Hey everyone,

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

i used maven to build the project,and it worked fine before i tried to add a
jsp file.

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>
**********************************************

my pom.xml looks like this:

<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.cellusys.test</groupId>
  <artifactId>LoginApp</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>LoginApp</name>
  <url>http://localhost:8080/LoginApp</url>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.0</version>
<!--        <configuration>
          <webResources>
            <resource>
              <directory>resource2</directory>
            </resource>
          </webResources>
         </configuration>
-->       </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
        <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>2.4</version>
        </dependency>
        <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <version>2.0</version>
        </dependency>
</dependencies>
</project>

************************************

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 
-- 
View this message in context: 
http://www.nabble.com/web-application-problem%2C-using-maven%2Ceclipse-and-tomcat.-%28beginner..%29-tf4103343s177.html#a11669001
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to