This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Context Loader problem : IllegalStateException

 
Ashish Agre
Ranch Hand
Posts: 73
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the following error
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well it says


What does your web.xml look like?
 
Ashish Agre
Ranch Hand
Posts: 73
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now it says...

 
Ashish Agre
Ranch Hand
Posts: 73
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My web.xml :

 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would definitely take a look at some spring tutorials examples to get you started. Typically your web.xml would look something more like this:

https://github.com/SpringSource/spring-mvc-showcase/blob/master/src/main/webapp/WEB-INF/web.xml

If you wanted to use java config things would be a little different but I am not sure which route you are going. Notice a couple important differences from what is in the link and what you have.

1. You are missing the ContextLoaderListener
2. You are not defining a ContextConfig for spring to bootstrap
3. Your dispatcher servlet mapping is typically / (your jsp's are mapped via view resolvers from the controllers handler mappings, see the same link for examples)
 
Ashish Agre
Ranch Hand
Posts: 73
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to the Spring Framework and don't know any thing about it.
I know servlets & jsps but Spring is completely new to me.
I found lots of working examples but each examples configuration is different from other and i am stuck in finding which is the right one?
Kindly guide me in right direction.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I can help you with a specific problem but Spring is a big subject to teach in a forum post. Here is what I would do:

1. search this forum for 'Spring Book' or 'Learning Spring' to get a bunch of ideas of where to start as these questions have been answered many times.
2. Search google for 'spring tutorials' or 'spring examples'. Try to use examples that are Spring 3 or later if possible. Googling around for some basic hello world type stuff I found these:
http://www.mkyong.com/spring3/spring-3-mvc-hello-world-example/
http://www.giantflyingsaucer.com/blog/?p=2395
3. Check out the spring reference documentation it is really well written and probably the best single source of information out there. If you supplement it with a book like 'Spring in Action 3rd Edition' you will be well on your way.
4. Post back to this forum if you run into specific problems or questions and I am sure somebody will help you

Good Luck,
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic