Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

servlet compilations

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you need to write them in your web.xml file first.

Dave
 
anshu sahai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic