This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 15632
    
  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
specifiying URI
How to use Relative path for a servlet (Using Tomcat server)
directory structure
servlet beginner confused
reading URL parameters in jsp