aspose file tools*
The moose likes Servlets and the fly likes Invoke Servlet Without changing web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Invoke Servlet Without changing web.xml" Watch "Invoke Servlet Without changing web.xml" New topic
Author

Invoke Servlet Without changing web.xml

Pankaj Patel
Ranch Hand

Joined: Jul 13, 2006
Posts: 73
Hello 2 All.

I am supposed to change a one jsp with is submitted to one servlet. Now i don't have right to change web.xml and register servlet. They told me to invoke servlet directly.

My Servlet Package : cyberoam.whitepapers.servlets;
And my context : cyberoam
Tomcat : 5.5 installed on 10081 port

so i am able to run my application on local machine using follwing url.

http://cyberoam:10081/jsp/whitepapers/whitepapers.jsp

Problem occur when i submit whitepapers.jsp
The form tag of this jsp is as follows.


Error :
Address bar : http://cyberoam:10081/cyberoam/servlet/cyberoam.whitepapers.servlets.WhitePaperInfoServlet

Error Description:
HTTP Status 404 - /cyberoam/servlet/cyberoam.whitepapers.servlets.WhitePaperInfoServlet

--------------------------------------------------------------------------------

type Status report

message /cyberoam/servlet/cyberoam.whitepapers.servlets.WhitePaperInfoServlet

description The requested resource (/cyberoam/servlet/cyberoam.whitepapers.servlets.WhitePaperInfoServlet) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.7



So could any one please tell me how to resolve this problem?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Please use real words when posting to the forums. Using "2" rather than "to" only makes your posts harder to read.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You can not invoke servlets directly in Tomcat 5x.
Tomcat does have an invoker but it has been disabled for years.
For more information, see:
http://faq.javaranch.com/view?InvokerServlet


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
Nice story the invoker servlet. I'm convinced not to use it.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Invoke Servlet Without changing web.xml
 
Similar Threads
HTTP Status 404 servlet error ("The requested resource is not available")
HELP !! My First Servlet can't work with Tomcat
The requested resource is not available
Help to find the error.
Simple j_security_check example not working