Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

creating jsp pages using tomcat, web.xml problems,i think!
(beginner)

pinky88

2007-07-18

Replies:


Hey everyone,

I'm not sure if I'm in the right place to ask about JSPs but I'm using the
tomcat 5.5.27 container and i cannot access my webapp on it. ( described
below)

I'm trying to create a simple login webapp which has a html form -
loginForm.html, a servlet called LoginApp, and a jsp file called
welcome.jsp. i'm trying to use a request dispatcher to follow the welcome
page from the servlet when the correct values are entered for username and
password.

However, I cannot get anything to run on tomcat..

In an old servlet (deployed from a war file) , i can access contents from
http://localhost:8080/MyWebApp-1.0-SNAPSHOT/


The current one is again deployed from a war file but when i try to access
it via http://localhost:8080/LoginApp-1.0-SNAPSHOT/

i get the following error:

HTTP Status 404 - /LoginApp-1.0-SNAPSHOT/

type Status report

message /LoginApp-1.0-SNAPSHOT/

description The requested resource (/LoginApp-1.0-SNAPSHOT/) is not
available.
Apache Tomcat/5.5.23

my web.xml looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  version="2.4">

 <servlet>
 <servlet-name>login</servlet-name>
 <servlet-class>com.cellusys.test.LoginApp
 </servlet-class>
</servlet>
<servlet-mapping>
 <servlet-name>login</servlet-name>
 <url-pattern>/login</url-pattern>
</servlet-mapping>
<servlet>
 <servlet-name>welcome</servlet-name>
 <jsp-file>/welcome.jsp
 </jsp-file>
</servlet>
<servlet-mapping>
 <servlet-name>welcome</servlet-name>
  <url-pattern>/welcome</url-pattern>
</servlet-mapping>


I probably need something else.. as I haven't mentioned the form, but in the
previous one it wasn't necessary.

I'm new to all of this Google isn't helping much, i've made any changes I
can find that should work but they don't..

Thanks in advance :)
Pinky
--
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.