Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets problem

 
dinesh sundaram
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I am trying to run a servlet using Netbeans. My local host directory maps to
C:\ Documents and Settings\dinesh\ .netbeans\ 3.4\ sampledir.
I have placed the .class file in the C:\ Documents and Settings\dinesh\ .netbeans\ 3.4\ sampledir \WEB-INF\classes.
When I tried to call the servelts from the browser with http://localhost:8081/ValidateMyLogin I am gettting “The requested resource (/ValidateMyLogin) is not available.”
Please give your valuable suggestion.
Thanks in advance
Dinesh
 
Andy Bowes
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you included a servlet mapping entry in the web.xml file for the ValidateMyLogin URL ?
e.g.
<servlet>
<servlet-name>ValidateMyLogin</servlet-name>
<servlet-class>com.mypackage.ValidateMyLogin</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ValidateMyLogin</servlet-name>
<url-pattern>/ValidateMyLogin</url-pattern>
</servlet-mapping>
 
dinesh sundaram
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi andy,
Thanks for your suggestion.
i included the servlet mapping in the web.xml file in the C:\ Documents and Settings\dinesh\ .netbeans\ 3.4\ sampledir \WEB-INF\web.xml...
when i tried to access the servlets still i am getting the same error ...do i need to add the servlet mapping in differr{��xplace...
~dinesh
 
Debashish Chakrabarty
Ranch Hand
Posts: 231
Firefox Browser Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dinesh,
I also use Netbeans and it seems the path you have mentioned is used by netbeans for keeping sample files/settings. This would not be your actual working directory with Netbeans.
Look for the netbeans directory on your machine. For example on my machine netbeans is installed at c:/netbeans. Create your web-applications in the proper installation directory and things will work
HTH
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic