File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes invoking servlet through html in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "invoking servlet through html in eclipse" Watch "invoking servlet through html in eclipse" New topic
Author

invoking servlet through html in eclipse

payal Jain
Ranch Hand

Joined: Dec 20, 2007
Posts: 50
Hi,
I am trying to invoke servlet through html in eclipse where my form action in html is
<FORM ACTION="/MyTomcat/Coreservlet.threeparams">

MyTomcat is root folder,Coreservlet is folder inside WEB-INF/src & threeprams is class.
My html runs properly but when i submit page it gives 404 error.
Is there any mistake in the path i am giving.
please help me out..
Jeff Rummings
Ranch Hand

Joined: Dec 20, 2007
Posts: 42
Did you add your servlet to web.xml?



[ December 20, 2007: Message edited by: Arman Sharif ]
[ December 20, 2007: Message edited by: Arman Sharif ]
payal Jain
Ranch Hand

Joined: Dec 20, 2007
Posts: 50
thank you it worked.I dint registered my servlet in web.xml.
but why it is needed to register servlet in web.xml,although i am invoking it through html.OR Is it neccessary to register every servlet in xml file.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15665
    
  15

It is necessary to register every servlet. It didn't used to be that way, but there were serious security problems with that approach.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: invoking servlet through html in eclipse
 
Similar Threads
How to use Relative path for a servlet (Using Tomcat server)
directory structure
reading URL parameters in jsp
specifiying URI
servlet beginner confused