GeeCON Prague 2014*
The moose likes IDEs, Version Control and other tools and the fly likes servlet compilations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "servlet compilations" Watch "servlet compilations" New topic
Author

servlet compilations

anshu sahai
Greenhorn

Joined: Jun 01, 2006
Posts: 6
Hello Can Any one help me plz?
I have configured my eclipse,i am able to run the jsp programs through eclipse using tomcat server.
But i am not able to run the servlets.
When i press compile button,its not giving any error,but when i am looking for output ,it says 404 error.

Do i need to write my servlet class and mapping information manually in the web.xml.

I dont know what i am missing.

Plz help me

Thanks
Anshu
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Yes, you need to write them in your web.xml file first.

Dave
anshu sahai
Greenhorn

Joined: Jun 01, 2006
Posts: 6
Dave..

Do we need to write manually or when we compile the servlets will it automatically takes care of it.

Can you plz expain step by step what i need to do to compile and run servlets.

Thanks
Anshu
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
you need to explicitly add the servlet to your webapp configuration.
Some IDEs and appservers may offer facilities to do that for you through some dialog box, but often you'll have to manually edit the web.xml yourself.
Any halfway decent tutorial or book will tell you how to do that, you should really read some to get to know what you're doing.


42
Mouly Kumaraswamy
Greenhorn

Joined: Apr 17, 2006
Posts: 23
I don't about Eclipse, but WSAD (based on Eclipse 2.1) comes with a graphical editor for web.xml. Use it if Eclipse come with a DD editor.


SCJP 1.4 SCWD 1.4
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Personally, I think you're better off learning how to write, compile, deploy, and debug servlets without an IDE when you're starting out.

Since this question is more about 'deploying from within Eclipse' I'll move this to the IDE forum where you're likely to get better help.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
GeeCON Prague 2014
 
subject: servlet compilations