thanks for your advice but i've still the same error.
i've a page index.jsp that contain an iframe.
when i click on my link, i submit a form with the url : user/createUser.jsp (that's the src of my iframe)
Yeah. I thought he wouldn't need it based on what was posted. But reading the log, there is a lot that was not posted. There was a lot more to the configurations, classes, etc. And since it wasn't posted that he had Services and other beans that would be needed in other Controllers etc, I assumed what he posted was all that was in his app.
But, if you look at the log line right above the stack trace, like line 120, it says
GRAVE: No WebApplicationContext found: no ContextLoaderListener registered?
Mark
fabian verbeek
Ranch Hand
Joined: Oct 20, 2012
Posts: 52
posted
0
thanks for your replies.
but what is the difference whit <listener-class> and my <servlet-class> ? where do i put the tag listener?
Here is my complete web.xml
thanks again for your help to a noob ;-)
fabian verbeek
Ranch Hand
Joined: Oct 20, 2012
Posts: 52
posted
0
Someone has an idea to help me?
maybe it comes from my url-pattern in web.xml but as i'm new, i've a lot of difficult to map correctly.
Is it correct this to intercept the url from my index.jsp that submit a form
And someone has a good tutorial to learn spring and form with sample that works to understand better.
here is the 2 samples i used but it doesn't work.
Difference is two different ApplicationContexts created. One to store your middle tier beans, and one for your web tier beans. The servlet-class is for your web-tier beans. Controllers, ViewResolvers. the listener class creates an ApplicationContext for your middle tier beans and gets stored in the ServletContext for all Servlets to get access to it, including all your web tier beans.
In your web.xml you have a servlet-class to create an ApplicationContext for your middle tier beans that won't be accessable by your two other DispatcherServlet. That one should be with the listener-class ContextLoaderListener.
On another note. this is one web application. So you only need one DispatcherServlet in the web.xml and servlet mapping to all URLs for your application. The more specific distinct URLs are then mapped to Controller methods with your @RequestMapping in your Controllers.
I recommend you pick up a copy of Spring In Action 3rd edition, or the Spring documentation. Be careful of tutorials/blog posts because they tend to show bad practices, use older styles and are sometimes just wrong.
Good Luck
Mark
fabian verbeek
Ranch Hand
Joined: Oct 20, 2012
Posts: 52
posted
0
thanks for your help, i downloaded the pdf spring in action 3rd edition.
So i change my code but i've an error404 with this log error:
Here is the link i call :
my web.xml:
my creationUser.xml
and my controller:
my class User
and finally my mapge createUser.jsp that is under user/
i suppose it's a silly mistake but i can't find.
thanks to unblock me
fabian verbeek
Ranch Hand
Joined: Oct 20, 2012
Posts: 52
posted
0
I can do a sample that work and my mistake was the value of my @RequestMapping (my file is under the directory user.
it works with an hyperlink to the address /user/createUser.jsp but how can i do with a frame (createUSer.sjp) include in my index.jsp