This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes call another servlet in a web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "call another servlet in a web application" Watch "call another servlet in a web application" New topic
Author

call another servlet in a web application

Nada Bajnaid
Ranch Hand

Joined: Aug 14, 2011
Posts: 45
I have two servlets in my web application (SQAES) this is the name of my java web app.

1) the main servlet: SQAServlet (in the package SQA.Learning.System)
it has @WebServlet ("/SQASystem")

2) LOServlet (in tha package RelatedLOs)
I did not use @WebServlet in this servlet

The doPost method of the SQAServlet calls the LOServlet.
I tried different ways to handle this but I got the following error

The requested resource not available


these are the ways I tried to call the LOServlets:

any suggestions where I'm wrong?
Nada Bajnaid
Ranch Hand

Joined: Aug 14, 2011
Posts: 45
Thanks I solve it
I add @WebServlet to the LOServlet
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: call another servlet in a web application