HOWTO : Apache/Tomcat (at last !!)

Hi Nebukazar,
Does this mean the tomcat is up ?

-bash-2.05b# tomcat4ctl
Usage: tomcat4ctl [ start | stop | restart ]
-bash-2.05b# tomcat4ctl start
>> Reading PID file (/var/run/tomcat4.pid)... [ DONE ]
>> Starting Jakarta Tomcat 4.0.6... [ DONE ]
>> Writing PID file... [ DONE ]
-bash-2.05b# :D
 
I dont think so ..

-bash-2.05b# ps aux |grep java
bublers 33244 0.0 0.2 2840 2476 p2 Is+ 10:28AM 0:00.12 BitchX -S java.w
-bash-2.05b#

its only my bitchx running on java :p

is there anything i didnt do yet ?
 
I've installed this trough ports,

/usr/ports/java/jdk14

it does ask me to get several files from sun

- really impressed by your quick reply
 
-bash-2.05b# pwd
/usr/local/jakarta-tomcat4.0/bin
-bash-2.05b# ./startup.sh
The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program
-bash-2.05b#
 
-bash-2.05b# ls
COPYRIGHT README.html include man
LICENSE bin jre src.zip
README demo lib
-bash-2.05b# pwd
/usr/local/jdk1.4.2
-bash-2.05b#

which file should i use to run this app ?
 
I would recommend you to start over and try to install tomcat step by step using the howto. When you get an error, you can send me a PM and I will see what I can do.
 
-bash-2.05b# pwd
/usr/local/java/jakarta-tomcat-connectors/jk/native
-bash-2.05b# ./configure --with-apxs=/usr/sbin/apxs
configure: error: cannot run /usr/local/bin/bash scripts/build/unix/config.sub
-bash-2.05b#

now stuck here ..
 
-bash-2.05b# tomcatd start
[: =: unexpected operator
Starting Tomcat: Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME: /usr/local/java

-bash-2.05b#

i cant find what the error stand for.
 
Hi Nebukazar,
Just ignore everything that i had paste up there together with the latest priv msg, with your help, we had already suceeded using tomcat on apache. Thanks !
 
HI Nebukazar,

i already installed tomcat, after started tomcatd, found this error when try to open the .jsp

type Status report

message /spm/index.jsp

description The requested resource (/spm/index.jsp) is not available.

"I am so SURE that the file existed"

Please..
 
hi,

it looks like you didn't created a new context for this domain name.

Make sure you create a new context for this domain in $CATALINA_HOME/conf/server.xml
 
So, is it possible to get a .war to deploy on a tomcat restart?

I am trying to get one to deploy on a user account.
 
well,

you will have to deploy the application manually.

You could deploy using WAR deployment but since it is a "shared" jvm, you will have to configure the context for it and restart tomcat everytime you need to configure your WAR apps.
 
*whoosh

Right over my head.

Heh, my only JSP experience, is Resin, which we manually install on cPanel servers at work...

Directadmin, Tomcat, all new to me.

Btw, thanks for the quick reply, I really didnt expect one so soon =P

Edit:

ps. I'm still trying to login to admin area of tomcat....
 
I got .war's to auto deploy by doing this in the server.xml:

<Host name="www.domain.com" appBase="/home/user/domains/domain.com/public_html" unpackWARs="true" autoDeploy="true">
<Alias>domain.com</Alias>
<Context path="" docBase="/home/user/domains/domain.com/public_html" debug="0"/>
<Context path="/manager" docBase="/usr/local/jakarta-tomcat-4.1.30/server/webapps/manager" debug="0" privileged="true"/>
<Logger className="org.apache.catalina.logger.FileLogger" directory="/home/admin/logs" prefix="context_log." suffix=".log" timestamp="true"/>
</Host>

Probably isn't correct, but seemed to do the trick.
 
Last edited:
Hi Guys,

I've installed tomcat using the the howto, and this is running:

[root@bc bin]# ps aux | grep tomcat
root 3194 0.5 5.3 235560 27424 pts/0 Sl 22:58 0:04 /usr/local/java/java/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/java/java/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 3314 0.0 0.1 5060 676 pts/0 S+ 23:11 0:00 grep tomcat
[root@bc bin]#

That's fine.

My questions are:

- Where can I see the tomcat online manager? I see that tomcat uses 8005 but I cannot get a connection on it.
- Can I use JSP on my normal apache? My server-version-string doesn't show anythig about tomcat now, and it doesn't parse .jsp pages.

Can anybody tell me how to use it? I just want to have my .jsp parsing working.
 
Back
Top