tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <bas...@obninsk.com>
Subject Re: 403 error starting tomcat 7.0.22 application on windows 7
Date Wed, 16 Nov 2011 06:59:14 GMT
When i have changed url for my app from http://localhost... to 
http://127.0.0.1... the 403 error has gone.

-----Исходное сообщение----- 
From: Tim Watts
Sent: Monday, November 14, 2011 7:35 PM
To: Tomcat Users List
Subject: Re: 403 error starting tomcat 7.0.22 application on windows 7

On Mon, 2011-11-14 at 09:56 +0400, basilk@obninsk.com wrote:
>
> -----Исходное сообщение----- 
> From: Tim Watts
> Sent: Monday, November 14, 2011 9:09 AM
> To: Tomcat Users List
> Subject: Re: 403 error starting tomcat 7.0.22 application on windows 7
>
> On Mon, 2011-11-14 at 08:17 +0400, basilk@obninsk.com wrote:
> > > Can you paste the application web.xml file (inline) into your reply?
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >         xmlns="http://java.sun.com/xml/ns/javaee"
> > >         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> > >         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> > > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> > >         version="2.5">
> > >  <display-name>WEB query</display-name>
> > >  <description></description>
> > >  <error-page>
> > >    <error-code>404</error-code>
> > >    <location>/includes/error404.jsp</location>
> > >  </error-page>
> > >  <error-page>
> > >    <error-code>500</error-code>
> > >    <location>/includes/error500.jsp</location>
> > >  </error-page>
> > >  <servlet>
> > >    <description></description>
> > >    <display-name>reportcmnt</display-name>
> > >    <servlet-name>reportcmnt</servlet-name>
> > >    <jsp-file>/jsp/reportcmnt.jsp</jsp-file>
> > >  </servlet>
> > >  <servlet-mapping>
> > >    <servlet-name>reportcmnt</servlet-name>
> > >    <url-pattern>/reportcmnt</url-pattern>
> > >  </servlet-mapping>
> > > </web-app>
> > >
>
> > Do you have an access log configured, if so, what does it show?
> >
> > 0:0:0:0:0:0:0:1 - - [13/Nov/2011:09:50:32 +0300] "GET /query HTTP/1.1" 
> > 302
> > 125 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML,
> > like
> > Gecko) Chrome/15.0.874.120 Safari/535.2"
> > 0:0:0:0:0:0:0:1 - - [13/Nov/2011:09:50:32 +0300] "GET /query/ HTTP/1.1"
> > 403
> > 964 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML,
> > like
> > Gecko) Chrome/15.0.874.120 Safari/535.2"
> > 0:0:0:0:0:0:0:1 - - [13/Nov/2011:11:40:54 +0300] "GET /query HTTP/1.1" 
> > 302
> > 125
> > "http://localhost:8082/manager/html;jsessionid=4D76EA53493CA915B556DB02D1D9932E?org.apache.catalina.filters.CSRF_NONCE=95AB554C225507BE146FBA41E2BF3A97"
> > "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like 
> > Gecko)
> > Chrome/15.0.874.120 Safari/535.2"
> > 0:0:0:0:0:0:0:1 - - [13/Nov/2011:11:40:54 +0300] "GET /query/ HTTP/1.1"
> > 403
> > 964
> > "http://localhost:8082/manager/html;jsessionid=4D76EA53493CA915B556DB02D1D9932E?org.apache.catalina.filters.CSRF_NONCE=95AB554C225507BE146FBA41E2BF3A97"
> > "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like 
> > Gecko)
> > Chrome/15.0.874.120 Safari/535.2"
> > What user account is Tomcat running under?
>
> A: local system account. It has full access to the application's folders 
> and
> files.
> >
> >
>
> OK, you're getting a 403 on http://localhost:8082/query/ but your
> web.xml only shows a mapping for /reportcmnt and no welcome file
> declarations.  What happens if you use /query/reportcmnt instead?
>
> A: 403 error again.
>
> Is there perhaps an index.html that would have redirected
> to /query/reportcmnt?
>
> A: My index.html contains
>
> <html>
>   <meta content="text/html;charset=utf-8"/>
>   <head>
>     <title>WEB query</title>
>   </head>
>   <body>
>     <script>location="jsp/app.jsp"</script>
>   </body>
> </html>
>
> Q: What version of Tomcat were you using prior to the win7 migration?
>
> A: Tomcat 7.0.22.
> I've just installed Tomcat 7.0.22 on WinXP,
> then copied my app from Win7 to the WinXp webapps folder and run my app.
> It works fine.
>
So (xp,tc7)=OK but (win7,tc7)=403 for 'query' but not 'manager'.
Presumably on XP you're also running Tomcat as a service under the local
system account?  Just for grins, have you tried stopping the service
then running Tomcat from a command shell (e.g. {tc-home}\bin
\startup.bat) on win7 under your user account and see if you still get
the 403?

Just guessing here but is it possible your web app files have security
constraints attached to them that aren't being resolved on win7 but are
on xp?

Are there any conditions in your app logic that would return a 403?
Perhaps it can't access a service from win7 but can from xp? Licensing?

Also, looks like you've done some tweaking on server.xml (e.g. different
server port).  Can you paste in this file as well?




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





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


Mime
View raw message