jQuery in Action, 3rd edition
The moose likes Other Application Frameworks and the fly likes Spring aware servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring aware servlets" Watch "Spring aware servlets" New topic

Spring aware servlets

K Aditi
Ranch Hand

Joined: Mar 17, 2008
Posts: 89
I have been developing jsps and servlets for past 7-8 months.That's how I got introduced to java.For the past 2 days I have started learning Spring...and I feel I am bogged down by terminologies like IoC and AOP. Could somebody explain me in layman's terms?My ultimate aim is to develop Web based Spring applications which employ Hibernate to interact with the database. To start with I tried to write Spring aware servlets. I wasn't successful.

I get the following exception:

I have put the interface file, implementation file, .xml file and the servlet file in the same package in WEB-INF
Is this the correct approach?
I am using JDK 6, Tomcat 6 and Spring 2.0

anuj patel

Joined: Jan 02, 2008
Posts: 10

This document Spring Framework contains all details about spring(IoC,AOP.

Thanks & Regards,
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Did you put the necessary JAR files in your WEB-INF/lib directory ?

[My Blog]
All roads lead to JavaRanch
K Aditi
Ranch Hand

Joined: Mar 17, 2008
Posts: 89
Yes I did.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Well most examples you will find on the web makes the use of SpringMVC and it's single DispatcherServlet to handle all requests, and not too much at all using your own Servlet. But Spring does have a Servlet class that you can extend and in the init method you would override and create/setup your ApplicationContext. I recommend using an ApplicationContext instead of a BeanFactory. An ApplicationContext is an extension of BeanFactory plus a bit more, and is how Spring apps are built today.

I don't remember the exact class name of the Spring Servlet class that you can extend. I think it might be this one


Anyway, I think it is much easier using SpringMVC instead of creating your own Servlets.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
K Aditi
Ranch Hand

Joined: Mar 17, 2008
Posts: 89
Thanks Mark!
I agree. Here's the link: http://aspose.com/file-tools
subject: Spring aware servlets
It's not a secret anymore!