Solved

Configuring Tomcat

Posted on 2004-09-08
19
451 Views
Last Modified: 2010-03-04
Though I have assigned a port of 8100 for Tomcat, i cannot get the welcome screen when I do http://localhost:8100. Does it matter that I have Apache web server running, but its on port 80.
0
Comment
Question by:zania22
  • 7
  • 7
  • 3
19 Comments
 
LVL 19

Expert Comment

by:ramazanyich
ID: 12008774
Apache server on port 80 doesn't have any interference with Tomcat on port 8100.
Check first Tomcat log files. Could you send also error messages in that files if they exists.
Check httpd.conf of Apache server: it shouldn't contain port 8100
0
 
LVL 1

Author Comment

by:zania22
ID: 12010029
Information found in jakarta_service_20040907:
[2004-09-07 15:13:00] [info] Service Tomcat5 name Apache Tomcat
[2004-09-07 15:13:01] [info] Service Tomcat5 installed
[2004-09-07 15:13:01] [info] Procrun finished.
[2004-09-07 15:14:05] [info] Updating service...
[2004-09-07 15:14:06] [info] Service Tomcat5 updated
[2004-09-07 15:14:06] [info] Update service finished.
[2004-09-07 15:14:06] [info] Procrun finished.
[2004-09-07 15:14:06] [info] Updating service...
[2004-09-07 15:14:06] [info] Service Tomcat5 updated
[2004-09-07 15:14:06] [info] Update service finished.
[2004-09-07 15:14:06] [info] Procrun finished.

Information found ing jakarta_service_20040908:
NONE

Files stdout and stderr are empty as well.
I'm wondering if its my version of Tomcat, 5.0? httpd.conf does not contain port 8100.
0
 
LVL 9

Accepted Solution

by:
ronan_40060 earned 500 total points
ID: 12014402
Hi there Zania
You could do one thing
since you have Apache and Tomcat both running on a machine
1> You could assign Apache run on different port than default 8080 , you can edit httpd.conf and change the port from 80 to some other port
2> Install tomcat to run on 8080

Please do NOT forget to go through the following links ; all explained :)
http://www.cnr.berkeley.edu/~salazar/apache_tomcat.html
http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html
http://www.devside.net/web/server/windows/Tomcat

Good Luck and let us know
Ronan
0
 
LVL 1

Author Comment

by:zania22
ID: 12019383
Hey,
     I think it was the compatibiity of the Tomcat5.0 i had the java1.4.2 version. Tomcat 5.0 needs the java 5.0 version. I uninstalled it, then intalled a  tomcat 4.1 version and everything worked smoothly. Now however, I'm having problems with my form. I have my action parameter invoking a servlet. the action button should say..
<form method="post" action="http://mydomain:8080/Production/servlet/editorServlet">
Where my file structure is:
C:\Program Files\Apache Group\Tomcat 4.1\webapps\Production\WEB-INF\classes

I have the editorServlet.class and .java in the classes folder. Its not working.
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 12019512
shouldn't it be :
http://mydomain:8080/Production/editorServlet

did you define that servlet in web.xml in C:\Program Files\Apache Group\Tomcat 4.1\webapps\Production\WEB-INF ?
Could you send your web.xml ?
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12019776

pls check it out

for in context
it shud be like
<Context path="/Production"
    docBase="webapps/Production"
    debug="0"
    reloadable="true">
</Context>

-----------------------------------------------------------------------------------------------------------------------------------------------
You need to  have a directory structure like following

C:\Program Files\Apache Group\Tomcat 4.1\webapps\Production\

C:\Program Files\Apache Group\Tomcat4.1\webapps\Production\WEB-INF\
C:\Program Files\Apache Group\Tomcat 4.1\webapps\Production\WEB-INF\classes
C:\Program Files\Apache Group\Tomcat 4.1\webapps\Production\WEB-INF\lib
C:\Program Files\Apache Group\Tomcat 4.1\webapps\Production\WEB-INF\web.xml

And you should put your test.jsp in:
C:\Program Files\Apache Group\Tomcat 4.1\webapps\Production\


TOMCAT_HOME should refer to C:\Program Files\Apache Group\Tomcat 4.1\ and is used by the JDK to run tomcat.


You should have a url like: http://localhost:8080/Production/editorServlet

----------------------------------------------------------------------------------------------------------------------------------------------
and for classpath
Tomcat\webapps\ROOT\WEB-INF\classes\ to your classpath.
-------------------------------------------------------------------------------------------------------------------------------------------

let me know how it goes

A bientôt
Ronan
0
 
LVL 1

Author Comment

by:zania22
ID: 12020362
There were 2 web.xml files that came with Tomcat. One in
C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF
and another in
C:\Program Files\Apache Group\Tomcat 4.1\conf
Which should I copy and add
<Context path="/Production"
    docBase="webapps/Production"
    debug="0"
    reloadable="true">
</Context>

0
 
LVL 1

Author Comment

by:zania22
ID: 12020396
Also, my .class and .java files should be in the Production/classes folder? and not just Production?
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 19

Expert Comment

by:ramazanyich
ID: 12020465
You should modify web.xml in C:\Program Files\Apache Group\Tomcat 4.1\conf
and put .class file into webapps/Production/WEB-INF/classes
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12022025
yes you need to modify the web.xml in  C:\Program Files\Apache Group\Tomcat 4.1\conf
Let us know
Good Luck
Ronan
0
 
LVL 1

Author Comment

by:zania22
ID: 12026812
I am getting the following error...

HTTP Status 404 - /Production/editorServlet

--------------------------------------------------------------------------------

type Status report

message /Production/editorServlet

description The requested resource (/Production/editorServlet) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/4.1.30

******************************************************
Here are the facts
1. Environment Variables:
(System)
TOMCAT_HOME=C:\Program Files\Apache Group\Tomcat 4.1\
JAVA_HOME=C:\j2sdk1.4.2_05
CLASSPATH=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\servlet.jar;C:\Program Files\Apache Group\Tomcat 4.1\webapps\Production\WEB-INF\lib\servlet.jar
(User)
PATH=C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\j2sdk1.4.2_05\bin;C:\Program Files\Apache Group\Tomcat 4.1\webapps\Production\WEB-INF\lib

2. Here is are xml files in conf
http://www.uvm.edu/~nspence/web.xml
http://www.uvm.edu/~nspence/server.xml

3. My file structure and url for the html for are correct.





0
 
LVL 1

Author Comment

by:zania22
ID: 12026909
Should I uncomment this out in web.xml?

<servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12030898
hello Zania

Change web.xml in the conf folder
Uncomment
  <!-- The mapping for the invoker servlet -->
    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
And it will work.
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12072971
Hello Zania
howz the overall process going on?
let us know
ronan
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12278723
Periwinkle
The question has been answered with the best possible means. The user did not come back in spite of providing her all help. The points should be split accordingly.
Thank you
Ronan
0
 
LVL 1

Author Comment

by:zania22
ID: 12309533
None of the experts suggestions worked. I uninstalled tomcat and re-installed and didn't do anything and it worked
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12318523
I think the question shud have given grade B or C the last .
All provious questions on Tomcat and Apache were solved with the help of he links I provided .
The Asker failed to come back after 9/10/2004
I think the question shud be given graded B Or C atleast
Regards
Ronan
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now