You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Valerie BARRAUD <va...@worldonline.fr> on 2001/06/09 04:16:29 UTC
tomcat start fails
Hi folks,
I've just finished to install Tomcat and launched
tomcat start
but the promised Tomcat window does not appear.
My file tomcat.bat (here after) seems to be ok. Any idea ?
---
tomcat.bat
-----------
@echo off
rem A batch file to start/stop tomcat server.
rem This batch file written and tested under Windows NT
rem Improvements to this file are welcome
rem Guess TOMCAT_HOME if it is not present
set TOMCAT_HOME=C:\jakarta-tomcat
set JAVA_HOME=C:\jdk1.3
echo *TOMCAT_HOME : %TOMCAT_HOME%
echo *JAVA_HOME : %JAVA_HOME%
if not "%TOMCAT_HOME%" == "" goto gothome
SET TOMCAT_HOME=.
if exist %TOMCAT_HOME%\bin\tomcat.bat goto gothome
SET TOMCAT_HOME=..
if exist %TOMCAT_HOME%\bin\tomcat.bat goto gothome
SET TOMCAT_HOME=
echo Unable to determine the value of TOMCAT_HOME.
goto eof
:gothome
rem Set up the CLASSPATH that we need
set CLASSPATH=C:\jdk1.3\lib\tools.jar
echo *Old classpath: %CLASSPATH%
set cp=%CLASSPATH%
rem set CLASSPATH=.
set CLASSPATH=%TOMCAT_HOME%\classes
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xml.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
echo *New classpath: %CLASSPATH%
rem echo cp : %cp%
if "%cp%" == "" goto next
rem else
rem REM added:
rem set CLASSPATH=%CLASSPATH%;%cp%
:next
if "%1" == "start" goto startServer
if "%1" == "stop" goto stopServer
if "%1" == "run" goto runServer
if "%1" == "env" goto setupEnv
if "%1" == "ant" goto runAnt
if "%1" == "jspc" goto runJspc
echo Usage:
echo tomcat (start^|run^|env^|stop)
echo start - start tomcat in a separate window
echo run - start tomcat in the current window
echo env - setup the environment for tomcat
echo stop - stop tomcat
echo ant - run ant with tomcat context
echo jspc - run jsp pre compiler
goto cleanup
:startServer
echo Starting tomcat in new window
echo =>Using classpath: %CLASSPATH%
start java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%"
org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
goto cleanup
:runServer
rem Start the Tomcat Server
echo Using classpath: %CLASSPATH%
java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%"
org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
goto cleanup
:stopServer
rem Stop the Tomcat Server
echo Using classpath: %CLASSPATH%
java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%"
org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6 %7 %8 %9
goto cleanup
goto cleanup
:runAnt
rem Run ant
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\ant.jar
echo Using classpath: %CLASSPATH%
java %ANT_OPTS% -Dant.home="%TOMCAT_HOME%" -Dtomcat.home="%TOMCAT_HOME%"
org.apache.tools.ant.Main %2 %3 %4 %5 %6 %7 %8 %9
goto cleanup
:runJspc
rem Run ant
echo Using classpath: %CLASSPATH%
java %JSPC_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.jasper.JspC %2
%3 %4 %5 %6 %7 %8 %9
goto cleanup
:setupEnv
set cp=%CLASSPATH%
:cleanup
rem clean up
set CLASSPATH=%cp%
set port=
set host=
set test=
set jsdkJars=
set jspJars=
set beanJars=
set miscJars=
set appJars=
set appClassPath=
set cp=
rem pause
:eof
---
Re: tomcat start fails
Posted by Stephane Meier <bo...@hyperchat.com>.
Hello,
If you are on Windows 9x/ME, make sure to limit pathnames to <= 8
characters.
Better start with the basic file (tomcat.bat), and then add the missing
variables, which are typically :
(adapt for your own environment)
set JAVA_HOME=C:\jdk1.3
set TOMCAT_HOME=C:\jakarta-tomcat3.2.2 (or whatever)
set CLASSPATH=C:\jdk1.3\lib\tools.jar
The classpath does not need to explicitly include files from
TOMCAT_HOME/lib.
Another thing that can help is to modify server.xml and in the section
tc_log, add the filename
marked in comments, so you will get something in TOMCAT_HOME\logs\tomcat.log
This will force all messages that appear in the DOS window to be written in
this file.
Otherwise the message is written so fast and the window is closed so fast
that you do not see any error message.
Stéphane
Re: Problem in access control of resources
Posted by Hemant Singh <Si...@Yahoo.com>.
HI Again Pankaj:
When it comes to rendering of browser, i will say it all depends on headers that you send it from servlet, if send the right header applicable for word ( i guess "application/doc", if not let me know i will checkout and find the correct one for u), than there is just no reason that why browser will not render it as a doc file,
But here you are not only making ur website platform dependent but also browser dependent as in case of IE it is offcourse capable of opening the word file as inprocess because of IE have a plugin for it, But what about Netscape, he will offcourse bring the dialog box asking the user that whether he wishes to download it or not(Whatever)
Regards
Hemant
----- Original Message -----
From: Pankaj Chhaparwal
To: tomcat-user@jakarta.apache.org
Sent: Monday, June 11, 2001 10:25 AM
Subject: Re: Problem in access control of resources
Hi Hemant,
The user should have both the options to view it or download it. The problem with streaming is that it is somewhat slow(since you have to first read it and then write it in a stream).The second issue is that for e.g. if I read a word document in a stream and then write it in a stream , the browser doesnt know that its a word document and just renders it as a txt document. In the case of word docs and xls the output on the browser is all junk. Please let me know what you think on this.
Thanks a lot for your help Hemant.
Regards,
Pankaj
At 06:43 PM 2/10/2000 +0530, you wrote:
HI Pankaj:
How you transfer the word documents to the client? I mean you expect user to download it, or view it in there web browser?
In both ways what you can do is that instead of redirecting the client to word files, you read those word files in your jsp or servlet and write that file to users stream, And as you jsp or servlet will always have maintained in session(or whatever) that user has logged in or not, so i guess this will solve your problem.
Regards,
Hemant
----- Original Message -----
From: Pankaj Chhaparwal
To: tomcat-user@jakarta.apache.org
Sent: Sunday, June 10, 2001 7:58 AM
Subject: Problem in access control of resources
Hi All,
Servlet spec 2.2 states
I am using Apache and Tomcat to build my website. The adapter is JServ.I have certain word documents which have to be displayed on the browser on demand from the end user. I dont want to end users to view these documents unless they have logged into the system. What happens right now is that user can see the url of word document when the jsp redirects him to word document on receiving the request. He can then access the document from the webserver even if he has not logged into the website. Is there anyway I can prevent this from happening? Ideally I would like Apache to serve all the word documents since they are static files. But I am also considering Tomcat to serve this file.
Also I have another question on access control. Servel 2.2 spec states the following
Access control for resources: The mechanism by which interactions with resources are limited
to collections of users or programs for the purpose of enforcing availability, integrity, or
confidentiality.
How can we limit interaction with resources to collections of programs?
Any help on this would be greatly appreciated.
Thanks & Regards,
Pankaj
Re: Problem in access control of resources
Posted by Pankaj Chhaparwal <pc...@Houston.GeoQuest.SLB.COM>.
Hi Hemant,
The user should have both the options to view it or download it. The
problem with streaming is that it is somewhat slow(since you have to first
read it and then write it in a stream).The second issue is that for e.g. if
I read a word document in a stream and then write it in a stream , the
browser doesnt know that its a word document and just renders it as a txt
document. In the case of word docs and xls the output on the browser is all
junk. Please let me know what you think on this.
Thanks a lot for your help Hemant.
Regards,
Pankaj
At 06:43 PM 2/10/2000 +0530, you wrote:
>HI Pankaj:
>How you transfer the word documents to the client? I mean you expect user
>to download it, or view it in there web browser?
>In both ways what you can do is that instead of redirecting the client to
>word files, you read those word files in your jsp or servlet and write
>that file to users stream, And as you jsp or servlet will always have
>maintained in session(or whatever) that user has logged in or not, so i
>guess this will solve your problem.
>Regards,
>Hemant
>----- Original Message -----
>From: <ma...@Houston.GeoQuest.SLB.COM>Pankaj Chhaparwal
>To: <ma...@jakarta.apache.org>tomcat-user@jakarta.apache.org
>Sent: Sunday, June 10, 2001 7:58 AM
>Subject: Problem in access control of resources
>
>Hi All,
>
>Servlet spec 2.2 states
>
>
>
>I am using Apache and Tomcat to build my website. The adapter is JServ.I
>have certain word documents which have to be displayed on the browser on
>demand from the end user. I dont want to end users to view these
>documents unless they have logged into the system. What happens right now
>is that user can see the url of word document when the jsp redirects him
>to word document on receiving the request. He can then access the document
>from the webserver even if he has not logged into the website. Is there
>anyway I can prevent this from happening? Ideally I would like Apache to
>serve all the word documents since they are static files. But I am also
>considering Tomcat to serve this file.
>
>
>
>Also I have another question on access control. Servel 2.2 spec states the
>following
>
>Access control for resources: The mechanism by which interactions with
>resources are limited
>to collections of users or programs for the purpose of enforcing
>availability, integrity, or
>confidentiality.
>How can we limit interaction with resources to collections of programs?
>
>Any help on this would be greatly appreciated.
>
>Thanks & Regards,
>Pankaj
Re: Problem in access control of resources
Posted by Hemant Singh <he...@yahoo.com>.
HI Pankaj:
How you transfer the word documents to the client? I mean you expect user to download it, or view it in there web browser?
In both ways what you can do is that instead of redirecting the client to word files, you read those word files in your jsp or servlet and write that file to users stream, And as you jsp or servlet will always have maintained in session(or whatever) that user has logged in or not, so i guess this will solve your problem.
Regards,
Hemant
----- Original Message -----
From: Pankaj Chhaparwal
To: tomcat-user@jakarta.apache.org
Sent: Sunday, June 10, 2001 7:58 AM
Subject: Problem in access control of resources
Hi All,
Servlet spec 2.2 states
I am using Apache and Tomcat to build my website. The adapter is JServ.I have certain word documents which have to be displayed on the browser on demand from the end user. I dont want to end users to view these documents unless they have logged into the system. What happens right now is that user can see the url of word document when the jsp redirects him to word document on receiving the request. He can then access the document from the webserver even if he has not logged into the website. Is there anyway I can prevent this from happening? Ideally I would like Apache to serve all the word documents since they are static files. But I am also considering Tomcat to serve this file.
Also I have another question on access control. Servel 2.2 spec states the following
Access control for resources: The mechanism by which interactions with resources are limited
to collections of users or programs for the purpose of enforcing availability, integrity, or
confidentiality.
How can we limit interaction with resources to collections of programs?
Any help on this would be greatly appreciated.
Thanks & Regards,
Pankaj
Apache+Tomcat connection problem
Posted by istvan bereti <is...@kolumbus.fi>.
Hi,
I try to configure Tomcat and Apache communication and I seems to have
problems. If you have this kind of experience please help me!
I used Jserv and now I installed tomcat from rpm package and apache.
Tomcat works fine standalone on the port 8080. 3.2.2. SUN jdk1.3.1
Apache 1.3.14. on Linux Mandrake 7.2. Also works fine.
If I telnet to the ports 8007. 8009 tomcat throws an exception, so this is
ok.
But when I try to connect the same servlet with apache it just says in the
apache error log that the file is not existing.
#
# Root context mounts for Tomcat
#
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
This should mean that if it's servlet in the first in the URI it should call
the ajp13.
For httpd -l I got
Compiled-in modules:
http_core.c
mod_so.c
suexec: enabled; valid wrapper /usr/sbin/suexec
The strange thing is that it seems to be that apache never calls the ajp13
connector.
If you had similar problem please let me know.
I also tried the jserv module but the same result. So what do I miss from
the config? It can't be so complicated that it takes 3 days to configure
it...
How or where can I see what does apache?
here is the jk_conf which is included in the httpd.conf:
###################################################################
# Auto generated configuration. Dated: Mon Jul 24 18:56:51 CEST 2000
###################################################################
JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
#
# Log level to be used by mod_jk
#
JkLogLevel error
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
Problem in access control of resources
Posted by Pankaj Chhaparwal <pc...@Houston.GeoQuest.SLB.COM>.
Hi All,
Servlet spec 2.2 states
I am using Apache and Tomcat to build my website. The adapter is JServ.I
have certain word documents which have to be displayed on the browser on
demand from the end user. I dont want to end users to view these documents
unless they have logged into the system. What happens right now is that
user can see the url of word document when the jsp redirects him to word
document on receiving the request. He can then access the document from the
webserver even if he has not logged into the website. Is there anyway I can
prevent this from happening? Ideally I would like Apache to serve all the
word documents since they are static files. But I am also considering
Tomcat to serve this file.
Also I have another question on access control. Servel 2.2 spec states the
following
Access control for resources: The mechanism by which interactions with
resources are limited
to collections of users or programs for the purpose of enforcing
availability, integrity, or
confidentiality.
How can we limit interaction with resources to collections of programs?
Any help on this would be greatly appreciated.
Thanks & Regards,
Pankaj