• 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

http status 404 The requested resource is not available.

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

this is my first servlet.when i tried a simple servlet in webapps/ROOT i am able run it sucessfully.

But when i try same thing in a separete folder i gives me this error wt is the problem.

Servlet:webapps\HI\WEB-INF\classes
Web.xml:HI\WEB-INF

my XML


<servlet>
<servlet-name>log</servlet-name>
<servlet-class>login</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>log</servlet-name>
<url-pattern>/HI</url-pattern>
</servlet-mapping>


thanx in advance
[ June 16, 2006: Message edited by: Ramya reenu ]
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can u give the following details,
* Name of the servlet class and package
* Url that you tried after deploying the application
 
Ramya reenu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Name of the servlet class:login.java
Package:HI
Tomcat4.1

Url that you tried after deploying the application:http://192.168.111.24:8080/HI/login.jsp
 
Balasubramani Dharmalingam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://192.168.111.24:8080/HI/HI

Try this. Because u have given the "/HI" as url-pattern for login servlet.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

<servlet-class>login</servlet-class>


It appears your servlet is not in a package. This leads to all sorts of difficult to debug problems so you should adopt a policy of placing ALL classes used in servlets in a package and setting the references in web.xml accordingly.
Bill
 
Ramya reenu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am creating a new project so in webapps i created a folder as"HI"then in which i have "WEB-INF" it has classes and lib folder then a web.xml.

My project starting page is "login.jsp" in which i have use

<form action="http://192.168.111.24:8080/check" method=GET>

two text box and a submit button.

placed the class file in a package com\conn\jdbc login.class

in web.xml i have written as
<servlet>
<servlet-name>log</servlet-name>
<servlet-class>com.conn.jdbc.login</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>log</servlet-name>
<url-pattern>/check</url-pattern>
</servlet-mapping>

but still i am facing the problem
 
reply
    Bookmark Topic Watch Topic
  • New Topic