wood burning stoves*
The moose likes Servlets and the fly likes Servlets problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets problem" Watch "Servlets problem" New topic
Author

Servlets problem

dinesh sundaram
Greenhorn

Joined: Jul 09, 2002
Posts: 11
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

Joined: Jan 14, 2003
Posts: 171
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>


Andy Bowes<br />SCJP, SCWCD<br />I like deadlines, I love the whoosing noise they make as they go flying past - Douglas Adams
dinesh sundaram
Greenhorn

Joined: Jul 09, 2002
Posts: 11
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

Joined: May 14, 2002
Posts: 230

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


Debashish
SCJP2, SCWCD 1.4, PMP, ITIL Foundation
 
GeeCON Prague 2014
 
subject: Servlets problem