Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Problem With Tomcat under Linux

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have tomcat 4.1.27 installed on Red Hat Linux 9 with JDK 1.4.1_02 and all the examples included with tomcat works fine.
But when I copy the servlet examples from SCWCD study Kit to webapps/ directory and go to http://localhost:8080/chapter01/servlet/HelloWorldServlet I get the source of the html file rather than just showing "Hello World!"
The same thing works fine under Win XP, could someone help me?
Thanks in advance
Alexan
[ August 27, 2003: Message edited by: Alexan Kahkejian ]
 
Ranch Hand
Posts: 38
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
couple of quick things
I think you want JDK 1.4.2 - I read somewhere recently that it's much better (how bad it was before I'm not sure) seehere
the other thing, obvious one - you mention copying stuff to the webapps directory, but have you made any changes to the contexts in server.xml?
 
Marcus Howarth
Ranch Hand
Posts: 38
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
while I'm on... can I ask where have you installed Tomcat? what is your CATALINA_HOME ??
some people talk about putting it under /var/tomcat.x.x.x/ or /usr/local/tomcat..
I'd put mine under /usr/java/tomcat - but i think I'm asking for trouble using root accounts here and will now move it
thing is I'd like it to run all the time and have write access to the webapps and conf folders via samba, maybe it should go in /home/<myaccount>/tomcat ??
thanks in advance
 
Alexan Kahkejian
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Marcus
Yes I've already made the required changes to server.xml and it works fine when running example servlets of tomcat and it works in win xp completely but the problem is in Linux and with new servlets.
PS : My $CATALINA_HOME is /usr/local/tomcat
 
Marcus Howarth
Ranch Hand
Posts: 38
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just got mine working..
try deleting everything under \work\Standalone\localhost and re-start
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Linux/Unix
 
Saloon Keeper
Posts: 26057
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, there's nothing in Windows that I can think of that would make it immune to the infamous stale workfile problem. It's really a Tomcat issue instead of an OS one.
 
Alexan Kahkejian
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
At last I found it, it is the content type so by adding response.setContentType("text/html"); the problem solved.
So Microsoft IE don't need this but Mozilla do.
Thanks all
Alexan
 
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic