RE: file size limit

2002-02-28 Thread Mehmet Ugur Kuzu (LinkPlus)

I solve it,
Tomcat 4.0.2 somehow sometimes does not give error for null string
variables,
but in 3.3a it gives and i solve it.
i think basicly it stop to produce html when it get this kind of error.
i can not identifiy problem clearly, but when i check strings for null
values it resolved.
thanks


-Original Message-
From: KC Berg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 5:31 PM
To: 'Tomcat Users List'
Subject: RE: file size limit


I have never seen JSPC cut off a jsp file but if all the html in your jsp is
not getting to the browser that sounds like you need to check your buffer
size. just a thought :)

-Original Message-
From: Mehmet Ugur Kuzu (LinkPlus) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 6:32 AM
To: 'Tomcat Users List'
Subject: file size limit


Hi,
Is there any file size limit for jsp files in Tomcat,
I am using JRE 1.3.01 and Tomcat 4.0.2 ,
and Tomcat does not produce jsp files more then 35 kb,
I checked and i saw that it produce .java files true but 
somehow it does not send all html codes to client.
sincerely,
Ugur 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



Re: Tomcat v4.0.2 : doesn't find JAR files in the WEB-INF/lib

2002-02-28 Thread Lassie

Sriram Narayanan wrote:

 (snip)
 
 Hi Craig,
 The web-inf directory is already in capital letter on the windows file
 system. Is there another place, or another conf file I should check for
 this capital letter thing ?
 

 It really must be an issue of capital case. Here's how you could check.
 1. From the Windows Explorer, go to View-Options and select the check box Display 
the full path in the title bar.
 2. Apply these changes.
 3. Navigate to the WEB-INF folder, and select the web.xml file. Now check the title 
bar, if the folder name is not WEB-INF, then you just need
 to rename this. Remember, all the characters must be in capital case.

My  WEB-INF folder appears to be in capital letters... I don't understand why I get 
the NoClassDefFoundError.
To be sure I tried this jsp code :
%
 String classpath = (String)context.getAttribute(org.apache.catalina.jsp_classpath);
 StringTokenizer st = new StringTokenizer(classpath, ;);
 while (st.hasMoreTokens()) {
  String curr = st.nextToken();
 %
  nbsp;nbsp;%=curr%br
 %
 }
 %

I got the correct result for the classpath constructed by tomcat :
  E:/Webapps/Context/WEB-INF/classes
  E:/Webapps/Context/WEB-INF/lib/classes12.jar
  E:/Webapps/Context/WEB-INF/lib/myjarfile.jar
  E:/Webapps/Context/WEB-INF/lib/oraclexsql.jar
  E:/Webapps/Context/WEB-INF/lib/xmlparserv2.jar
  E:/Webapps/Context/WEB-INF/lib/xsu12.jar
  D:/Apache/jakarta-tomcat-4.0.2/classes/
  D:/Apache/jakarta-tomcat-4.0.2/lib/jasper-compiler.jar
  D:/Apache/jakarta-tomcat-4.0.2/lib/jasper-runtime.jar
  D:/Apache/jakarta-tomcat-4.0.2/lib/naming-factory.jar
  D:/Apache/jakarta-tomcat-4.0.2/common/classes/
  D:/Apache/jakarta-tomcat-4.0.2/common/lib/naming-common.jar
  D:/Apache/jakarta-tomcat-4.0.2/common/lib/naming-resources.jar
  D:/Apache/jakarta-tomcat-4.0.2/common/lib/servlet.jar
  D:/Apache/jakarta-tomcat-4.0.2/common/lib/tools.jar

So : the tomcat classpath looks ok, but I still get the NoClassDefFoundError when 
trying to access my classes... any clue ?
Tx

Lassie


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




SV: Tomcat x Apache

2002-02-28 Thread Klosa Uwe

Hi,

I think you have to change 

WebAppConnection Tomcat_Apache warp localhost:8008

to

WebAppConnection Tomcat_Apache warp myServer:8008

and
Engine className=org.apache.catalina.connector.warp.WarpEngine
name=localhost debug=0 appBase=webapps

to

Engine className=org.apache.catalina.connector.warp.WarpEngine
name=myServer debug=0 appBase=webapps.

I don't know if both is neccesary. But try it.

Regards

Uwe


-Ursprungligt meddelande-
Från: Ion Larrañaga [mailto:[EMAIL PROTECTED]]
Skickat: den 28 februari 2002 10:20
Till: Tomcat Users List
Ämne: RE: Tomcat x Apache


Sorry for my mistake. You are right that Apache should redirect the request
to Tomcat directly. This means I should read messages more carefully ;)

Are you able to access static pages with Apache? Do you have an index.html
in /home/myDocs to test if you can access http://your.server/index.html ?

I think that maybe Apache is denying you access before sending the request
to
mod_webapp. This may be if you have only changed your DocumentRoot directive
without granting access to it. Have you changed the Directory where it
says
This should be changed to whatever you set DocumentRoot to ?

Hope it helps,

   Ion


-Mensaje original-
De: Cleber Hostalácio de Melo [mailto:[EMAIL PROTECTED]]
Enviado el: miércoles, 27 de febrero de 2002 18:28
Para: Tomcat Users List
Asunto: Re: Tomcat x Apache


My  webapps directory and all its directories are read and execute free for
all users. So I don´t think this is the problem.

Any way, I think Apache should pass all the /examples requests to
Tomcat and not trying to read the directly from the file system.

It looks more that Apache is not allowed to connect to Tomcat. I´ve
already check all the possibilities but could not find any parameter(s) in
httpd.conf or server.xml that could prevent the connection.

Any other clue?

Thank you.


Ion Larranaga wrote:

 Does your apache user (nobody by default) have access
 to the physical directory? Perhaps that directory belongs
 to the user you start Tomcat with (maybe root?) and
 nobody has no read access to it.

 Hope it helps,

   Ion

 -Mensaje original-
 De: Cleber Hostalacio de Melo [mailto:[EMAIL PROTECTED]]
 Enviado el: miercoles, 27 de febrero de 2002 17:25
 Para: [EMAIL PROTECTED]
 Asunto: Tomcat x Apache

 Hi,

 I have linux  (kernel 2.4.5), apache 1.3.19 and
 Tomacat 4.0.2

 Tomcat are working well with the url:
   http://Myserv:tomcat_port/examples/jsp/index.html

 But when I try to access this application from Apache with the
 URL:

   http://Myserv/examples/jsp/index.html

 I receive the message in my browser:

 Forbidden
 You don't have permission to access /examples/jsp/index.html on this
 server.

 The corresponding entries in the Apache logs are:

 httpd/logs/access.log:
   GET /examples/jsp/index.html HTTP/1.0 403 301

 httpd/logs/error.log:
   [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot
 read directory for multi: /examples/jsp/

 There is no entry in the Tomcat logs which looks like that Apache is not

 even trying to
 connect to Tomcat.

 My configuration files are:

 httpd.com

 .
 ServerName myServer
 ServerType standalone
 ServerRoot /etc/httpd
 ..
 LoadModule 
 LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so
 ..
 AddModule
 AddModule mod_webapp.c
 ..
 DocumentRoot /home/myDocs
 ..
 WebAppConnection Tomcat_Apache warp localhost:8008
 WebAppDeploy examples Tomcat_Apache /examples/

 server.xml

 .
 Service name=Tomcat_Apache
 Connector
   className=org.apache.catalina.connector.warp.WarpConnector
   port=8008 minProcessors=5 maxProcessors=75
   enableLookups=true
   acceptCount=10 debug=0/

   !-- Replace localhost with what your Apache ServerName is set to
 --
   Engine className=org.apache.catalina.connector.warp.WarpEngine
name=localhost debug=0 appBase=webapps
.
/Engine
 /Service

 Anyone has any idea what could be the problem?

 Thanks.

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Apache + Tomcat + SSL : Please help me on this

2002-02-28 Thread Anton Brazhnyk

Hi,

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 5:37 AM
 To: [EMAIL PROTECTED]
 Subject: Apache + Tomcat + SSL : Please help me on this
 
 
 Hi All,
 
 I have a problem in configuring SSL. I basically have two questions.
 
 1. I'm trying to configure Apache to use Tomcat as a servlet 
 container. My Apche server is 1.3.14-3 and i'm using Tomcat 4.02 
 and mod_webapp.so to integrate using WebAppConnection. I 
 basically followed the steps given as in following article
 
 http://dcb.sun.com/practices/howtos/tomcat_apache.jsp
 
 It worked very well and I managed to get Apache passing request 
 to the Tomcat. All works fine.
 
 Now my actual problem is SSL. How to get SSL work with Tomcat ? 
 Should I use Apaches SSL as recommended in Tomcat doc or Tomcats 
 SSL. What steps should I take ?
 

Can't help here, sorry. You should consult with Apache docs. And you have
to use Apache SSL, in fact AFAIK you won't be able to use Tomcat one in
that configuration.

 
 2. In a another machine I have Tomcat running as a standalone. I 
 tried to configure Tomcat SSL by following the how to document in 
 Tomcat. I am getting following error thrown in stdout in logs directory.
 
 Create Catalina server
 Exception during startup processing
 java.lang.reflect.InvocationTargetException: 
 java.lang.NoClassDefFoundError: javax/net/ServerSocketFactory
  at java.lang.Class.forName0(Native Method)
  at java.lang.reflect.Method.invoke(Native Method)
  ... ... ...
  at 
 org.apache.catalina.startup.BootstrapService.main(BootstrapService
 .java:428)
 
 As with my knowledge I precisely followed the steps given in doc, 
 but still have problem. as I uncomment the SSL HTTP/1.1 Connector 
 on port 8443 in server.xml, I could not get Tomcat started and 
 hence getting the exception thrown in stdout. 
 

It looks like you don't have JSSE installed in proper location.
It resides in $JAVA_HOME/jre/lib/ext in my case and
I believe it can live in $CATALINA_HOME/server/lib
or in $CATALINA_HOME/common/lib if your apps use it.

 
 I would highly appreciate if anyone can help me on this as I'm 
 tightly held up to finish my project on due date.
 
 Thank you,
 
 Zaid.
 
 

Anton

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Tomcat isn't running

2002-02-28 Thread Anton Brazhnyk

Hi,

 -Original Message-
 From: Yassel Omar Izquierdo Souchay [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 8:08 AM
 To: [EMAIL PROTECTED]
 Subject: Tomcat isn't running
 
 
 Hello
 i had installed tomcat 4.0 and when y try tu run startup it never finish
 because alwas says
 Windows cannot find the file -Djava.endorsed.dirs=. Make sure you typed
 correctily...
 what i have to do.

It looks like problem with your catalina.bat. It got corrupted somehow.
that -Djava.endorsed.dirs=.  happened to be on a new line.
You can comment out @echo off there and, assuming your JAVA_HOME 
is set correctly, try catalina start.
Hope it helps.

 I couldn't run my Servlets and my .jsp in my iis.
 If somebody know how i would be grateful
 
 thanx in advance
 Yassel
 
 

Anton

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Context addition in windows!

2002-02-28 Thread Joel Rees

Wait a minute.

On Thursday, February 28, someone claiming to be Kurt Kurniawan wrote:

  ... all servlet files and other jar files, have to be in
 /WEB-INF/CLASSES directory under your webapps.
 ...

 if you want to specify your directory other than this,
 you have to have your servlet engine move  to your E drive as well.

With Tomcat 3.2, you can specify additional contexts in the file

conf/server.xml

and the contexts can be anywhere on your server, at minimum. I am doing
this, TC 3.2 (and 3.3) on D: and the directory structure for some more
webapps on E:.

With Tomcat 3.3, there is the additional method of specifying contexts in
files named like

conf/apps-appname.xml

where for a webapp called appname. The apps-examples.xml in the /conf
directory is one of several provided in the distribution. I am not using v.
4, so I don't know, but I have the impression that it is using the method
provided in 3.2? It's in the on-line docs under deployment organization or
something similar.

RTWM:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/deployment.html
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/appdev/deployment.html
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/appdev/deployment.html

The path attribute of the context tag specifies the selector portion of the
URI to plug into the browser, and the docBase attribute specifies the
location in the local file system. Thus,

Context path=/appname
docBase=E:/more_webapps/appname

etc. should work for locating a webapp directory structure or war file in
the directory more_webapps on volume E:.

I've seen some talk on this list about putting the webapp on another
machine, but I wasn't paying attention. That is also mentioned in the docs.

Joel Rees
Alps Giken Kansai Systems Develoment
Suita, Osaka




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Time out error

2002-02-28 Thread Mahesh Agarwal

Hi All

I am using loadrunner to test my application. When i am setting 5 users to
connect to my server (I am using JBoss-2.4.1_Tomcat-3.2.3) ,it is
successful. But when increases the count to 10 users, its giving timeout
error for everyone. Can any body please solve out issue.

thanks a lot in advance

Mahesh

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Thread counts

2002-02-28 Thread Anton Brazhnyk

Hi,

 -Original Message-
 From: Moi [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 9:48 AM
 To: Tomcat Users List
 Subject: Thread counts
 
 
 To optimize my Tomcat4,I'd like to minimize number of thread counts ,for
  example to 10.Because,when I see Linux processes with ps axuw it
 gives very long list.
 
 What should I do?
 

The best you can do is to relax :)
I don't think it'll be kind of optimization to reduce number of threads.
but of course it depends on
- how much TC instances are running
- how much connectors they're using
- how much applications are there
- how much threads are created by those applications
and so on.

 
 

Anton

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Nice Tomcat+apache beginner site

2002-02-28 Thread Keith Ng

Hi

I have found a website that describes very clearly how to set up tomcat and
apache side by side. Its pretty useful and those who are having problems
might wan to check it out.

http://www.webmasterbase.com/article/305



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Nice Tomcat+apache beginner site

2002-02-28 Thread Keith Ng

Sorry. That link was the last page of tat artcile
here it is again guys

http://www.webmasterbase.com/article.php?pid=0aid=305

-Original Message-
From: Keith Ng [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 7:15 PM
To: Tomcat Users List
Subject: Nice Tomcat+apache beginner site


Hi

I have found a website that describes very clearly how to set up tomcat and
apache side by side. Its pretty useful and those who are having problems
might wan to check it out.

http://www.webmasterbase.com/article/305



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Apache does not load images!!

2002-02-28 Thread Eswar.K

hi ricky,

i am using mod_jk only and not mod_webapp. any clue why it is happening?

Eswar K. J. A

-Original Message-
From: Ricky Leung [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 5:05 AM
To: Tomcat Users List
Subject: RE: Apache does not load images!!


are you using mod_webapp?  I find this to be a problem when using apache and
mod_webapp, but it went away once I use it on Solaris.  mod_jk doesn't have
this problem either.

-Original Message-
From: Eswar.K [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 8:56 AM
To: Tomcat Users List
Subject: RE: Apache does not load images!!



sometimes some images gets loaded and sometimes some others...
and sometimes all of them are shown.

The path of  the image is not a problem, bcos if it was, i should be
consistently get the problem for the same image, which is not happening.

Eswar

-Original Message-
From: Phil Shrimpton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 3:27 PM
To: Tomcat Users List; Eswar.K
Subject: Re: Apache does not load images!!


On Wednesday 27 February 2002 10:39, Eswar.K wrote:

Hi,

 tomcat has been integrated with apache with mod_jk.  When I send a request
 directly to tomcat(post 8080), all the images are loaded appropriately,
but
 when i am sending a requet to apache(port 80), few images are not being
 loaded. What should be done to avoid such a problem?

I had the same problem.  What is was, was that the URI I was using for the
imgaes was

/images/myimage.gif

Which when used via Apache/mod_jk were being request from Apache's doument
root.

Changing the URI to...

images/myimage.gif  (no initial slash)

Fixed the problem

Phil


--
Linux 2.4.4-4GB
  9:55am  up  2:27,  1 user,  load average: 0.20, 0.47, 0.41

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: JSP programming under Tomcat 4.0.2

2002-02-28 Thread Randy Layman


All versions of Tomcat (and all JSP containers for that matter)
require you to add %@ page import=% to your JSP files.

Also, Tomcat versions 3.3 and beyond ignore your system's classpath
variable - it causes to may problems with people not understanding how this
interacted with the web apps.

Lastly, lots of people have experience using JSP with Tomcat 4.02.
If you have more specific questions please ask - this is the right forum.

Randy

 -Original Message-
 From: Ming [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 27, 2002 6:29 PM
 To: Tomcat Users List
 Subject: JSP programming under Tomcat 4.0.2
 
 
 I'm using Tomcat 4.0..2 and apache 1.3.23. I move all my 
 class files to the
 WEB-INF classes folder and jar files to the lib folder.
 
 I'm programming in JSP. But it seems that although all the 
 necessary class
 files and jar files are in the classes and lib folder, I 
 still need to import
 them in my JSP script. This wasn't the case before I upgraded 
 the tomcat and
 apache.  Since the new tomcat is on the same machine as the 
 old one, the
 classpaths are the same too.
 
 Does anybody have experience on programming JSP under Tomcat 
 4.0.2? I really
 appriciate if you can help.
 
 Thanks.
 
 Ming
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: [TC402] Manager Context in IIS 5 is access denied

2002-02-28 Thread Randy Layman


Check the permissions for the redirector dll and the virtual
directory.  Also, if you want Tomcat to handle authentication (which you
need for the manager app), IIS must be configured to allow anonymous access
to the virtual directory.

Randy


 -Original Message-
 From: Frans Thamura [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 25, 2002 5:04 PM
 To: Tomcat Users List
 Subject: [TC402] Manager Context in IIS 5 is access denied
 
 
 I install IIS + Tomcat 4.02 and activate the manager.
 
 i tomcat with manager context (http://localhost:8080/manager) 
 it is work well.. 
 
 but when i try the port 80 (IIS) access denied.
 
 Do you know this problem.
 
 Frans
 
 
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Questions to security fixes

2002-02-28 Thread Steffen Fries

Hi,

just a short question, are all of the security vulnerabilties 
listed under  
http://securitytracker.com/archives/target/420.html are
fixed in the newest version. Is there a general list which 
shows, which
security bugs are fixed?

Regards
 
Steffen
___
Steffen Fries, Siemens AG, CT IC 3  
Otto-Hahn-Ring 6,  D-81730 Munich, Germany 
Phone:  (+49) 89 / 636-53403, Fax  :  (+49) 89 / 636-48000
Email:  [EMAIL PROTECTED]
___
This email was written on 100% recycled bytes!



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Context addition in windows!

2002-02-28 Thread Cox, Charlie



 -Original Message-
 From: Joel Rees [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 5:36 AM
 To: Tomcat Users List
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: Context addition in windows!
 
 
 Wait a minute.
 
 On Thursday, February 28, someone claiming to be Kurt Kurniawan wrote:
 

I assume you have reason to believe it may not be Kurt Kurniawan who sent
this message to the list? :)

   ... all servlet files and other jar files, have to be in
  /WEB-INF/CLASSES directory under your webapps.
  ...
 

classes go into /WEB-INF/classes (note the case-sensitive name) and jars go 
into /WEB-INF/lib

  if you want to specify your directory other than this,
  you have to have your servlet engine move  to your E drive as well.
 
 With Tomcat 3.2, you can specify additional contexts in the file
 
 conf/server.xml
 
 and the contexts can be anywhere on your server, at minimum. 
 I am doing
 this, TC 3.2 (and 3.3) on D: and the directory structure for some more
 webapps on E:.
 
 With Tomcat 3.3, there is the additional method of specifying 
 contexts in
 files named like
 
 conf/apps-appname.xml
 
 where for a webapp called appname. The apps-examples.xml in the /conf
 directory is one of several provided in the distribution. I 
 am not using v.
 4, so I don't know, but I have the impression that it is 
 using the method
 provided in 3.2? It's in the on-line docs under deployment 
 organization or
 something similar.
 
 RTWM:
 http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/deployment.html
 http://jakarta.apache.org/tomcat/tomcat-3.3-doc/appdev/deployment.html
 http://jakarta.apache.org/tomcat/tomcat-3.2-doc/appdev/deployment.html
 
 The path attribute of the context tag specifies the selector 
 portion of the
 URI to plug into the browser, and the docBase attribute specifies the
 location in the local file system. Thus,
 
 Context path=/appname
 docBase=E:/more_webapps/appname
 
 etc. should work for locating a webapp directory structure or 
 war file in
 the directory more_webapps on volume E:.
 
 I've seen some talk on this list about putting the webapp on another
 machine, but I wasn't paying attention. That is also 
 mentioned in the docs.
 
 Joel Rees
 Alps Giken Kansai Systems Develoment
 Suita, Osaka
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Avoiding 'servlet' as part of the URL

2002-02-28 Thread Thomas Stiller

How can I achieve that a servlet Serv123.class
which is successfully running from
install_dir/webapps/ROOT/WEB-INF/classes/
and currently called
http://somehost/servlet/Serv123

is able to be called
http://somehost/myfolder/Serv123
and located in the directory
install_dir/webapps/myfolder/classes/

Thx
Thomas


-- 

___
Sign-up for your own FREE Personalized E-mail at Email.com
http://www.email.com/?sr=signup



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Avoiding 'servlet' as part of the URL

2002-02-28 Thread Barney Hamish

You can set up aliases for servlets in the web.xml but the servlets still
have to reside in the WEB-INF directory. Have a look at the documentation
for the web.xml file.

-Original Message-
From: Thomas Stiller [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 2:28 PM
To: [EMAIL PROTECTED]
Subject: Avoiding 'servlet' as part of the URL


How can I achieve that a servlet Serv123.class
which is successfully running from
install_dir/webapps/ROOT/WEB-INF/classes/
and currently called
http://somehost/servlet/Serv123

is able to be called
http://somehost/myfolder/Serv123
and located in the directory
install_dir/webapps/myfolder/classes/

Thx
Thomas


-- 

___
Sign-up for your own FREE Personalized E-mail at Email.com
http://www.email.com/?sr=signup



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Why localhost:8080 NOT expanded to http://localhost:8080

2002-02-28 Thread Tom Oinn



Thomas Stiller wrote:
 
 After having started Tomcat 4.0.2 I entered
 the URL
 localhost:8080
 into my browsers URL entryfield.
 Surprisingly it is not automatically expanded to
 http://localhost:8080
 but gave an error (page not found)
 
 With other URLs in the outside internet world(when I am connected through my 
providers connection) it works fine.

Most browsers will only do the autocompletion with addresses starting
'www', I doubt there's any way you can change this. You could just
create a bookmark to your server if it's bugging you...

Tom

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Nice Tomcat+apache beginner site

2002-02-28 Thread Chuck Amadi

Keith Ng wrote:

Hi

I have found a website that describes very clearly how to set up tomcat and
apache side by side. Its pretty useful and those who are having problems
might wan to check it out.

http://www.webmasterbase.com/article/305



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

Cheers mate , i took a peek and i found the topic regarding Apache HTTP 
Server .Thus i am currently just running tomcat 3  4 in development 
environment .
Thus Apache Server already installed at work prior to me starting ( Also 
no notes ) therefore i will make a copy and have a play at home thus 
ehance my skills as they say the more you do the more you can !!

Excellant website if i say so again
Regards Chuck Amadi



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Why localhost:8080 NOT expanded to http://localhost:8080

2002-02-28 Thread Randy Layman


ICANN assigned HTTP traffic (that for the web) to port 80.
Consequently, web browsers assume that web traffic will occur over port 80.
They also handle other protocols (like FTP on 21).  Since 8080 is no an
assigned number for a protocol the web browser doesn't know how to talk to
the other end.  Therefore you have to tell it what protocol to use (HTTP).

Randy

 -Original Message-
 From: Thomas Stiller [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 8:30 AM
 To: [EMAIL PROTECTED]
 Subject: Why localhost:8080 NOT expanded to http://localhost:8080;
 
 
 After having started Tomcat 4.0.2 I entered
 the URL 
 localhost:8080 
 into my browsers URL entryfield.
 Surprisingly it is not automatically expanded to
 http://localhost:8080
 but gave an error (page not found)
 
 With other URLs in the outside internet world(when I am 
 connected through my providers connection) it works fine.
 
 Which option do I have to change to get an auto-complete?
 
 Thx Thomas
 -- 
 
 ___
 Sign-up for your own FREE Personalized E-mail at Email.com
 http://www.email.com/?sr=signup
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




tomcat402+iplanet4.1

2002-02-28 Thread Thutika, Swamy

Hi All,
  I could succesfully connect iplanet4.1 with tomcat33a with ajp3
connector(on windows nt). I user nsapi_redirector that came is under binary
distribution.

  I am using tomcat as ouofprocess engine.

  But when i do the same thing between tomcat402 and iplanet4.1 , i get the
following errors when accessing examples url from iplanet


**
  [Thu Feb 28 08:51:19 2002]  [jk_connect.c (115)]: jk_open_socket, try to
connect socket = 444
[Thu Feb 28 08:51:21 2002]  [jk_connect.c (124)]: jk_open_socket, after
connect ret = -1
[Thu Feb 28 08:51:21 2002]  [jk_connect.c (143)]: jk_open_socket, connect()
failed errno = 61
[Thu Feb 28 08:51:21 2002]  [jk_ajp13_worker.c (196)]: In
jk_endpoint_t::connect_to_tomcat, failed errno = 61
[Thu Feb 28 08:51:21 2002]  [jk_ajp13_worker.c (635)]: Error connecting to
the Tomcat process.
[Thu Feb 28 08:51:21 2002]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 0
[Thu Feb 28 08:51:21 2002]  [jk_connect.c (108)]: Into jk_open_socket
[Thu Feb 28 08:51:21 2002]  [jk_connect.c (115)]: jk_open_socket, try to
connect socket = 452
[Thu Feb 28 08:51:22 2002]  [jk_connect.c (124)]: jk_open_socket, after
connect ret = -1
[Thu Feb 28 08:51:22 2002]  [jk_connect.c (143)]: jk_open_socket, connect()
failed errno = 61
[Thu Feb 28 08:51:22 2002]  [jk_ajp13_worker.c (196)]: In
jk_endpoint_t::connect_to_tomcat, failed errno = 61
[Thu Feb 28 08:51:22 2002]  [jk_ajp13_worker.c (635)]: Error connecting to
the Tomcat process.
[Thu Feb 28 08:51:22 2002]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 1
[Thu Feb 28 08:51:22 2002]  [jk_connect.c (108)]: Into jk_open_socket
[Thu Feb 28 08:51:22 2002]  [jk_connect.c (115)]: jk_open_socket, try to
connect socket = 460
[Thu Feb 28 08:51:24 2002]  [jk_connect.c (124)]: jk_open_socket, after
connect ret = -1
[Thu Feb 28 08:51:24 2002]  [jk_connect.c (143)]: jk_open_socket, connect()
failed errno = 61
[Thu Feb 28 08:51:24 2002]  [jk_ajp13_worker.c (196)]: In
jk_endpoint_t::connect_to_tomcat, failed errno = 61
[Thu Feb 28 08:51:24 2002]  [jk_ajp13_worker.c (635)]: Error connecting to
the Tomcat process.
[Thu Feb 28 08:51:24 2002]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 2
[Thu Feb 28 08:51:24 2002]  [jk_ajp13_worker.c (549)]: Into
jk_endpoint_t::done





As i didn't find naspi_redirector.dll under tomcat402 binary , i am using
the 33a redirector.

Could somebody help me resolve this?

Thanks in advance,

Swamy

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: tomcat402+iplanet4.1

2002-02-28 Thread Ralph Einfeldt

Are you also using the mod_jk.so of 3.3 ?

If not, give it a try.

 -Ursprüngliche Nachricht-
 Von: Thutika, Swamy [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 15:06
 An: '[EMAIL PROTECTED]'
 Betreff: tomcat402+iplanet4.1
 
snip/ 
 As i didn't find naspi_redirector.dll under tomcat402 binary 
 , i am using the 33a redirector.
snip/ 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: IlligalStateException -- getOutputStream() has already been called for this response.

2002-02-28 Thread Nicolas Silberzahn



Bonjour,

getOutputStream()  can be done only once.
I guess the first servlet you are invoking is doing it.
Then you forward to a jsp which try to do it again

If it forwards to a jsp, the initial servelt don't have to send something on
the stream, thus don't have to call getOutputStream() .

Bonne journée,


Nicolas Silber*zahn

Digital Airways
Everywhere InternetTechnologies/Internet
100% Java, Mobile, Offline awareWapaka Browser/100% Java, Mobile, Offline
aware
www.DigitalAirways.com


-Message d'origine-
De : KC Berg [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 26 février 2002 22:02
À : 'Tomcat Users List'
Objet : RE: IlligalStateException -- getOutputStream() has already been
called for this response.


How are you doing the includes? Also when you are using a forward in a
servlet you can not print anything to the output buffer before you use the
forward. Because once the output stream has been sent to the browser the
server can no longer forward that stream to another servlet.

KC

-Original Message-
From: Dmitry Nikelshpur [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 26, 2002 12:40 PM
To: [EMAIL PROTECTED]
Subject: IlligalStateException -- getOutputStream() has already been
called for this response.


Hello everyone.

I had posted a similar message before, but either did not get replies or
missed them.

I am using a JavaBean in a JSP page. This bean draws charts and graphs
depending on supplied data...

When I call the JSP page directly from the browser, the graph displays
properly, and no error messages are dumped to catalina.out.

When I have a servlet forward to the JSP page, the graphs display
properly, but I get a message in catalina.out:
java.lang.IlligalStateException: getOutputStream() has already been
called for this response.

When I have a servlet include the JSP page, I get garbage in the
browser, and the same message in catalina.out,
java.lang.IlligalStateException: getOutputStream() has already been
called for this response.

I had seen posts regarding this error, and believe that I saw something
in the bug databasee, but still no solution.
Is this behavior 'normal?' for JSPs / Servlets?

The bean that I am using to create the charts is called jspChart, and is
at:  http://www.javaside.com/u_jspchart.html
This URL contains a sample JSP page, so any servlet that includes /
forwards this page should produce above results.

I would apprecieate it if you could BCC me in your replies, to make sure
I get the message.
Also, if you have any other solutions for creating charts/graphs
dynamically, with the ability to include/forweard from servlets, I'll be
more than pleased...

Thanks in advance!


Dmitry



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: IlligalStateException -- getOutputStream() has already been called for this response.

2002-02-28 Thread Nicolas Silberzahn



Bonjour,

getOutputStream()  can be done only once.
I guess the first servlet you are invoking is doing it.
Then you forward to a jsp which try to do it again

If it forwards to a jsp, the initial servelt don't have to send something on
the stream, thus don't have to call getOutputStream() .

Bonne journée,


Nicolas Silber*zahn

Digital Airways
Everywhere InternetTechnologies/Internet
100% Java, Mobile, Offline awareWapaka Browser/100% Java, Mobile, Offline
aware
www.DigitalAirways.com


-Message d'origine-
De : KC Berg [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 26 février 2002 22:02
À : 'Tomcat Users List'
Objet : RE: IlligalStateException -- getOutputStream() has already been
called for this response.


How are you doing the includes? Also when you are using a forward in a
servlet you can not print anything to the output buffer before you use the
forward. Because once the output stream has been sent to the browser the
server can no longer forward that stream to another servlet.

KC

-Original Message-
From: Dmitry Nikelshpur [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 26, 2002 12:40 PM
To: [EMAIL PROTECTED]
Subject: IlligalStateException -- getOutputStream() has already been
called for this response.


Hello everyone.

I had posted a similar message before, but either did not get replies or
missed them.

I am using a JavaBean in a JSP page. This bean draws charts and graphs
depending on supplied data...

When I call the JSP page directly from the browser, the graph displays
properly, and no error messages are dumped to catalina.out.

When I have a servlet forward to the JSP page, the graphs display
properly, but I get a message in catalina.out:
java.lang.IlligalStateException: getOutputStream() has already been
called for this response.

When I have a servlet include the JSP page, I get garbage in the
browser, and the same message in catalina.out,
java.lang.IlligalStateException: getOutputStream() has already been
called for this response.

I had seen posts regarding this error, and believe that I saw something
in the bug databasee, but still no solution.
Is this behavior 'normal?' for JSPs / Servlets?

The bean that I am using to create the charts is called jspChart, and is
at:  http://www.javaside.com/u_jspchart.html
This URL contains a sample JSP page, so any servlet that includes /
forwards this page should produce above results.

I would apprecieate it if you could BCC me in your replies, to make sure
I get the message.
Also, if you have any other solutions for creating charts/graphs
dynamically, with the ability to include/forweard from servlets, I'll be
more than pleased...

Thanks in advance!


Dmitry



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Why localhost:8080 NOT expanded to http://localhost:8080

2002-02-28 Thread Chris Campbell


This is not surprising really. In most URI addresses the protocol (http, ftp
etc) is the part before the colon. If you leave 'http:' out of a URI with a
colon in it, the part before the colon becomes the protocol, in this case
'localhost'.

ChrisC

 -Original Message-
 From: Thomas Stiller [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 10:30 PM
 To: [EMAIL PROTECTED]
 Subject: Why localhost:8080 NOT expanded to http://localhost:8080;
 
 
 After having started Tomcat 4.0.2 I entered
 the URL 
 localhost:8080 
 into my browsers URL entryfield.
 Surprisingly it is not automatically expanded to
 http://localhost:8080
 but gave an error (page not found)
 
 With other URLs in the outside internet world(when I am 
 connected through my providers connection) it works fine.
 
 Which option do I have to change to get an auto-complete?
 
 Thx Thomas
 -- 
 
 ___
 Sign-up for your own FREE Personalized E-mail at Email.com
 http://www.email.com/?sr=signup
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Reload Context Problem-Tomcat 4.0.1

2002-02-28 Thread Haris Papadopoulos

Hi,
When classes or servlets are updated, the context is being reloaded. However, we use a 
pool of connections to Firebird in a development environment and it seems that 
sometimes (not always and this is strange), the context is reloaded but the new pool 
of connections is never created. As I said, sometimes it works fine and sometimes 
doesn't. The connections are made via inetd to a Classic Server Installation of 
Firebird on Linux. I don't know if it's an Interserver issue but we didn't have these 
problems in the past using Resin. 
Thanx in advance.  



RE: Why localhost:8080 NOT expanded to http://localhost:8080

2002-02-28 Thread Randy Layman


Not quite - A fully qualified URL is formatted like:
procotol://hostname:port/path
The hostname is immediately follows // and is terminated by the next
element.  This allows the : to unambiguous, even if the optional elements
are left out.

Randy

 -Original Message-
 From: Chris Campbell [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 9:27 AM
 To: 'Tomcat Users List'
 Subject: RE: Why localhost:8080 NOT expanded to
 http://localhost:8080;
 
 
 
 This is not surprising really. In most URI addresses the 
 protocol (http, ftp
 etc) is the part before the colon. If you leave 'http:' out 
 of a URI with a
 colon in it, the part before the colon becomes the protocol, 
 in this case
 'localhost'.
 
 ChrisC
 
  -Original Message-
  From: Thomas Stiller [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, February 28, 2002 10:30 PM
  To: [EMAIL PROTECTED]
  Subject: Why localhost:8080 NOT expanded to 
 http://localhost:8080;
  
  
  After having started Tomcat 4.0.2 I entered
  the URL 
  localhost:8080 
  into my browsers URL entryfield.
  Surprisingly it is not automatically expanded to
  http://localhost:8080
  but gave an error (page not found)
  
  With other URLs in the outside internet world(when I am 
  connected through my providers connection) it works fine.
  
  Which option do I have to change to get an auto-complete?
  
  Thx Thomas
  -- 
  
  ___
  Sign-up for your own FREE Personalized E-mail at Email.com
  http://www.email.com/?sr=signup
  
  
  
  --
  To unsubscribe:   
mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: tomcat402+iplanet4.1

2002-02-28 Thread Ralph Einfeldt

Sorry, was in wrong cinema.

Forget it.

mod_jk.so is for apache what naspi_redirector.dll
is for netscape.

 -Ursprüngliche Nachricht-
 Von: Thutika, Swamy [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 15:25
 An: 'Tomcat Users List'
 Betreff: RE: tomcat402+iplanet4.1
 
 
 Thanks Ralph for the quick reply.
 
 I am on NT box. Is it some kind of a dll that i have to install on NT.
 
 - Swamy
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: tomcat402+iplanet4.1

2002-02-28 Thread Ralph Einfeldt

Your log looks like you already use mod_jk.

I don't think that naspi_redirector.dll
will produce such messages. (Not shure as 
I never used it)

 -Ursprüngliche Nachricht-
 Von: Thutika, Swamy [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 15:25
 An: 'Tomcat Users List'
 Betreff: RE: tomcat402+iplanet4.1

 [Thu Feb 28 08:51:19 2002]  [jk_connect.c (115)]: jk_open_socket, try
to
 connect socket = 444

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Scope / Instantiation of JSP pages / declarations

2002-02-28 Thread Thorsten Barth

Hello,

Using Tomcat, I found out that JSP pages are instantiated only once - the 
first time they are requested. The values of the local declared variables 
are kept for subsequent requests and even shared between different sessions.

If two requests are accessing the same page at the same time, this messes 
all up, so I would like to change this behaviour. I searched Suns JSP specs 
and the tomcat documentation, but I just found an attribute in the page 
directive that forces serialization of the requests (threadsafe=false) - 
but I think that would significantly reduce performance...

Do you know
- if and why the current behaviour of tomcat is intended?
- where I can search for more info?
- if there is an option that tells Tomcat to create a new instance of JSP 
pages every time they are called

P.S: Allaire JRUN seems to behave different 

Thanks and bye...

-- 
Thorsten Barth

Web Arts AG
eBusiness Solutions
---
Max-Planck-Str. 9
61381 Friedrichsdorf
---
Tel.: 06172/599833
Fax : 06172/599830
E-Mail: [EMAIL PROTECTED]
http://www.web-arts.com/


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Scope / Instantiation of JSP pages / declarations

2002-02-28 Thread Randy Layman


see intermixed

 -Original Message-
 From: Thorsten Barth [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 9:55 AM
 To: Tomcat Users List
 Subject: Scope / Instantiation of JSP pages / declarations
 
 
 If two requests are accessing the same page at the same time, 
 this messes 
 all up, so I would like to change this behaviour. I searched 
 Suns JSP specs 
 and the tomcat documentation, but I just found an attribute 
 in the page 
 directive that forces serialization of the requests 
 (threadsafe=false) - 
 but I think that would significantly reduce performance...
Yes it would.
 
 Do you know
 - if and why the current behaviour of tomcat is intended?
Yes - it keeps memory consumption down (instead of having thousands of
instances of the JSP class for thousands or requests, you have only one)
 - where I can search for more info?
The JSP Spec and Servlet Spec would probably be good resources
 - if there is an option that tells Tomcat to create a new 
 instance of JSP 
 pages every time they are called
I don't believe so
 
 P.S: Allaire JRUN seems to behave different 
If so then it doesn't comply with the JSP spec.


One thing to remember is that only variables declared in the %! ...
% blocks and page scoped beans are shared between requests.  If you want
variables that are used only in the scope of one request then either use %
... % blocks or set your bean scope to request.

Randy

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Threading my app

2002-02-28 Thread Dominic Clay

Hi,

Have been successfully writing small webapps for some time, but I have hit a
difficult issue and was wondering if anyone had any ideas

the scenario...

Page1 contains a link to a document.
when the link is clicked, Page2 appears which contains a large text document
stored is a text field in a DB.  This field can be anything from 100K to
several MB.

This is an acceptable size for our network.  However before showing the page
the JSP page runs through a routine to look for certain words and prefix
them with a link to the previous word, *and* postfix them with a link to the
next word.

There can be up to 100 of these words in a document.

The issue is this can take up to 200 seconds to complete.

The Idea...

I want to put this processing in a separate thread which is called when
Page1 appears.

This jsp page starts the processing.
Page2 then requests the data (possibly from a session variable) returned by
this thread and displays the data...

So for a thread newbie...

Is this possible, if so, how.


Thanks,

Dominic



Re: Tomcat v4.0.2 : doesn't find JAR files in the WEB-INF/lib

2002-02-28 Thread Mullen-Schultz, Gary

I too get this error.  Here's what I see in the log:

2002-02-27 17:04:38 WebappLoader[/WebPro]: Deploy JAR
/WEB-INF/lib/KSCDomainBusinessObjects72_022202.jar to
D:\Tomcat\jakarta-tomcat-4.0.2\KSCWebApps\Correspondent\WebPro\WEB-INF\lib\K
SCDomainBusinessObjects72_022202.jar

... (some stuff in between, no errors obvious) ...

2002-02-27 17:04:42 ContextConfig[/WebPro]: Scanning library JAR files
2002-02-27 17:04:42 ContextConfig[/WebPro]:
tldConfigJar(/WEB-INF/lib/KSCDomainBusinessObjects72_022202.jar):
java.io.IOException: The system cannot find the path specified

The .jar file does exist in the directory listed in the first log line, and
Everyone has full rights to it.

I ensured that WEB-INF is all in caps, which it is.

Any ideas?

Gary Mullen-Schultz

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




configuring additional servlet path

2002-02-28 Thread Uri Shohet

Hi List,


I went through all (IMHO) tomcat documentation and haven't found a solution.

In Apache JServ I could make 2 servlet zones and map them as follows:

http://myhost/myproduct/servlet - /myproduct/run/servlet
http://myhost/myproduct/pubservlet  - /myproduct/run/pubservlet

I need this because I want /myproduct/servlet/ servlets to be protected by 
username and password, and /myproduct/pubservlet to be unprotected (public - 
hence the name).

Now, in tomcat I've set up a Context /myproduct in server.xml

Context path=/myproduct docBase=/myproduct/run/web debug=2
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_myproduct_log. suffix=.txt
  timestamp=true/
/Context

and moved all the files and dirs from /myproduct/run/servlet to 
/myproduct/run/web/WEB-INF/classes and all the servlets such as 
http://myhost/myproduct/servlet/Snoop are working fine.

My question is how can I set up /myproduct/pubservlet mapping so that when 
client calls http://myhost/myproduct/pubservlet/mypackage.MyServlet, tomcat 
will call /myproduct/run/pubservlet/mypackage/MyServlet.class 

Any help appreciated

Thanks in advance

-- 
Uri Shohet
A.M.S. Advanced Maintenance Systems Ltd.
E-Mail: [EMAIL PROTECTED]
Tel.:   +972-2-5822477 Ext.884
Fax :   +972-2-5814448

Registered Linux User #166615 (http://counter.li.org)


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: configuring additional servlet path

2002-02-28 Thread Barney Hamish

Have a look at the servlet specifications from sun that correspond to your
version of Tomcat. They tell you what you need to add to your web.xml to set
up user-defined mappings to servlets.

Hamish

-Original Message-
From: Uri Shohet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 4:49 PM
To: Tomcat Users List
Subject: configuring additional servlet path


Hi List,


I went through all (IMHO) tomcat documentation and haven't found a solution.

In Apache JServ I could make 2 servlet zones and map them as follows:

http://myhost/myproduct/servlet - /myproduct/run/servlet
http://myhost/myproduct/pubservlet  - /myproduct/run/pubservlet

I need this because I want /myproduct/servlet/ servlets to be protected by 
username and password, and /myproduct/pubservlet to be unprotected (public -

hence the name).

Now, in tomcat I've set up a Context /myproduct in server.xml

Context path=/myproduct docBase=/myproduct/run/web debug=2
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_myproduct_log. suffix=.txt
  timestamp=true/
/Context

and moved all the files and dirs from /myproduct/run/servlet to 
/myproduct/run/web/WEB-INF/classes and all the servlets such as 
http://myhost/myproduct/servlet/Snoop are working fine.

My question is how can I set up /myproduct/pubservlet mapping so that when 
client calls http://myhost/myproduct/pubservlet/mypackage.MyServlet, tomcat 
will call /myproduct/run/pubservlet/mypackage/MyServlet.class 

Any help appreciated

Thanks in advance

-- 
Uri Shohet
A.M.S. Advanced Maintenance Systems Ltd.
E-Mail: [EMAIL PROTECTED]
Tel.:   +972-2-5822477 Ext.884
Fax :   +972-2-5814448

Registered Linux User #166615 (http://counter.li.org)


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




XSL - Reload a resource without restarting

2002-02-28 Thread Lauer, Oliver

Hi all, 

somebody a brilliant idea how to reload a resource dynamically within a
webapp without having to restart. 
In my case I want to reload a XSL file only if it was changed. 

Thanks in advance
Oliver 

 AXA eSolutions GmbH
 AXA Konzern AG Germany
 Oliver Lauer 
 Web Architect
 Wörthstraße 34
 D-50668 Köln
 Germany
 Tel.: +49 221 148 31277
 Fax: +49 221 148 43963
 Mobil: +49 179 59 064 59
 e-Mail: [EMAIL PROTECTED]
 _
 
 

--
Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information 
nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne 
auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der 
unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des 
Inhalts dieser E-Mail nicht gestattet ist.Diese Nachricht  ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der 
vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich 
mit dem Absender der E-Mail in Verbindung zu setzen.

For legal and security reasons the information provided in this e-mail is not legally 
binding. Upon request we would be pleased to provide you with a legally binding 
confirmation in written form. Any form of unauthorised use, publication, reproduction, 
copying or disclosure of the content of this e-mail is not permitted. This message is 
exclusively for the person addressed or their representative. If you are not the 
intended recipient of this message and its contents, please notify the sender 
immediately.

==


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Nice Tomcat+apache beginner site

2002-02-28 Thread Clinton Gormley

I've tried out the instructions on this site and added these config lines to
httpd.conf (vanilla apache and tomcat installs on Win2000)

LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c
WebAppConnection conn warp localhost:8008
WebAppDeploy examples conn /examples

when i try http://localhost/examples/, it correctly gives me a directory
listing generated by the Tomcat server, but when I try to go to any of the
subdirectories (eg http://localhost/examples/servlets/), I see a 302
response in my Apache access log and the request eventually fails.

Any ideas?

thanks

Clint

 -Original Message-
 From: Keith Ng [mailto:[EMAIL PROTECTED]]
 Sent: 04 March 2002 11:36
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: RE: Nice Tomcat+apache beginner site
 
 
 Sorry. That link was the last page of tat artcile
 here it is again guys
 
 http://www.webmasterbase.com/article.php?pid=0aid=305
 


This e-mail, and any attachment, is confidential.
If you are not the intended recipient, you should not use, copy, alter or
disclose the contents of this message; you must delete it immediately. 
Finally, the contents of this message may contain personal views, which are
not the views of the company, unless specifically stated.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: tomcat waiting in linux

2002-02-28 Thread John Niven

Robert

 -Original Message-
 From: tlug [mailto:[EMAIL PROTECTED]] 
 Sent: 27 February 2002 21:21
 To: [EMAIL PROTECTED]
 Subject: tomcat waiting in linux
 
 I am running
   Java 1.4 from sun for linux
  RedHat 7.2
  and TomCat 4.0.2 from the rpm file
 
 I get the following message on my screen
 Using CATALINA_BASE:   /var/tomcat4
 Using CATALINA_HOME:   /var/tomcat4
 Using CATALINA_TMPDIR: /var/tomcat4/temp
 Using JAVA_HOME:   /usr/java/j2sdk1.4.0
 Starting service Tomcat-Standalone
 Apache Tomcat/4.0.2
 Starting service Tomcat-Apache
 Apache Tomcat/4.0.2
That looks OK to my newbie-ish eyes.  Put another way, that's what I get on
a Windows box, and my setup works OK.

 which looks wrong since I am trying to run it just 
 Standalone.  Does it come pre configured to run with apache?
I'll defer answering that to someone who knows what they're talking about ;)
but like I say, I get the Starting servive Tomcat-Apache lines on my
console at startup.

 I load up Konqueror and goto http://localhost:8080/ and 
 http://127.0.0.1:8080/ which comes back with  cannot connect 
 to localhost port 8080.  Tomcat should work fine with the 
 above verisons right?
You mentioned you installed Tomcat from the RPM?  If so, I think you may
need to use port 8180, not 8080 - check the archives.  Based on the
Starting services... messages above, I think Tomcat is running OK.  I'm
not a *nix person - is there a handy command to list activity on all ports
that you could run?  Check if there's an unusual port active in the 8000's
range.

 Thanks,
 Robert
Hope that helps,
John

--
John Niven
Reply via Mailing List
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: tomcat waiting in linux

2002-02-28 Thread rsequeira


If you are running tomcat straight out of the box, then the log messages
seem correct. By default the http connector listens on port 8080 unless you
modified the server.xml and changed the port (see Connector/ in
server.xml).
Trying telnet-ing to the port 8080 once you have started. See what ports
are open by typing netstat -n.
RS





tlug [EMAIL PROTECTED] on 02/27/2002 03:21:08 PM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  tomcat waiting in linux

I am running
  Java 1.4 from sun for linux
 RedHat 7.2
 and TomCat 4.0.2 from the rpm file

I get the following message on my screen
Using CATALINA_BASE:   /var/tomcat4
Using CATALINA_HOME:   /var/tomcat4
Using CATALINA_TMPDIR: /var/tomcat4/temp
Using JAVA_HOME:   /usr/java/j2sdk1.4.0
Starting service Tomcat-Standalone
Apache Tomcat/4.0.2
Starting service Tomcat-Apache
Apache Tomcat/4.0.2


which looks wrong since I am trying to run it just Standalone.  Does it
come pre configured to run with apache?

I load up Konqueror and goto http://localhost:8080/ and
http://127.0.0.1:8080/ which comes back with cannot connect to localhost
port 8080.  Tomcat should work fine with the above verisons right?

Thanks,
Robert

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]









--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: tomcat waiting in linux

2002-02-28 Thread Thutika, Swamy

 I used to get the same display when i run the tomcat33a / tomact402. I
removed the
 Apache service set up from server.xml. Everything works fine even after
that.
 My feeling is that the examples erver.xml has this server predfeined within
it.

 HTH,
 Swamy  

-Original Message-
From: John Niven [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 11:32 AM
To: 'Tomcat Users List'
Subject: RE: tomcat waiting in linux


Robert

 -Original Message-
 From: tlug [mailto:[EMAIL PROTECTED]] 
 Sent: 27 February 2002 21:21
 To: [EMAIL PROTECTED]
 Subject: tomcat waiting in linux
 
 I am running
   Java 1.4 from sun for linux
  RedHat 7.2
  and TomCat 4.0.2 from the rpm file
 
 I get the following message on my screen
 Using CATALINA_BASE:   /var/tomcat4
 Using CATALINA_HOME:   /var/tomcat4
 Using CATALINA_TMPDIR: /var/tomcat4/temp
 Using JAVA_HOME:   /usr/java/j2sdk1.4.0
 Starting service Tomcat-Standalone
 Apache Tomcat/4.0.2
 Starting service Tomcat-Apache
 Apache Tomcat/4.0.2
That looks OK to my newbie-ish eyes.  Put another way, that's what I get on
a Windows box, and my setup works OK.

 which looks wrong since I am trying to run it just 
 Standalone.  Does it come pre configured to run with apache?
I'll defer answering that to someone who knows what they're talking about ;)
but like I say, I get the Starting servive Tomcat-Apache lines on my
console at startup.

 I load up Konqueror and goto http://localhost:8080/ and 
 http://127.0.0.1:8080/ which comes back with  cannot connect 
 to localhost port 8080.  Tomcat should work fine with the 
 above verisons right?
You mentioned you installed Tomcat from the RPM?  If so, I think you may
need to use port 8180, not 8080 - check the archives.  Based on the
Starting services... messages above, I think Tomcat is running OK.  I'm
not a *nix person - is there a handy command to list activity on all ports
that you could run?  Check if there's an unusual port active in the 8000's
range.

 Thanks,
 Robert
Hope that helps,
John

--
John Niven
Reply via Mailing List
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: IlligalStateException -- getOutputStream() has already been called for this response.

2002-02-28 Thread Nicolas Silberzahn



Bonjour,

getOutputStream()  can be done only once.
I guess the first servlet you are invoking is doing it.
Then you forward to a jsp which try to do it again

If it forwards to a jsp, the initial servelt don't have to send something on
the stream, thus don't have to call getOutputStream() .

Bonne journée,


Nicolas Silber*zahn

Digital Airways
Everywhere InternetTechnologies/Internet
100% Java, Mobile, Offline awareWapaka Browser/100% Java, Mobile, Offline
aware
www.DigitalAirways.com


-Message d'origine-
De : KC Berg [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 26 février 2002 22:02
À : 'Tomcat Users List'
Objet : RE: IlligalStateException -- getOutputStream() has already been
called for this response.


How are you doing the includes? Also when you are using a forward in a
servlet you can not print anything to the output buffer before you use the
forward. Because once the output stream has been sent to the browser the
server can no longer forward that stream to another servlet.

KC

-Original Message-
From: Dmitry Nikelshpur [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 26, 2002 12:40 PM
To: [EMAIL PROTECTED]
Subject: IlligalStateException -- getOutputStream() has already been
called for this response.


Hello everyone.

I had posted a similar message before, but either did not get replies or
missed them.

I am using a JavaBean in a JSP page. This bean draws charts and graphs
depending on supplied data...

When I call the JSP page directly from the browser, the graph displays
properly, and no error messages are dumped to catalina.out.

When I have a servlet forward to the JSP page, the graphs display
properly, but I get a message in catalina.out:
java.lang.IlligalStateException: getOutputStream() has already been
called for this response.

When I have a servlet include the JSP page, I get garbage in the
browser, and the same message in catalina.out,
java.lang.IlligalStateException: getOutputStream() has already been
called for this response.

I had seen posts regarding this error, and believe that I saw something
in the bug databasee, but still no solution.
Is this behavior 'normal?' for JSPs / Servlets?

The bean that I am using to create the charts is called jspChart, and is
at:  http://www.javaside.com/u_jspchart.html
This URL contains a sample JSP page, so any servlet that includes /
forwards this page should produce above results.

I would apprecieate it if you could BCC me in your replies, to make sure
I get the message.
Also, if you have any other solutions for creating charts/graphs
dynamically, with the ability to include/forweard from servlets, I'll be
more than pleased...

Thanks in advance!


Dmitry



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: XSL - Reload a resource without restarting

2002-02-28 Thread Ralph Einfeldt


Depends on the application/library that is using the file and how much
control you have about the application/library.

Without more input it's hard to say anything more.

 -Ursprüngliche Nachricht-
 Von: Lauer, Oliver [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 17:16
 An: Tomcat Users List (E-Mail)
 Betreff: XSL - Reload a resource without restarting
snip/
 somebody a brilliant idea how to reload a resource 
 dynamically within a
 webapp without having to restart. 
 In my case I want to reload a XSL file only if it was changed. 
snip/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: XSL - Reload a resource without restarting

2002-02-28 Thread Ralph Einfeldt

I thought that the problem was, how to handle the change not
how to recognize it.

If the xsl is just file and you know where it is, 
what about this:

long mLastLoad = 0;
File mXSLFile = new File(path-to-file);
if (mXSLFile.lastModified()  mLastLoad) {
  doWhatEverToReRead();
  mLastLoad = (new Date()).getTime();
}

P.S.:

I still beg that the real problem lies in doWhatEverToReRead()

 -Ursprüngliche Nachricht-
 Von: Lauer, Oliver [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 18:01
 An: 'Tomcat Users List'
 Betreff: AW: XSL - Reload a resource without restarting

 I'm going to try it. Thanks !
 
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 17:51
 An: Tomcat Users List
 Betreff: Re: XSL - Reload a resource without restarting
snip/
 If you do a getResource from the ServletContext, it will give you a
 java.net.URL.  Then, maybe you could do an openConnection on 
 the URL to get a URLConnection.  Then, try the getLastModified method
on 
 that...  Don't know if this will work, but figured I'd throw it out
there
 as a suggestion.
snip/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: tomcat waiting in linux

2002-02-28 Thread John Niven

Swamy

 -Original Message-
 From: Thutika, Swamy [mailto:[EMAIL PROTECTED]] 
 Sent: 28 February 2002 16:35
 To: 'Tomcat Users List'
 Subject: RE: tomcat waiting in linux
 
  I used to get the same display when i run the tomcat33a / 
 tomact402. I removed the  Apache service set up from 
 server.xml. Everything works fine even after that.  My 
 feeling is that the examples erver.xml has this server 
 predfeined within it.
I suspect you're right - my attitude (as a newbie grateful just to get it
working) has tended to be: if it works, don't try and fix it!  I should
probably try pruning my server.xml file...

 
  HTH,
  Swamy  
 

Many thanks!
John

--
John Niven
Reply via Mailing List

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: XSL - Reload a resource without restarting

2002-02-28 Thread Lauer, Oliver

I haven't spend much time on this request yet but what I know is that a
webapp has to parse a XML stream with XSLT and the XSL is subject to change.

And I don't want to reload the webapp for that purpose. 

Background: The XSLT filters our XML stream. 

Any suggestions ? 

Thanks 
Oliver 

 AXA eSolutions GmbH
 AXA Konzern AG Germany
 Oliver Lauer 
 Web Architect
 Wörthstraße 34
 D-50668 Köln
 Germany
 Tel.: +49 221 148 31277
 Fax: +49 221 148 43963
 Mobil: +49 179 59 064 59
 e-Mail: [EMAIL PROTECTED]
 _
 


-Ursprüngliche Nachricht-
Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 28. Februar 2002 17:42
An: Tomcat Users List
Betreff: AW: XSL - Reload a resource without restarting



Depends on the application/library that is using the file and how much
control you have about the application/library.

Without more input it's hard to say anything more.

 -Ursprüngliche Nachricht-
 Von: Lauer, Oliver [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 17:16
 An: Tomcat Users List (E-Mail)
 Betreff: XSL - Reload a resource without restarting
snip/
 somebody a brilliant idea how to reload a resource 
 dynamically within a
 webapp without having to restart. 
 In my case I want to reload a XSL file only if it was changed. 
snip/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information 
nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne 
auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der 
unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des 
Inhalts dieser E-Mail nicht gestattet ist.Diese Nachricht  ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der 
vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich 
mit dem Absender der E-Mail in Verbindung zu setzen.

For legal and security reasons the information provided in this e-mail is not legally 
binding. Upon request we would be pleased to provide you with a legally binding 
confirmation in written form. Any form of unauthorised use, publication, reproduction, 
copying or disclosure of the content of this e-mail is not permitted. This message is 
exclusively for the person addressed or their representative. If you are not the 
intended recipient of this message and its contents, please notify the sender 
immediately.

==


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: XSL - Reload a resource without restarting

2002-02-28 Thread Lauer, Oliver

Danke Ralf, 

Do you know  a similar mechanism for something that is located within my web
context e.g. within web-inf like the web.xml

Oliver 

 AXA eSolutions GmbH
 AXA Konzern AG Germany
 Oliver Lauer 
 Web Architect
 Wörthstraße 34
 D-50668 Köln
 Germany
 Tel.: +49 221 148 31277
 Fax: +49 221 148 43963
 Mobil: +49 179 59 064 59
 e-Mail: [EMAIL PROTECTED]
 _
 


-Ursprüngliche Nachricht-
Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 28. Februar 2002 18:15
An: Tomcat Users List
Betreff: AW: XSL - Reload a resource without restarting


I thought that the problem was, how to handle the change not
how to recognize it.

If the xsl is just file and you know where it is, 
what about this:

long mLastLoad = 0;
File mXSLFile = new File(path-to-file);
if (mXSLFile.lastModified()  mLastLoad) {
  doWhatEverToReRead();
  mLastLoad = (new Date()).getTime();
}

P.S.:

I still beg that the real problem lies in doWhatEverToReRead()

 -Ursprüngliche Nachricht-
 Von: Lauer, Oliver [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 18:01
 An: 'Tomcat Users List'
 Betreff: AW: XSL - Reload a resource without restarting

 I'm going to try it. Thanks !
 
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 17:51
 An: Tomcat Users List
 Betreff: Re: XSL - Reload a resource without restarting
snip/
 If you do a getResource from the ServletContext, it will give you a
 java.net.URL.  Then, maybe you could do an openConnection on 
 the URL to get a URLConnection.  Then, try the getLastModified method
on 
 that...  Don't know if this will work, but figured I'd throw it out
there
 as a suggestion.
snip/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information 
nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne 
auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der 
unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des 
Inhalts dieser E-Mail nicht gestattet ist.Diese Nachricht  ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der 
vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich 
mit dem Absender der E-Mail in Verbindung zu setzen.

For legal and security reasons the information provided in this e-mail is not legally 
binding. Upon request we would be pleased to provide you with a legally binding 
confirmation in written form. Any form of unauthorised use, publication, reproduction, 
copying or disclosure of the content of this e-mail is not permitted. This message is 
exclusively for the person addressed or their representative. If you are not the 
intended recipient of this message and its contents, please notify the sender 
immediately.

==


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Got some questions about load balancing in 3.3a

2002-02-28 Thread Michael Molloy

I've got some questions about load balancing with Tomcat 3.3a.

First of all, the Tomcat-Workers-How-To that comes with 3.3a says that the 
workers.properties file contains working entries for an Ajp12, Ajp13, and a load 
balancing worker. However, it also says that the tomcat workers to be used for load 
balancing should not appear in the worker.list property, but they do in the default 
workers.properties file. Should they or should they not be in that list? 

Also, if I want to load balance using a remote machine, what configuration changes 
need to be made to the tomcat config files on that remote machine? Is it as simple as 
changing the remote worker port to match the port on the host machine? For example, 

Computer host workers.properties excerpt:
worker.test.port=10001
worker.test.host=192.168.0.43
worker.test.type=ajp13

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, ajp13, test

Computer remote (192.168.0.43) workers.properties excerpt
worker.test.port=10001
worker.test.host=localhost
worker.test.type=ajp13

I'm really confused at this point. I tried this the other day and couldn't get the 
host machine to communicate with the remote machine. Can someone offer some insight?

Thanks
--Michael

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: XSL - Reload a resource without restarting

2002-02-28 Thread jeff . guttadauro


Hi, Oliver.

   I can offer an idea (doubt it would qualify as brilliant though - sorry).
If you do a getResource from the ServletContext, it will give you a
java.net.URL.  Then, maybe you could do an openConnection on the URL to get a
URLConnection.  Then, try the getLastModified method on that...  Don't know if
this will work, but figured I'd throw it out there as a suggestion.

Best of luck,
-Jeff

 -Ursprüngliche Nachricht-
 Von: Lauer, Oliver [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 28. Februar 2002 17:16
 An: Tomcat Users List (E-Mail)
 Betreff: XSL - Reload a resource without restarting
[snip]
 somebody a brilliant idea how to reload a resource
 dynamically within a
 webapp without having to restart.
 In my case I want to reload a XSL file only if it was changed.
[snip]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: JSP programming under Tomcat 4.0.2

2002-02-28 Thread Ming

Hi, Randy,

Thanks a lot for your information.

Here is my situation:

My older tomcat is version 3.3 and new tomcat is version 4.0.2.

This is the script in the older tomcat directory(very simple one):

%@ page language=java contentType=text/html %
%@ page info=Simple testing program %
%@ page import=java.util.* %
%@ page import=java.io.* %
%@ page import=java.net.URL %

%@ include file=includes/js_include.txt %

html
head

%  String inputString = passwd;
jcrypt jcrypt = new jcrypt();
String cryptedPassword = jcrypt.crypt(MM, inputString);

%

titleSimple testing program/title
/head
%= inputString % and %= cryptedPassword %

/html


But under the new version of tomcat, this won't work until I put a line %@
page import=jcrypt %at the beginning. I've put my jcrypt.class file in
WEB-INF/classes and under $CATALINA_HOME/classes as well and restart the
tomcat and apache. Still seems not working.

I just read the documentation from jakarta site and you are right, tomcat 3.3
and above version ignore the CLASSPATH variable. But my question is, my older
version tomcat is 3.3 and new one is 4.0.2. Why does this script work under
the older one and not the new one?

Thanks a lot for your help.

Ming

Randy Layman wrote:

 All versions of Tomcat (and all JSP containers for that matter)
 require you to add %@ page import=% to your JSP files.

 Also, Tomcat versions 3.3 and beyond ignore your system's classpath
 variable - it causes to may problems with people not understanding how this
 interacted with the web apps.

 Lastly, lots of people have experience using JSP with Tomcat 4.02.
 If you have more specific questions please ask - this is the right forum.

 Randy

  -Original Message-
  From: Ming [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, February 27, 2002 6:29 PM
  To: Tomcat Users List
  Subject: JSP programming under Tomcat 4.0.2
 
 
  I'm using Tomcat 4.0..2 and apache 1.3.23. I move all my
  class files to the
  WEB-INF classes folder and jar files to the lib folder.
 
  I'm programming in JSP. But it seems that although all the
  necessary class
  files and jar files are in the classes and lib folder, I
  still need to import
  them in my JSP script. This wasn't the case before I upgraded
  the tomcat and
  apache.  Since the new tomcat is on the same machine as the
  old one, the
  classpaths are the same too.
 
  Does anybody have experience on programming JSP under Tomcat
  4.0.2? I really
  appriciate if you can help.
 
  Thanks.
 
  Ming
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



virtual hosts/certificates

2002-02-28 Thread Bernhard Wraase

Hello,

is it possible to use several certificates in one tomcat?
I would like to configure a different cert for each virtual host.
I.e.:
cert A for virtual host 1
cert B for virtual host 2
cert C for virtual host 3
As far as I understand the docs it is not possible.

Does anybody know a trick?
-- 
Regards Bernhard

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Upload bug ...

2002-02-28 Thread Julien OIX

hi everyone, 

I'm using these RPM's on a Linux RedHat 7.1

apache-1.3.22-1.7.1 (with mod_throttle-3.1.2-3 mod_put-1.3-2
mod_bandwidth-2.0.3-2)

tomcat4-4.0.1-1

mod_webapp-1.0.2-1

and it seems there's a bug whit file upload ...

Is this possible at this time to recompile a clean mod_webapp.so ,
and if not, does use of mod_jk.so permit file upload, and which RPM or
source to take for ?

Thanks in advance ...


-- 
Julien OIX
Service Informatique de Gestion
Tél: 02 40 99 83 65
mail: [EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: XSL - Reload a resource without restarting

2002-02-28 Thread Markus Spath



[EMAIL PROTECTED] wrote:

 Hi, Oliver.
 
I can offer an idea (doubt it would qualify as brilliant though - sorry).
 If you do a getResource from the ServletContext, it will give you a
 java.net.URL.  Then, maybe you could do an openConnection on the URL to get a
 URLConnection.  Then, try the getLastModified method on that...  Don't know if
 this will work, but figured I'd throw it out there as a suggestion.


Java and XSLT (Eric Burke / O'Reilly) shows a generic approach (additionally 
using Templates) for this. you could download the examples and have a look a 
chapter 6.

markus



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat (4.0.2) expiring protected forms

2002-02-28 Thread Towns, Peter (ANTS)

Hi all,

I'd like to stop Tomcat (4.0.2) from expiring my forms and causing my
browser to spew out Your webpage has expired, etc... whenever a user
history.back()s to the form. Tomcat seems to be pretty keen to do this since
it's trying a whole bunch of headers to expire/no-cache my pages.

I've googled around it it's been suggested that this happens because I've
slapped a security-constraint across the whole site. So, Tomcat expires
every page in order that other users can't history.back() to any
(potentially sensitive) forms ..?

But is there so way to toggle this behaviour in Tomcat's config ..?
Obviously I'd rather not have to hack up any HttpServletResponses to achieve
this...

Any suggestions would be appreciated ( I apologise if I've missed something
obvious...),

Pete


***
This email message contains confidential information for the above addressee only.  If 
you are not the intended addressee you must not disclose or use the information in any 
manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey 
House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by 
the FSA
***


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




invalid https url generates NullPointerException

2002-02-28 Thread Steve A Drake


 Hello. I just downloaded and installed Tomcat 4.0.2 and jsse1.0.2 on my
RH 7.2 box. I configured SSL under Tomcat so that the test URLs:
http://localhost:8080/ and https://localhost:8443/ work fine.

 The problem that I am having is that, if I accidentally enter:
https://localhost:8080/ Tomcat bogs down and throws the following
NullPointerException in catalina.out. I know that this address is invalid
but I'm surprised to see this behavior. Did I miss some configuration detail?
TIA for your advice.

java.lang.NullPointerException
at
org.apache.catalina.connector.http.HttpResponseStream.checkHead(HttpResponseStream.java:253)
at
org.apache.catalina.connector.http.HttpResponseStream.init(HttpResponseStream.java:104)
at
org.apache.catalina.connector.http.HttpResponseImpl.createOutputStream(HttpResponseImpl.java:220)
at
org.apache.catalina.connector.ResponseBase.getOutputStream(ResponseBase.java:725)
at
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:469)
at
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:236)
at
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpResponseImpl.java:288)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1039)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: invalid https url generates NullPointerException

2002-02-28 Thread KC Berg

did you check your redirectPort in server.xml? 

--
Connector className=org.apache.catalina.connector.http.HttpConnector
   port=8080 minProcessors=5 maxProcessors=20
   enableLookups=false redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=6/

--

What I did to enforce the use of https and eliminate your issue was the
following...


if(request.getServerPort() != 443){
  response.sendRedirect(https://; + request.getServerName() +
request.getServletPath()+?+ request.getQueryString());

}
---

The above code works if you setup tomcat to use the standard ports for http
and https. However you can use the above code in the following manner if you
need to use the default tomcat ports.



if(request.getScheme().equals(http)){
  response.sendRedirect(https://; + request.getServerName() + :8443 +
request.getServletPath()+?+ request.getQueryString());

}




I'm not sure if this is what you were after but it should work :) 

KC

-Original Message-
From: Steve A Drake [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 11:19 AM
To: [EMAIL PROTECTED]
Subject: invalid https url generates NullPointerException



 Hello. I just downloaded and installed Tomcat 4.0.2 and jsse1.0.2 on my
RH 7.2 box. I configured SSL under Tomcat so that the test URLs:
http://localhost:8080/ and https://localhost:8443/ work fine.

 The problem that I am having is that, if I accidentally enter:
https://localhost:8080/ Tomcat bogs down and throws the following
NullPointerException in catalina.out. I know that this address is invalid
but I'm surprised to see this behavior. Did I miss some configuration
detail?
TIA for your advice.

java.lang.NullPointerException
at
org.apache.catalina.connector.http.HttpResponseStream.checkHead(HttpResponse
Stream.java:253)
at
org.apache.catalina.connector.http.HttpResponseStream.init(HttpResponseStr
eam.java:104)
at
org.apache.catalina.connector.http.HttpResponseImpl.createOutputStream(HttpR
esponseImpl.java:220)
at
org.apache.catalina.connector.ResponseBase.getOutputStream(ResponseBase.java
:725)
at
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:
469)
at
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBa
se.java:236)
at
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpRespo
nseImpl.java:288)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1039)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
at java.lang.Thread.run(Thread.java:484)



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: JSP programming under Tomcat 4.0.2

2002-02-28 Thread Randy Layman


I believe that this is one of the ambiguities of the JSP/Servlet
spec.  You old version will only work on Tomcat 3.3, not TC 3.2 or the newer
4.0, and it will only work if the JSP file is in the root directory of your
webapp.  The reason is how the .java files are generated.  

Under Tomcat 3.3 the package is set to be the path within the web
app.  The root directory is in the unnamed package and JSP files in an
sample1 directory are in the sample1 package.  Since Java implicitly imports
all classes in the same package, jcrypt, which is also in the unnamed
package, is found under this scheme.

Under other versions of Tomcat the package has other text preprended
to the directory to make the package name (I believe one of them uses
org.apache.jsp, but I'm not absolutely sure about that).  In this case only
other JSP files in the same directory are implicitly imported and jcrypt
isn't.

I don't believe that the spec specifies a requirement on this (I'm
sure Craig will correct me if I'm wrong), which leads to the portable JSP
developers rule - Import all classes needed!

Randy


 -Original Message-
 From: Ming [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 12:25 PM
 To: Tomcat Users List
 Subject: Re: JSP programming under Tomcat 4.0.2
 
 
 Hi, Randy,
 
 Thanks a lot for your information.
 
 Here is my situation:
 
 My older tomcat is version 3.3 and new tomcat is version 4.0.2.
 
 This is the script in the older tomcat directory(very simple one):
 
 %@ page language=java contentType=text/html %
 %@ page info=Simple testing program %
 %@ page import=java.util.* %
 %@ page import=java.io.* %
 %@ page import=java.net.URL %
 
 %@ include file=includes/js_include.txt %
 
 html
 head
 
 %  String inputString = passwd;
 jcrypt jcrypt = new jcrypt();
 String cryptedPassword = jcrypt.crypt(MM, inputString);
 
 %
 
 titleSimple testing program/title
 /head
 %= inputString % and %= cryptedPassword %
 
 /html
 
 
 But under the new version of tomcat, this won't work until I 
 put a line %@
 page import=jcrypt %at the beginning. I've put my 
 jcrypt.class file in
 WEB-INF/classes and under $CATALINA_HOME/classes as well and 
 restart the
 tomcat and apache. Still seems not working.
 
 I just read the documentation from jakarta site and you are 
 right, tomcat 3.3
 and above version ignore the CLASSPATH variable. But my 
 question is, my older
 version tomcat is 3.3 and new one is 4.0.2. Why does this 
 script work under
 the older one and not the new one?
 
 Thanks a lot for your help.
 
 Ming
 
 Randy Layman wrote:
 
  All versions of Tomcat (and all JSP containers for 
 that matter)
  require you to add %@ page import=% to your JSP files.
 
  Also, Tomcat versions 3.3 and beyond ignore your 
 system's classpath
  variable - it causes to may problems with people not 
 understanding how this
  interacted with the web apps.
 
  Lastly, lots of people have experience using JSP 
 with Tomcat 4.02.
  If you have more specific questions please ask - this is 
 the right forum.
 
  Randy
 
   -Original Message-
   From: Ming [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, February 27, 2002 6:29 PM
   To: Tomcat Users List
   Subject: JSP programming under Tomcat 4.0.2
  
  
   I'm using Tomcat 4.0..2 and apache 1.3.23. I move all my
   class files to the
   WEB-INF classes folder and jar files to the lib folder.
  
   I'm programming in JSP. But it seems that although all the
   necessary class
   files and jar files are in the classes and lib folder, I
   still need to import
   them in my JSP script. This wasn't the case before I upgraded
   the tomcat and
   apache.  Since the new tomcat is on the same machine as the
   old one, the
   classpaths are the same too.
  
   Does anybody have experience on programming JSP under Tomcat
   4.0.2? I really
   appriciate if you can help.
  
   Thanks.
  
   Ming
  
  
   --
   To unsubscribe:   
 mailto:[EMAIL PROTECTED]
   For additional commands: 
 mailto:[EMAIL PROTECTED]
   Troubles with the list: 
 mailto:[EMAIL PROTECTED]
  
 
  --
  To unsubscribe:   
 mailto:[EMAIL PROTECTED]
  For additional commands: 
 mailto:[EMAIL PROTECTED]
  Troubles with the list: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




[Dim Question] Redirecting GET http://blah.com/ resource - GET /resource - Tomcat 4

2002-02-28 Thread CAM

Hello all,

I'm sure I'm missing something very basic here but I can't think what. I'm using 
a little proxy (HttpSniffer) to debug header and cookie info between my browser 
and a remote Tomcat 4-b6. I'm getting failures to requests (404's) when I go 
thru the proxy and I can see in my access logs that this is because the requests 
are arriving as:

192.x.x.x - - [28/Feb/2002:17:30:49 00] GET 
http://my.host.com:8080/dms/servlet/dms HTTP/1.0 404 263

instead of:

192.x.x.x - - [28/Feb/2002:17:24:16 00] GET /dms/servlet/dms HTTP/1.1 200 2294

Rather than rewrite httpsniffer, I suspect I need some form of redirect - 
besides, the sniffer works with other sites (e.g. Google). I haven't managed to 
dig out anything about redirection from the docs - there are a lot of facets to 
the information. Is redirection associated with the Engine? The connector?

So, an RTFM is probably deserved but a clue as to where would be tremendous.

cam



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Reloading of beans and sessiopn no longer valid

2002-02-28 Thread Jason Webber

When I update a bean in my webpages that handles reports, everything seems
to reload.  The database bean reloads that has nothing to do with the report
bean.  This causes my database connections to be reestablished.  The scope
of the database bean is application.  Also all valid sessions are now gone
and all the users must relogin in.  How can I make it so that only the class
that has changed reloads or classes that depends on that class, but not
everything else?

Thanks



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: JSP programming under Tomcat 4.0.2

2002-02-28 Thread Ming

Hi, Randy,

Thanks a lot for your reply. I think you raised a very good question regarding
portable JSP development. Everytime when  I try to move the JSP codes from one
place to another, I spent so much time on just making them work again.

I'm very slow on this. So, is that possible for you to explain to me what
should be the right way to develop a set of portable JSP codes?

This is what I'm currently doing:

1. I make a directory under webapps, call it xml.
2. Under xml, I have the following directories:
WEB-INF (with  classes, jsp, lib web.xml),
images (contains all my images)
search.jsp  ( the main JSP script used for searching and some other jsp
scripts)
includes   ( contains all my includes files, including .txt file, .jsp file
which will be used in the main search.jsp and other jsp files)
servlets
3. And I put all my class files and jar files under WEB-INF/classes and
WEB-INF/lib directories in the xml directory.

4. And I have a source directory in $HOME/local/src/ and put all my java source
files there.

I'm a beginner for JSP programming (and JAVA programming) and would like to
start the right way. Can you give me some suggestions on this?

Thanks a lot and really appreciate your help.

Ming




Randy Layman wrote:

 I believe that this is one of the ambiguities of the JSP/Servlet
 spec.  You old version will only work on Tomcat 3.3, not TC 3.2 or the newer
 4.0, and it will only work if the JSP file is in the root directory of your
 webapp.  The reason is how the .java files are generated.

 Under Tomcat 3.3 the package is set to be the path within the web
 app.  The root directory is in the unnamed package and JSP files in an
 sample1 directory are in the sample1 package.  Since Java implicitly imports
 all classes in the same package, jcrypt, which is also in the unnamed
 package, is found under this scheme.

 Under other versions of Tomcat the package has other text preprended
 to the directory to make the package name (I believe one of them uses
 org.apache.jsp, but I'm not absolutely sure about that).  In this case only
 other JSP files in the same directory are implicitly imported and jcrypt
 isn't.

 I don't believe that the spec specifies a requirement on this (I'm
 sure Craig will correct me if I'm wrong), which leads to the portable JSP
 developers rule - Import all classes needed!

 Randy

  -Original Message-
  From: Ming [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, February 28, 2002 12:25 PM
  To: Tomcat Users List
  Subject: Re: JSP programming under Tomcat 4.0.2
 
 
  Hi, Randy,
 
  Thanks a lot for your information.
 
  Here is my situation:
 
  My older tomcat is version 3.3 and new tomcat is version 4.0.2.
 
  This is the script in the older tomcat directory(very simple one):
 
  %@ page language=java contentType=text/html %
  %@ page info=Simple testing program %
  %@ page import=java.util.* %
  %@ page import=java.io.* %
  %@ page import=java.net.URL %
 
  %@ include file=includes/js_include.txt %
 
  html
  head
 
  %  String inputString = passwd;
  jcrypt jcrypt = new jcrypt();
  String cryptedPassword = jcrypt.crypt(MM, inputString);
 
  %
 
  titleSimple testing program/title
  /head
  %= inputString % and %= cryptedPassword %
 
  /html
 
 
  But under the new version of tomcat, this won't work until I
  put a line %@
  page import=jcrypt %at the beginning. I've put my
  jcrypt.class file in
  WEB-INF/classes and under $CATALINA_HOME/classes as well and
  restart the
  tomcat and apache. Still seems not working.
 
  I just read the documentation from jakarta site and you are
  right, tomcat 3.3
  and above version ignore the CLASSPATH variable. But my
  question is, my older
  version tomcat is 3.3 and new one is 4.0.2. Why does this
  script work under
  the older one and not the new one?
 
  Thanks a lot for your help.
 
  Ming
 
  Randy Layman wrote:
 
   All versions of Tomcat (and all JSP containers for
  that matter)
   require you to add %@ page import=% to your JSP files.
  
   Also, Tomcat versions 3.3 and beyond ignore your
  system's classpath
   variable - it causes to may problems with people not
  understanding how this
   interacted with the web apps.
  
   Lastly, lots of people have experience using JSP
  with Tomcat 4.02.
   If you have more specific questions please ask - this is
  the right forum.
  
   Randy
  
-Original Message-
From: Ming [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 6:29 PM
To: Tomcat Users List
Subject: JSP programming under Tomcat 4.0.2
   
   
I'm using Tomcat 4.0..2 and apache 1.3.23. I move all my
class files to the
WEB-INF classes folder and jar files to the lib folder.
   
I'm programming in JSP. But it seems that although all the
necessary class
files and jar files are in the classes and lib folder, I
still need to import
them in 

Custom error 401 page?

2002-02-28 Thread Robert Wille

If I define a custom error 401 page, I get an error 500 when I attempt to access a 
protected resource (protected with BASIC authentication). There is a 
NullPointerException thrown somewhere deep in the bowels of Tomcat. I would really 
like to display my own page when the user fails to authenticate, rather than 
displaying the default page. Is it possible to do this? I am using Tomcat 4.0.2.



RE: JSP programming under Tomcat 4.0.2

2002-02-28 Thread Randy Layman


I would suggest looking at the Servlet spec, chapter 9 covers the
Web Application and sections 9.4, 9.5, and 9.7.1 seems especially relevant
to your question.

Randy

 -Original Message-
 From: Ming [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 28, 2002 2:08 PM
 To: Tomcat Users List
 Subject: Re: JSP programming under Tomcat 4.0.2
 
 
 Hi, Randy,
 
 Thanks a lot for your reply. I think you raised a very good 
 question regarding
 portable JSP development. Everytime when  I try to move the 
 JSP codes from one
 place to another, I spent so much time on just making them work again.
 
 I'm very slow on this. So, is that possible for you to 
 explain to me what
 should be the right way to develop a set of portable JSP codes?
 
 This is what I'm currently doing:
 
 1. I make a directory under webapps, call it xml.
 2. Under xml, I have the following directories:
 WEB-INF (with  classes, jsp, lib web.xml),
 images (contains all my images)
 search.jsp  ( the main JSP script used for searching and 
 some other jsp
 scripts)
 includes   ( contains all my includes files, including 
 .txt file, .jsp file
 which will be used in the main search.jsp and other jsp files)
 servlets
 3. And I put all my class files and jar files under 
 WEB-INF/classes and
 WEB-INF/lib directories in the xml directory.
 
 4. And I have a source directory in $HOME/local/src/ and put 
 all my java source
 files there.
 
 I'm a beginner for JSP programming (and JAVA programming) and 
 would like to
 start the right way. Can you give me some suggestions on this?
 
 Thanks a lot and really appreciate your help.
 
 Ming
 
 
 
 
 Randy Layman wrote:
 
  I believe that this is one of the ambiguities of 
 the JSP/Servlet
  spec.  You old version will only work on Tomcat 3.3, not TC 
 3.2 or the newer
  4.0, and it will only work if the JSP file is in the root 
 directory of your
  webapp.  The reason is how the .java files are generated.
 
  Under Tomcat 3.3 the package is set to be the path 
 within the web
  app.  The root directory is in the unnamed package and JSP 
 files in an
  sample1 directory are in the sample1 package.  Since Java 
 implicitly imports
  all classes in the same package, jcrypt, which is also in 
 the unnamed
  package, is found under this scheme.
 
  Under other versions of Tomcat the package has 
 other text preprended
  to the directory to make the package name (I believe one of 
 them uses
  org.apache.jsp, but I'm not absolutely sure about that).  
 In this case only
  other JSP files in the same directory are implicitly 
 imported and jcrypt
  isn't.
 
  I don't believe that the spec specifies a 
 requirement on this (I'm
  sure Craig will correct me if I'm wrong), which leads to 
 the portable JSP
  developers rule - Import all classes needed!
 
  Randy
 
   -Original Message-
   From: Ming [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, February 28, 2002 12:25 PM
   To: Tomcat Users List
   Subject: Re: JSP programming under Tomcat 4.0.2
  
  
   Hi, Randy,
  
   Thanks a lot for your information.
  
   Here is my situation:
  
   My older tomcat is version 3.3 and new tomcat is version 4.0.2.
  
   This is the script in the older tomcat directory(very simple one):
  
   %@ page language=java contentType=text/html %
   %@ page info=Simple testing program %
   %@ page import=java.util.* %
   %@ page import=java.io.* %
   %@ page import=java.net.URL %
  
   %@ include file=includes/js_include.txt %
  
   html
   head
  
   %  String inputString = passwd;
   jcrypt jcrypt = new jcrypt();
   String cryptedPassword = jcrypt.crypt(MM, inputString);
  
   %
  
   titleSimple testing program/title
   /head
   %= inputString % and %= cryptedPassword %
  
   /html
  
  
   But under the new version of tomcat, this won't work until I
   put a line %@
   page import=jcrypt %at the beginning. I've put my
   jcrypt.class file in
   WEB-INF/classes and under $CATALINA_HOME/classes as well and
   restart the
   tomcat and apache. Still seems not working.
  
   I just read the documentation from jakarta site and you are
   right, tomcat 3.3
   and above version ignore the CLASSPATH variable. But my
   question is, my older
   version tomcat is 3.3 and new one is 4.0.2. Why does this
   script work under
   the older one and not the new one?
  
   Thanks a lot for your help.
  
   Ming
  
   Randy Layman wrote:
  
All versions of Tomcat (and all JSP containers for
   that matter)
require you to add %@ page import=% to your JSP files.
   
Also, Tomcat versions 3.3 and beyond ignore your
   system's classpath
variable - it causes to may problems with people not
   understanding how this
interacted with the web apps.
   
Lastly, lots of people have experience using JSP
   with Tomcat 4.02.
If you have more specific questions please ask - this is
   the right forum.
   
  

RE: invalid https url generates NullPointerException

2002-02-28 Thread Steve A Drake

 Hello KC.


On Thu, 28 Feb 2002, KC Berg wrote:

 did you check your redirectPort in server.xml?

 --
 Connector className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5 maxProcessors=20
enableLookups=false redirectPort=8443
acceptCount=10 debug=0 connectionTimeout=6/

 Yes. I'm just using the default settings:

!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector className=org.apache.catalina.connector.http.HttpConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=6/


 --

 What I did to enforce the use of https and eliminate your issue was the
 following...

 
 if(request.getServerPort() != 443){
   response.sendRedirect(https://; + request.getServerName() +
 request.getServletPath()+?+ request.getQueryString());

 }
 ---

 The above code works if you setup tomcat to use the standard ports for http
 and https. However you can use the above code in the following manner if you
 need to use the default tomcat ports.

 

 if(request.getScheme().equals(http)){
   response.sendRedirect(https://; + request.getServerName() + :8443 +
 request.getServletPath()+?+ request.getQueryString());

 }

 


 I'm not sure if this is what you were after but it should work :)


 Maybe I'll try something like that. Thanks.


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Sense of realm element in login-config

2002-02-28 Thread Lawlor, Frank

 This is what I want to do: 
 
 1) I want to setup a database which includes multiple realms 
 2) user are linked to realms 
 3) I want to use protect a servlet with basic authentication, and I want
to 
 be able refer to the correct realm when performing the authentication
(this 
 means sending the correct realm/user to the database. And I don't want to
do 
 this by hacking the tomcat configuration files. 
 
I didn't see the original post, but just Craig's answer.
I'm not sure exactly what you want, but I did something
similar that required NO modification of the tomcat
mechanisms.

My goal was to allow users to log in with domain\userid
to the same application (and use the domain to
show them different data)
and allow each domain to have its own set of users
(e.g. same userid) and be managed independently.

I did this with only a couple of minor modifications:

My login.jsp collects domain, userid and password.
It uses a simple JavaScript one-liner to concatenate
domain\userid to create j_username
(I use a '\', but you can use any separator
char you want (don't use ':' since HTTP uses that as the 
userid:password separator.).

If you want to use BASIC authentication to do this
you just need to enter domain\userid as the 
userid.

In the database I use the domain\userid as the 'userid'
that I tell Tomcat about in the Realm statement
(actually I use an Oracle view to concat the two
fields, but that isn't important).

This creates multiple user 'domains' very simply
but does require the user to enter a domain name
in addition to userid and password.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Starting tomcat with a different user

2002-02-28 Thread Nelson Yip

Hi,
 
I finally installed tomcat but I want to start up tomcat with a
different user and not root
I created a user called tomcat and I want this user to startup tomcat
automatically  What is the best way to do it?
 
 
Thanks
Nelson



Database bean Destroy

2002-02-28 Thread Jason Webber

I have a database pooling bean that I use.  Is there a way to tell when the
bean is being destroyed becuase the bean has been replaced with a newer
version or is being unloaded for some reason?  I need to know so that I can
close the database connections that the bean is controlling.  I dont want to
wait for the connections just to timeout and have the database reclaim the
connection sessions.  This is because I sometimes get maximum sessions
exceeded with my oracle database.

TIA


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Problem with ISAPI redirector for Tomcat 4.0.2

2002-02-28 Thread Bryan Baker

Hello,

I added the ISAPI redirector for 4.0.2 (isapi_redirector.dll, dated 13 Feb
2002, sized 241766 bytes) to IIS 5.0 (W2K SP2). Tomcat 4.0.2 works fine, but
when requesting a resource via IIS I got the message:

The specified module could not be found.

I deleted this filter, and downloaded and installed the ISAPI filter for
3.3. That works--IIS redirects the requests to Tomcat and a correct response
is generated. I made no other changes to IIS or Tomcat to get this to work.

Is there a bug in the new isapi_redirector.dll? Or are there additional
configuration steps needed?

Bryan Baker
ESRI, Inc.
Redlands, CA, USA

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Starting tomcat with a different user

2002-02-28 Thread Lasse Hillerøe Petersen

At 21:31 +0100 28/02/02, Nelson Yip wrote:
different user and not root.
I created a user called tomcat and I want this user to startup tomcat
automatically.  What is the best way to do it?

From a startup script that runs as root, do something like:
su tomcat-user -c $TOMCAT_HOME/bin/startup.sh

-Lasse



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Getting multiple instances of my servlet, although it doesn't implement SingleThreadModel

2002-02-28 Thread Scott Shorter

All,

I have a servlet that loads on startup, per the load-on-startup/ tag
in web.xml.  It does *not* implement SingleThreadModel.

Unfortunately, two instances start up every time Tomcat starts - I can
tell because I have a System.out.println call in init().  I need for
there to be only one instance.

What other settings could be causing multiple instances to happen?

Thanks in advance,
Scott


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Re: Tomcat v4.0.2 : doesn't find JAR files in the WEB-INF/lib

2002-02-28 Thread Mullen-Schultz, Gary

I should add that this exact configuration works under 4.0.1.  We are
running on Windows 2000.

 I too get this error.  Here's what I see in the log:

 2002-02-27 17:04:38 WebappLoader[/WebPro]: Deploy JAR
/WEB-INF/lib/KSCDomainBusinessObjects72_022202.jar to
D:\Tomcat\jakarta-tomcat-4.0.2\KSCWebApps\Correspondent\WebPro\WEB-INF\lib\K
SCDomainBusinessObjects72_022202.jar

... (some stuff in between, no errors obvious) ...

2002-02-27 17:04:42 ContextConfig[/WebPro]: Scanning library JAR files
2002-02-27 17:04:42 ContextConfig[/WebPro]:
tldConfigJar(/WEB-INF/lib/KSCDomainBusinessObjects72_022202.jar):
java.io.IOException: The system cannot find the path specified

The .jar file does exist in the directory listed in the first log line, and
Everyone has full rights to it.

I ensured that WEB-INF is all in caps, which it is.

Any ideas?

Gary Mullen-Schultz

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RequestDumperValve help

2002-02-28 Thread Mark Shaw

I have a question (potential bug?) w/ RequestDumperValve  I have set up a
simple SOAP like web-service (actually it's Caucho's Hessian protocol) and
when I attempt to use this when also using the RequestDumperValve, my call,
which uses POST, always fails on the server due to the servlet input stream
being close  The Dumper logs all the correct values from the client
request, but my servlet is passed (from invokeNext()?) a closed input stream
so it can't read the SOAP request  I poked around in the code and
discovered that this is related to HttpServletRequestgetParameterNames(),
and digging deeper still, found that code in
HttpRequestBaseparseParamaters() actually closes the input stream when
reading the params from a POST:
 
if (POSTequals(getMethod())  (getContentLength()  0)
 (thisstream == null)
 application/x-www-form-urlencodedequals(contentType)) {
try {
int max = getContentLength();
int len = 0;
byte buf[] = new byte[getContentLength()];
ServletInputStream is = getInputStream();
while (len  max) {
int next = isread(buf, len, max - len);
len += next;
}
isclose();
RequestUtilparseParameters(results, buf, encoding);
} catch (Throwable t) {
;
}
}
 
Is there any reason isclose() is called?  Am I doing something wrong?
 
Thanks for any help on this,
-Mark Shaw
 



Meaning of url-pattern /xxxx/* .... ???

2002-02-28 Thread Thomas Stiller

What does that (only wildcard-part interesting: * !!!) inside a servlet-mapping mean:

url-pattern //* /url-pattern

Does that mean search in this subdirectory tree
or does it mean search the name corresponding
servlet or what ?

Thx for answeríng this beginner question
Thomas

-- 

___
Sign-up for your own FREE Personalized E-mail at Email.com
http://www.email.com/?sr=signup



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Meaning of url-pattern /xxxx/* .... ???

2002-02-28 Thread Craig R. McClanahan



On Thu, 28 Feb 2002, Thomas Stiller wrote:

 Date: Thu, 28 Feb 2002 16:57:32 -0500
 From: Thomas Stiller [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Meaning of url-pattern //*  ???

 What does that (only wildcard-part interesting: * !!!) inside a servlet-mapping 
mean:

 url-pattern //* /url-pattern

 Does that mean search in this subdirectory tree
 or does it mean search the name corresponding
 servlet or what ?

 Thx for answeríng this beginner question
 Thomas


No, it means that your servlet will match the / part, and anything
else will be returned to use as extra path info.

For example, assume you have the above mapping in a webapp mapped to
context path /myapp.  Now, a URL like this:

  http://localhost:8080/myapp//foo/bar.html

will call your servlet, which can then get the following:

  request.getContextPath() will return /myapp
  request.getServletPath() will return /
  request.getPathInfo() will return /foo/bar.html

Using extra path info is a common way to pass parameters to a servlet as
part of the request URL itself.  In addition, it totally hides the fact
that there is no static resource named //foo/bar.html in your app,
so the client has no way to know whether this response is being produced
dynamically or statically.

See the Servlet Specification for what everything in the web.xml file
means:

  http://java.sun.com/products/servlet/download.html

Craig



 --

 ___
 Sign-up for your own FREE Personalized E-mail at Email.com
 http://www.email.com/?sr=signup



 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Meaning of url-pattern /xxxx/* .... ???

2002-02-28 Thread Christopher K . St . John

Thomas Stiller wrote:
 
 What does that (only wildcard-part interesting: * !!!)
 inside a servlet-mapping mean:
 
 url-pattern //* /url-pattern
 

 SRV.11.2 Specification of Mappings, from version 2.3 of the
servlet spec, should have all the information you need. The
servlet spec isn't (for the most part) written in spec-speak, so
it's easy to read. You can download it at:

 http://java.sun.com/products/servlet/download.html

 
-- 
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: RequestDumperValve help

2002-02-28 Thread Craig R. McClanahan



On Thu, 28 Feb 2002, Mark Shaw wrote:

 Date: Thu, 28 Feb 2002 13:45:53 -0800
 From: Mark Shaw [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: RequestDumperValve help

 I have a question (potential bug?) w/ RequestDumperValve.  I have set up a
 simple SOAP like web-service (actually it's Caucho's Hessian protocol) and
 when I attempt to use this when also using the RequestDumperValve, my call,
 which uses POST, always fails on the server due to the servlet input stream
 being close.  The Dumper logs all the correct values from the client
 request, but my servlet is passed (from invokeNext()?) a closed input stream
 so it can't read the SOAP request.  I poked around in the code and
 discovered that this is related to HttpServletRequest.getParameterNames(),
 and digging deeper still, found that code in
 HttpRequestBase.parseParamaters() actually closes the input stream when
 reading the params from a POST:

 if (POST.equals(getMethod())  (getContentLength()  0)
  (this.stream == null)
  application/x-www-form-urlencoded.equals(contentType)) {
 try {
 int max = getContentLength();
 int len = 0;
 byte buf[] = new byte[getContentLength()];
 ServletInputStream is = getInputStream();
 while (len  max) {
 int next = is.read(buf, len, max - len);
 len += next;
 }
 is.close();
 RequestUtil.parseParameters(results, buf, encoding);
 } catch (Throwable t) {
 ;
 }
 }

 Is there any reason is.close() is called?  Am I doing something wrong?


The input stream is closed because it has been completely read.  Even
without the close() there, though, you'd still have a problem because the
stream will have been read already, and there's no way to rewind it.

That wouldn't be a problem if the servlet only used getParameter() type
calls itself.  But if the servlet expects to read the input stream, and a
filter has already read it, you're violating the requirements of the
servlet and you'll need to do something different in your filter:

* Modify RequestDumperFilter to not dump the parameters

* Create a wrapper around the request before passing it on,
  and have the wrapper provide a suitable input stream
  even though the filter already read the real input stream.

 Thanks for any help on this,
 -Mark Shaw

Craig



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: changing the default character encoding

2002-02-28 Thread Richard Sand

Hi all,

I am still beating my head against a brick wall trying to get the default
encoding changed for my Tomcat server on Linux (slackware 2.4.17 if it
matters).

The problem is actually outside of Tomcat so please excuse the slightly
off-topic question.  But basically, I've run the following simple test:

import java.io.InputStreamReader;
import java.io.ByteArrayInputStream;
public class Encoding {
  public static void main(String[] args){
byte[] bytes = new byte[0];
ByteArrayInputStream bs = new ByteArrayInputStream(bytes);
InputStreamReader in = new InputStreamReader(bs);
System.out.println(file.encoding is  +
System.getProperty(file.encoding));
System.out.println(default encoding is  + in.getEncoding());
  }
}

And no matter what I try, it always says default encoding is ASCII, no
matter what I've specified file.encoding as.  I'm invoking the class as:

java -cp $CLASSPATH:. -Dfile.encoding=ISO8859_1 Encoding

I've tried the following values for file.encoding with no changes:

ISO8859_1
ISO-8859-1
8859_1
iso-8859-1
iso8859-1
iso8859_1
en_US
no_NO
norwegian

I've also tried every one of those values for LANG and LC_ALL in my
environment variables.

Please, someone help me! How do I change the damned default encoding
Why isn't it picking up on my environment variables or the file.encoding
property? Running java -version tells me:

java version 1.3.1_02
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

Can anyone help? I'm totally stymied here!

Best regards,

Richard




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




encoding Cp1252 is not supported

2002-02-28 Thread Sam NewYork

I recently installed Cocoon2 with JBoss-2.4.3_Tomcat-3.2.3.  I followed all 
the instructions on the installation page which involved removing parser.jar 
and jaxp.jar and replacing that with xerces-1.4.4.jar

Now when I try to work with my JSP files in another webapp outside of
cocoon, I get the following message:

Internal Servlet Error:

org.apache.jasper.compiler.CompileException:
D:\JBoss-2.4.3_Tomcat-3.2.3\tomcat\webapps\ecp\jsp\navigation\top_nav_media.jsp(1,0)
Unable to open taglibrary /WEB-INF/tlds/taglib.tld : Parse Error in the tag 
library descriptor: The encoding Cp1252 is not supported.
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:713)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)


My taglib.tld in the ecp webapp explicity has an ISO-8859-1 encoding in it.  
I think this has to do with xerces since I changed the parser.jar.
Any one have any ideas what's going on?  If I should be asking another 
mailing list this question, please let me know.

Any help will be appreciated.

Thanks,
Sam



_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Nice Tomcat+apache beginner site

2002-02-28 Thread Andrzej Jan Taramina

 when i try http://localhost/examples/, it correctly gives me a directory
 listing generated by the Tomcat server, but when I try to go to any of the
 subdirectories (eg http://localhost/examples/servlets/), I see a 302
 response in my Apache access log and the request eventually fails.
 
 Any ideas?

You running on a windows platform?  If so, there is an outstanding bug that 
causes binary transfers between Tomcat and Apache to block (this includes 
transmission of images like .gifs).

Bug and details are posted at:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6621

Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Deploying apps

2002-02-28 Thread Dieter Lunn

Hi,

I downloaded todays nightly build and it started fine but it won't deploy an 
app I have and I can't connect using localhost:8080. Could someone please 
help?

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: someone claiming to be (was Re: Context addition in windows!)

2002-02-28 Thread Joel Rees

Someone claiming to be you questioned:

  -Original Message-
  From: Joel Rees
  [snipped]

  On Thursday, February 28, someone claiming to be Kurt Kurniawan wrote:

 I assume you have reason to believe it may not be Kurt Kurniawan who
sent
 this message to the list? :)

No, just being slightly more paranoid than usual. This is the 'net, y'know.

Joel




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: changing the default character encoding

2002-02-28 Thread Joel Rees

Java news groups archives can be accessed at

http://groups.google.com/groups?group=comp.lang.java

but see below:

Richard Sand asked:

 Hi all,

 I am still beating my head against a brick wall trying to get the default
 encoding changed for my Tomcat server on Linux (slackware 2.4.17 if it
 matters).

 The problem is actually outside of Tomcat so please excuse the slightly
 off-topic question.  But basically, I've run the following simple test:

 import java.io.InputStreamReader;
 import java.io.ByteArrayInputStream;
 public class Encoding {
   public static void main(String[] args){
 byte[] bytes = new byte[0];

Mind if I ask why you have a 0 byte buffer here? (Although perhaps it
wouldn't matter for what you're testing.)

 ByteArrayInputStream bs = new ByteArrayInputStream(bytes);
 InputStreamReader in = new InputStreamReader(bs);

I tried this:

  InputStreamReader in = new InputStreamReader(bs, US-ASCII);

(Shift_JIS is the usual for me.) I had to declare the main method as throws
UnsupportedEncodingException to get it to compile, but the responded with
the changed encoding when run from the command line.

So it looks like it might be a Tomcat question? But I think I recall seeing
some answer on the list or in the docs. It may come down to having to
declare the encoding from your web pages, or read it from the headers the
browser sends or something.

Not much help, I suppose.

Joel Rees

 System.out.println(file.encoding is  +
 System.getProperty(file.encoding));
 System.out.println(default encoding is  + in.getEncoding());
   }
 }

 And no matter what I try, it always says default encoding is ASCII, no
 matter what I've specified file.encoding as.  I'm invoking the class as:

 java -cp $CLASSPATH:. -Dfile.encoding=ISO8859_1 Encoding

 I've tried the following values for file.encoding with no changes:

 ISO8859_1
 ISO-8859-1
 8859_1
 iso-8859-1
 iso8859-1
 iso8859_1
 en_US
 no_NO
 norwegian

 I've also tried every one of those values for LANG and LC_ALL in my
 environment variables.

 Please, someone help me! How do I change the damned default encoding
 Why isn't it picking up on my environment variables or the file.encoding
 property? Running java -version tells me:

 java version 1.3.1_02
 Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
 Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

 Can anyone help? I'm totally stymied here!

 Best regards,

 Richard




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Jetty .vs. tomcat

2002-02-28 Thread Ming Fai

hi Steve,

I'm a Tomcat user. from what I read on the web, I believe Jetty does
outperform Tomcat significantly in static pages and also outperform Tomcat
to a unknown degree in dynamic pages. so, why i still choose Tomcat?

My main consideration is in scalability. Multiple instance of Tomcat can be
run and load balanced with Apache and mod_jk. I believe it can achieve a
very high scalability in handling simultanceous requests. Other
considerations are: good integration with other Apache and commercial
products, better support (i personally think the 'support' from Apache group
is better than other open src groups), full implementation of JCP
specification etc.

And Tomcat should not be used together with Apache if there is heavy loading
of static pages.

Other than Tomcat and Jetty, Resin is also quite famous. And there are other
commercial choice like WebLogic, JRun and Orion.  You should make decision
base on your need.

In my opinion, if your site is small in scale, and requires a very good
response time, then Jetty or Resin are your choice. Otherwise, Tomcat is a
good choice in general and it is a proven product. It occupies about 50% of
the servlet engine market as of mid 2001.
(http://www.devx.com/judgingjava/articles/sixyears/printable/sixyearsp2.asp#
fig7)

Any comment are welcome!

Regards,
mingfai






 -Original Message-
 From: Steve Wong [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 01, 2002 3:17 PM
 To: [EMAIL PROTECTED]
 Subject: Jetty .vs. tomcat



   How will you compare jetty with tomcat?
   Which one will you choose for a production environment? Why?
   Any Performance figures about these 2 servlet containers?

 Thx. and Regards.
 Steve.

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]