You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mackstar <ri...@gmail.com> on 2009/05/11 02:32:15 UTC

Tomcat 5.5.27 404 for JSP's in a particular derectory

I have an app which is currently working fine under jetty and I have set up
tomcat to be a replacement container (part of my clients requirements).

All seems to work apart from the JSP's (and any other html file) in one
directory for which I get 404's. If I change the directory's name it works.
Example the dir name is called shuppin if I change the dir name to shuppin1
I have no problems.

I don't know what the problem is but fact that I have a classes dir called
shuppin may also be causing problems?

I will upload the web.xml and server.xml
(the classes seem to work correctly when called from other dirs)

I have also once cleared the work/Catalina dir to get rid of any caching.

I also get the following error in my logs

java.io.FileNotFoundException:
/var/www/java/tomcat/work/Catalina/auction.provide-cars.com/shuppin/SESSIONS.ser
(No such file or directory) http://www.nabble.com/file/p23475510/server.xml
server.xml  http://www.nabble.com/file/p23475510/web.xml web.xml 

Any help is appreciatted.

Richard
-- 
View this message in context: http://www.nabble.com/Tomcat-5.5.27-404-for-JSP%27s-in-a-particular-derectory-tp23475510p23475510.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat 5.5.27 404 for JSP's in a particular derectory

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mackstar,

On 5/10/2009 10:31 PM, Mackstar wrote:
> Konstantin Kolinko wrote:
>>
>>
>> 2) Do not use the Invoker servlet. It is a hole you won't be able to patch
>> See
>> http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q2
>> http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3
> 
> I disabled the invoker servlet and could then use the directory, I have to
> re-arrange a bunch of servlets now to get them working!

That shouldn't be necessary. Just add <servlet-mapping> elements to your
web.xml. You should not have to change one line of JSP or servlet code.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoIoLoACgkQ9CaO5/Lv0PCWGACeJKwlsXxbhaXywlTY2qOi7p1w
Dv0AoIOgVjDaMKwGYf6PtAW49VIl/G2s
=lko+
-----END PGP SIGNATURE-----

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


Re: Tomcat 5.5.27 404 for JSP's in a particular derectory

Posted by Mackstar <ri...@gmail.com>.


Konstantin Kolinko wrote:
> 
> 
> 
> 2) Do not use the Invoker servlet. It is a hole you won't be able to patch
> See
> http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q2
> http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3
> 
> 

I disabled the invoker servlet and could then use the directory, I have to
re-arrange a bunch of servlets now to get them working!

Thanks for your help

Richard 
-- 
View this message in context: http://www.nabble.com/Tomcat-5.5.27-404-for-JSP%27s-in-a-particular-derectory-tp23475510p23476295.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat 5.5.27 404 for JSP's in a particular derectory

Posted by David Smith <dn...@cornell.edu>.
Mackstar wrote:
> Thanks all for your help
>
> I am stupid stupid stupid
>
> I had my ftp set up so that even though ROOT houses my app I have ROOT and
> shuppin in the same directory aswell as shuppin inside the ROOT dir so it
> looked in the sibling of ROOT rather than the child of ROOT
>
> Thanks again for your help
>
> Richard
>
>   
Yup... that will do it.  shuppin as a sibling would have been seen as a
webapp and it would have ended up with the request.

--David


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


RE: Tomcat 5.5.27 404 for JSP's in a particular derectory

Posted by Mackstar <ri...@gmail.com>.
Thanks all for your help

I am stupid stupid stupid

I had my ftp set up so that even though ROOT houses my app I have ROOT and
shuppin in the same directory aswell as shuppin inside the ROOT dir so it
looked in the sibling of ROOT rather than the child of ROOT

Thanks again for your help

Richard

-- 
View this message in context: http://www.nabble.com/Tomcat-5.5.27-404-for-JSP%27s-in-a-particular-derectory-tp23475510p23482270.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: Tomcat 5.5.27 404 for JSP's in a particular derectory

Posted by Mackstar <ri...@gmail.com>.


Caldarale, Charles R wrote:
> 
>> 1. The shuppin directory is a subdirectory which is inside a ROOT
>> application directory, it has other sibling directories which are
>> working correctly.
> 
> They may appear to work correctly, but that's probably just an accident. 
> Each webapp should be directly under the <Host> appBase (by default,
> that's Tomcat's webapps directory).  Placing a directory under
> webapps/ROOT makes it part of the default webapp rather than being its own
> webapp.
> 
> Sounds like your directory setup is incorrect, as well might be other
> config settings.  What <Context> elements have you specified?  Where are
> they located?  What's in the individual webapp WEB-INF/web.xml files?
> 
> 

OK I spoke too soon, you were right the invoker issue did not sort out my
problem

I have the following in my server.xml

    <Host name="auction" appBase="/var/www/auction"
       unpackWARs="true" autoDeploy="false"
       xmlValidation="false" xmlNamespaceAware="false">
        <Alias>auction.provide-cars.com</Alias>
      </Host>

I have a dir called /var/www/auction/ROOT in which I have
/var/www/auction/ROOT/shuppin as well as
/var/www/auction/ROOT/dir and /var/www/auction/ROOT/members

the dir and members dirs are working fine, have no problem accessing beans
etc in /var/www/auction/ROOT/WEB-INF/Classes. I have added no other contexts
and am completely lost why this shuppin dir should throw 404's unless you
change its name. 

As I said earlier I do have a package/dir at
/var/www/auction/ROOT/WEB-INF/Classes/shuppin/ which may have something to
do with it?

This is wierd because I had it working once?

Thanks again for any help

Richard


-- 
View this message in context: http://www.nabble.com/Tomcat-5.5.27-404-for-JSP%27s-in-a-particular-derectory-tp23475510p23481918.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: Tomcat 5.5.27 404 for JSP's in a particular derectory

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mackstar [mailto:richard.mackstar@gmail.com]
> Subject: Re: Tomcat 5.5.27 404 for JSP's in a particular derectory
> 
> 1. The shuppin directory is a subdirectory which is inside a ROOT
> application directory, it has other sibling directories which are
> working correctly.

They may appear to work correctly, but that's probably just an accident.  Each webapp should be directly under the <Host> appBase (by default, that's Tomcat's webapps directory).  Placing a directory under webapps/ROOT makes it part of the default webapp rather than being its own webapp.

Sounds like your directory setup is incorrect, as well might be other config settings.  What <Context> elements have you specified?  Where are they located?  What's in the individual webapp WEB-INF/web.xml files?

> 2. OK I get your point on using the invoker, do you think if I remove
> the usage of the invoker then my problem may resolve itself?

No, that won't fix it, but you should avoid the invoker servlet at all costs; it's highly unfortunate that it's even still available.  You will need to supply servlet mappings in each webapp's WEB-INF/web.xml file to replace the invoker servlet.

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


Re: Tomcat 5.5.27 404 for JSP's in a particular derectory

Posted by Mackstar <ri...@gmail.com>.
Thanks for your reply,

just to get back to you.. 

1. The shuppin directory is a subdirectory which is inside a ROOT
application directory, it has other sibling directories which are working
correctly.

2. OK I get your point on using the invoker, do you think if I remove the
usage of the invoker then my problem may resolve itself?

Much appreciated

Richard


 

Konstantin Kolinko wrote:
> 
> 2009/5/11 Mackstar <ri...@gmail.com>:
>>
>> I have an app which is currently working fine under jetty and I have set
>> up
>> tomcat to be a replacement container (part of my clients requirements).
>>
>> All seems to work apart from the JSP's (and any other html file) in one
>> directory for which I get 404's. If I change the directory's name it
>> works.
>> Example the dir name is called shuppin if I change the dir name to
>> shuppin1
>> I have no problems.
>>
>> I don't know what the problem is but fact that I have a classes dir
>> called
>> shuppin may also be causing problems?
>>
>> I will upload the web.xml and server.xml
>> (the classes seem to work correctly when called from other dirs)
>>
>> I have also once cleared the work/Catalina dir to get rid of any caching.
>>
>> I also get the following error in my logs
>>
>> java.io.FileNotFoundException:
>> /var/www/java/tomcat/work/Catalina/auction.provide-cars.com/shuppin/SESSIONS.ser
>> (No such file or directory)
>> http://www.nabble.com/file/p23475510/server.xml
>> server.xml  http://www.nabble.com/file/p23475510/web.xml web.xml
>>
>> Any help is appreciatted.
>>
> 
> 1) Is "shupping" a web application, or just a subdirectory in it?
> 
> Note, that all subdirectories in appBase are separate independent web
> applications, and the root web application in Tomcat should be named
> "ROOT" (in uppercase),
> 
> 2) Do not use the Invoker servlet. It is a hole you won't be able to patch
> See
> http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q2
> http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> 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/Tomcat-5.5.27-404-for-JSP%27s-in-a-particular-derectory-tp23475510p23476193.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat 5.5.27 404 for JSP's in a particular derectory

Posted by Konstantin Kolinko <kn...@gmail.com>.
2009/5/11 Mackstar <ri...@gmail.com>:
>
> I have an app which is currently working fine under jetty and I have set up
> tomcat to be a replacement container (part of my clients requirements).
>
> All seems to work apart from the JSP's (and any other html file) in one
> directory for which I get 404's. If I change the directory's name it works.
> Example the dir name is called shuppin if I change the dir name to shuppin1
> I have no problems.
>
> I don't know what the problem is but fact that I have a classes dir called
> shuppin may also be causing problems?
>
> I will upload the web.xml and server.xml
> (the classes seem to work correctly when called from other dirs)
>
> I have also once cleared the work/Catalina dir to get rid of any caching.
>
> I also get the following error in my logs
>
> java.io.FileNotFoundException:
> /var/www/java/tomcat/work/Catalina/auction.provide-cars.com/shuppin/SESSIONS.ser
> (No such file or directory) http://www.nabble.com/file/p23475510/server.xml
> server.xml  http://www.nabble.com/file/p23475510/web.xml web.xml
>
> Any help is appreciatted.
>

1) Is "shupping" a web application, or just a subdirectory in it?

Note, that all subdirectories in appBase are separate independent web
applications, and the root web application in Tomcat should be named
"ROOT" (in uppercase),

2) Do not use the Invoker servlet. It is a hole you won't be able to patch
See
http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q2
http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3

Best regards,
Konstantin Kolinko

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