• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

tomcat 5 deployment issue

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey folks,
once more a bizzare thing happens to me.
i try to check out the tomcat 5's beta. i've installed it and everything looks fine.
i copied webapp folder from the machine with tomcat 4.1.x to the machine with the new installation. the jsp pages are visible and look fine, but servlets are not. i just get 404 each try my apps call servlet.
what's going on? any ideas?
thanks
 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i also had some strange behavour when i've tried to migrate an app from
tomcat 4.0.2 to the new beta 5. exactly as in your case the jsp files were ok. the servlets returned error 404. i've played with my app's web.xml file and found the solution.
at 4.0.2 the web.xml had the following lines:

the form in my jsp page called /mywebapp/servlet/Controller and it worked fine.
for some reason this didn't work at 5 beta until i've added this:

actually i've seen this in an example web.xml file, and it worked also for my case. i didn't find any explanation for this change , and i also don't see why this change was needed.
is it a bug in a new version, or there are some new rules i've missed?
i hope anyone has an idea or an explanation.
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here is the sollution:
Answer :

The XSS vulnerability has been found at the time Tomcat 4.0.3 has been released (and 4.1.2 was in beta). The problem was connected to the fact that it was possible to run some specific classes simply using the /servlet/ mapping.
The Jakarta group that is working on Tomcat has immediately found a solution to the problem.
The simple, but working solution, was to comment the /servlet/ mapping from the default web application descriptor (web.xml), located under the $TOMCAT_HOME/conf. This has been done sinc 4.1.3 beta.
A developer can still uncomment the /servlet/ mapping, but on a standard installation, that mapping is not available.
 
reply
    Bookmark Topic Watch Topic
  • New Topic