tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From removeps-c...@yahoo.com
Subject Re: not able to access URL in 2nd app in 7.0.23
Date Wed, 25 Jan 2012 17:10:49 GMT
Replies in place

--- On Wed, 1/25/12, Pid <pid@pidster.com> wrote:

> From: Pid <pid@pidster.com>
> Subject: Re: not able to access URL in 2nd app in 7.0.23
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Date: Wednesday, January 25, 2012, 12:55 AM
> On 25/01/2012 02:49, removeps-code@yahoo.com
> wrote:
> > In my webapps folder there are two folders: ROOT,
> myapp.  ROOT is the default app.
> > 
> > In myapp/WEB-INF/web.xml there is
> > 
> >   <servlet>
> > 
>    <servlet-name>MyServlet</servlet-name>
> > 
>    <servlet-class>package.MyServlet</servlet-class>
> > 
>    <load-on-startup>1</load-on-startup>
> >   </servlet>
> >   <servlet-mapping>
> > 
>    <servlet-name>MyServlet</servlet-name>
> > 
>    <url-pattern>/folder/action.do</url-pattern>
> >   </servlet-mapping>
> > 
> > When I go to http://host/myapp/folder/action.do in Tomcat 7.0.22 it
> invokes myapp, MyServlet.  Even some versions of Tomcat
> 6.x did this.
> > 
> > But in Tomcat 7.0.23 it generates 404 page not found.
> > 
> > Any idea what I can do?
> 
> What do the log files report, during application startup
> and when you
> try to access the page?

During startup I see

INFO: Deploying web application directory /home/myusername/jvm/apache-tomcat-7.0.23/domains/mydomain/myapp

When going to the page, no logs are generated.  However I put a System.out.println statement
in the default servlet of myapp to print the getRequestURI() and find that the following URI
is hit "/myapp/404.html".

The myapp/WEB-INF/web.xml has

  <error-page>
    <error-code>404</error-code>
    <location>/404.html</location>
  </error-page>

So this means that the myapp servlet is invoked, which is a good thing.  But the URL I went
to is https://mydomain/myapp/folder/action.do.

The servlet that is supposed to handle /folder/action.do is not invoked.

Nor should it be invoked.  There is an https security constraint in myapp/WEB-INF/web.xml
to direct the user to myapp/login.html.  This page is generated by the default servlet as
well.

So I will try two things.  First, remove the https to see if it works.  Second, change the
url-mapping from an exact match like "/myapps/folder/action.do" to "*.action.do"
 
> 
> p
> 
> > I'm gonna check if it works in 7.0.25.

FYI, it does not work in 7.0.25 either.

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


Mime
View raw message