It looks like you've configured one .war per servlet.Have you replaced some of the old config with some new stuff in the login app?
If you were able to request the URL '/LoginApp' there should probably be a file called LoginApp.war, which would need to contain some more config in it's web.xml than you have posted.
p pinky88 wrote:
Thanks everyone for the replies, Um forgot to mention that I'm using Maven to build the project, so I have a pom.xml file, and the web.xml. /login is for a form. /LoginApp shows a servlet which may use the info from the form.. I think.. Ok I'm extremely new to this Maven/Tomcat stuff, two weeks.. Last week i started a hello world app and my cousin helped me to finish it (I had no web.xml and hadn't it deployed), I'm learning all this for some possible work experience in my cousin's programming company for the rest of the summer. The only programming I've done before are pretty basic java programs that I've learned in university (i'm studying computer science,just finished 1st year) so I hope some of that explains why some of my questions ,and generalised answers to your questions may sound so stupid!! ;) I do not know what tomcat logs are.. but i posted the message i got just after I was asked for them.. I followed the basic structure of the hello world app already deployed.. I'll post the pom.xml and the web.xml of both the hello world app and the login one, and maybe you'll understand why I've got both /login and /LoginApp. For the hello world app: pom.xml: <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>MyWebApp</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>MyWebApp</name> <url>http://localhost:8080/MyWebApp</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> web.xml: <?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>helloworld</servlet-name> <servlet-class>com.cellusys.test.HelloWorldServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>helloworld</servlet-name> <url-pattern>/sayMyName</url-pattern> </servlet-mapping> </web-app> For the login app: pom.xml: <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> web.xml: <?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> </web-app> ...When the HelloWorld app was deployed using the previously mentioned pom.xml and web.xml, it worked. The /MyWebApp showed the hello world message. The /sayMyNameBitch (excuse the language,my cousin was joking ;]) shows a form asking for a name, and then i changed the servlet to print"hello <name submitted in form>".I hope this makes things clearer as regards having the two URLs.. Thanks, Karen Caldarale, Charles R wrote:From: pinky88 [mailto:[EMAIL PROTECTED] Subject: Re: How to deploy a web app on tomcat.. help needed plz.. :)<?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> </web-app>That defines a class name, not a webapp name. Since you seem to be deploying from a .war file, what is the name of that .war file and where exactly did you put it? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
smime.p7s
Description: S/MIME Cryptographic Signature