The servlet receives POST requests containing xml documents that describe
operations like "add-something-to-db" / "retrieve-something-from-db" /
"sync-time-with-server".
The servlet parses these xmls, fullfills the requests and responds with an
xml document containing either error codes or some info that was requested.
The servlet needs access to daos that the web application uses to fulfill
most of these requests.
Theres no GUI/Web GUI involved with this servlet. So it doesn't need to
redirect to or show any web pages.

I looked at "Controller" but it seems that if i use it i have to respond
with some ModelAndView object to requests...


On Sat, May 29, 2010 at 3:41 PM, James Carman <[email protected]>wrote:

> What are these other servlets doing?  Perhaps you could implement the
> functionality using Spring-WebMVC and just implement a "controller"?
> Then, Spring manages the "servlets" (they're actually beans that act
> like servlets and Spring dispatches to them) and you can have all your
> cool dependency injection, etc. from Spring.
>
> On Sat, May 29, 2010 at 8:11 AM, Sam Zilverberg <[email protected]>
> wrote:
> > I can't reach my daos in any other way but using
> > ApplicationContext context =
> > WebApplicationContextUtils.getWebApplicationContext(getServletContext());
> >
> > I've tried using some spring annotations and <context:annotation-config
> />
> > to autowire these daos into the servlet.
> > When not using @Qualifier spring would fail at startup telling me that
> I'm
> > not specific enough and that there are 20 more beans of that type "IDAO"
> > which is correct.
> > when using @Qualifier spring does not fail at startup but doesn't
> > successfully inject the dao - I get Null instead of the dao.
> >
> > Then I've tried using only xml config approach - defining the servlet as
> a
> > bean in applicationContext.xml and referencing its dao property to the
> > correct bean prop.
> > Again i get Null instead of the dao.
> >
> > I've tried googling for a solution but couldn't find one. I only learned
> > that the problem is probably that the servlet is outside of the web
> > application context so it can't reach
> > beans defined in it by simple xml property ref config.
> >
> > This isn't wicket specific problem, but any help as to how I can use a
> > xml/annotation configuration instead of directly setting the daos in the
> > servlet's init() would be greatly appreciated!
> >
> > Thanks
> > -Sam
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to