I'm taking URL handling problem as I wrote. I'm newbee at Spring, so I'm waiting your helps and patients.
When I try to launch http://localhost:8090/local/jsp/firstPage.htm or http://localhost:8090/local/firstPage.htm I can't launch my "firstPage.jsp" file which is under the "jsp" folder in the "WEB-INF" folder.
I'll be happy if someone helps me.
Thanks in advance.
Here's my congifuration files :
And my jsp page
Prasad Krishnegowda wrote:First, in your web.xml, you have mapped all the .htm requests to spring dispatcher servlet, in webmvc-servlet.xml, you have given *.htm, *.html, *.jsp and *.ajax to localcontroller, there is no way that other requests except *.htm invokes the webmvc-servlet.xml and in webmvc-servlet.xml, you cant have *.htm, you have to be specific..
OK, so what do you recommend to me? I want to map all .htm, .ajax, .jsp requests to localController. So should I remove .htm mapping from spring dispatcher servlet? Or?
Thanks in advance, I really need your helps.
With regards and greetings,
P:S: If you have any doubts you can post it here, we will try our level best to help you..
I use ajax requests because I develop web projects so I use many ajax requests, I need to catch them. For example when user click an item in the list, when I need to display its details I do this with an ajax request, etc. OK I can start with XML based configuration, so what is my mistake or absent in the configurations as I wrote above? Can you correct my configurations?
Prasad Krishnegowda wrote:In your web.xml, if you have mapped *.htm and *.ajax requests to spring dispatcher servlet.. In the dispatcher-servlet.xml, you should have specific mapping like, registration.htm and displayDetails.ajax and map those to their corresponding beans, this is what is missing in your configuration file, currently dispatcher-servlet has generic mappings like *.htm, *.ajax..
Thanks for your reply but I think I've configured it with declaring the bean internal path method name resolver 'localControllerMethodNameResolver'.
I don't want to declare each ajax or htm request individually.. So I used this method.. Isn't it true?