Replies in place

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

> From: Pid <p...@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-c...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to