Search:

Type: Posts; User: Hamidam; Keyword(s):

Search: Search took 0.02 seconds.

  1. How to define a Spring bean using annotation instead of XML?

    <bean id="bootstrap" class="com.package.Bootstrap"></bean>

    this works fine. The bootsrap class :

    public class Bootstrap {

    @PostConstruct
    public void onServerStart() {
    ...
  2. I am experiencing the same issue ! I am on spring...

    I am experiencing the same issue ! I am on spring mvc 3.06.

    I should also say that implementing InitializingBean doesnt work either for some reason. afterPropertiesSet is not being fired ...
  3. Nope, this is what I have:

    Nope, this is what I have:


    <?xml version='1.0' encoding='utf-8'?>
    <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements. See the NOTICE...
  4. import javax.servlet.http.HttpServletRequest; ...

    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;

    import org.springframework.web.servlet.ModelAndView;
    import...
  5. Not sure if I have, what setting are you thinking...

    Not sure if I have, what setting are you thinking about? We have a create-app script that have some default configuration files set up, so it might/should already be configured.

    Any link to some...
  6. Replies
    5
    Views
    1,846

    You can configure one for each exception type for...

    You can configure one for each exception type for that code:


    Exception HTTP Status Code
    ConversionNotSupportedException 500 (Internal Server Error)
    HttpMediaTypeNotAcceptableException 406 (Not...
  7. Replies
    5
    Views
    1,846

    You woldnt define a 404 in web.xml for what you...

    You woldnt define a 404 in web.xml for what you are trying to achieve. the 404 is the global, dispatcher independent.

    To do what you want, that is override the default 404 when one of your...
  8. So, could you show me an example, because this...

    So, could you show me an example, because this thread suggests something else:

    http://stackoverflow.com/questions/6022980/how-can-i-create-a-url-based-on-controller-and-action-method-in-spring-mvc...
  9. Yes, I believe a 404 is the way to go... i...

    Yes, I believe a 404 is the way to go... i believe it is only the 404 that requires this type of special handling...
  10. That doesnt work either. Exact same behaviour...

    That doesnt work either. Exact same behaviour when going for a controller that does not exist. It only works for non-existing action in a controller that does exist.

    I also tried with implementing...
  11. Showing an error occurred view on exception or 404

    which works fine for all exeptions occuring under core url.
    I have


    @Controller(value="core/*")
    public class CoreController {

    public static String exceptionOccurredView =...
  12. spring:url to controller and action with params

    Is there a way to link to a controller and action from within a view using c:url or spring:url ?
  13. Yes, I know I can, but that is not what I want to...

    Yes, I know I can, but that is not what I want to do :)

    The correct import is:

    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

    Why is it so hard to figure this kind of stuff...
  14. Thanks for the help. That url tag worked. However...

    Thanks for the help. That url tag worked. However now I am having issues with linking to another controller and action.
    Using the same tag, results in the baseurl being wrong. With:

    <spring:url...
  15. Hot reload not really reloading, forced to restart

    I have heard from some Java folks, the argument that JEE and Spring now I very productive because you rarely have to restart your server anymore. I haven't seen the light of that.

    I am using...
  16. Action method parameters, how many, and what are they?

    How can I know what parameters an action can take and return?

    As of now, I know of

    someAction(HttpServletResponse response, HttpServletRequest request, Model model)...

    is there any more?...
  17. Replies
    1
    Views
    153

    Accessing params equivalent in spring

    Is there a global object equavalent of params in spring mvc or do I have to resort to request.getParameter(...) ?
  18. Hmm ... where can I find this kind of info in the...

    Hmm ... where can I find this kind of info in the spring documentation ?

    http://static.springsource.org/spring/docs/current/spring-framework-reference/html/spring-web.html

    How can I know what...
  19. But now I still have problems with linking to a...

    But now I still have problems with linking to a css file... which usually are outside of the web-inf directory, right?

    A link:

    <link rel="stylesheet" href="webspring/public/main.css"...
  20. It appears that this happens if your gsp is not...

    It appears that this happens if your gsp is not in the WEB-INF folder, but outside but in WebContent... any idea why? The jsp's cant be outside? Or shouldnt?

    Thanks!
  21. PageNotFound - No mapping found for HTTP request with URI

    I am getting this error :

    o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI

    when I try to render a view from an controller/action

    I've read about it being that...
  22. Jeezes, really, no way ? One would think moving...

    Jeezes, really, no way ? One would think moving to Spring, it should be mature enough to support the most basic stuff by now...
  23. Jeezes, really, no way ? One would think moving...

    Jeezes, really, no way ? One would think moving to Spring, it should be mature enough to support the most basic stuff by now...
  24. Spring MVC 3.0.6 Getting hold of the controller and action name

    See:
    http://stackoverflow.com/questions/9807584/spring-mvc-3-0-6-getting-hold-of-the-controller-and-action-name/9807721#comment12491303_9807721



    Question:
    ================
    Is there a way to...
  25. Spring MVC 3, Interceptor on all excluding some defined paths

    See:

    http://stackoverflow.com/questions/9908124/spring-mvc-3-interceptor-on-all-excluding-some-defined-paths/9924850#9924850

    Question:

    =========
    Is it possible to apply an interceptor to...
Results 1 to 25 of 25