Problem configuring TOMCAT-APACHE combination.

2000-11-29 Thread Shriranga K Kulkarni


Hello All,

  I have configured tomcat-apache combination. I have given a servlet
request but the following error is being shown.

[28/11/2000 22:19:04:696] (EMERGENCY) ajp12: can not connect to host 
127.0.0.0:8007
[28/11/2000 22:19:04:697] (EMERGENCY) ajp12: connection fail
[28/11/2000 22:19:04:697] (ERROR) an error returned handling request 
via protocol "ajpv12"
[28/11/2000 22:20:54:106] (EMERGENCY) ajp12: can not connect to host 
127.0.0.0:8007
[28/11/2000 22:20:54:107] (EMERGENCY) ajp12: connection fail
[28/11/2000 22:20:54:107] (ERROR) an error returned handling request 
via protocol "ajpv12"
[28/11/2000 22:21:58:586] (EMERGENCY) ajp12: can not connect to host 127.0.0.0:
8007
[28/11/2000 22:21:58:586] (EMERGENCY) ajp12: connection fail
[28/11/2000 22:21:58:586] (ERROR) an error returned handling request via 
protocol "ajpv12"

Does any one have solution to overcome the above problem. I am running
Apache 1.3.19 and Tomcat 3.1 on Red Hat Linux version 6.1.

Should I change configuration file /etc/hosts to include localhost?
Should I invoke Tomcat while Linux is booting? If so Please indicate
where?
Should I have any jar file for compilig servlet programs? I am using
JDK1.2.2.

Thanks in advance
Sriranga.  





RE: What's with the _0002f in the filenames? (Precompiling JSP's)

2000-11-29 Thread Stubenrauch,Andreas

Hi,
afaik there are two reasons for this one is versioning (for recompiling and
loading) and the other as a char-mangling mechanism to make weired filenames
propper class names.

For a detailed discussion search the archives for topics like:
"jsp-filenames should be less than 20 characters"

Reagards,
Andreas

 -Original Message-
 From: Aleksey Tsalolikhin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 2:50 AM
 To: [EMAIL PROTECTED]
 Subject: What's with the _0002f in the filenames? (Precompiling JSP's)
 
 
 Ok, here's a naive question:
 
 When Tomcat (3.2b8/Sun JDK 1.2.2_06) runs a JSP file for me, 
 say, somefile.jsp,
 I notice it
 
 a) precompiles to somefile.java in the work directory for that context
 b) compiles it to _0002fsomefile_0002ejspsomefile_0.class
 c) renames that to _0002fsomefile_0002ejspsomefile.class and 
 executes it
 
 Why not somefile.class?
 
 It'd make precompiling JSP's into classes a lot easier; I could run
 jspc to precompile the *.java files, and then "javac *.java" to 
 precompile the class files.
 
 Sincerely,
 Aleksey
 
 UNIX System Administrator
 



Re: tomcat/freeBSD - mod_jk

2000-11-29 Thread AC

I'm running Tomcat 3.2b6 on a FreeBsd 4.1.1-STABLE with both Jdk 1.8, Jdk 
1.2 Linux and native Jdk 1.2 Beta. I did some test with velometer and the 
response are quite good with all the versions.
The fastest was the Linux version (!) but now I'm stressing the native 1.2 
to check if is stable enough (and for servlets an jsp seems to be stable. 
No crash till now). In production environment I'm still using the 1.8 with 
TYA jit.

I'm still using the mod_jserv because I had some problems with mod_jk (I 
have not tested the latest versions).  If anyone has tested it, any helps 
are welcome.

thanks
andrea



At 10.28 18/11/2000 +0100, you wrote:
On Fri, Nov 17, 2000 at 11:42:21AM -0700, oj49 wrote:
  Hi,
  Anyone out there running Tomcat with the freeBSD port of JDK1.2.2 on 
 any recent
  of freeBSD? Any pointers or comments?

I cannot swaer that it was the FreeBSD port of jdk1.2 aand I'm not sure
whether it's jdk1.2.2 (with all these confusing numbers these days :-)
but I'm using tomcat (still 3.1beta but will probably
migrate to 3.2b7 this weekend) under FreeBSD with a PIII/500 and 256 MB
and I'm very satisfied with this combination.

 
  thanks
  -aaz

--
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]




Re: Streaming to servlet under Tomcat/IIS

2000-11-29 Thread John . Nordgaard



Sorry, I left out the data streaming in the last posting.
What I meant to write was:

// Client side:
Socket s = new Socket(host, port);
OutputStream os = s.getOutputStream();
DataOutputStream dos = new DataOutputStream(os);
dos.writeBytes("GET /proxy HTTP/1.0\r\n\r\n");
dos.writeBytes(data);// == Fairly vital part...
dos.flush();
...




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



duplicating http-headers?

2000-11-29 Thread Benedikt Eric Heinen


Hi there,

  I have a problem with tomcat, which most likely is a setup
problem. But I can't find anything about it in the FAQ so far.

  I set up Tomcat to run under apache-1.3.12 (Debian unstable
doesn't have a newer apache yet). I can access Tomcat directly,
which works fine. But accessing it through apache results in pages
with an increasing number of http-header blocks in them,
e.g. accessing the numberguessing jsp page, after a few accesses I
get:


Status: 200 OK
Content-Type: text/html;charset=8859_1
Set-Cookie2: JSESSIONID=dkcj56cxo1;Version=1;Path="/";Discard
Set-Cookie: JSESSIONID=dkcj56cxo1;Path=/
Servlet-Engine: Tomcat Web Server/3.3 dev ( JSP 1.1; Servlet 2.2 )

Status: 200 OK
Content-Type: text/html;charset=8859_1
Set-Cookie2: JSESSIONID=dkcj56cxo1;Version=1;Path="/";Discard
Set-Cookie: JSESSIONID=dkcj56cxo1;Path=/
Servlet-Engine: Tomcat Web Server/3.3 dev ( JSP 1.1; Servlet 2.2 )

Status: 200 OK
Content-Type: text/html;charset=8859_1
Set-Cookie2: JSESSIONID=dkcj56cxo1;Version=1;Path="/";Discard
Set-Cookie: JSESSIONID=dkcj56cxo1;Path=/
Servlet-Engine: Tomcat Web Server/3.3 dev ( JSP 1.1; Servlet 2.2 )

Status: 200 OK
Content-Type: text/html;charset=8859_1
Set-Cookie2: JSESSIONID=ennly4zbx1;Version=1;Path="/";Discard
Set-Cookie: JSESSIONID=ennly4zbx1;Path=/
Servlet-Engine: Tomcat Web Server/3.3 dev ( JSP 1.1; Servlet 2.2 )

!--
  Copyright (c) 1999 The Apache Software Foundation.  All rights 
  reserved.



Apache is using tomcat via mod_jk:

LoadModule jk_module /usr/lib/apache/1.3/mod_jk.so

IfModule mod_jk.c
  Alias /cocoon /icemark/webapps/cocoon
  JkWorkersFile /icemark/opt/tomcat/conf/workers.properties
  JkLogFile  /var/log/apache/tomcat/jk.log
  JkLogLevel warn
  JkMount /*.jsp ajp12
  JkMount /servlet/* ajp12
  JkMount /examples/* ajp12
/IfModule



Also interesting - Changing 

JkMount /*.jsp ajp12
to 
JkMount /*.jsp ajp13

results in 

404 - Not Found (Original request/tomcat.notFoundHandler)

when trying to access the numberguess.jsp...



Any clue what's going wrong here?  Do I need to upgrade apache or
did I just make "Stupid Beginners Trick #42"?

I would rather stick to using the debian apache package -- I'm not
really into recompiling everything I use... ;)




  Benedikt


  "Study as if you were going to live forever;
   live as if you were going to die tomorrow."
 -- Maria Mitchell




trouble compiling mod_jk.so on Linux

2000-11-29 Thread lblackburn
Title: trouble compiling mod_jk.so on Linux





I am having trouble creating the shared object library mod_jk.so on linux.


After running the below command I get the following error.


$APACHE_HOME/bin/apxs -o mod_jk.so -DLINUX -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -c *.c ../jk/*.c

Error is:
apxs:Break: Command failed with rc=255


Any ideas what I could be doing wrong? I even tried some options that seemed to fix my compile problem on solaris by setting -lposix4 but that did not seem to help.

The whole output of the run looks like:
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c mod_jk.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_ajp12_worker.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_ajp13.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_ajp13_worker.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_connect.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_jni_worker.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_lb_worker.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_map.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_msg_buff.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_nwmain.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_pool.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_sockbuf.c

*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED -I/home/dev/software/apache_1.3.14/include -I../jk -I/usr/local/jdk1.2.2/include/ -I/usr/local/jdk1.2.2/include/linux -DLINUX -c ../jk/jk_uri_worker_map.c


Unable to open taglibrary taglib.tld

2000-11-29 Thread Gonçalo Martins


Hi,

I am using Tomcat 3.1 in Win2000 and I have the following error using Custom
Tablibs :

org.apache.jasper.JasperException: Unable to open taglibrary taglib.tld :
Unable to open the tag library descriptor: Connection refused: no further
information at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java:672)
taglib.tld is declared in the web.xml for this webapp.

Anybody got an error like that ?

Thanks

Gonçalo Martins




Java don't stop when I shutdown.

2000-11-29 Thread Jaco van Staden

Hi

When I excecute ../bin/shutdown.sh all the Java Threads stay alive. When I 
start again new Threads are started. And so on..

What could cause this?

I am using Tomcat 3.1 on RH7 with SUN JDK1.2.2 -native threads.


-- 
AJ van Staden
Cyber Seal Business and Industrial Information systems
Pta Office Tel: +27 12 998 5674, Pta Office Fax: +27 12 998 0249,
Cell: +27 82 927 5513



RE: TOMCAT-APACHE configuration problem. (fwd)

2000-11-29 Thread Stubenrauch,Andreas

As the old saying goes: ClassNotFound is always right!

Your tomcat can't find the class coreservlets.ShowParameters you are trying
to use.
Put it in a propper place. See various discussions about "classpath" in
archives

Beside that your errorlogs look like you have a major config jam (look at
those file not founds)

 -Original Message-
 From: Shriranga K Kulkarni [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 11:49 AM
 To: [EMAIL PROTECTED]
 Subject: TOMCAT-APACHE configuration problem. (fwd)
 
 
 
 Hello All,
 
   I am getting the following error while loading a servlet through
 TOMCAT-APACHE configuration. Following is the configuration 
 file in which
 the error is also highlighted. Can any one help me in solving this.
 Thanks in advance
 Sriranga.
 
 
 Context log: path="/examples" Adding context path="/examples" 
  docBase="webapps
 /examples"
 Context log: path="" Adding context path=""  docBase="webapps/ROOT"
 Context log: path="/test" Adding context path="/test"  
 docBase="webapps/test"
 Starting tomcat install="/sriranga/tomcat/jakarta-tomcat" 
 home="/sriranga/tomcat/jakarta-tomcat" classPath=".:
 /sriranga/tomcat/jakarta-tomcat/lib/ant.jar:/sriranga/tomcat/j
 akarta-tomcat/
 lib/jasper.jar:/sriranga/tomcat/jakarta-tomcat/lib/servlet.jar
 :/sriranga/
 tomcat/jakarta-tomcat/lib/test:/sriranga/tomcat/jakarta-tomcat/lib/
 webserver.jar:/sriranga/tomcat/jakarta-tomcat/lib/xml.jar:
 /sriranga/jdk1.2.2/lib/tools.jar:/sriranga/jdk1.2.2/lib/tools.jar"
 Context log: path="/admin" Automatic context load 
 docBase="/sriranga/tomcat/
 jakarta-tomcat/webapps/admin"
 Context log: path="/admin" Adding context path="/admin"  
 docBase="/sriranga/
 tomcat/jakarta-tomcat/webapps/admin"
 Context log: path="/coreservlets" Automatic context load 
 docBase="/sriranga/
 tomcat/jakarta-tomcat/webapps/coreservlets"
 Context log: path="/coreservlets" Adding context 
 path="/coreservlets"  docBase=
 "/sriranga/tomcat/jakarta-tomcat/webapps/coreservlets"
 Context log: path="/admin" File not found /sriranga/tomcat/
 jakarta-tomcat/webapps/admin/WEB-INF/web.xml, using only defaults
 Context log: path="/examples" File not found 
 /sriranga/tomcat/jakarta-tomcat/
 webapps/examples/WEB-INF/web.xml, using only defaults
 Context log: path="/coreservlets" File not found /sriranga/tomcat/
 jakarta-tomcat/webapps/coreservlets/WEB-INF/web.xml, using 
 only defaults
 Context log: path="/test" File not found 
 /sriranga/tomcat/jakarta-tomcat/
 webapps/test/WEB-INF/web.xml, using only defaults
 Context log: path="" File not found 
 /sriranga/tomcat/jakarta-tomcat/webapps/
 ROOT/WEB-INF/web.xml, using only defaults
 Starting endpoint port="8080" handler="org.apache.tomcat.service.http.
 HttpConnectionHandler" 
 Starting endpoint port="8007" 
 handler="org.apache.tomcat.service.connector.
 Ajp12ConnectionHandler" 
 Context log: path="" Class Not Found in init
  java.lang.ClassNotFoundException: coreservlets.ShowParameters
   at 
 org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(Adaptiv
 eClassLoader.java:450)
   at 
 org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(Adapt
 iveServletLoader.java:141)
   at 
 org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapp
 er.java:294)
   at 
 org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWra
 pper.java:445)
   at 
 org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWra
 pper.java:597)
   at 
 org.apache.tomcat.servlets.InvokerServlet.service(InvokerServl
 et.java:257)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
 org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWra
 pper.java:503)
   at 
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
   at 
 org.apache.tomcat.service.http.HttpConnectionHandler.processCo
 nnection(HttpConnectionHandler.java:160)
   at 
 org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEnd
 point.java:338)
   at java.lang.Thread.run(Thread.java:475)
   
 
 
 
 



importing javax.mail.* from within JSP servlets

2000-11-29 Thread Giorgio Brajnik

I'm using tomcat3.1+apache and jdk1.3.0_01 on linux redhat 6.2.
I'm not using j2ee but usually (i.e. outside servlets) import its
packages. 

I'm trying to write a jsp that imports javax.mail.* (from j2ee.jar) 
but jasper complains 
with "Package javax.mail not found in import.
import javax.mail.*;"

I tried to put the i2ee.jar file almost everywhere, including

/tomcat/lib
my_application_context/lib
/usr/java/jdk1.3.0_01/lib/
in the classpath environment var used by tomcat.sh
./tomcat/conf/tomcat.properties:
   wrapper.classpath="/usr/java/j2sdkee1.2.1/lib/j2ee.jar" 

but nothing suceeded so far.

What should I do?

Thanks a lot.

Giorgio Brajnik



RE: start tomcat and apache at first

2000-11-29 Thread Stubenrauch,Andreas

The startup order is determined by the numbers x,y in the link Sxxtomcat
Kyytomcat
The lower the number the sooner it gets called (on entering or leaving the
runlevel)

Search the archives for nice startup scripts

Regards,
Andreas

 -Original Message-
 From: Carlos [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 11:23 AM
 To: [EMAIL PROTECTED]
 Subject: start tomcat and apache at first
 
 
 wen i init my linux (restart) how can i make for restarting 
 tomcat first and
 later apache?
 i am using a linux suse 7.
 I have put in the rcd.2  3 a symlink to the 
 /opt/jakarta/bin/tomcat.sh
 but is not run
 
 thanks
 Carlos
 



RE[2]: Tomcat issue - Fresh data not brought forward

2000-11-29 Thread Scott Hamilton

Hi,
   Yes, I did check the transaction is commited.


OK if you are doing an explicit connection.commit();
then the only time I've had a similar problem was when
I was using the same bean from different JSP pages and
the bean was set scope="session"  and I had kept
the connection to the database open, so I was
doing a DriverManager.getConnection() once and never
did a corresponding connection.close()  The data
I always got was from when the first transaction was
started, even with a connection.commit() it appeared
as though one transaction was commited in the RDBMS
but a new transaction wasn't started.


Scott.



RES: importing javax.mail.* from within JSP servlets

2000-11-29 Thread Jose Euclides da Silva Junior - DIGR.O

-BEGIN PGP SIGNED MESSAGE-

I have the same doubt too, but in WINDOWS NT - 4.0 environment.

José Euclides Júnior
__
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] 
[EMAIL PROTECTED]
http://euclides.8m.com
If i fail, if i succeed, at least i live as i believe.

- -Mensagem original-
De: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Enviada em: Quarta-feira, 29 de Novembro de 2000 10:21
Para:   [EMAIL PROTECTED]
Assunto:importing javax.mail.* from within JSP servlets

I'm using tomcat3.1+apache and jdk1.3.0_01 on linux redhat 6.2.
I'm not using j2ee but usually (i.e. outside servlets) import its
packages. 

I'm trying to write a jsp that imports javax.mail.* (from j2ee.jar) 
but jasper complains 
with "Package javax.mail not found in import.
import javax.mail.*;"

I tried to put the i2ee.jar file almost everywhere, including

/tomcat/lib
my_application_context/lib
/usr/java/jdk1.3.0_01/lib/
in the classpath environment var used by tomcat.sh
./tomcat/conf/tomcat.properties:
   wrapper.classpath="/usr/java/j2sdkee1.2.1/lib/j2ee.jar" 

but nothing suceeded so far.

What should I do?

Thanks a lot.

Giorgio Brajnik
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.1

iQCVAwUBOiUl8d0YhuJ3BUxtAQETYAP+Pg4Wvr/2HNIN0pwU5PwwDBDJgc07n0t7
hVzMOjpqwOO1IIIvTDqpKGvzSQNmRPFLsPhGtM4LaBcDYr613S2R11ajLn6JOzEI
850e+QrCRjN0decyH/6c+tRXtIMCMG+s0kx5OfJ4xIvhiURqmrwf3xqBq3xIjOII
ZO83M8S4frE=
=QErM
-END PGP SIGNATURE-



Help me, PLEASE! Tomcat X multipart-form/data

2000-11-29 Thread Jose Euclides da Silva Junior - DIGR.O

-BEGIN PGP SIGNED MESSAGE-

Hi,
it seems to happen a foolish bug whenever JSP of Tomcat deals with
multipart/form-data. Since I have developed all my project with JSP,  now it
becomes very difficult to change all source files  into servlets. It seems
to be a bug when JSP performs  getInputStreams method with request object ,
as you can see below. Below, you can see my source JSP file and the Tomcat
system message.

Can somebody help me what is happening?

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"!-- SerStar Formulario 2
--

%@ page session="true"
import="ErrorBean,javax.servlet.*,javax.servlet.http.*,java.io.*,
java.util.*;" errorPage="Errorpage.jsp" %
jsp:useBean id="errform" class="ErrorBean" scope="session" /

HTML
HEAD
TITLESerStar - Cadastro /TITLE
/HEAD
BODY bgcolor="#FF"

%
errform.setCoderror("ErrorS020");
String cAddr = request.getRemoteAddr(); 
if ( cAddr.equals(session.getValue("serstar")))
{ % 
FORM method="POST" name="formtwo" 
  action="/examples/servlet/StarServlet"
%
 PrintWriter out = response.getWriter(); 
   if (request.getMethod().equals("POST") 
   request.getContentType().startsWith("multipart/form-data"))
   {
 int index =request.getContentType().indexOf("boundary=");
 if ( index  0)
{
System.out.println(" Stream inconsistente ");
}
   }
   String boundary= request.getContentType().substring(index+9);
   byte[] tmpbuffer = new byte[8192];
   int length=0;

   String inputLine = null;
   boolean moreData=true, naoachei=true;   
   ServletInputStream instream = request.getInputStream();
   
for (int i=1;i21;i++)
  {
while ( inputLine.indexOf(boundary)  0  moreData = true )
{
 length = instream.readLine( tmpbuffer,0,tmpbuffer.length);
   inputLine = new String( tmpbuffer, 0,0, length );
   if ( length  0 )
  {
moreData = false;
  }
 }

if ( moreData )
   { 
   length = instream.readLine(tmpbuffer,0,tmpbuffer.length);
   inputLine = new String(tmpbuffer, 0,0,length);

 if (( i == 1 ) 
   ( inputLine.indexOf("nome") = 0 ))
  {   
length =
instream.readLine(tmpbuffer,0,tmpbuffer.length);
inputLine = new String(tmpbuffer,0,0,length);%
INPUT type="HIDDEN" name="%= nome %"
value="% = inputLine %"
   %}
   else 
   if (( i == 2 ) 
   ( inputLine.indexOf("nomeart") = 0 ))
  { 
length = 

instream.readLine(tmpbuffer,0,tmpbuffer.length);
inputLine = new String(tmpbuffer,0,0,length);%
INPUT type="HIDDEN" name="%= nomeart %"
value="% = inputLine %"
   % }
   else
 if (( i == 3 ) 
   ( inputLine.indexOf("sexo") = 0 ))
  { 
length = 

instream.readLine(tmpbuffer,0,tmpbuffer.length);

inputLine = new String(tmpbuffer,0,0,length);%
INPUT type="HIDDEN" name="%= sexo %"
value="% = inputLine %"
   % }
   else 
 if (( i == 4 ) 
   ( inputLine.indexOf("dia") = 0 ))
  { 
length =
instream.readLine(tmpbuffer,0,tmpbuffer.length);

inputLine = new String(tmpbuffer,0,0,length);%
INPUT type="HIDDEN" name="%= dia %"
value="% = inputLine %"
   % }
 else
 if (( i == 5 ) 
   ( inputLine.indexOf("mes") = 0 ))
  { 
length =
instream.readLine(tmpbuffer,0,tmpbuffer.length);

inputLine = new String(tmpbuffer,0,0,length);%
INPUT type="HIDDEN" name="%= mes %"
value="% = inputLine %"
   % }
 else
 if (( i == 6 ) 
   ( inputLine.indexOf("ano") = 0 ))
  { 
length =
instream.readLine(tmpbuffer,0,tmpbuffer.length);

inputLine = new String(tmpbuffer,0,0,length);%
INPUT type="HIDDEN" name="%= ano %"
value="% = inputLine %"
   % }   
 else
 if (( i == 7 ) 
   ( inputLine.indexOf("profissao") = 0 ))
  { 
length =
instream.readLine(tmpbuffer,0,tmpbuffer.length);
inputLine = new 

Support for ACLs in Tomcat ?

2000-11-29 Thread HENROTAY PIERRE

I am new to this list and I have a specific question (and did not find a complete 
answer in the archives): does Tomcat support ACLs (for access control authorization) ? 
In particular, how to allow/disallow access to a given servlet via an ACL ?

Pierre Henrotay

Siemens Business Services




RE: start tomcat and apache at first

2000-11-29 Thread Saurabh Shukla

:-) Why try so hard and reboot your machine to test. the script which starts
apache, before apache add (/opt/jakarta/bin/tomcat.sh start) to start
tomcat.


Shuklix

Ps: I haven't tried this, standard Disclaimers apply. :-)

-Original Message-
From: Carlos [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 3:53 PM
To: [EMAIL PROTECTED]
Subject: start tomcat and apache at first


wen i init my linux (restart) how can i make for restarting tomcat first and
later apache?
i am using a linux suse 7.
I have put in the rcd.2  3 a symlink to the /opt/jakarta/bin/tomcat.sh
but is not run

thanks
Carlos





sun blackdown jdk1.3.0

2000-11-29 Thread Teófilo Alonso Marbán




Hi all!

Im trying to test 
Tomcat running with different jdk's. Everything is OK with 
IBMJava2-SDK-1.3-2.0.i386.rpm (and IBM's former ones and sun 1.2.2prev as 
well).
The problem appears when I try to start Tomcat with sun or 
even blackdown jsdk1.3.0*: some jsdk processes begin to run but Tomcat 
doesnt work.

Can't I use 1.3.0 with Tomcat?
Any clue about it?

Thanks in advance.


isapi_redirect.dll - Where is it?

2000-11-29 Thread Christian Rauh

Come on people,

This is the third message I post asking where I can find a compiled
binary for isapi_redirect.dll. Where is it?

Obviously, it is not "available under the win32/i386 directory where you
downloaded the Tomcat binary distribution" as the docs say in:

  
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-iis-howto.html

I believe people are using it because of the posts I am getting, did you
all compiled it? If so, can anyone send me a compiled version?

Christian Rauh

Steve Mandl wrote:
 
 Hello-
 I have a suggestion for an addition to the tomcat iis howto
 document. I have a printout I got from
 http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-iis-howto.html
 under winnt troubleshooting, step 4, you should add that the user iis
 is running with must have access to the isapi_redirect.dll, and the
 root of the drive . Otherwise you get a stop sign icon when creating
 the virtual directory. Also the user the web server uses for anonymous
 authentication (iusr_machinename) needs access to isapi_redirect.dll.
 This isn't that much extra stuff to add, and even though it might
 better belong in the documentation for iis, iis is poorly documented
 and these permission problems are very common when doing anything
 exotic with iis in general.
 -Steve Mandl
  \|||/
  (O O)
 --ooO-(_)-Ooo
 |Steve Mandl   | PDC Programming Group
 |Programmer| Cornell University
 |[EMAIL PROTECTED] | 110 Humphreys Service
 Building
 |Voice: 607-255-8010   | Ithaca, NY 14850
 |Fax:   607-274-2022  .oooO| dataworks.fcs.cornell.edu
 ---(   )Oooo.
 \ ( (   )
  \_) ) /
 (_/



Re: isapi_redirect.dll - Where is it?

2000-11-29 Thread Jacob Kjome

Really, I can't believe anyone would want to continue to use Tomcat 
3.1.  Tomcat 3.2 (even in the early betas) has been far better.  Also, you 
will find all files extra files in the 3.2 downloads.  The most current 
would be 3.2 beta 8.  If you still want to use Tomcat 3.1, just grab the 
extra files out the 3.2's win32 directory:

http://jakarta.apache.org/builds/tomcat/release/v3.2-beta-8/bin/win32/i386/

Jake

At 01:01 PM 11/29/2000 -0200, you wrote:
Come on people,

This is the third message I post asking where I can find a compiled
binary for isapi_redirect.dll. Where is it?

Obviously, it is not "available under the win32/i386 directory where you
downloaded the Tomcat binary distribution" as the docs say in:


http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-iis-howto.html

I believe people are using it because of the posts I am getting, did you
all compiled it? If so, can anyone send me a compiled version?

Christian Rauh

Steve Mandl wrote:
 
  Hello-
  I have a suggestion for an addition to the tomcat iis howto
  document. I have a printout I got from
  
 http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-iis-howto.html
  under winnt troubleshooting, step 4, you should add that the user iis
  is running with must have access to the isapi_redirect.dll, and the
  root of the drive . Otherwise you get a stop sign icon when creating
  the virtual directory. Also the user the web server uses for anonymous
  authentication (iusr_machinename) needs access to isapi_redirect.dll.
  This isn't that much extra stuff to add, and even though it might
  better belong in the documentation for iis, iis is poorly documented
  and these permission problems are very common when doing anything
  exotic with iis in general.
  -Steve Mandl
   \|||/
   (O O)
  --ooO-(_)-Ooo
  |Steve Mandl   | PDC Programming Group
  |Programmer| Cornell University
  |[EMAIL PROTECTED] | 110 Humphreys Service
  Building
  |Voice: 607-255-8010   | Ithaca, NY 14850
  |Fax:   607-274-2022  .oooO| dataworks.fcs.cornell.edu
  ---(   )Oooo.
  \ ( (   )
   \_) ) /
  (_/




RE: isapi_redirect.dll - Where is it?

2000-11-29 Thread Russell Freeman

...but 3.2 isn't GA yet. People won't want to ship products on beta
software.

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: 29 November 2000 15:25
To: [EMAIL PROTECTED]
Subject: Re: isapi_redirect.dll - Where is it?


Really, I can't believe anyone would want to continue to use Tomcat 
3.1.  Tomcat 3.2 (even in the early betas) has been far better.  



AJPV12

2000-11-29 Thread Dan Yin

I found the following note in your instruction, can you tell me where to
find AJPV12.  Thank you in advance for your reply.

Special note: The Tomcat service is using AJPV12 to perform clean
shutdown and you should make sure that an AJPV12 connector is defined in
your server.xml. In the absence of a configured AJPV12 port the Tomcat
service will kill Tomcat abruptly (that is murder it) without giving it
a chance to clean up. 

Regards,
Dan




Server timeout IllegalMonitorStateException

2000-11-29 Thread Teófilo Alonso Marbán




Hi folks!

I'm making a JSP performance test using apache's 
ab (a client and a server within the same network) in two different 
situations:
a) running 
tomcat
b) running tomcat with apache + mod_jk

When I'm testing tomcat (without apache) everything seems to 
go OK but after 7 or 8 times I get a message Server time out. Operation 
now in progress and Tomcat hangs. I'm getting about 125 requests/sec 
(except for the first time).

I get only 0.75 requests/sec when I'm testing 
tomcat + apache with the same test and I get the same message after two or three 
tries. But there is one difference: Tomcat doesn't hang (not 
always).


Do you know where the message server time 
out comes from? ab? apache? tomcat? 

I get also something like 
 
java.lang.IllegalMonitorStateException: JVMLK008: current thread not 
owner at 
java.lang.Object.wait(Native 
Method) at 
java.lang.Object.wait(Object.java(Compiled 
Code)) at 
org.apache.tomcat.util.Queue.pull(Queue.java(Compiled 
Code)) at 
org.apache.tomcat.logging.LogDaemon$1.run(TomcatLogger.java(CompiledCode)) 
at org.apache.tomcat.logging.LogDaemon.run(TomcatLogger.java(Compiled 
Code))
but not very frecuently. 
Is it a misconfiguration problem or is a problem 
of the jvm?

I'm using tomcat3.2b8 + mod_jk
 
apache1.3.14
 
IBMJava2-SDK-1.3-2.0 

 
RedHat6.2

Thanks in advance.


RE: isapi_redirect.dll - Where is it?

2000-11-29 Thread Jacob Kjome

Ok, I can see that, but 3.2 will be out in just a few days (hopefully) and 
the original question was about getting isapi_redirect.dll.  I pointed you 
to it.

jake

At 03:20 PM 11/29/2000 +, you wrote:
...but 3.2 isn't GA yet. People won't want to ship products on beta
software.

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: 29 November 2000 15:25
To: [EMAIL PROTECTED]
Subject: Re: isapi_redirect.dll - Where is it?


Really, I can't believe anyone would want to continue to use Tomcat
3.1.  Tomcat 3.2 (even in the early betas) has been far better.




RE: root-relative URLs don't work(Tomcat 3.1)

2000-11-29 Thread VONKA, Marek

Hi,

Not an expert so not sure what is suppossed to happen, but for referencing
resources like this I've found that you also have to include your
application context name, so it would be "/myContextName/style.css". Dosen't
seem correct to me, but that's what I've found for Tomcat 3.1. Note that for
aRequestDispatcher.forward(...) you would not include the context name. Yuk.

Hope that helps!

Marek

-Original Message-
From: Russell Freeman [mailto:[EMAIL PROTECTED]]
Sent: 29 November 2000 14:10
To: '[EMAIL PROTECTED]'
Subject: "root-relative" URLs don't work(Tomcat 3.1)


Whenever I have a web page that references a "root-relative" resource, e.g.
"/style.css", tomcat can't see to resolve it properly. It seems to be
ignoring the web site root as specified in server.xml. Obviously if the
resource lives in the same location as the current page I can drop the
leading forward-slash. However this won't work for resources in different
locations.

I've tried turning on debug for the webapp but I'm not seeing anything.

Any help appreciated

Russ


___
This email is confidential and intended solely for the use of the 
individual to whom it is addressed. Any views or opinions presented are 
solely those of the author and do not necessarily represent those of 
Sema Group. 
If you are not the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing, or 
copying of this email is strictly prohibited.

If you have received this email in error please notify the Sema Group
Helpdesk by telephone on +44 (0) 121 627 5600.
___



servlet

2000-11-29 Thread Carlos

in my tomcat if i invoque http://server/servlet/class it not response.
How can i configute it?
if i use virtual domains how and where can i configure for the classes
alwais use the classes that are in ROOT/WEB-INF/classes?
thanks
Carlos




RE: servlet

2000-11-29 Thread Aumann, Shad

Carlos,

You need to explicitly configure Tomcat to work with Apache.  See the HOWTO
for configuring mod_jk at:

http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html

Hope this helps.

Shad

 -Original Message-
 From: Carlos [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 11:19 AM
 To: [EMAIL PROTECTED]
 Subject: servlet
 
 
 i am working with tomcat(3.2b8)+apache
 in i invoque http://.../servler/...
 the system says me there is not found
 if i read the logs i see that the system whant to founf
 http://:8080/servlet/...
 what is may problem and the solution?
 thanks
 Carlos
 
 



Problem with Session tracking API using with Tomcat 3.1 and Reverse Proxy

2000-11-29 Thread GCT



Hi!

I've encountered the following problem using the Session Tracking API
 in Tomcat 3.1.

 I use servlets (not JSP!) under the following environment:

 java 1.2.2
 tomcat 3.1 (servlet.jar version 2.2)
 apache 

For invalidating a session, in the servlet scope, I use the following code:

HttpSession session = req.getSession(true);
session.invalidate();
session = req.getSession(true);

The code works fine if I DO NOT USE reverse proxy.
Of couse the client (i.e. IExplorer 5.0 or Netscape 4.5/4.7) is set to accept
cookies.

But when I DO use reverse proxy with the same client (accepting cookies, too),
the server is unable to save the
session-id.
It appears not to be a cookie problem because if I try to write a cookie this
way (in the servlet scope, too) :

cookie=setCookie("xyz","123");
res.addCookie(cookie);

and then continuing :

res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println(...)

from other servlets, I can read the value of cookie xyz, BUT I can't read no way
 the cookie (named JSESSIONID) used by
the Session Tracking API of Tomcat 3.1 to save session-id.
So the session isn't correcty tracked and the servlet wrongly thinks new
sessions are started.

Put in other words, it seems that req.getSessione(true) isn't able to save
properly the cookie JSESSIONID when
using reverse proxy mechanism.

Can anyone help me?

Paolo Tavano
Csi Piemonte






Problem retrieving bean from session....

2000-11-29 Thread James Morgenstein

All-

Three pages into my application I am attempting to retrieve a bean using the
same useBean clause as on the second page (cut and paste here for
comparison):

  jsp:useBean id="CAMPAIGN" scope="session"
type="com.recommendit.beans.CampaignVB106Bean"   /jsp:useBean
  jsp:useBean id="CAMPAIGN" scope="session"
type="com.recommendit.beans.CampaignVB106Bean"   /jsp:useBean

The bean should already be in the session from previous pages; therefore, I
have a type clause instead of a class clause.

I am receiving the following error on a inconsistent basis:
  java.lang.InstantiationException: bean CAMPAIGN  not found within scope

I am using Tomcat 3.2b8 with URL rewriting in conjunction Apache 1.3 on
Redhat Linux 6.2.

Is it possible that the application server is not attaching back to the same
session.  I have started logging the session ids and cookies to a log file
and there may be some mismatch here.

Thoughts?

Thanks for the help.

James M. Morgenstein


BEGIN:VCARD
VERSION:2.1
N:Morgenstein;James;Michael;Mr.
FN:James Michael Morgenstein
NICKNAME:James
ORG:Recommend-It;Technology
TITLE:Vice-President
TEL;WORK;VOICE:732-296-8885
TEL;PAGER;VOICE:888-767-1583
TEL;WORK;FAX:732-296-8817
ADR;WORK:;;77 Paterson Street;New Brunswick;NJ;08901;USA
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:77 Paterson Street=0D=0ANew Brunswick, NJ 08901=0D=0AUSA
URL:
URL:http://www.recommend-it.com
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:2623T031446Z
END:VCARD



RE: root-relative URLs don't work(Tomcat 3.1)

2000-11-29 Thread Russell Freeman

Thanks Marek, 

Yes, that was the conclusion I have come to trying to get it working
although I still couldn't get .forward() to work either.

Yes, hardcoding /context-name/ before all links seems like a bad idea to me.
Surely there must be a better way!?

-Original Message-
From: VONKA, Marek [mailto:[EMAIL PROTECTED]]
Sent: 29 November 2000 15:51
To: '[EMAIL PROTECTED]'
Subject: RE: "root-relative" URLs don't work(Tomcat 3.1)


Hi,

Not an expert so not sure what is suppossed to happen, but for referencing
resources like this I've found that you also have to include your
application context name, so it would be "/myContextName/style.css". Dosen't
seem correct to me, but that's what I've found for Tomcat 3.1. Note that for
aRequestDispatcher.forward(...) you would not include the context name. Yuk.

Hope that helps!

Marek

-Original Message-
From: Russell Freeman [mailto:[EMAIL PROTECTED]]
Sent: 29 November 2000 14:10
To: '[EMAIL PROTECTED]'
Subject: "root-relative" URLs don't work(Tomcat 3.1)


Whenever I have a web page that references a "root-relative" resource, e.g.
"/style.css", tomcat can't see to resolve it properly. It seems to be
ignoring the web site root as specified in server.xml. Obviously if the
resource lives in the same location as the current page I can drop the
leading forward-slash. However this won't work for resources in different
locations.

I've tried turning on debug for the webapp but I'm not seeing anything.

Any help appreciated

Russ


___
This email is confidential and intended solely for the use of the 
individual to whom it is addressed. Any views or opinions presented are 
solely those of the author and do not necessarily represent those of 
Sema Group. 
If you are not the intended recipient, be advised that you have received
this
email in error and that any use, dissemination, forwarding, printing, or 
copying of this email is strictly prohibited.

If you have received this email in error please notify the Sema Group
Helpdesk by telephone on +44 (0) 121 627 5600.
___



Re: Some pointers in getting SSL in Tomcat 3.2

2000-11-29 Thread Thom Park

Hi,

bear with me on this one but...

" It is NOT enough to download the binaries from the jakarta
web site and follow the instructions in server.xml.  You have to build
it from source (and make sure that the JSSE files are in the classpath)."

...Why not? is there some special build directives that pull dummy JSSE
references in that will
'block' access to the real JSSE or some thing else. I need to understand why
we need to do a 'special' build
for SSL tomcat.

And, yes, I haven't got SSL working with TOMCAT either ;-)

-T.




Stefán F. Stefánsson wrote:

 If you want to be able to access your pages through HTTPS you have to
 specify that the server should use port 443 to handle in the requests
 (this you do in the server.xml file on the Connector tag).  You also
 have to build the Tomcat 3.2 bX from source with the JSSE in the
 classpath.  It is NOT enough to download the binaries from the jakarta
 web site and follow the instructions in server.xml.  You have to build
 it from source (and make sure that the JSSE files are in the classpath).

 Regards, Stefan.

 -Original Message-
 From: Steven Peterson [mailto:[EMAIL PROTECTED]]
 Sent: 27. nóvember 2000 06:11
 To: [EMAIL PROTECTED]
 Subject: Some pointers in getting SSL in Tomcat 3.2

 Hi all:

 I want to get SSL working on a Tomcat-only (no Apache) machine and am
 having some SSL beginner's difficulties.

 I have downloaded Tomcat 3.2beta (8, I believe) an installed it on a
 Windows NT machine, configured server.xml and created a JSP/Servlet
 application that seems to work fine without SSL.   However, when I try
 to talk to the application through SSL, (by calling the same application
 pages through https:// instead of http://) the server simply does not
 respond.  I have loaded JSSE, updated the security properties file, and
 generated a key for "tomcat".

 1.) Am I correct in assuming that SSL works by simply calling up
 existing pages through https instead of http?
 2.) Is there a step-by-step guide anywhere to taking advantage of SSL on
 Tomcat?

 Thanks for any pointers.

 - Steve

 --
 Steven Peterson, President
 Frontier Productions, Inc.
 310 Wesley Drive
 Chapel Hill, NC 27516
 http://www.frontierproductions.net
 Tel: 919-942-1386
 Fax: 919-933-2677




RE: Some pointers in getting SSL in Tomcat 3.2

2000-11-29 Thread GOMEZ Henri

Take a look at the following documents for SSL and Tomcat :

Will be included in 3.2 release ;-)


Title: Tomcat and SSL




 

   
  
   
   
  

  

Tomcat and SSL
By Gomez Henri [EMAIL PROTECTED]
Table of Contents

  Tomcat and SSL
  Building tomcat with SSL support
  Tomcat with Apache and mod_jk
  SSL via apache
  SSL direct
  Credits


Tomcat and SSL
Tomcat could use SSL directly (via an HTTP connector supporting SSL) or via 
  an Apache SSLified (Apache-SSL or apache-mod_ssl) 
  with the mod_jk connector.

Building tomcat with SSL support
If you want to rebuild the tomcat with SSL, be carefull of your CLASSPATH. 
  I used to clear the CLASSPATH env var to avoid conflict in jar. A common case 
  of conflict is for XML parsers (xerces & jaxp). tomcat need a recent XML parser 
  like Apache Group xerces 1.1.2 or Sun's jaxp 1.0.1.
At build time, (via ant), tomcat will check for some libs and will then included 
  more or less options. It's the case of SSL support. If you have the JSSE 1.0.2 
  jars in your CLASSPATH, tomcat will be built with SSL (SSLSocketFactory). tomcat 
  will use the JSSE jars (jcert.jar, jsse.jar, jnet.jar).This software COULDN'T 
  BE INCLUDED in tomcat. You'll have to go to jsse 
  home page and download from there the domestic (US/Canada) or global archive. 
  Then copy the 3 jars in tomcat runtime classpath lib ($TOMCAT_HOME/lib).

Tomcat with Apache and mod_jk
If you use Apache with SSL (apache-ssl or apache-mod_ssl), the apache connector 
  mod_jk will be able to forward to tomcat some SSL informations if JkExtractSSL 
  directive is present in your httpd.conf. 
Informations are :

   
HTTPS
apache redirect to tomcat from an SSL area
  
   
SSL_SESSION_ID
SSL session ID
  
   
SSL_CIPHER
SSL CIPHER used
  
   
SSL_CLIENT_CERT
SSL Certificate of client
  

Since apache-ssl and apache-mod_ssl use differents env vars, you could adapt 
  SSL vars via the following JK vars 

  JkExtractSSL
  JkHTTPSIndicator
  JkSESSIONIndicator
  JkCIPHERIndicator
  JkCERTSIndicator: 

here is an example of directive to include in httpd.conf for use with mod_ssl 

# Should mod_jk send SSL 
  information to Tomact (default is On)
  JkExtractSSL On 
  # What is the indicator for SSL (default is HTTPS)
  JkHTTPSIndicator HTTPS 
  # What is the indicator for SSL session (default is SSL_SESSION_ID) 
  JkSESSIONIndicator SSL_SESSION_ID 
  # What is the indicator for client SSL cipher suit (default is SSL_CIPHER) 
  JkCIPHERIndicator SSL_CIPHER 
  # What is the indicator for the client SSL certificated (default is SSL_CLIENT_CERT) 
  
  JkCERTSIndicator SSL_CLIENT_CERT 
Warning, even if mod_jk support both ajp12 (old version from ApacheJServ) and 
  ajp13, only ajp13 could forward SSL informations to tomcat.

SSL via apache
mod_jk seems to support the VirtualHost directive of Apache. It's specialy 
  usefull when using an apache-mod_ssl with tomcat.
  This config will easily secure your webapps via Apache SSL support. Just take 
  care of setting these jk vars outside VirtualHost directives :
 JkWorkersFile /etc/httpd/conf/workers.properties
  JkLogFile /var/log/httpd/mod_jk.log 
  JkLogLevel warn 
The jk redirect stuff could be set in virtual hosts : 
VirtualHost _default_:443
  SSLEngine on 
  SSLCipherSuite ALL:!ADH:!EXP56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL 
  
  
  # other SSL stuff
  
  Alias /alesia "/var/tomcat/webapps/alesia"  
  
  Directory "/var/tomcat/webapps/alesia"
  Options Indexes FollowSymLinks  
  
  /Directory> 
  
  JkMount /alesia/servlet/* ajp13 
  JkMount /alesia/*.jsp ajp13 
  
  Location "/alesia/WEB-INF/">
  AllowOverride None
  Deny from all
  /Location> 
/VirtualHost>

SSL direct
If you want tomcat run HTTP/SSL, you need to create a SSL certificate. For 
  more informations about SSL and certificates, I suggest you could take a look 
  at OpenSSL (OpenSource SSL implementation) 
  and ModSSL (SSL support for Apache)
Verify tomcat server.xml configuration file
 
   To use the HTTP with SSL 
connector in tomcat, verify that it is activated in server.xml
  Connector className="org.apache.tomcat.service.PoolTcpConnector"
Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/
Parameter name="port" value="8443"/
Parameter name="socketFactory" value="org.apache.tomcat.net.SSLSocketFactory" 
/ 
/Connector 

Generate a SSL certificate (RSA) for tomcat

  I succeed (at least) with my IBM JDK 1.3 after : 


   jsse jars MUST BE IN BOTH CLASSPATH and $JAVA_HOME/jre/lib/ext 
(JAVA  1.2)

  
   from server.xml doc.You _need_ to set up a server certificate if you want 
this to work, and you need JSSE. 


   Add JSSE jars to CLASSPATH 
   Edit $JAVA_HOME/jre/lib/security/java.security Add: security.provider.2=com.sun.net.ssl.internal.ssl.Provider
   Do: keytool -genkey 
-alias tomcat -keyalg RSA RSA is essential to work with 

Re: Some pointers in getting SSL in Tomcat 3.2

2000-11-29 Thread Trevor Little

No you can just download the binaries... I did and I have ssl working
(for Windows and linux).  Once you download the binaries you DO have to
compile 3 java files in TOMCAT_HOME/src/org/apache/tomcat/net.  Then
follow the directions in server.xml.


Thom Park wrote:
 
 Hi,
 
 bear with me on this one but...
 
 " It is NOT enough to download the binaries from the jakarta
 web site and follow the instructions in server.xml.  You have to build
 it from source (and make sure that the JSSE files are in the classpath)."
 
 ...Why not? is there some special build directives that pull dummy JSSE
 references in that will
 'block' access to the real JSSE or some thing else. I need to understand why
 we need to do a 'special' build
 for SSL tomcat.
 
 And, yes, I haven't got SSL working with TOMCAT either ;-)
 
 -T.
 
 Stefán F. Stefánsson wrote:
 
  If you want to be able to access your pages through HTTPS you have to
  specify that the server should use port 443 to handle in the requests
  (this you do in the server.xml file on the Connector tag).  You also
  have to build the Tomcat 3.2 bX from source with the JSSE in the
  classpath.  It is NOT enough to download the binaries from the jakarta
  web site and follow the instructions in server.xml.  You have to build
  it from source (and make sure that the JSSE files are in the classpath).
 
  Regards, Stefan.
 
  -Original Message-
  From: Steven Peterson [mailto:[EMAIL PROTECTED]]
  Sent: 27. nóvember 2000 06:11
  To: [EMAIL PROTECTED]
  Subject: Some pointers in getting SSL in Tomcat 3.2
 
  Hi all:
 
  I want to get SSL working on a Tomcat-only (no Apache) machine and am
  having some SSL beginner's difficulties.
 
  I have downloaded Tomcat 3.2beta (8, I believe) an installed it on a
  Windows NT machine, configured server.xml and created a JSP/Servlet
  application that seems to work fine without SSL.   However, when I try
  to talk to the application through SSL, (by calling the same application
  pages through https:// instead of http://) the server simply does not
  respond.  I have loaded JSSE, updated the security properties file, and
  generated a key for "tomcat".
 
  1.) Am I correct in assuming that SSL works by simply calling up
  existing pages through https instead of http?
  2.) Is there a step-by-step guide anywhere to taking advantage of SSL on
  Tomcat?
 
  Thanks for any pointers.
 
  - Steve
 
  --
  Steven Peterson, President
  Frontier Productions, Inc.
  310 Wesley Drive
  Chapel Hill, NC 27516
  http://www.frontierproductions.net
  Tel: 919-942-1386
  Fax: 919-933-2677



tomcat as an NT service

2000-11-29 Thread Paul Feuer
Title: tomcat as an NT service





hi. i'm having trouble finding the jk_nt_service.exe file. i've seen a couple messages talking about problems with jdk1.3 and log-on/log-off, but this is a issue i'm prepared to deal with (prolly with an auto-logon). can you point me to the file, or point out any alternatives?

thanks a bunch,


./paul



softwax

freight elevator quartet
http://www.fe4.com






RE: mod_jk for AIX?

2000-11-29 Thread Ritwick Dhar

Cristoph,

Glad to be of help. By the way, the mod_jserv.so works now (no core dump). I
used the *real* apache code, instead of the IBM one.

The IBM version is nothing but the src code that comes with the IBM HTTPS
server 1.3.6.2 (http://www-4.ibm.com/software/webservers/httpservers/) -
basically a Apache dist tweaked by IBM and with modules for SSL added. It
turns out that they have Apache1.3.7 dev code inside the IBM 1.3.6.2
version. What the ***?

Where exactly did you add the line #! /usr/local/apache/libexec/mod_jk.so?
in mod_jk.c? Where is the documentation that you mention?

Also, do you happen to know the compiler option on AIX for building
multithreaded applications? I'm trying to build openssl, and the configure
script tells me it doesn't know the options for multithreading.

Glad to meet you as well. Feel free to bookmark me ;)

Regards
Ritwick

-Original Message-
From: Christoph Leser [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 5:15 AM
To: '[EMAIL PROTECTED]'
Subject: AW: mod_jk for AIX?


I tried as you suggested and it compiled and linked without problem.
It even seems to run, although I didn't do extensive testing yet.
FYI: I added an extra line in mod_jk.so like
#! /usr/local/apache/libexec/mod_jk.so

which, according to AIX documentation should help the runtime loader to 
find the shared object.

And, of course, I moved the mod_jk.so to that directory.

Further to the core dump problem:

Have you looked into the log files?. I found some interesting files in:

/usr/local/apache/logs/access_log
/usr/local/apache/logs/error_log
/usr/local/jakarta/build/tomcat/logs/jasper.log
/usr/local/jakarta/build/tomcat/logs/servelt.log

I'm using the apache 1.3.12 and Java130 and tomcat 3.2.b8, maybe your setup 
is somewhat different

BTW: You use the apache stuff from IBM? Is that now part of AIX, or where 
did you get it from? Is it free? And how is it supported?

I noticed only little interest in AIX on this list, so I'm glad to meet you 
;-)  May I bookmark your e-mail address or are you watching thios list 
regularly?
.
Friendly regards

Christoph Leser
SP Computersysteme GmbH
E-Mail:[EMAIL PROTECTED]
Tel. +49 711 7264112
Fax: +49 711 7289860

-Ursprüngliche Nachricht-
Von:Ritwick Dhar [SMTP:[EMAIL PROTECTED]]
Gesendet am:Mittwoch, 29. November 2000 01:28
An: '[EMAIL PROTECTED]'
Cc: 'Christoph Leser'
Betreff:RE: mod_jk for AIX?

I got mod_jserv, not mod_jk to compile and link on AIX. mod_jk should be
similar. Christopher, you're right, the exports file was missing. I did the
following for mod_jserv.h:

1. Hacked the apxs file and added -qcpluscmt to make the compiler ignore 
the
// comments
2. Took a look at .exp files for the .so modules. Each had one line:
modulename_module. I created a file in the current directory called
mod_jerv.exp with one line: jserv_module.
3. invoked ld with -bE:mod_jserv.exp

This resulted in a successful compile. However, I'm still getting a core
dump :-/ from httpd.

Am I doing things the right way?

Rit

-Original Message-
From: Christoph Leser [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 27, 2000 11:44 AM
To: '[EMAIL PROTECTED]'
Subject: AW: mod_jk for AIX?


I have the same problem. It seems to me that the -bE option is missing. On
AIX we need to have a *.exp file stating what symbols are to be exported by 

the shared object we are going to build. Don't know how other systems do
it.

So we should figure out what symbols in mod_jk are to be exported (maybe
only jk_module ? ).

If nobody jumps in here, I'll try to figure it out, but it will not be
before next weekend.


Christoph Leser
SP Computersysteme GmbH
E-Mail:[EMAIL PROTECTED]
Tel. +49 711 7264112
Fax: +49 711 7289860

-Ursprüngliche Nachricht-
Von:Ritwick Dhar [SMTP:[EMAIL PROTECTED]]
Gesendet am:Montag, 27. November 2000 16:50
An: '[EMAIL PROTECTED]'
Betreff:mod_jk for AIX?

Guys,

I'm having immense difficulty building mod_jk on AIX 4.3.3. + IBM HTTP
Server 1.3.12.1 + jdk1.1.8

apxs command:
/backup/ofxsoftware/IHS1.3.12.1.bin/bin/apxs -o mod_jk.so -I../jk
-I/usr/jdk_base/include -I/usr/jdk_base/i
nclude/aix -c *.c ../jk/*.c

Compilation goes well, the link fails with:
ld -H512 -T512 -bhalt:4 -bM:SRE -bnoentry
-bI:/backup/ofxsoftware/IHS1.3.12.1.bin/libexec/httpd.exp -lc -o mod_jk.so
jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o jk_pool.o
jk_nwmain.o
jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o jk_connect.o
jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o mod_jk.o
ld: 0711-244 ERROR: No csects or exported symbols have been saved.

Can anyone tell me where I'm going wrong?

Does anyone have a prebuilt mod_jk.so for AIX?

Thanks
Rit

PS: I had no better luck with mod_jserv either. See my previous post about
HANDLER THREAD PROBLEM. Can't believe it's *this* difficult and frustrating
getting tomcat to work with Apache!



Problem forwarding to JSP when calling servlet has already processed POST data

2000-11-29 Thread Duane Morse

I have a servlet which has processed a form (method POST) and now wants to
invoke a JSP
to render the response page.  It puts a new attribute on the request object
for the JSP to pick up.
With Tomcat 3.2b8, an attempt is apparently made to re-read the POST data
for the JSP (even
though the JSP itself doesn't try to fetch any of the POST variables), and
this results in a "Short Read"
error.

How should this scenario be handled?  (I've run the same code under JRun,
and either the error
isn't fatal there, or it doesn't try to fetch POST data until the JSP
actually asks for it, and since my
JSP doesn't fetch any POST data, there's no problem.)

Duane Morse, Eldorado Computing Inc., Phoenix AZ




mod_jk config question under WinNT

2000-11-29 Thread Matt Coolidge

Hi - to configure Apache to use mod_jk under Solaris the httpd.conf code
looks like:

# Load mod_jk 
LoadModule jk_module libexec/mod_jk.so 
AddModule mod_jk.c 
QUESTION: Is this code identical under WinNT or would it be mod_jk.dll? An
example snippet would be great.

Thx,
-MC




RE: Help : HANDLER THREAD PROBLEM (Tomcat3.2b6, NT4.0, JDK1.2)

2000-11-29 Thread Ritwick Dhar



Philip,

I had 
this problem with Tomcat 3.1 with Apache on AIX (there's a previous post by me 
with title 'Handler thread problem) I Isolated the problem to mod_jserv. 
Recompiling solved it. It should be the same with mod_jk.

Rit

  -Original Message-From: Philip Chan 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 29, 2000 
  12:47 AMTo: [EMAIL PROTECTED]Subject: Help 
  : HANDLER THREAD PROBLEM (Tomcat3.2b6, NT4.0, JDK1.2)
  I got this error when I try this URL http://localhost:8007
  Is this a known bug ?(I seem to recall seeing posting with 
  title like HANDLER ...). Thx
  I download Tomcat3.2, install it and start it as 
  "standalone"without changing the configs.
  All the servlet/jsp works. So I think everything is working 
  but this.
  
  Here is the actual output in the log
  2000-11-29 12:50:44 - ContextManager: Adding context Ctx( 
  /examples )2000-11-29 12:50:44 - ContextManager: Adding context Ctx( 
  /admin )Starting tomcat. Check logs/tomcat.log for error 
  messages2000-11-29 12:50:44 - ContextManager: Adding context Ctx( 
  )2000-11-29 12:50:44 - ContextManager: Adding context Ctx( /test 
  )2000-11-29 12:50:46 - PoolTcpConnector: Starting HttpConnectionHandler on 
  80802000-11-29 12:50:46 - PoolTcpConnector: Starting 
  Ajp12ConnectionHandler on 8007
  
  HANDLER THREAD PROBLEM: java.io.IOException: Stream 
  brokenjava.io.IOException: Stream 
  broken at 
  org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Compiled 
  Code) at 
  org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:147) 
  at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled 
  Code) at 
  org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled 
  Code) at 
  java.lang.Thread.run(Compiled Code)2000-11-29 01:03:43 - Ctx( /examples ): 
  IOException in: R( /examples + /jsp/index.html + null) socket write error 
  (code=10053)


RE: temporary page

2000-11-29 Thread Sayles, Scott SAXONHQ

Here's another possibility:

Send a response and display something like "Working Please wait" and
continually flush out a little bit of text at a time like "." during
processing.  When you're done processing, you could display a javascript
call like the following.

script language="javascript"
window.location="theOtherPage.jsp"
/script

Of course, you'll want to make sure not to enclose the message inside a
table.  Typically, a browser won't display a table until it has all of it.



-Original Message-
From: Gianluca [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 11:14 AM
To: tomcat-user
Subject: temporary page


how can i send to the browser a temporary html page from servlet invoked
with post method while it is woking ?
i want that only after my servlet has finished it will response with a
sendRedirect method to the client.
 
Is it possible that ?

Thanks. 



improper content-length header

2000-11-29 Thread Juan Munoz

Hello,

I'm developing a VoiceXML application using tellme.com's tools.  Apparently,
their browser doesn't work properly unless the correct content-length header
is set.  Tomcat doesn't set this correctly from the JSPs I'm writing.  How
can I configure tomcat to set the correct content-length?  I haven't been
able to find any documentation anywhere on this.

Has anyone else here been able to get tomcat to work with tellme?

Thanks for any help,

-Juan

---
Juan Munoz
Scient (R):  Innovate - For What's Next(TM)
500 Technology Square
Cambridge, MA 02139
[EMAIL PROTECTED]
617-768-2055(W)
617-461-6631(M)



RE: tomcat as an NT service

2000-11-29 Thread Aumann, Shad
Title: tomcat as an NT service



http://jakarta.apache.org/builds/tomcat/release/v3.2-beta-8/bin/win32/i386/

HTH.

Shad

  -Original Message-From: Paul Feuer 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 29, 2000 1:54 
  PMTo: '[EMAIL PROTECTED]'Subject: tomcat as 
  an NT service
  hi. i'm having trouble finding the 
  jk_nt_service.exe file. i've seen a couple messages talking about problems 
  with jdk1.3 and log-on/log-off, but this is a issue i'm prepared to deal with 
  (prolly with an auto-logon). can you point me to the file, or point out any 
  alternatives?
  thanks a bunch, 
  ./paul 
   softwax  freight elevator quartet http://www.fe4.com 
   



RE: tomcat as an NT service

2000-11-29 Thread Paul Feuer
Title: RE: tomcat as an NT service





oops. nevermind. i found it in the cvs archive


./paul


-Original Message-
From:  Paul Feuer 
Sent: Wednesday, November 29, 2000 1:54 PM
To: '[EMAIL PROTECTED]'
Subject: tomcat as an NT service


hi. i'm having trouble finding the jk_nt_service.exe file. i've seen a couple messages talking about problems with jdk1.3 and log-on/log-off, but this is a issue i'm prepared to deal with (prolly with an auto-logon). can you point me to the file, or point out any alternatives?

thanks a bunch,


./paul



softwax

freight elevator quartet
http://www.fe4.com






JspC HOW-TO? (Was precompilations)

2000-11-29 Thread Mike La Budde

OK, I'm stumped! How do I use JspC to precompile a specific (or all of the) 
.jsp file(s)?

I've tried the following:

jspc -uriroot c:\sfwr\tomcat\webapps\examples 
-webapp  c:\sfwr\tomcat\webapps\examples 
c:\sfwr\tomcat\webapps\examples\jsp\num\numguess.jsp

and various other tries w/out success

TIA,

Mike


At 11/28/2000 06:50 PM -0800, you wrote:
On Thu, Nov 23, 2000 at 06:34:01AM -0600, Michael H. La Budde wrote:
  At 11/23/2000 09:29 AM +0100, you wrote:
  Is Possible the tomcat precompile the pages?
  there is any precompilation mode?
  there is anything to precompile?
 
  Here are two possibilities for precompiling all your jsp pages so that
  users won't have to incur that overhead:
 
  1) Take a look at conf/test-tomcat.xml in your tomcat distribution. 
 This is
  an ant build file which is used to exercize the test context. You 
 should be
  able to easily clone this to execute your own...
 
  2) Download Apache JMeter and put together the necessary test scenarios to
  run your app (thus, once again, precompiling your pages).

Hi,

 I have observed the following under Tomcat 3.2b8/Sun JDK 
 1.2.2_06, with
our application under simulated load of 50 users registering:

 Unless the registration .jsp's are already compiled into classes (by
manually going through a registration first), Tomcat starts giving 500
errors about a minute or two into the run.

 If we go through a registration manually first, and then start the
load test, it runs just fine.

 I've figured out how to use "tomcat.sh jspc" to populate the
context's work directory with .java files, but I can't just turn on
Tomcat and let ant or JMeter PLUS the user load kill the server; and
I don't understand the naming scheme algorithm used to generate the
*.class files in the work directory.

 Any suggestions?

Thanks,
Aleksey

P.S. BTW, Tomcat 3.2b8 FAR FAR outperforms Tomcat 3.1, in terms
of stability under load.  Fantastic!  Kudos to the developers.

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - */
  Michael H. La Buddeemail:  [EMAIL PROTECTED]
  Prosoft, Inc.  phone:  414-860-6509
  [EMAIL PROTECTED]   fax:414-860-7014
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - */




RE: temporary page

2000-11-29 Thread Josh Knowles

Another idea would be to use forward to forward them to a temp page.  The
servlet would still have control and could finish working and then forward
or redirect to the final page.

-Original Message-
From: Sayles, Scott SAXONHQ [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 11:08 AM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: temporary page


Here's another possibility:

Send a response and display something like "Working Please wait" and
continually flush out a little bit of text at a time like "." during
processing.  When you're done processing, you could display a javascript
call like the following.

script language="javascript"
window.location="theOtherPage.jsp"
/script

Of course, you'll want to make sure not to enclose the message inside a
table.  Typically, a browser won't display a table until it has all of it.



-Original Message-
From: Gianluca [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 11:14 AM
To: tomcat-user
Subject: temporary page


how can i send to the browser a temporary html page from servlet invoked
with post method while it is woking ?
i want that only after my servlet has finished it will response with a
sendRedirect method to the client.
 
Is it possible that ?

Thanks. 



Http Authentication.

2000-11-29 Thread Lijia Xu

Hi,

I'm trying to implement HTTP authenticaiton. But with tomcat-apache.conf
file included, the initial http authentication ability I set under the
server configuration in httpd.conf file under apache doesn't work
anymore. Does anyone know how to make it work?

Thanks.

Lijia Xu




Distributed session tracking?

2000-11-29 Thread Aumann, Shad

Hello,

If I wanted to run multiple web servers - each running Apache/Tomcat - in a
load-balancing configuration, how can I make it so that the session tracking
on each installation of Tomcat is available to whatever web server gets the
client's request?

I realize that I could just do "first hit" load balancing, and then keep the
client on the same web server that they started with.

But, I'd rather have a web server "farm", and be able to send the requests
to the server with the lowest load.

Does Apache/Tomcat have any provisions for automatically supporting this
kind of distributed session tracking?

I'm about to implement it myself, using the RDBMS as the location of all of
the shared session information for each of the web servers to utilize.  Does
anyone have a better idea?

Shad

--
Shad J. Aumann
Senior Software Engineer
Anteon
[EMAIL PROTECTED]



is ajp12 connection handler required to shutdown?

2000-11-29 Thread Morianos








I dont want to use the ajp12 protocol but if I leave it out of the
server.xml file(s) I cant shut tomcat down cleanly. The docs state that this is needed to shut down tomcat
properly but if I am running multiple JVMs with multiple server.xml files, that
means I need multiple ajp12 connectors.
One for each JVM. Am I understanding
this correctly?








Re: Java don't stop when I shutdown.

2000-11-29 Thread Matthew L Daniel

On Wed, Nov 29, 2000 at 09:51:32PM +0200, Jaco van Staden wrote:
 
 Hi
 
 When I excecute ../bin/shutdown.sh all the Java Threads stay alive. When I
 start again new Threads are started. And so on..
 
 What could cause this?
 
 I am using Tomcat 3.1 on RH7 with SUN JDK1.2.2 -native threads.

If anyone is following this, I also have experienced this problem with no
obvious solution in sight.

I am running IBM's JDK 1.3 for Linux and have seen this problem since
tomcat32b7 - Catalina 4.0M5.  The magic 'killall java' seems to be the only
fix, as after the first shutdown.sh the Ajp12ConnectionHandler stops listening
to shutdown requests.

  Just my USD$0.02.
  -- /v\atthew
-- 
Matthew L Daniel   Rich bachelors should be heavily taxed.
Internet Director  It is not fair that some men should be
SterlingPlanet, Inc.   happier than others.
[EMAIL PROTECTED]-- Oscar Wilde



Re: send redirect question

2000-11-29 Thread Rick Bosch

if I have a bean that is called from a jsp and has the call

if (!(cookie.tempContains("loggedin"))){
try{
String
param=(request.getParameter("show")!=null)?"?show="+request.getParameter("sh
ow"):"";
response.sendRedirect("index.jsp"+param);
commit=true;
}catch(IOException e){
log.write("Problem launching"+e.getMessage());
}
}else{

and in my jsp 

jsp:useBean id="mybean" class="actv.login.PickDir" /
%
mybean.init( request,  response);
if(mybean.commit){return;}
%
html
head 

However we have found that some versions of ie if they mess with the back
button and up with messed up pages (described below).

1) how can i fix it?

2) Then would you say it is not safe to redirect from a bean that you have
pass a refrence to http response?



thanks
-rick

 From: "Craig R. McClanahan" [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 Date: Tue, 28 Nov 2000 12:45:46 -0800
 To: [EMAIL PROTECTED]
 Subject: Re: send redirect question
 
 Rick Bosch wrote:
 
 we have several jsp pages that call beans.  Some beans for one reason or
 another will redirect a user to another page, howver in some cases its
 possible for a redirect to occur and if the logic of the bean is to continue
 writing after a reddirect the client get messed up pages usually the
 original then some http headers and then the new page.  How is it jsp pages
 are somehow "aware" of a redirect but if i call a redirect from a bean it
 seems to be ignored???
 
 
 Deep down, a JSP page is just a Java class.  And the Java language has no
 concept like the setjmp()/longjmp() combination of C, where you can change the
 logical flow of control with what amounts to a "go to" statement to a
 completely
 different method in a completely different source file.
 
 When you call response.sendRedirect() -- or RequestDispatcher.forward(), which
 has the same basic issue -- control will ultimately be returned to your page
 when the method you just called returns.  It is up to you to add a "return"
 statement afterwards, to stop creating the remainder of the current page.
 
 The only time that this is done for you by the container is when you use
 jsp:forward, or execute a JSP custom tag that tells the container to skip
 the
 remainder of the current page.
 
 
 thanks
 -rick
 
 Craig McClanahan
 



RE: Java don't stop when I shutdown.

2000-11-29 Thread Aumann, Shad

I had the same problem with Tomcat when I was using IBM's JDK 1.3 for Linux.

The problem was solved when I switched to the released version of the Sun
JDK 1.3 for Linux.  Maybe the switch will work for you, too.

Shad

 -Original Message-
 From: Matthew L Daniel [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 4:36 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Java don't stop when I shutdown.
 
 
 On Wed, Nov 29, 2000 at 09:51:32PM +0200, Jaco van Staden wrote:
  
  Hi
  
  When I excecute ../bin/shutdown.sh all the Java Threads 
 stay alive. When I
  start again new Threads are started. And so on..
  
  What could cause this?
  
  I am using Tomcat 3.1 on RH7 with SUN JDK1.2.2 -native threads.
 
 If anyone is following this, I also have experienced this 
 problem with no
 obvious solution in sight.
 
 I am running IBM's JDK 1.3 for Linux and have seen this 
 problem since
 tomcat32b7 - Catalina 4.0M5.  The magic 'killall java' seems 
 to be the only
 fix, as after the first shutdown.sh the 
 Ajp12ConnectionHandler stops listening
 to shutdown requests.
 
   Just my USD$0.02.
   -- /v\atthew
 -- 
 Matthew L Daniel   Rich bachelors should be 
 heavily taxed.
 Internet DirectorIt is not fair that some men 
 should be
 SterlingPlanet, Inc.   happier than others.
 [EMAIL PROTECTED]-- Oscar Wilde
 



cookie session tracking doesn't work

2000-11-29 Thread Stefan Woithe

Hi all,

Using Tomcat 3.1final and a servlet I wonder why my browser doesn't asks me whether to 
accept a cookie (what I've selected in the preferences). Analyzing every available 
information with the first request from the originaly delivered page of my servlet 
(i.e. the second request to it) there are no cookie information at all. A to use the 
cookie session tracking -- I thought it is transparent to me. But is there any 
possibility to find out whether the browser a request comes from supports cookies or 
not? My knowlegde is: no!

Thank you indeed

Regards

Stefan




RE: Problem retrieving bean from session....

2000-11-29 Thread James Morgenstein

More information

In my pages I am now logging the current session id, if the session is new,
and the value of all cookies.

In those cases where I am getting an error (and this is on a second or third
page), the session is new and there is a jsessionid cookie even though I
have disabled cookies in the server.xml file, and the value of the
jsessionid cookie does not match the session in use.

What this says to me is that for some reason Tomcat does not find the
existing session, tries to recreate it, and causes my error since I do not
let beans get created in subsequent pages.

Any thoughts on why Tomcat cannot find the session?

Any thoughts on why even if I have cookies disabled, Tomcat is trying to set
a cookie?

Could this have something do with client side caching and/or proxy caches?

Thanks.

James


-Original Message-
From: James Morgenstein [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 12:27 PM
To: [EMAIL PROTECTED]
Subject: Problem retrieving bean from session


All-

Three pages into my application I am attempting to retrieve a bean using the
same useBean clause as on the second page (cut and paste here for
comparison):

  jsp:useBean id="CAMPAIGN" scope="session"
type="com.recommendit.beans.CampaignVB106Bean"   /jsp:useBean
  jsp:useBean id="CAMPAIGN" scope="session"
type="com.recommendit.beans.CampaignVB106Bean"   /jsp:useBean

The bean should already be in the session from previous pages; therefore, I
have a type clause instead of a class clause.

I am receiving the following error on a inconsistent basis:
  java.lang.InstantiationException: bean CAMPAIGN  not found within scope

I am using Tomcat 3.2b8 with URL rewriting in conjunction Apache 1.3 on
Redhat Linux 6.2.

Is it possible that the application server is not attaching back to the same
session.  I have started logging the session ids and cookies to a log file
and there may be some mismatch here.

Thoughts?

Thanks for the help.

James M. Morgenstein




Re: JspC HOW-TO? (Was precompilations)

2000-11-29 Thread Aleksey Tsalolikhin

On Wed, Nov 29, 2000 at 01:29:58PM -0600, Mike La Budde wrote:
 OK, I'm stumped! How do I use JspC to precompile a specific (or all of the) 
 .jsp file(s)?
 
 I've tried the following:
 
 jspc -uriroot c:\sfwr\tomcat\webapps\examples 
 -webapp  c:\sfwr\tomcat\webapps\examples 
 c:\sfwr\tomcat\webapps\examples\jsp\num\numguess.jsp
 
 and various other tries w/out success
 
 TIA,
 
 Mike


Dear Mike,

It might help if you post what kind of error you are getting,
or what happens when you try.

For me,

tomcat.sh jspc -v -d /usr/local/tomcat/work/localhost_8080%2Fcontextname -webapp 
/usr/local/tomcat/webapps/myapp

works, it converts my *.jsp files to *.java files (which I
understand now contain the servlet source code).

What I'm looking for is a tool to convert the servlet
source code to servlet classes, using the unique-class-name generation
algorithm described in
http://archives2.real-time.com/pipermail/tomcat-users/2000-August/008481.html
so Tomcat doesn't have to do this work itself when it starts.

Is there such a tool?  Or has anybody else run into Tomcat going into
500 server errors while trying to compile JSP pages under heavy load,
and if so, how did you deal with it, please?

Yours Sincerely,
Aleksey Tsalolikhin



Finding jk_nt_service.exe

2000-11-29 Thread Robert Gillespie
Title: Finding jk_nt_service.exe





Hello there,


Your documentation located on this page:
D:\Robert\Sony of Europe\JAVA SOAP Layer\Tomcat Installation\Jakarta-Tomcat as NT Service.htm
states that the file jk_nt_service.exe is located in win32/i386 directory, but it is currently not there.
Our company needs that file to set up Tomcat as an NT Service.
Please either tell us the location of the file, or send it to me.


Thank you very much in advance for your prompt response,


Robert Gillespie
Software Architect
Digital Lighthouse Corporation





RE: Distributed session tracking?

2000-11-29 Thread Lacerda, Wellington (AFIS)

Take a look on the list archives. I saw this subject circulating before. 

There's an interesting article about distributed session tracking in web
farms that use RDBMS and is very good (despite the fact it deals with ASP,
but that's not relevant). 

I saw the reference to the article on that thread on the list.

Wellington

-Original Message-
From: Aumann, Shad
To: TomcatUser Mailing List (E-mail)
Sent: 29/11/00 20.44
Subject: Distributed session tracking?

Hello,

If I wanted to run multiple web servers - each running Apache/Tomcat -
in a
load-balancing configuration, how can I make it so that the session
tracking
on each installation of Tomcat is available to whatever web server gets
the
client's request?

I realize that I could just do "first hit" load balancing, and then keep
the
client on the same web server that they started with.

But, I'd rather have a web server "farm", and be able to send the
requests
to the server with the lowest load.

Does Apache/Tomcat have any provisions for automatically supporting this
kind of distributed session tracking?

I'm about to implement it myself, using the RDBMS as the location of all
of
the shared session information for each of the web servers to utilize.
Does
anyone have a better idea?

Shad

--
Shad J. Aumann
Senior Software Engineer
Anteon
[EMAIL PROTECTED]



Tomcat as a service

2000-11-29 Thread anuj suri

Hi

I was trying to run Tomcat as service on Win2000 and was following the steps 
on given in the jakarta site. I just wanted to know in the step #4 how do u 
start and stop Tomcat as a service after creating a service called jakarta.
It says type "net start jakarta"on th ecomand line.. but it does not 
recognize net as its not a batch file or any thing.. please advice how to 
start and stop tomcat as a service.

I also integrated Tomcat and IIS which works fine.

thanks
anuj
_
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com




Tomcat as service wrapper files missing

2000-11-29 Thread Vince Ulfig



Hi,

I want Apache and Tomcat to start automatically as 
a service
on my NT machine when the machine boots, or when I 
log in.

I'm following the instructions on this 
page:
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/NT-Service-howto.html

This page refers to these files, that I cannot 
find:

  Locate the wrapper.properties template file in your Tomcat conf directory. 

  Update the wrapper.tomcat_home property to point at your tomcat home. 
  Update the wrapper.java_home property to point at your Java home. 
I'm attempting to use Apache and Tomcat with another software
that refers to this wrapper files.

I installed this version of tomcat:
apache_1_3_14_win32_r2.exe
from the URL:http://jakarta.apache.org/builds/tomcat/release/v3.1/bin/

The install exe was encased in this zip file on the above URL:
jakarta-tomcat.zip

Why did my installation not install the wrapper files, and
how do I find them?

Thanks!


How to build mod_jserv.so on AIX using apxs

2000-11-29 Thread Ritwick Dhar

I have been trying to do this for some time now, and have been frustrated by
how little info is out there to solve this particular problem. It's
especially difficult on this platform because there are certain changes that
need to be made that are not intuitive at all (at least to me). So I thought
I'd send this info for those who have been in the same boat as me (or are
just as stupid).

Environment:
--
IBM AIX 4.3.3
IBM C and C++ compilers version 3.something
Apache 1.3.14
Tomcat 3.1

According to the tomcat user guide, all you need to do is apxs -c -o
mod_jserv.so *.c. 

Not so. This produces compiling errors (C++ comments not recognized) and
linking errors (can't find exports file). The apxs file tha's created with
the apache installation has insufficient options for the IBM compiler.

To solve this, do the following:

1. Open the apxs file

2. Add the option -qcpluscmt to the compiler options line so it looks like
this:
my $CFG_CFLAGS = ' -DAIX=43 -U__STR__ -DAIX_BIND_PROCESSOR -qcpluscmt
-qnogenpcomp -qnousepcomp -DUSE_HSREGEX `../apaci`';

3. Change the linker options line so it looks like this:
my $CFG_LDFLAGS_SHLIB = q(-H512 -T512 -bhalt:4 -bM:SRE -bnoentry
-bE:mod_jserv.exp -bI:/path/to/apache/libexec/httpd.exp -lc); 
Note: Replace -bE:`echo.` with -bE:mod_jserv.exp

4. Create a file 'mod_jserv.exp' in /path/to/tomcat/src/native/apache/jserv
containing the lines:
#! /path/to/apache/libexec/mod_jserv.so
jserv_module 
This is the exports file the linker needs.

5. cd to /path/to/tomcat/src/native/apache/jserv and run
/path/to/apache/apxs  -c -o mod_jserv.so *.c. 

You should end up with a compiled mod_jserv.so in the current directory.

Note that I'm not a C programmer by any stretch of imagination, so if you
find a way to do this with one command, let me know how. 
And thanks to Cristoph Leser for help.

Rit


--
Ritwick Dhar

Research  Development
MI Eastpoint Technology
Bedford, NH
603.647.2030
--




Jakarta/Tomcat 3.2 sites

2000-11-29 Thread Robert B. Easter

Can some people please provide me with some URLs of sites that are running 
Jakarta/Tomcat 3.1 or 3.2 so that I can see what kind of content is typically 
possible with this technology?

Thanks.  I'm very new to Java and want to understand this better.  I'm 
running Apache and PHP for a site of mine and want to consider Tomcat for 
things PHP isn't able to do.  It would be nice for http://jakarta.apache.org/ 
to have a User's Showcase or something like that where people can see sites 
powered by tomcat.


-- 
 Robert B. Easter  [EMAIL PROTECTED] -
- CompTechNews Message Board   http://www.comptechnews.com/ -
- CompTechServ Tech Services   http://www.comptechserv.com/ -
-- http://www.comptechnews.com/~reaster/ 



Problem with servlet api that ships with 3.2.b8

2000-11-29 Thread Thom Park

I'm having some trouble getting the J2EE CTS tests to pass using Tomcat 
3.2.b8.
The CTS is complaining that a public static final member has been added 
to javax.servlet.http.HttpServletResponse class -

e.g.:public static final int SC_TEMPORARY_REDIRECT = 307;

I can't find this public static defined in either the 2.2 or2.3 servlet 
specifications.

Does this mean that the servletapi.jar that ships with tomcat 3.2.b8 
does NOT conform to the servlet 2.2 spec or can I simply ping Sun
and ask for a clarification?

Thanks,

Thom





how do I get mod_so?

2000-11-29 Thread Cherie Yoon

Hi,
I am trying to build mod_jserv.so for linux and I ran "apxs -c -o
mod_jserv.so" in the Tomcat directory(TOMCAT_HOME/src/native/apache/jserv) 
When I install apache, I think I enabled DSO as following,
./configure --prefix=/path/to/install --enable-rule=SHARED_CORE=yes
but I am getting this error that no DSO support for Apache available under
my platform. Apache module mod_so shoudl be compiled into my server binary
directoy. (i am using is Redhat 6.2) 
I found mod_so.c in the src directory,  do I need to compile this to solve
the problem? if I do, please give me some hint how to compile. (do i need to
modify Makefile and recompile Apache?)
Thanks in advance.
cherie




Directory problem

2000-11-29 Thread Neil Aggarwal

Hello:

I am trying to use tomcat with apache and am having a
problem with my virtual host directory.

In my httpd.conf file, I added index.jsp to my listing
of index files:
DirectoryIndex index.jsp index.php index.html index.htm index.shtml
index.cgi

I also have the following virtual host defined:
VirtualHost 216.65.31.3
  DocumentRoot /home/httpd/videosearch

Directory "/home/httpd/videosearch"
  Options Indexes FollowSymLinks
  AllowOverride None

  Order allow,deny
  Allow from all
/Directory

/VirtualHost

And I used this line to include my jakarta config file:
include /usr/local/jakarta-tomcat/conf/tomcat.conf

My tomcat.conf file is:
LoadModule jserv_module /etc/httpd/modules/mod_jserv.so

IfModule mod_jserv.c
# Do not edit! 
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice

ApJServDefaultPort 8007

AddType text/jsp .jsp
AddHandler jserv-servlet .jsp

ApJServMount /examples /root

/IfModule

I want files with a .jsp extension to be processed by tomcat 
and other files handled via Apache. 

According to the virtual host directive, when I visit
http://216.65.31.3
I should get the files from /home/httpd/videosearch directory.
But, when I do so, I get the file:
/usr/local/jakarta-tomcat/webapps/ROOT/index.html\
which is not what I wanted.

Also, when I try to load the URL:
http://216.65.31.3/index.jsp
I get a 404 not found error.

This file I wanted to load was:
/home/httpd/videosearch/index.jsp
Which I know is there.

Also, If I try to load this URL
http://216.65.31.3/test.html
It loads the file /home/httpd/videosearch/test.html
which is what I wanted.

Any ideas?

Thanks,
Neil.

--
Neil Aggarwal
JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development -- Java, JSP, servlets, databases



Re: how do I get mod_so?

2000-11-29 Thread David Bussenschutt

pretty much straight from the apache instalation docs:

to build most modules as static, but enable DSO try building apache as:
./configure --prefix=/path/to/install  --enable-shared=so

or to build pretty much everything as DSO try this:
./configure --prefix=/path/to/install  --enable-module=most
--enable-shared=max

check for mod_so (ie DSO support) support with :
/path/to/apache/bin/httpd -l

Only the more obscure installs need to define SHARED_CORE=yes (to get
around linker oddities)

RTFM, ;-)
David.


At 07:16 PM 11/29/00 -0500, you wrote:
Hi,
I am trying to build mod_jserv.so for linux and I ran "apxs -c -o
mod_jserv.so" in the Tomcat directory(TOMCAT_HOME/src/native/apache/jserv) 
When I install apache, I think I enabled DSO as following,
./configure --prefix=/path/to/install --enable-rule=SHARED_CORE=yes
but I am getting this error that no DSO support for Apache available under
my platform. Apache module mod_so shoudl be compiled into my server binary
directoy. (i am using is Redhat 6.2) 
I found mod_so.c in the src directory,  do I need to compile this to solve
the problem? if I do, please give me some hint how to compile. (do i need to
modify Makefile and recompile Apache?)
Thanks in advance.
cherie




David Bussenschutt  Email: [EMAIL PROTECTED]
Senior Computing Support Officer  Systems Administrator/Programmer
Location: Griffith University. Information Technology Services
  Brisbane Qld. Aust.  (TEN bldg. rm 1.33) Ph: (07)38757079




Re: Problem with servlet api that ships with 3.2.b8

2000-11-29 Thread Thom Park

Thanks Craig,

I appreciate the quick answer !

-Thom


Craig R. McClanahan wrote:

 Thom Park wrote:
 
 I'm having some trouble getting the J2EE CTS tests to pass using Tomcat
 3.2.b8.
 The CTS is complaining that a public static final member has been added
 to javax.servlet.http.HttpServletResponse class -
 
 e.g.:public static final int SC_TEMPORARY_REDIRECT = 307;
 
 I can't find this public static defined in either the 2.2 or2.3 servlet
 specifications.
 
 Does this mean that the servletapi.jar that ships with tomcat 3.2.b8
 does NOT conform to the servlet 2.2 spec or can I simply ping Sun
 and ask for a clarification?
 
 
 Hi Thom,
 
 This line was added to the HttpServletResponse class in the servlet.jar file
 that Tomcat uses.  The change was based on the fact that the new error code was
 added to the servlet 2.2 spec by a published errata:
 
 http://java.sun.com/products/servlet/errata.html
 
 It is possible that the CTS test version you are running does not reflect this
 update -- your best bet would be to talk to your Licensee Engineering
 representative about it.
 
 Thanks,
 
 Thom
 
 
 Craig
 
 




potentially thousands of servlet context entries

2000-11-29 Thread David Bussenschutt

Q1, 
Thanks andreas, this fixed it:
cd /path/to/tomcat/webapps/
find . -type d -print | xargs -n1 chmod o+x
find . -type f -print | xargs -n1 chmod o+r
Is that going to be a security problem giving 'nobody' read access to all
of 'webapps' ?

Everyone:
Q2. I'm completely new to java and servlets (I'm just the sysop), but I'm
guessing that in a development environment you'd be wanting to reload/stop
a servlet frequently? 
Since all my ~3500 users are potential developers, then having just 1 (one)
JVM might be a bad idea, and I doubt the server could cope with 3500 of
them (actually it'd be more like 150-300 active at any one time).  
Any other ideas? Perhaps I could "cluster" the users into development
"teams" and have a JVM for each? (giving them the power to restart their
own JVM)
If I wanted to have a JVM for every user(started on demand - I'm NOT
running 3500 JVM's just in case some-one wants to use it) how would I go
about arranging that? Is there a few hints in a how-to someplace?

David.

At 09:54 AM 11/29/00 +0100, you wrote:
Hi,
Q1)
Probably still a user-rights problem. Make sure user nobody has rwx on
$TOMCAT_HOME/work and access to all context dirs (under webapp)
i
Q2)
You might encounter several problems here. With some clever links and
mod_rewrite rules you might establish a per user mapped context-dir but do
you want to have all 3500 with in one Tomcat instance(one JVM). If one needs
to reload/stop a servlet the engine has to be stopped for all 3499 users as
well.
To bypass that you will need a separate Tomcat for each user with will lead
to a lot of memory and cpu consumption.

Reagards,
Andreas

 -Original Message-
 From: David Bussenschutt [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 4:31 AM
 To: [EMAIL PROTECTED]
 Subject: Q's: running tomcat as 'nobody', and thousands of servlet
 context entries
 
 
 Hi All,
 
 I've read the tomcat-apache howto at:
 http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat
 -apache-howto.
 html
 (and also the users-guide, the mod_jk howto, the list 
 archives etc etc.)
 
 I have installed: linux 2.2.14 ; apache 1.3.12 (mod_ssl  
 php4   mod_so
 statically linked; mod_jk, etc etc dyn. linked); tomcat 
 3.2beta8 (milestone
 release) ; mod_jk compiled and installed
 
 QUESTION 1.
 
 When I run tomcat as 'nobody' as suggested in the above howto 
 document, I
 was initially getting all sorts of problems with 'nobody' not having
 permission to write the log files etc, but with that all 
 fixed, I now get
 the following jsp errors from tomcat on startup:  
 --
 
 cannot load servlet name: jsp
 cannot load servlet name: jsp
 cannot load
 servlet name:
 jsp
 --
 
 
 but it doesn't seem to prevent the example jsp and servlets 
 from working 
 (once the log file permissions are fixed) ... what does it mean?
 
 When I run tomcat as 'root' these problems don't exist, and 
 the jsp and
 servlet examples run fine.
 
 So, can you give me any hints as to what the problem might be?
 
 QUESTION 2.
 
 I have another server I wish to install this on, and it has about 3500
 users (students) that will all be wanting to use servlets/jsp in their
 projects.  They all get http://localhost/~username/ access to 
 their pages,
 and also get cgi access through a global apache directive of :
 ScriptAliasMatch ^/([^/]+)-bin(.*) /home/$1/cgi-bin$2
 which allows cgi's within their own ~username space. 
 (seen as http://localhost/~username-bin/ and available in the file
 heirarchy as ~username/cgi-bin/ )
 
 How do I go about giving them access to run servlets from 
 their ~username
 space?  eg:
 (seen as http://localhost/~username-servlet/ and available in 
 their own
 home as ~username/servlet/ ??? )
 It's not practical to create 3500 Context entries into the 
 server.xml, one
 for each user, so how might I go about this?
 
 Also, How do I go about giving them access to run jsp from 
 their username
 space? 
 Is it as simple as adding a directive somewhere saying that 
 all *.jsp files
 are redirected to the JVM? If so I must have mussed that in the
 documentation somewhere...?
 
 Thanks,
 
 David.
 
 P.S. These might be good questions to add to your original 
 'apache-tomcat'
 howto, or to a FAQ someplace, assuming you have an answer... ;-)
 
 
 
 
 
 
 
 
 
 
 
 David Bussenschutt  Email: [EMAIL PROTECTED]
 Senior Computing Support Officer  Systems Administrator/Programmer
 Location: Griffith University. Information Technology Services
   Brisbane Qld. Aust.  (TEN bldg. rm 1.33) Ph: (07)38757079
 
 




David Bussenschutt  Email: [EMAIL PROTECTED]
Senior Computing Support Officer  Systems 

Re: potentially thousands of servlet context entries

2000-11-29 Thread Craig R. McClanahan

David Bussenschutt wrote:

 Q1,
 Thanks andreas, this fixed it:
 cd /path/to/tomcat/webapps/
 find . -type d -print | xargs -n1 chmod o+x
 find . -type f -print | xargs -n1 chmod o+r
 Is that going to be a security problem giving 'nobody' read access to all
 of 'webapps' ?


It should't (but see below).  In fact, as you have discovered, Tomcat will not be
able to work without this.

One potential issue that a sysop might want to be aware of:  many servlet based
applications customize themselves based on configuration files.  For example, the
servlet container itself references a file named WEB-INF/web.xml (inside the
document root of each web application's base directory).  Often, there is
sensitive information (such as username/password combinations for database
logins) in these files, and the issue is "can a remote user access this file?"

The servlet API expressly prohibits serving files from a WEB-INF directory
directly to a client user, so a request like this:

http://localhost:8080/myapplication/WEB-INF/web.xml

will fail.  Therefore, the WEB-INF directory is a pretty good place to store
configuration files for your apps.  Placing them anywhere else within the
document base directory for a web app risks compromising the information
contained in them.


 Everyone:
 Q2. I'm completely new to java and servlets (I'm just the sysop), but I'm
 guessing that in a development environment you'd be wanting to reload/stop
 a servlet frequently?
 Since all my ~3500 users are potential developers, then having just 1 (one)
 JVM might be a bad idea, and I doubt the server could cope with 3500 of
 them (actually it'd be more like 150-300 active at any one time).
 Any other ideas? Perhaps I could "cluster" the users into development
 "teams" and have a JVM for each? (giving them the power to restart their
 own JVM)
 If I wanted to have a JVM for every user(started on demand - I'm NOT
 running 3500 JVM's just in case some-one wants to use it) how would I go
 about arranging that? Is there a few hints in a how-to someplace?


If your developers are willing, one way to do this would be to have each user
have their own "$TOMCAT_HOME" directory.  (A few tweaks to the standard scripts
would let you share most of the actual files.)  Then, they could just run the
standard startup script when they wanted their own Tomcat to be running.  The
hard part of administering this, though, will be making sure that two developers
are not trying to use the same network port at the same time.

If your developers are running on their own PCs, another approach might be to
have them run Tomcat locally, instead of on the server.


 David.


Craig McClanahan





Tomcat 3.2b8 ClassCastException after servlet update

2000-11-29 Thread David Rees

Hi,

I've got a problem where I'm doing a HttpServletRequest.getAttribute in
a servlet after a JSP forwards the request to it.  Here's a basic
outline of what happens:

test.jsp POSTs to forward.jsp (which stores the form info in a
test.TestBean) which then forwards the request to TestServlet.

This only happens when the servlet has been modified, shutting down and
restarting Tomcat allows the servlet to work properly.  Here's the stack
trace:

java.lang.ClassCastException: test.TestBean
at TestServlet.doPost(TestServlet.java:11)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:421)
at
test._0002ftest_0002fforward_0002ejspforward_jsp_0._jspService(_0002ftest_0002fforward_0002ejspforward_jsp_0.java:96)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:479)

And the line 11 of the servlet where the exception occurs:
test.TestBean tb = (test.TestBean)req.getAttribute("testBean");

I have a simple test case (which this was generated under) which I can
post to the list if anyone is interested.

Is this a known bug?  I haven't tried the same thing under Tomcat 3.1
yet, as I was under the impression that Tomcat 3.2beta was superior to
Tomcat 3.1.

Thanks,
Dave



mod_jk.so problem on Linux

2000-11-29 Thread Graham Freeman

I am having trouble getting mod_jk.so working in Apache 1.3 on my Linux box.
If I include the instruction
   
 LoadModulejk_module  libexec/mod_jk.so

in my httpd.conf file, Apache reports

   # ./bin/apachectl configtest
   Syntax error on line 991 of /usr/local/apache/conf/httpd.conf:
   API module structure `jk_module' in file /usr/local/apache/libexec/mod_jk.so is 
garbled - perhaps this is not an Apache module DSO?

I have tried recompiling the library from the source, and I get a different
file length for mod_jk.so (88757) but no change in the behaviour.
I also tried using mod_jk.conf-auto, but it contains the same LoadModule
instruction and gives the same error.

Tomcat 3.2-b8 is otherwise working fine stand-alone.

  Graham



chinese language

2000-11-29 Thread zhan yi




I met two problems with chinese text. 
 1 When i include file from another chinese 
file, the included file will not display correctly. See attached file1.jsp and 
file2.jsp.
 2 In tomcat-4.0-m4, I used 
setCharacterEncoding to process chinese form attribute, but it doesn't work. See 
attached file3.jsp.

I am not clear where to seek support. Any suggestion is appreciated.

 file1.jsp
 file2.jsp
 file3.jsp


Location of mod_jserv.so in tomcat-apache.conf

2000-11-29 Thread Neil Aggarwal

Hello:

In my tomcat-apache.conf file, there is this line:
LoadModule jserv_module libexec/mod_jserv.so

My apache installation uses a modules directory (even though
I am on Linux). 

Where do I set how this line is generated?

If I change this line, it will be overwritten the next time
tomcat starts.

Thanks, 
Neil.

--
Neil Aggarwal
JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development -- Java, JSP, servlets, databases



RE: Tomcat 3.2b8 ClassCastException after servlet update

2000-11-29 Thread David Rees

Replying to my own message:

I just downloaded and tried it under Tomcat 3.1 which showed the same
problem.  So at least this isn't a new bug.  :-)

I also tried Tomcat 4.0-m4 which works perfectly in for my test case.

-Dave

 I have a simple test case (which this was generated under) which I can
 post to the list if anyone is interested.

 Is this a known bug?  I haven't tried the same thing under Tomcat 3.1
 yet, as I was under the impression that Tomcat 3.2beta was superior to
 Tomcat 3.1.




jk_nt_service and more java params needed

2000-11-29 Thread Milton

Has anyone figured how to modify wrapper.properties to send
"-Djava.security.manager -Djava.security.policy = c:\tomcat\tomcat.policy"
parameters to the jvm?

Thanks in advance.





RE: jk_nt_service and more java params needed

2000-11-29 Thread David Rees

Have you tried setting the environment variable "TOMCAT_OPTS"?

-Dave

 From: Milton [mailto:[EMAIL PROTECTED]]

 Has anyone figured how to modify wrapper.properties to send
 "-Djava.security.manager -Djava.security.policy = c:\tomcat\tomcat.policy"
 parameters to the jvm?




j_security is pissing me off...

2000-11-29 Thread John de la Garza

Does anyone know what's up with the formbased security that tomcat supports?

I try to access the
http://127.0.0.1/examples/jsp/security/protected/index.jsp

and it never gets to index.jsp

or if I click on protected from the http://127.0.0.1/examples/jsp/security/

directory display it puts me in http://127.0.0.1/examples/jsp


Why does this behave so wierd?  I just want it to work like the spec says...


any solutions? or pointers?




Re: j_security is pissing me off...

2000-11-29 Thread Craig R. McClanahan



John de la Garza wrote:

 Does anyone know what's up with the formbased security that tomcat supports?


Tomcat 3.1 does not support form based security.  Upgrade to 3.2 or 4.0.

Craig McClanahan





wrapper.classpath not working?

2000-11-29 Thread Neil Aggarwal

Hello:

I added the following line to my wrapper.classpath
in the tomcat.properties file:
wrapper.classpath=/usr/local/mm.mysql-2.0.2-bin.jar

But, in my test servlet, I printed the classpath and
I got this:
/usr/local/jakarta-tomcat/classes:.:/usr/local/jakarta-tomcat/lib/ant.jar:/usr/local/jakarta-tomcat/lib/jasper.jar:/usr/local/jakarta-tomcat/lib/servlet.jar:/usr/local/jakarta-tomcat/lib/test:/usr/local/jakarta-tomcat/lib/webserver.jar:/usr/local/jakarta-tomcat/lib/xml.jar:/usr/local/java/lib/tools.jar

Is the wrapper.classpath property disabled in Tomcat 3.1?


Thanks,
Neil.


--
Neil Aggarwal
JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development -- Java, JSP, servlets, databases



Re: wrapper.classpath not working?

2000-11-29 Thread KINGMAN

Can you tell me how to construct a Web Application  in my tomcat4.0.Where I put my 
servlets?
thanks!  



WAP Configuration

2000-11-29 Thread Rob Mitchell

Hi,

I've set up the apache-tomcat configuration with the aim of having jsp 
pages deliver WML to the WAP browser in the Nokia WAP toolkit.

I have set up a JSP page under Tomcat that just contains WML content.

So far the WAP Toolkit can access the page but as far as I can tell it is 
being encoded in MIME as HTML. At least, the cache for the Nokia Toolkit 
shows an HTML page being cached, though it contains the WML. Also the Nokia 
Browser displays some of the page but it looks like its not displaying 
parts of the page which have '' or '' next to them but I'm getting just 
about everything else, including the WML version. I have checked that the 
page is correctly formed by loading it separately as a WML file.

So at the moment my thinking is that Tomcat is handling the JSP but is 
returning the output from the page as HTML, even though the contents are WML.

I have noticed that in my tomcat-apache.conf file that the line that should 
read:

AddType text/jsp .jsp

reads

AddType test/jsp .jsp


I dont know if that is screwing anything up or not.

Can anyone who has done this give me a clue ?

Thanks
Rob




: password and login admin

2000-11-29 Thread zhan yi


-Original Message-
·¢¼þÈË: Persegato Marco [EMAIL PROTECTED]
ÊÕ¼þÈË: [EMAIL PROTECTED] [EMAIL PROTECTED]
ÈÕÆÚ: 2000Äê11ÔÂ29ÈÕ 18:35
Ö÷Ìâ: password and login admin


Hi all,
how can I find the default password and username for admin in
tomcat3.2beta8?

thanks in advance
Persegat Marc







Re: wrapper.classpath not working?

2000-11-29 Thread Craig R. McClanahan

KINGMAN wrote:

 Can you tell me how to construct a Web Application  in my tomcat4.0.Where I put my 
servlets?
 thanks!

The basic concepts of how a web application needs to be organized (which includes 
where servlets
should be placed) are defined by the Servlet 2.2 (for Tomcat 3.x) or Servlet 2.3 (for 
Tomcat
4.x) specifications, which are available at
http://java.sun.com/products/servlet/download.html.  You will want to understand the 
chapters
on web applications, and on the web.xml file.

For Tomcat 4.0 in particular, I would suggest that you download Tomcat 3.2 and study 
the
Application Developer's Guide, which is included in the documentation directory.  The
recommendations for how an application development effort should be organized, and 
instructions
on how to organize your own servlet files, are virtually unchanged in Tomcat 4.0.

Craig McClanahan





Re: WAP Configuration

2000-11-29 Thread Craig R. McClanahan

I have two recommendations for you, below.

Rob Mitchell wrote:

 Hi,

 I've set up the apache-tomcat configuration with the aim of having jsp
 pages deliver WML to the WAP browser in the Nokia WAP toolkit.

 I have set up a JSP page under Tomcat that just contains WML content.

 So far the WAP Toolkit can access the page but as far as I can tell it is
 being encoded in MIME as HTML. At least, the cache for the Nokia Toolkit
 shows an HTML page being cached, though it contains the WML. Also the Nokia
 Browser displays some of the page but it looks like its not displaying
 parts of the page which have '' or '' next to them but I'm getting just
 about everything else, including the WML version. I have checked that the
 page is correctly formed by loading it separately as a WML file.

 So at the moment my thinking is that Tomcat is handling the JSP but is
 returning the output from the page as HTML, even though the contents are WML.

 I have noticed that in my tomcat-apache.conf file that the line that should
 read:

 AddType text/jsp .jsp

 reads

 AddType test/jsp .jsp

 I dont know if that is screwing anything up or not.

 Can anyone who has done this give me a clue ?

 Thanks
 Rob

First, go directly to the Jakarta web site http://jakarta.apache.org and
download Tomcat 3.2.  Monopoly:metaphorDo not pass GO.  Do not collect
$200/Monopoly:metaphor.  Tomcat 3.2 fixes over a hundred bugs in Tomcat 3.1.

Second, the content type that is created by a JSP page is controlled by what your
page declares in the "page" directive, not by Tomcat.  If you wish to have the
output treated as XML, for example, you would include a directive like this at
the top of your pages:

%@ page contentType="text/xml" %

You will need to review the documentation of the WAP Toolkit you are using to
determine what content type it is expecting, but the choice of content type is up
to the page author, not the servlet container.

Craig McClanahan





Re: »Ø¸´: password and login admin

2000-11-29 Thread Craig R. McClanahan

It is up to you to set these values.  You need to create a username/password
combination that has the role "admin" assigned to them.

If you are using a stock Tomcat configuration, you can do this by editing the
file "conf/tomcat-users.xml" user the Tomcat distribution directory.

Craig McClanahan

zhan yi wrote:

 -Original Message-
 ·¢¼þÈË: Persegato Marco [EMAIL PROTECTED]
 ÊÕ¼þÈË: [EMAIL PROTECTED] [EMAIL PROTECTED]
 ÈÕÆÚ: 2000Äê11ÔÂ29ÈÕ 18:35
 Ö÷Ìâ: password and login admin

 Hi all,
 how can I find the default password and username for admin in
 tomcat3.2beta8?
 
 thanks in advance
 Persegat Marc
 
 
 




Re: password and login admin

2000-11-29 Thread KINGMAN

Are you China?

 kingman



Re: chinese language

2000-11-29 Thread Simon Lam

1. Try to put meta tag to specify character set directly in your jsp.
2. Try to convert your Chinese string to "8859_1" encoding outside jsp. For example, 
in a JavaBean.
The two methods above works fine for Japanese.
3. Visit Internationlization forum in java.sun.com.

Hope this might help.

"zhan yi" [EMAIL PROTECTED] wrote:

 I met two problems with chinese text. 
 1 When i include file from another chinese file, the included file will not 
display correctly. See attached file1.jsp and file2.jsp.
 2 In tomcat-4.0-m4, I used setCharacterEncoding to process chinese form 
attribute, but it doesn't work. See attached file3.jsp.
 
 I am not clear where to seek support. Any suggestion is appreciated.
 




Re: Access Log for Tomcat in standAlone mode or Running Apache with Tomcat.

2000-11-29 Thread Krishna Kant

you will have to include the config file ( tomcat-apache) of tomcat in httpd of
apache
then start tomcat and
start apache

Moursli Nabil wrote:

 Can anyone help me with this, I can't run TOMCAT with Apache, so the only
 issu I see
 is to run Tomcat in standAlone mode. If anyone know how to manage Acces Log
 on Tomcat.
 That would be great. Or if you know how to make Apache Run with Tomcat let
 me know.

 Thx in advance.

 Nabil.
 CMG-Admiral.

 - Original Message -
 From: Russell Freeman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, November 29, 2000 3:09 PM
 Subject: "root-relative" URLs don't work(Tomcat 3.1)

  Whenever I have a web page that references a "root-relative" resource,
 e.g.
  "/style.css", tomcat can't see to resolve it properly. It seems to be
  ignoring the web site root as specified in server.xml. Obviously if the
  resource lives in the same location as the current page I can drop the
  leading forward-slash. However this won't work for resources in different
  locations.
 
  I've tried turning on debug for the webapp but I'm not seeing anything.
 
  Any help appreciated
 
  Russ




Re: WML Generation from JSP broken!!!!

2000-11-29 Thread Craig R. McClanahan



Davanum Srinivas wrote:

 Hi all,
 Attached is a JSP Sample file which generates WML. It works with no problems on 
Tomcat3.1, but
 fails miserably with the latest dev nightly snapshot and m4. Can someone shed light?


Well, your page certainly doesn't work under Tomcat 4.0 (which implements JSP 1.2).  
Furthermore, it
*should* not.

Because you are starting this page with an ?xml version="1.0"? directive, the JSP 
compiler assumes that
you have created this page in the XML syntax for JSP pages, as described in the 1.2 
spec
http://java.sun.com/products/jsp/download.html.  However, this page violates several 
of the rules:
* It does not start with a jsp:root element (this is
  what the parse error is complaining about).
* It uses % % for a scriptlet, instead of the
  required jsp:scriptlet element.

You will need to rewrite your page conforming to the new syntax rules in order for it 
to work correctly
under 4.0.


 Thanks in advance,
 dims

 PS: Am not currently subscribed to the list. So please CC me at "[EMAIL PROTECTED]"


Craig McClanahan

PS:  Why did it work under 3.1?  Because 3.1 didn't support the XML syntax, so it just 
passed the ?xml?
directive through as template text.






WML Generation from JSP broken!!!!

2000-11-29 Thread Davanum Srinivas

Hi all,
Attached is a JSP Sample file which generates WML. It works with no problems on 
Tomcat3.1, but
fails miserably with the latest dev nightly snapshot and m4. Can someone shed light? 

Thanks in advance,
dims

PS: Am not currently subscribed to the list. So please CC me at "[EMAIL PROTECTED]"

= Begin Stack Trace =
org.apache.jasper.compiler.ParseException:
D:\jakarta-tomcat-4.0\bin\..\webapps\examples\jsp\datewml.jsp(4,-1) Document root 
element is
missing.
at org.apache.jasper.compiler.ParserXJspSax.parse(ParserXJspSax.java:194)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:166)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:193)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:464)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:435)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:156)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:168)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:393)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:177)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:443)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2014)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:807)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:886)
at java.lang.Thread.run(Thread.java:484)
= End Stack Trace =


=
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

?xml version="1.0"?
!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"

%
response.setContentType("text/vnd.wap.wml");
out.println("wml");
out.println("card title=\"MobileDate\"");
out.println(" p align=\"center\"");
out.println("Date and Time Servicebr/");
out.println("Date is: "+ new java.util.Date());
out.println("/p");
out.println("/card");
out.println("/wml");
%



[ANNOUNCEMENT] Tomcat 3.2 Final Release

2000-11-29 Thread Craig R. McClanahan

The most anticipated release from the Jakarta project yet!  We hereby announce
the availability of the final release of version 3.2 of the Tomcat servlet
container and JSP engine.  Tomcat implements the Servlet 2.2 and JSP 1.1
specifications, and represents the most current release quality build of this
project.

Compared to version 3.1, there have been substantial improvements in
performance, many new features (including support for SSL connections), and well
over one hundred bug fixes.

Pick up the binary distribution of Tomcat 3.2 at:

http://jakarta.apache.org/builds/tomcat/release/v3.2/bin

Craig McClanahan
and the rest of the
Tomcat development team





Re: WML Generation from JSP broken!!!!

2000-11-29 Thread Alex Tang

Is there a way to get the compiler to ignore the "?xml version="1.0"?" syntax?

Otherwise this means that serving any page that is XML compliant (WML, XHTML, etc) now 
requires a complete
rewrite of all JSP files to run in 4.0.

Thanks.

...alex...


"Craig R. McClanahan" wrote:

 Davanum Srinivas wrote:

  Hi all,
  Attached is a JSP Sample file which generates WML. It works with no problems on 
Tomcat3.1, but
  fails miserably with the latest dev nightly snapshot and m4. Can someone shed 
light?
 

 Well, your page certainly doesn't work under Tomcat 4.0 (which implements JSP 1.2).  
Furthermore, it
 *should* not.

 Because you are starting this page with an ?xml version="1.0"? directive, the JSP 
compiler assumes that
 you have created this page in the XML syntax for JSP pages, as described in the 1.2 
spec
 http://java.sun.com/products/jsp/download.html.  However, this page violates 
several of the rules:
 * It does not start with a jsp:root element (this is
   what the parse error is complaining about).
 * It uses % % for a scriptlet, instead of the
   required jsp:scriptlet element.

 You will need to rewrite your page conforming to the new syntax rules in order for 
it to work correctly
 under 4.0.

 
  Thanks in advance,
  dims
 
  PS: Am not currently subscribed to the list. So please CC me at "[EMAIL PROTECTED]"
 

 Craig McClanahan

 PS:  Why did it work under 3.1?  Because 3.1 didn't support the XML syntax, so it 
just passed the ?xml?
 directive through as template text.