You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by pinky88 <fo...@tcd.ie> on 2007/07/16 21:38:56 UTC

How to deploy a web app on tomcat.. help needed plz.. :)

Hi,

I'm trying to deploy a web application on tomcat 5.5.23 but I'm not exactly
sure how to do so (beginner).

I've copied the war file and archive into the webapp directory but i'm
getting a message saying the requested resource is not available.

I previously had another web app deployed but with the help of my cousin so
i'm not entirely sure what he did, this was still running fine with tomcat
until I put my new war file into webapp, now I am getting the same message
ass above for this application too.

Does tomcat only allow one web application war file into the webapp
directory at a time maybe???

Thanks in advance for replies,

Pinky
-- 
View this message in context: http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-plz..-%3A%29-tf4090702.html#a11629510
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by David kerber <dc...@verizon.net>.
What are you typing into the browser to access this app?  Your error 
message says "LoginApp" wasn't found, but here your servlet is named 
"login".  Try using "login" in your URL instead of LoginApp.


pinky88 wrote:
> yup i have it defined in a web.xml in the WEB-INF folder.. my web.xml is as
> follows:
>
> <?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>
>
>
> Perhaps I've done something wrong with this, I copied from the web
> application that my cousin deployed for me, and changed the servlet name and
> pattern..?
>
> Thanks,
> Pinky
>
>
>
>
>
>
>
> David Kerber wrote:
>   
>> Do you have the LoginApp servlet defined in web.xml or another 
>> equivalent place?
>>
>>
>> pinky88 wrote:
>>     
>>> HTTP Status 404 - /LoginApp
>>>
>>> type Status report
>>>
>>> message /LoginApp
>>>
>>> description The requested resource (/LoginApp) is not available.
>>> Apache Tomcat/5.5.23
>>>
>>>
>>>
>>> Asensio, Rodrigo wrote:
>>>   
>>>       
>>>> Pinki, please post the entire tomcat log here. 
>>>>
>>>> -----Original Message-----
>>>> From: pinky88 [mailto:fordeka@tcd.ie] 
>>>> Sent: Monday, July 16, 2007 3:39 PM
>>>> To: users@tomcat.apache.org
>>>> Subject: How to deploy a web app on tomcat.. help needed plz.. :)
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I'm trying to deploy a web application on tomcat 5.5.23 but I'm not
>>>> exactly sure how to do so (beginner).
>>>>
>>>> I've copied the war file and archive into the webapp directory but i'm
>>>> getting a message saying the requested resource is not available.
>>>>
>>>> I previously had another web app deployed but with the help of my cousin
>>>> so i'm not entirely sure what he did, this was still running fine with
>>>> tomcat until I put my new war file into webapp, now I am getting the
>>>> same message ass above for this application too.
>>>>
>>>> Does tomcat only allow one web application war file into the webapp
>>>> directory at a time maybe???
>>>>
>>>> Thanks in advance for replies,
>>>>
>>>> Pinky
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-pl
>>>> z..-%3A%29-tf4090702.html#a11629510
>>>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>> This message (including any attachments) contains confidential
>>>> and/or proprietary information intended only for the addressee.
>>>> Any unauthorized disclosure, copying, distribution or reliance on
>>>> the contents of this information is strictly prohibited and may
>>>> constitute a violation of law.  If you are not the intended
>>>> recipient, please notify the sender immediately by responding to
>>>> this e-mail, and delete the message from your system.  If you
>>>> have any questions about this e-mail please notify the sender
>>>> immediately.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>     
>
>   



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by "Asensio, Rodrigo" <ro...@gilbarco.com>.
Do you have the real class inside %YOUR_WEBAPP%/WEB-INF/classes or lib ?


-----Original Message-----
From: pinky88 [mailto:fordeka@tcd.ie] 
Sent: Monday, July 16, 2007 4:11 PM
To: users@tomcat.apache.org
Subject: Re: How to deploy a web app on tomcat.. help needed plz.. :)


yup i have it defined in a web.xml in the WEB-INF folder.. my web.xml is
as
follows:

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


Perhaps I've done something wrong with this, I copied from the web
application that my cousin deployed for me, and changed the servlet name
and pattern..?

Thanks,
Pinky







David Kerber wrote:
> 
> Do you have the LoginApp servlet defined in web.xml or another 
> equivalent place?
> 
> 
> pinky88 wrote:
>> HTTP Status 404 - /LoginApp
>>
>> type Status report
>>
>> message /LoginApp
>>
>> description The requested resource (/LoginApp) is not available.
>> Apache Tomcat/5.5.23
>>
>>
>>
>> Asensio, Rodrigo wrote:
>>   
>>> Pinki, please post the entire tomcat log here. 
>>>
>>> -----Original Message-----
>>> From: pinky88 [mailto:fordeka@tcd.ie]
>>> Sent: Monday, July 16, 2007 3:39 PM
>>> To: users@tomcat.apache.org
>>> Subject: How to deploy a web app on tomcat.. help needed plz.. :)
>>>
>>>
>>> Hi,
>>>
>>> I'm trying to deploy a web application on tomcat 5.5.23 but I'm not 
>>> exactly sure how to do so (beginner).
>>>
>>> I've copied the war file and archive into the webapp directory but 
>>> i'm getting a message saying the requested resource is not
available.
>>>
>>> I previously had another web app deployed but with the help of my 
>>> cousin so i'm not entirely sure what he did, this was still running 
>>> fine with tomcat until I put my new war file into webapp, now I am 
>>> getting the same message ass above for this application too.
>>>
>>> Does tomcat only allow one web application war file into the webapp 
>>> directory at a time maybe???
>>>
>>> Thanks in advance for replies,
>>>
>>> Pinky
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-neede
>>> d-pl
>>> z..-%3A%29-tf4090702.html#a11629510
>>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>>
>>>
>>> --------------------------------------------------------------------
>>> - To start a new topic, e-mail: users@tomcat.apache.org To 
>>> unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>> This message (including any attachments) contains confidential 
>>> and/or proprietary information intended only for the addressee.
>>> Any unauthorized disclosure, copying, distribution or reliance on 
>>> the contents of this information is strictly prohibited and may 
>>> constitute a violation of law.  If you are not the intended 
>>> recipient, please notify the sender immediately by responding to 
>>> this e-mail, and delete the message from your system.  If you have 
>>> any questions about this e-mail please notify the sender 
>>> immediately.
>>>
>>> --------------------------------------------------------------------
>>> - To start a new topic, e-mail: users@tomcat.apache.org To 
>>> unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

--
View this message in context:
http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-pl
z..-%3A%29-tf4090702.html#a11630045
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately. 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by ben short <be...@benshort.co.uk>.
Karen,

If your using maven 2 then it should be dead easy. Assuming you have
maven 2 setup on your system follow the example given here [1]. This
will create a war file artifact with a simple jsp and the web.xml. The
last goal mvn package will create you a war file.

I suggest that you give it ago and then analyse whats files are in the war file.

You can deploy the war as shown in one of the links provided by others
in this thread. I prefer the tomcat manager webapp myself.

Sorry to the Tomcat guys if this is off topic but maybe it might help
her understand the layout of the war file and she can build on it from
there.

[1] http://maven.apache.org/guides/mini/guide-webapp.html

On 7/16/07, Caldarale, Charles R <Ch...@unisys.com> wrote:
> > From: pinky88 [mailto:fordeka@tcd.ie]
> > Subject: RE: How to deploy a web app on tomcat.. help needed plz.. :)
>
> I would recommend cleaning up your examples before posting.  This is an
> international, multi-cultural, multi-gender mailing list, and you (or
> your cousin's) attempts at humor are completely inappropriate.
>
> > I do not know what tomcat logs are..
>
> Try looking in the aptly named "logs" directory...
>
> > I'll post the pom.xml
>
> Irrelevant - that has meaning to maven, not Tomcat.
>
> You still haven't answered the questions you were asked:
>
> 1) What's in the logs?
>
> 2) What's the name of your new .war file?
>
> 3) Where did you put your new .war file?
>
> 4) Do you have the real class inside %YOUR_WEBAPP%/WEB-INF/classes or
> lib?
>
> 5) What are you typing into the browser to access this app?
>
>  - 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: pinky88 [mailto:fordeka@tcd.ie] 
> Subject: RE: How to deploy a web app on tomcat.. help needed plz.. :)

I would recommend cleaning up your examples before posting.  This is an
international, multi-cultural, multi-gender mailing list, and you (or
your cousin's) attempts at humor are completely inappropriate.

> I do not know what tomcat logs are..

Try looking in the aptly named "logs" directory...

> I'll post the pom.xml

Irrelevant - that has meaning to maven, not Tomcat.

You still haven't answered the questions you were asked:

1) What's in the logs?

2) What's the name of your new .war file?

3) Where did you put your new .war file?

4) Do you have the real class inside %YOUR_WEBAPP%/WEB-INF/classes or
lib?

5) What are you typing into the browser to access this app?

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by Pid <p...@pidster.com>.
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:fordeka@tcd.ie] 
>>> 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: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
> 


RE: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by pinky88 <fo...@tcd.ie>.
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>/sayMyNameBitch</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:fordeka@tcd.ie] 
>> 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-plz..-%3A%29-tf4090702.html#a11630759
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: pinky88 [mailto:fordeka@tcd.ie] 
> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by pinky88 <fo...@tcd.ie>.
yup i have it defined in a web.xml in the WEB-INF folder.. my web.xml is as
follows:

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


Perhaps I've done something wrong with this, I copied from the web
application that my cousin deployed for me, and changed the servlet name and
pattern..?

Thanks,
Pinky







David Kerber wrote:
> 
> Do you have the LoginApp servlet defined in web.xml or another 
> equivalent place?
> 
> 
> pinky88 wrote:
>> HTTP Status 404 - /LoginApp
>>
>> type Status report
>>
>> message /LoginApp
>>
>> description The requested resource (/LoginApp) is not available.
>> Apache Tomcat/5.5.23
>>
>>
>>
>> Asensio, Rodrigo wrote:
>>   
>>> Pinki, please post the entire tomcat log here. 
>>>
>>> -----Original Message-----
>>> From: pinky88 [mailto:fordeka@tcd.ie] 
>>> Sent: Monday, July 16, 2007 3:39 PM
>>> To: users@tomcat.apache.org
>>> Subject: How to deploy a web app on tomcat.. help needed plz.. :)
>>>
>>>
>>> Hi,
>>>
>>> I'm trying to deploy a web application on tomcat 5.5.23 but I'm not
>>> exactly sure how to do so (beginner).
>>>
>>> I've copied the war file and archive into the webapp directory but i'm
>>> getting a message saying the requested resource is not available.
>>>
>>> I previously had another web app deployed but with the help of my cousin
>>> so i'm not entirely sure what he did, this was still running fine with
>>> tomcat until I put my new war file into webapp, now I am getting the
>>> same message ass above for this application too.
>>>
>>> Does tomcat only allow one web application war file into the webapp
>>> directory at a time maybe???
>>>
>>> Thanks in advance for replies,
>>>
>>> Pinky
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-pl
>>> z..-%3A%29-tf4090702.html#a11629510
>>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>> This message (including any attachments) contains confidential
>>> and/or proprietary information intended only for the addressee.
>>> Any unauthorized disclosure, copying, distribution or reliance on
>>> the contents of this information is strictly prohibited and may
>>> constitute a violation of law.  If you are not the intended
>>> recipient, please notify the sender immediately by responding to
>>> this e-mail, and delete the message from your system.  If you
>>> have any questions about this e-mail please notify the sender
>>> immediately.
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-plz..-%3A%29-tf4090702.html#a11630045
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by David kerber <dc...@verizon.net>.
Do you have the LoginApp servlet defined in web.xml or another 
equivalent place?


pinky88 wrote:
> HTTP Status 404 - /LoginApp
>
> type Status report
>
> message /LoginApp
>
> description The requested resource (/LoginApp) is not available.
> Apache Tomcat/5.5.23
>
>
>
> Asensio, Rodrigo wrote:
>   
>> Pinki, please post the entire tomcat log here. 
>>
>> -----Original Message-----
>> From: pinky88 [mailto:fordeka@tcd.ie] 
>> Sent: Monday, July 16, 2007 3:39 PM
>> To: users@tomcat.apache.org
>> Subject: How to deploy a web app on tomcat.. help needed plz.. :)
>>
>>
>> Hi,
>>
>> I'm trying to deploy a web application on tomcat 5.5.23 but I'm not
>> exactly sure how to do so (beginner).
>>
>> I've copied the war file and archive into the webapp directory but i'm
>> getting a message saying the requested resource is not available.
>>
>> I previously had another web app deployed but with the help of my cousin
>> so i'm not entirely sure what he did, this was still running fine with
>> tomcat until I put my new war file into webapp, now I am getting the
>> same message ass above for this application too.
>>
>> Does tomcat only allow one web application war file into the webapp
>> directory at a time maybe???
>>
>> Thanks in advance for replies,
>>
>> Pinky
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-pl
>> z..-%3A%29-tf4090702.html#a11629510
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>> This message (including any attachments) contains confidential
>> and/or proprietary information intended only for the addressee.
>> Any unauthorized disclosure, copying, distribution or reliance on
>> the contents of this information is strictly prohibited and may
>> constitute a violation of law.  If you are not the intended
>> recipient, please notify the sender immediately by responding to
>> this e-mail, and delete the message from your system.  If you
>> have any questions about this e-mail please notify the sender
>> immediately.
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>     
>
>   



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by pinky88 <fo...@tcd.ie>.
HTTP Status 404 - /LoginApp

type Status report

message /LoginApp

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



Asensio, Rodrigo wrote:
> 
> Pinki, please post the entire tomcat log here. 
> 
> -----Original Message-----
> From: pinky88 [mailto:fordeka@tcd.ie] 
> Sent: Monday, July 16, 2007 3:39 PM
> To: users@tomcat.apache.org
> Subject: How to deploy a web app on tomcat.. help needed plz.. :)
> 
> 
> Hi,
> 
> I'm trying to deploy a web application on tomcat 5.5.23 but I'm not
> exactly sure how to do so (beginner).
> 
> I've copied the war file and archive into the webapp directory but i'm
> getting a message saying the requested resource is not available.
> 
> I previously had another web app deployed but with the help of my cousin
> so i'm not entirely sure what he did, this was still running fine with
> tomcat until I put my new war file into webapp, now I am getting the
> same message ass above for this application too.
> 
> Does tomcat only allow one web application war file into the webapp
> directory at a time maybe???
> 
> Thanks in advance for replies,
> 
> Pinky
> --
> View this message in context:
> http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-pl
> z..-%3A%29-tf4090702.html#a11629510
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> This message (including any attachments) contains confidential
> and/or proprietary information intended only for the addressee.
> Any unauthorized disclosure, copying, distribution or reliance on
> the contents of this information is strictly prohibited and may
> constitute a violation of law.  If you are not the intended
> recipient, please notify the sender immediately by responding to
> this e-mail, and delete the message from your system.  If you
> have any questions about this e-mail please notify the sender
> immediately.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-plz..-%3A%29-tf4090702.html#a11629700
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by "Asensio, Rodrigo" <ro...@gilbarco.com>.
Pinki, please post the entire tomcat log here. 

-----Original Message-----
From: pinky88 [mailto:fordeka@tcd.ie] 
Sent: Monday, July 16, 2007 3:39 PM
To: users@tomcat.apache.org
Subject: How to deploy a web app on tomcat.. help needed plz.. :)


Hi,

I'm trying to deploy a web application on tomcat 5.5.23 but I'm not
exactly sure how to do so (beginner).

I've copied the war file and archive into the webapp directory but i'm
getting a message saying the requested resource is not available.

I previously had another web app deployed but with the help of my cousin
so i'm not entirely sure what he did, this was still running fine with
tomcat until I put my new war file into webapp, now I am getting the
same message ass above for this application too.

Does tomcat only allow one web application war file into the webapp
directory at a time maybe???

Thanks in advance for replies,

Pinky
--
View this message in context:
http://www.nabble.com/How-to-deploy-a-web-app-on-tomcat..-help-needed-pl
z..-%3A%29-tf4090702.html#a11629510
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately. 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: How to deploy a web app on tomcat.. help needed plz.. :)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: pinky88 [mailto:fordeka@tcd.ie] 
> Subject: How to deploy a web app on tomcat.. help needed plz.. :)
> 
> I'm trying to deploy a web application on tomcat 5.5.23 but 
> I'm not exactly sure how to do so (beginner).

You might want to take a look at the doc:
http://tomcat.apache.org/tomcat-5.5-doc/appdev/index.html
especially this part:
http://tomcat.apache.org/tomcat-5.5-doc/appdev/deployment.html

> I've copied the war file and archive into the webapp directory but i'm
> getting a message saying the requested resource is not available.

Don't bother giving us an approximation or your interpretation of the
message - post the exact message, since you have it readily available.
As another poster already noted, take a look in Tomcat's logs for more
information.

> Does tomcat only allow one web application war file into the webapp
> directory at a time maybe???

Of course not.  The standard Tomcat 5.5 distribution comes with six
applications in webapps, plus two more in server/webapps.

Exactly what are you referring to with "webapp directory"?

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org