• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlets problem

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 250
Python Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic