• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem With Tomcat under Linux  RSS feed

 
Alexan Kahkejian
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • 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 ]
 
Marcus Howarth
Ranch Hand
Posts: 38
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
just got mine working..
try deleting everything under \work\Standalone\localhost and re-start
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Linux/Unix
 
Tim Holloway
Saloon Keeper
Posts: 18797
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!