• 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 4.1.12 not executing JSP on Sun OS

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a weird problem !
My application runs fine on Apache 2.0 and Tomcat 3.3.1 on Windows
Now I have moved the same code on to SunOS 5.6. which has APache2 and Tomcat 4.1.12. I am able to excute Tomcat's examples jsps and servlets !But when it comes to my own application deployed on the Root, when I try to run my jsp, Tomcat shows a prompt asking if I want to download the file...and then it shows the entire jsp code !!! instead of executing it.....
Can't understand the problem... Can ne one help....
[ October 28, 2002: Message edited by: Shilpa Bhargava ]
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to delete the work directory under tomcat and try again to execute example jsp's. if its not working then check the logs directory for error messages or the command window.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I don't know whether this is the same problem, but tomcat 4.1 and tomcat 3.3 behave quite differently (not least because they implement different servlet and jsp specifications). I have found that tomcat 4 no longer enables the default servlet and jsp handler automatically, so you either have to define those, or you have to specify a servlet-mapping in the web.xml for each servlet/jsp you want to run.
Hope that helps.
Jesse
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jesse,
you are correct. Actually the container from 4.0 onwords is called catalina. It is completely rewritten as per new spec.
regarding silpa's problem, it looks like apache is not sending the jsp requests to Tomcat. it is handling the request itself. is there any mapping is missing in apache configuration?.
but then how is examples running allright?.
 
Shilpa Bhargava
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my Apache's httpd.conf
this is what is appended
<IfModule mod_jk.c>
JkWorkersFile "/usr/local/jakarta-tomcat-4.1.12/conf/jk/workers.properti
es"
JkLogFile "/usr/local/karta-tomcat-4.1.12/logs/mod_jk.log"
JkLogLevel debug
JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /jk ajp13
JkMount /jk/* ajp13
JkMount /cocoon ajp13
JkMount /cocoon/* ajp13
## JkMount /ROOT ajp13
## JkMount /ROOT/* ajp13
</IfModule>
Cud the problem be becoz ROOT entry is commented ???
 
Shilpa Bhargava
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jesse,
Are u talking about uncommenting the mapping for invoking servlet ?
Is there anything else also that needs to be uncommented or added to the web.xml file !!

Thanks a ton !
 
Shilpa Bhargava
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uncommenting the ROOT entry worked ....but now the error is 404 for ROOT!!!
 
Jesse Beaumont
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Defining a mapping for the invoker servlet is one option. The other option is to add a servlet-mapping tag to your web.xml for every servlet you have.
e.g.
<servlet-mapping>
<servlet-name>HelloWorldServlet</servlet-name>
<url-pattern>/servlet/HelloWorldServlet</url-pattern>
</servlet-mapping>
Hope that clarifies it.
reply
    Bookmark Topic Watch Topic
  • New Topic