[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 482
  • Last Modified:

Configuring Tomcat

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
zania22
Asked:
zania22
  • 7
  • 7
  • 3
1 Solution
 
ramazanyichCommented:
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
 
zania22Author Commented:
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
 
ronan_40060Commented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
zania22Author Commented:
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
 
ramazanyichCommented:
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
 
ronan_40060Commented:

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
 
zania22Author Commented:
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
 
zania22Author Commented:
Also, my .class and .java files should be in the Production/classes folder? and not just Production?
0
 
ramazanyichCommented:
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
 
ronan_40060Commented:
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
 
zania22Author Commented:
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
 
zania22Author Commented:
Should I uncomment this out in web.xml?

<servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
0
 
ronan_40060Commented:
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
 
ronan_40060Commented:
Hello Zania
howz the overall process going on?
let us know
ronan
0
 
ronan_40060Commented:
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
 
zania22Author Commented:
None of the experts suggestions worked. I uninstalled tomcat and re-installed and didn't do anything and it worked
0
 
ronan_40060Commented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now