Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Newbie Tomcat Problem

Thread view: 
sirstrongbad@gmail.com - 21 Aug 2007 00:02 GMT
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...
Bikal KC - 21 Aug 2007 00:09 GMT
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
Bikal KC - 21 Aug 2007 00:12 GMT
> Hi,
>
[quoted text clipped - 7 lines]
>
> 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
sirstrongbad@gmail.com - 21 Aug 2007 03:34 GMT
> > Hi,
>
[quoted text clipped - 12 lines]
>
> 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?
Lew - 21 Aug 2007 05:52 GMT
> 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
<http://tomcat.apache.org/tomcat-6.0-doc/connectors.html>
> 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/>

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.