You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Prateek Asthana <hk...@gmail.com> on 2007/03/05 07:17:41 UTC
MyApp servlet not deploying
Hi,
I was trying to run the "myapp" servlet example. The examples provided
in the webapps directory seem to run fine but when i try the "myapp"
example by deploying. compiling and so on as illustrated, I run into
the following error:
type Status report
message /myapp/
description The requested resource (/myapp/) is not available.
I checked up the logs and have no trace of any error. The web.xml is as follows:
<display-name>Hello, World Application</display-name>
<description>
This is a simple web application with a source code organization
based on the recommendations of the Application Developer's Guide.
</description>
<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>mypackage.Hello</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/myapp</url-pattern>
</servlet-mapping>
I tried deploying using the front end and also by copying into
"$CATALINA_HOME/webapps" but to no avail. When I log into the manager
module, I lists this servlet but when i try viewing it as
http://localhost:8080/myapp/ it gives me the above error. Please
help me get my first servlet started with tomcat. By the way I am
using Windows 2000.
Thanks,
Prateek
---------------------------------------------------------------------
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: MyApp servlet not deploying
Posted by Markus Schönhaber <ma...@schoenhaber.de>.
Prateek Asthana wrote:
> I was trying to run the "myapp" servlet example. The examples provided
> in the webapps directory seem to run fine but when i try the "myapp"
> example by deploying. compiling and so on as illustrated, I run into
> the following error:
>
> type Status report
> message /myapp/
> description The requested resource (/myapp/) is not available.
>
> I checked up the logs and have no trace of any error. The web.xml is as
> follows:
[...]
> <servlet-mapping>
> <servlet-name>HelloServlet</servlet-name>
> <url-pattern>/myapp</url-pattern>
> </servlet-mapping>
>
>
> I tried deploying using the front end and also by copying into
> "$CATALINA_HOME/webapps" but to no avail. When I log into the manager
> module, I lists this servlet but when i try viewing it as
> http://localhost:8080/myapp/ it gives me the above error. Please
> help me get my first servlet started with tomcat. By the way I am
> using Windows 2000.
You propably created a WebApp named "myapp", i. e. created a folder
$CATALINA_HOME/webapps/myapp
which you can access via
http://localhost:8080/myapp/
The <url-pattern> you have configured is relative to this WebApp root. To
access your servlet, try
http://localhost:8080/myapp/myapp
The reason why you get an error message when you access
http://localhost:8080/myapp/
is that you don't have a welcome page (by default index.jsp, index.html etc.)
in yout WebApp.
Regards
mks
---------------------------------------------------------------------
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