Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat6.0+eclipse 3.3

 
Sree Kumari
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

A simple servlet with a form post <form method="POST" action="http://localhost:8080/ServletDemos/LoginServlet"> with
servlet mapping in web.xml as follows.
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>demo.basics.LoginServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>/LoginServlet</url-pattern>
</servlet-mapping>
It is handled using doPost()

I am trying to work in eclipse europa+tomcat6.0

I tried enabling the invoker but still unable to execute one.
shows 404 The requested resource (/LoginServlet) is not available.

All get requests work perfectly well


I had been stuck up with this very basics
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sree Vidya wrote:I tried enabling the invoker


Why? Dont do this. How did you deploy into tomcat?
 
Sree Kumari
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to run servlet using eclipse's run at server option only
 
Nandita Yerramareddy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check if your application server is working fine by providing the localhost:portnumber in the browser.

If it works fine then I guess there is some problem in your application.

If it doesnt then right click on your server and go to open-- check for the server location in the overview and see if "Use Tomcat installion...." is checked, if it is not checked , check it and deploy your application again, should work.

If that check box is not enabled, then stop your server, remove all the projects on the server, rt click and publish. Once you publish, it will automatically enable and you can check it.

Try this out.. hope it works.
 
Sree Kumari
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you,It worked Nandita
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic