Newbie Tomcat Problem

S

sirstrongbad

I am working with Tomcat 5 for the first time in on a Unix machine.
Apache seems to be working ok, serving up static HTML, but all my
JSP's are displaying in the browser as inline code. My assumption is
that Tomcat is not running, but I am having a heck of a time finding
anything on this new Unix box that someone else set up. I cannot even
find the .sh startup script. How can I check if Tomcat is running?

Also, JAVA_HOME and CATALINA_HOME do not appear to be set, although
java -version shows version 1.5.

Any help is GREATLY appreciated...
 
B

Bikal KC

Hi,
find the .sh startup script. How can I check if Tomcat is running?

$ netstat -tupan
$ lsof -i
That'll show what's listening for conn.
Also, JAVA_HOME and CATALINA_HOME do not appear to be set, although

Set those variables in ~/.bashrc

Cheers
 
B

Bikal KC

Bikal said:
Hi,


$ netstat -tupan
$ lsof -i
That'll show what's listening for conn.


Set those variables in ~/.bashrc

Ofcourse only if you are using bash :) as I do.
for e.g., export J2MEWTK_HOME=/opt/WTK2.5.1EA

Cheers
 
S

sirstrongbad

Ofcourse only if you are using bash :) as I do.
for e.g., export J2MEWTK_HOME=/opt/WTK2.5.1EA

Cheers

I am indeed using bash. I ran the netstat command. Ports :8080, :
8009, and :8005 are being listened to. Which from what I understand
is an indicator that Tomcat is running. I also ran "/etc/init.d/
tomcat5 start" and got the message "Starting tomcat5: tomcat5 process
already running"

So I if Tomcat is already running, why would the web browser be
displaying raw, un-compiled code? I assume there has got to be
something that was not setup correctly on this box. Any ideas of
things I can check?
 
L

Lew

So I if Tomcat is already running, why would the web browser be
displaying raw, un-compiled code? I assume there has got to be
something that was not setup correctly on this box. Any ideas of
things I can check?

Because you're serving the JSP through your web server, not through Tomcat.
I am working with Tomcat 5 for the first time in on a Unix machine.
Apache seems to be working ok, serving up static HTML, but all my
JSP's are displaying in the browser as inline code. My assumption is

I assume by "Apache" you mean their "Web Server" product. Tomcat is from
Apache, too, you know.

You can have Web Server forward JSP requests to Tomcat for service, but bear
in mind that according to
When using a single server, the performance when using a native webserver in front of the Tomcat instance is most of the time significantly worse than a standalone Tomcat with its default HTTP connector, even if a large part of the web application is made of static files.

How did you deploy your application to Tomcat? You did copy a WAR file to the
${CATALINA_HOME}/webapps/ directory, didn't you?

Can you see your application by accessing it directly from Tomcat, without
passing through Web Server?

If not, then it isn't correctly deployed to Tomcat. If so, then the
connection between Web Server and Tomcat is at issue.

There is some stuff about connecting the two at
<http://tomcat.apache.org/connectors-doc/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top