Tomcat with SSL

2004-04-16 Thread Hiemer, Bernhard
Hi at all!

I´m trying to configure my Tomcat-Standalone for SSL-Support. I use Win XP,
JRE 1.3.1 and JSSE 1.0.3_02.
The Tomcat-Versions I tried are 4.1.30 and 5.0.19.

I worked along the HOW-TO on the Jakarta-Website:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

BUT I receive the following error on startup of Tomcat:
java.lang.reflect.InvocationTargetException: java.lang.OutOfMemoryError

I have already tried the Options -Xmx512m -Xms128m to give the VM more
memory.

What´s to do now?
Thanks in advance for each little help!
Bernhard



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrating from Tomcat404 to Tomcat5019. Problem with Filter

2004-04-16 Thread Antonio Fiol Bonnín
Two things I would double-check:

a) The approach of creating a PrintWriter at constructor time. Is that 
the right way of doing that?
b) Think of implementing flush and/or close for your ServletOutputStream.

HTH (but these are mostly wild guesses)

Antonio Fiol

Alex Moots wrote:

I've been using a custom made servlet filter developed for Tomcat404.  
It has worked perfectly for a long time.

The basic idea of the filter is that it acts as a wrapper around the 
response filter capturing the response output so that the output can 
be sent to a second destination (ie an email message body or something 
similar).  We call this a Double Output Stream filter.  The code for 
this filter is quite simple and I've attached a simplified version of 
it below.  The whole thing is less than 70 lines of code.

The problem is that this filter doesn't work properly in Tomcat5019.  
I don't get an exception during processing.  The problem is that the 
respByte [] (which should contain the array of bytes sent to the 
browser) is not populated, or is only partially populated.  And when 
this filter is invoked only a partial page is sent to the browser.  
For example, if my page is 10KB long only 3KB will be sent to the 
browser, and similarly only 3KB will be present in the respByte 
array.  It seems like what is happening is that Tomcat5019 is 
short-circuiting the execution of the page for some reason.  I don't 
know why.  The code worked fine in tomcat404 and I didn't change 
anything during the upgrade to tomcat5019.

Can anyone give an idea of what is going wrong here?  I did some 
searching to see if the servlet filter API changed between tomcat404 
and 5019, but I didn't find anything to suggest that things have 
changed significantly.

Thanks for your help.
Alex.
**CODE***

public class SaveAsHTMLFilter implements Filter {
   public void doFilter(ServletRequest request, ServletResponse 
response, FilterChain chain) throws IOException, ServletException {
   //Re the real response in a DoubleResponseWrapper which 
encloses the
   //real OutputStream, plus a ByteArrayOutputStream, into a 
DoubleOutputStream
   DoubleResponseWrapper respWrap = new 
DoubleResponseWrapper((HttpServletResponse) response);

   //Process the request to generate the output into the 
respWrap's DoubleOutputStream
   chain.doFilter(request, respWrap);

   //retrieve the ByteArray
   byte respByte[] = respWrap.getRespByte();
   // [SNIP]
   // Send the respByte array (which is the response that was sent 
to the browser) to an email message or something similar
   // [SNIP]
   }
}

***
public class DoubleResponseWrapper extends HttpServletResponseWrapper {
DoubleOutputStream dblOS;
PrintWriter pw;
 public DoubleResponseWrapper(HttpServletResponse resp) throws 
IOException {
   super(resp);
   ServletOutputStream servOutp  = resp.getOutputStream();
   ByteArrayOutputStream   byteArray = new ByteArrayOutputStream(32000);
   dblOS = new DoubleOutputStream(servOutp, byteArray);
   pw = new PrintWriter(dblOS);
 }
 public ServletOutputStream getOutputStream () throws IOException {
   return dblOS;
 }
 public PrintWriter getWriter() throws IOException {
   return pw;
 }
 public byte getRespByte()[] {
   return dblOS.getRespByte();
 }
}

***
public class DoubleOutputStream extends ServletOutputStream {
 private ServletOutputStream ServOutp;
 private ByteArrayOutputStream ByteOutp;
 public DoubleOutputStream(ServletOutputStream sos, 
ByteArrayOutputStream bos) {
   ServOutp = sos;
   ByteOutp = bos;
 }

 public void write(int b) throws IOException {
   try {
   ServOutp.write(b);
   ByteOutp.write(b);
 } catch (Exception e) {
 System.out.println(e);
 }
 }
 public byte [] getRespByte() {
   return ByteOutp.toByteArray();
 }
}



smime.p7s
Description: S/MIME Cryptographic Signature


Re: shared/lib again...

2004-04-16 Thread Veniamin Fichin
Julio César Aguilar wrote:

   If you use multiple instance Tomcat's feature, this may be the case. 
In Windows I'm using a single instance of tomcat, there's no 
CATALINA_BASE so it should be the same as CATALINA_HOME if I understand 
correctly.
   Then I don't know... My installation is that:

Win2K
Java is 1.4.1_01
CATALINA_HOME=D:\Tomcat-5.0.16
CATALINA_BASE=D:\Projects\CA (or any other)
   %CATALINA_BASE%\shared\lib contains jars needed by most 
applications, and that classes are visible to application. Removing 
CATALINA_BASE variable and placing jars into %CATALINA_HOME%\shared\lib 
still works.
   I just wrote a simple servlet that looks for the class whose name is 
passed as parameter.

IsThereThisClass.java
package org.unchqua.test.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class IsThereThisClass extends HttpServlet {

public void doGet (HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
resp.setContentType(text/plain);
PrintWriter out=resp.getWriter();
String cn=req.getParameter(cn);
ClassLoader cnLoader=null;
if (cn==null) {
out.println(No class name given, I want \cn\ parameter);
return;
}
out.print(The class \+cn+\ is);
try {
cnLoader=this.getClass().getClassLoader().loadClass(cn)
  .getClassLoader();
}
catch (ClassNotFoundException cnfe) {
out.print( not);
}
out.println( found);
if (cnLoader!=null) {
out.println(Loader:\n--\n+cnLoader+--);
}
}
}
/IsThereThisClass.java
   Map it to any working application and call it like 
classfind?cn=com.example.your.package.YourClass to see if it is visible 
to any webapp's classloader.
   What exactly the moment when CNFE is thrown? You said that the 
applications is not even start due to CNFE, so that classes are needed 
during deployment or while normal application functioning?

In Linux I'm using a single binary of tomcat and have the jar in 
CATALINA_BASE/shared/lib.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Session persistance

2004-04-16 Thread Johan Wasserman - CPX Mngd Services
Any luck Anu?
I have exactly the same request...
I need to serialize the session (HttpSession to a byte array) and save
it to a blob in MySql (i use Hibernate).

I have tried, for example;
...
ByteArrayOutputSream baos = new ByteArrayOutputstream();
ObjectOutputStream oos = new ObjectOutputStream(boas);
oos.writeObject(session);  //-- it fails here, nothing in the logs
byte[] sessionAsBytes = baos.toByteArray();
...

I need this to give the user the option to restore a previous session
(where they where before they last logged out, with all the session
variables required to restore to that point). I guess that's what you
need it for as well.

By the way, hibernate's createBlob also doesn't do he trick.  Something
to do with the session.  I'm thinking of creating a bean (and store it
in session) to keep track of my app and then just
serializing/deserializing that bean from/to the session on logout/login.
I prefer the session though.

Thanks, Johan.

-Original Message-
From: Anu Mathew [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 16, 2004 7:37 AM
To: Tomcat Users List
Subject: Re: Session persistance


I already RTFM. From the manual I understood that you are also part of
developing TFM. But in TFM, restoring of the session is mentioned as
automatic when the applicatio/server restarts. But I want to control
both storing and restoring of the session using my code. Is this
possible? Thanks, Anu Mathew
- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 6:45 PM
Subject: RE: Session persistance



 Hi,

 I need to
 1. Store the session object in a database (I can trigger this 
 operation from a jsp say logoff.jsp ) 2. Retrieve the session object 
 from the database (I can trigger this operation from a jsp say 
 login.jsp )
 
 Thoughts??

 Here's one thought: RTFM.  JDBC store for sessions: 
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html

 Yoav Shapira




 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Session persistance

2004-04-16 Thread Filip Hanik \(lists\)
that will not work from a war file, cause you only get a facade to the
actual session.
in order to serialize a session you need access to the tomcat internal
classes.

what I suggest you do though is that you create session attribute listeners
and store your sessions there.
there should also be activate/passivate events that allow you to intercept
these

Filip

-Original Message-
From: Johan Wasserman - CPX Mngd Services
[mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 1:41 AM
To: Tomcat Users List
Subject: RE: Session persistance


Any luck Anu?
I have exactly the same request...
I need to serialize the session (HttpSession to a byte array) and save
it to a blob in MySql (i use Hibernate).

I have tried, for example;
...
ByteArrayOutputSream baos = new ByteArrayOutputstream();
ObjectOutputStream oos = new ObjectOutputStream(boas);
oos.writeObject(session);  //-- it fails here, nothing in the logs
byte[] sessionAsBytes = baos.toByteArray();
...

I need this to give the user the option to restore a previous session
(where they where before they last logged out, with all the session
variables required to restore to that point). I guess that's what you
need it for as well.

By the way, hibernate's createBlob also doesn't do he trick.  Something
to do with the session.  I'm thinking of creating a bean (and store it
in session) to keep track of my app and then just
serializing/deserializing that bean from/to the session on logout/login.
I prefer the session though.

Thanks, Johan.

-Original Message-
From: Anu Mathew [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 7:37 AM
To: Tomcat Users List
Subject: Re: Session persistance


I already RTFM. From the manual I understood that you are also part of
developing TFM. But in TFM, restoring of the session is mentioned as
automatic when the applicatio/server restarts. But I want to control
both storing and restoring of the session using my code. Is this
possible? Thanks, Anu Mathew
- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 6:45 PM
Subject: RE: Session persistance



 Hi,

 I need to
 1. Store the session object in a database (I can trigger this
 operation from a jsp say logoff.jsp ) 2. Retrieve the session object
 from the database (I can trigger this operation from a jsp say
 login.jsp )
 
 Thoughts??

 Here's one thought: RTFM.  JDBC store for sessions:
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html

 Yoav Shapira




 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Vedr.: IIS and Tomcat security

2004-04-16 Thread Thomas Nybro Bolding
Yes it does.

request.getRemoteUser() in your JSP gives you the IIS authenticated user. Make sure 
your IIS is set to Integrated Windows authentication and insert 
request.tomcatAuthentication=false in your jk2.properties file.

/Thomas





Insyde [EMAIL PROTECTED]
15-04-2004 18:06
Besvar venligst til Tomcat Users List

 
Til:[EMAIL PROTECTED]
cc: 
Vedr.:  IIS and Tomcat security



Hi

Does JK2 connector pass a security information to Tomcat, like the 
authenticated user? I coudn't find any information about this in JK2 
documentation. In my project, I need that the IIS authenticates the users, and then, 
the Tomcat executes my web application with users and roles 
information.

Thanks

Maurício Kanada



FONT SIZE=1 FACE=Arial___
Vi gør opmærksom på, at denne e-mail kan indeholde fortrolig information. Hvis du ved 
en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om fejlen 
ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit system uden 
at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhæftet bilag efter vores overbevisning er fri for virus 
og andre fejl, som kan påvirke computeren eller it-systemet, hvori den modtages og 
læses, åbnes den på modtagerens eget ansvar. Vi påtager os ikke noget ansvar for tab 
og skade, som er opstået i forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you have 
received this message by mistake, please inform the sender of the mistake by sending a 
reply, then delete the message from your system without making, distributing or 
retaining any copies of it.
Although we believe that the message and any attachments are free from viruses and 
other errors that might affect the computer or IT system where it is received and 
read, the recipient opens the message at his or her own risk. We assume no 
responsibility for any loss or damage arising from the receipt or use of this message.
/FONT



Tomcat Administration

2004-04-16 Thread Lee Chin Khiong

Can't login into tomcat administration. /admin/. not found. why ?


domino redirector

2004-04-16 Thread Luca Saccarola
Hi Guys,

  using tomcat v4.1.27 with domino jk connector v1.2.5 on a red hat v7.3 (kernel 
2.4.20-28.7) based system. All works fine as long as a request for a servlet that 
implement an http upload is made: file transfer will succeed but every additional 
servlet request call the already loaded upload servlet despite what specified in my 
uri. After additional investigation I have found that the problem is repicable when a 
generic servlet attempt to call read method for input stream with the following 
statements:

   ServletInputStream in = req.getInputStream();
   byte[] buffer = new byte[1];
   int bytesRead = in.read(buffer);

After the servlet is executed I can execute only indicted servlet despite the servlet 
specified in uri (looking at domino redirector log file). All fine when a servlet is 
requested directly to tomcat (i.e.: via port 8080). Anyone experienced ? TIA

Best.
-- 
Luca Saccarola
Key ID: 0x4A7A51F7 (c/o keyservers)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HttpProcessor Problem - Starting background thread

2004-04-16 Thread Namasivayam, Sudhakar (Cognizant)
Hi,
   My webapp was running fine for 2 days when suddenly, a static thread had stopped... 
this thread should be always alive 
I searched the logs but find only this entry

2004-04-16 13:43:41 HttpProcessor[8080][6] Starting background thread

What does this mean? Please can any  tell me the scenarios it could happen ?? 
Can i do some thing before or after  this event is called, like pesisting the 
objects???

I m using Tomcat standalone running on port 8080. 

Linux  +  tomcat 4.0.4 + JDK 1.4


Thanks in advance,
sudhakar



Log  server.xml below.



NOTE:
usually when i start/stop the thread i find these 
2004-04-15 14:11:07 jsp: init
2004-04-15 14:11:07 StandardWrapper[/sfpsr:ssi]: Loading container servlet ssi
2004-04-15 14:11:07 ssi: init
2004-04-15 14:11:07 action: init
2004-04-15 14:11:08 Ajp13Connector[8007] Opening server socket on host IP address 
127.0.0.1
2004-04-15 14:11:08 Ajp13Connector[8007] Starting background thread
2004-04-15 14:11:08 Ajp13Processor[8007][0] Starting background thread
2004-04-15 14:11:08 Ajp13Processor[8007][1] Starting background thread
2004-04-15 14:11:08 Ajp13Processor[8007][2] Starting background thread
2004-04-15 14:11:08 Ajp13Processor[8007][3] Starting background thread
2004-04-15 14:11:08 Ajp13Processor[8007][4] Starting background thread
2004-04-15 14:11:08 HttpConnector[8080] Starting background thread
2004-04-15 14:11:08 HttpProcessor[8080][0] Starting background thread
2004-04-15 14:11:08 HttpProcessor[8080][1] Starting background thread
2004-04-15 14:11:08 HttpProcessor[8080][2] Starting background thread
2004-04-15 14:11:08 HttpProcessor[8080][3] Starting background thread
2004-04-15 14:11:08 HttpProcessor[8080][4] Starting background thread
2004-04-15 14:11:10 jsp: init

server.xml


Server port=8005 shutdown=SHUTDOWN debug=0

  Service name=Agent8005

Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8007 minProcessors=5 maxProcessors=100
   acceptCount=10 debug=0 address=127.0.0.1 /

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

Engine jvmRoute=a8050 name=Agent8050 defaultHost=localhost debug=0

Manager className=org.apache.catalina.session.PersistentManager
  debug=0
  saveOnRestart=true
  maxActiveSessions=-1
  minIdleSwap=-1
  maxIdleSwap=-1
  maxIdleBackup=-1
Store className=org.apache.catalina.session.FileStore/
  /Manager

  Logger className=org.apache.catalina.logger.FileLogger
  prefix=JVM8050. suffix=.txt
  timestamp=true/
  Realm className=org.apache.catalina.realm.MemoryRealm /

  Host name=localhost debug=0 appBase=webapps unpackWARs=true

Context path=/TMAgent docBase=TMAgent 
debug=0 privileged=true
 Valve className=org.apache.catalina.valves.RemoteAddrValve
allow=127.0.0.1/
/Context
Context path=/manager docBase=manager
  debug=0 privileged=true
/Context





  /Host

/Engine

  /Service

/Server
This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

Visit us at http://www.cognizant.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: jk connector build / configure failure

2004-04-16 Thread Christoph P. Kukulies
On Fri, Apr 16, 2004 at 07:31:40AM +0800, Eric Noel wrote:
 On 4/15/2004 10:28 PM, C. Kukulies wrote:
 In the vein of getting tomcat 5 apache 1.3.29 integration working
 I'm now at the point where I came to the conclusion that I need to build
 jakarta-tomcat-connectors-jk-1.2.5-src/jk/native
 
 Correct me if I'm wrong but I came there by reading and skimming the web.
 Noone could help me in this list so far. Maybe because everyone is using
 apache2, don't know.
 
 
 
 im using debian and ive used its binary apache 1.3 to integrate tomcat 5 
 with no probs. on a no-X debian hosts, the requirements would be
 apt-get install apache
 apt-get install apache-dev (requires libdb2-dev)
 apt-get install libtool
 apt-get install automake
 
 For the connector
 tar -xzvf jakarta-tomcat-connectors-jk2-src-current.tar.gz
 cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2
 sh buildconf.sh
 ./configure --with-apxs=/usr/bin/apxs
 make
 make all
 cp ../build/jk2/apache13/mod_jk2.so /usr/lib/apache/1.3/

Thanks. I'm using FreeBSD and I found that there was a port (/usr/ports) 
which applies patches and it seems I have ajk2 connector installed now.


--
Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Thanks!

2004-04-16 Thread tomcat-user
Please read the attached file.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

jk.log error messages - english grammar

2004-04-16 Thread C. Kukulies

[Fri Apr 16 11:17:29 2004]  [jk_uri_worker_map.c (500)]: Attempting to map URI 
'/servlets-examples'
[Fri Apr 16 11:17:29 2004]  [jk_uri_worker_map.c (514)]: 
jk_uri_worker_map_t::map_uri_to_worker, Found an exact match worker2 - 
/servlets-examples
[Fri Apr 16 11:17:29 2004]  [jk_worker.c (132)]: Into wc_get_worker_for_name worker2
[Fri Apr 16 11:17:29 2004]  [jk_worker.c (136)]: wc_get_worker_for_name, done did not 
found a worker

Despite of the english grammar (did not found? anyone founding the jakarta
project :-) ?
what is the cause of this message?

mod_jk.conf:
IfModule mod_jk.c
JkWorkersFile /usr/local/etc/apache/workers.properties
JkLogFile  /usr/local/jakarta-tomcat5.0/logs/jk.log
JkLogLevel warn

# Sample JkMounts.  Replace these with the paths you would
# like to mount from your JSP server.
JkMount /*.jsp worker2
JkMount /servlets-examples/* worker2
JkMount /servlets-examples  worker2
#   JkMount /servlets/* worker2
/IfModule

workers.properties:

# incredibly simple workers.properties file, intended for connecting
# to one host, via AJP13.  See the tomcat documentation for
# information on more exotic configuration options.
#
# Change jsp-hostname to the hostname of your JSP server.
#
worker.list=worker1, worker2, worker3, worker4
# Set properties for worker1 (ajp12)
worker.worker1.type=ajp12
worker.worker1.host=localhost
worker.worker1.port=8007
worker.worker1.lbfactor=5
# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=locaLHost
worker.worker2.port=8009
worker.worker2.lbfactor=50
worker.worker2.cachesize=10
worker.worker2.cache_timeout=600
worker.worker2.socket_keepalive=1
worker.worker2.socket_timeout=300
# Set properties for worker3 (jni)
worker.worker3.type=jni
# Set worker3 bridge type, here Tomcat 3.3
worker.worker3.bridge=tomcat33
# Set worker3 classpath
worker.worker3.class_path=$(workers.tomcat_home)$(ps)classes
worker.worker3.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
# Set worker3 tomcat command line
worker.worker3.cmd_line=-home
worker.worker3.cmd_line=$(workers.tomcat_home)
# Set worker3 Tomcat/JVM settings
worker.worker3.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)libj
vm.so
worker.worker3.stdout=$(workers.apache_log)$(ps)inprocess.stdout
worker.worker3.stderr=$(workers.apache_log)$(ps)inprocess.stderr
worker.worker3.sysprops=tomcat.home=$(workers.tomcat_home)
# Set properties for worker4 (lb) which use worker1 and worker2
worker.worker4.balanced_workers=worker1,worker2


--
Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Mail Delivery (failure tomcat-user@jakarta.apache.org)

2004-04-16 Thread tomcat-user


If the message will not displayed automatically,
follow the link to read the delivered message.
Received message is available at:
www.jakarta.apache.org/inbox/tomcat-user/read.php?sessionid-27983




Re: jk connector build / configure failure

2004-04-16 Thread John Sidney-Woollett
Christoph P. Kukulies said:
 On Fri, Apr 16, 2004 at 07:31:40AM +0800, Eric Noel wrote:
 On 4/15/2004 10:28 PM, C. Kukulies wrote:
 In the vein of getting tomcat 5 apache 1.3.29 integration working
 I'm now at the point where I came to the conclusion that I need to
 build
 jakarta-tomcat-connectors-jk-1.2.5-src/jk/native
 
 Correct me if I'm wrong but I came there by reading and skimming the
 web.
 Noone could help me in this list so far. Maybe because everyone is
 using
 apache2, don't know.

We're using Apache 1.3 + mod-ssl + mod_deflate + mod_accel + modJK1.2.5 +
Tomcat 5.0.18, and it works great (especially mod_deflate!).

Basically when you build Apache (from source on Linux), make sure you
build it with so support, eg

./configure --prefix=/usr/local/apache --enable-module=ssl --enable-module=so
make; make install;

Then get mod_jk source from jakarta.apache.org, and unpack, and build as
follows (in the unpacked dir):

./buildconf.sh

./configure --with-apxs=/usr/local/apache/bin/apxs --enable-EAPI

If you don't yet have a modules directory, then

mkdir /usr/local/apache/modules
cp apache-1.3/mod_jk.so /usr/local/apache/modules

You still have to create a workers.properties file, and add the JKxx
settings into your Apache httpd.conf file, to get the two to talk
together.

I know this instructions are vague, but hopefully in conjunction with
others docs, you will be able to get Apache and Tomcat connected using JK.

They do work really well together (with Apache frontending your SSL
transactions, fielding static resources, compressing responses, and load
balancing between two or more TC servers) - it is worth perservering.

Good luck.

John Sidney-Woollett

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 4 vs 5 form based container auth filters

2004-04-16 Thread Martin Alley
FYI this is catered for in tomcat 5 with the filter-mapping/dispatcher
element (see servlet 2.4 spec).

Thanks to Bill Barker for the info.

Martin

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 13 April 2004 16:35
To: 'Tomcat Users List'
Subject: RE: tomcat 4 vs 5 form based container auth  filters

Anyone?

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 16:42
To: 'Tomcat Users List'
Subject: RE: tomcat 4 vs 5 form based container auth  filters

Thanks Adam

It seems to me that the separation idea is not clear cut.  There is
certainly a down side.  I wonder whether this will stick.

Martin


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 13:48
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

I can see Yoav is blitzing the mailing list right now. Perhaps you'll 
get a more authoritative answer from him or the other hardcore tomcat 
people.

One of the problems of excluding filters from the authentication request

is to do with character-encoding in the request - I remember someone 
whose realm included users with user-names containing accented 
characters that had to be converted to the correct character-encoding 
for the realm database. He had used a filter to do it but obviously had 
to find another way.

Adam

On 04/12/2004 02:34 PM Martin Alley wrote:
 Except with form based auth, you want the look at feel to be part of
the
 application?  
 
 What reasons did you hear? :-)
 
 Whilst not knowing the full reasons, it would be nice if there was
some
 config switch to control this, other wise it increases application
 maintainence overhead if you want to change the look and feel.
 
 I'll see if I can find anything in the tc5 release notes on this.
 
 Thanks again
 Martin
 
 
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: 12 April 2004 13:13
 To: Tomcat Users List
 Subject: Re: tomcat 4 vs 5 form based container auth  filters
 
 AFAIK it has something to do with providing a clean seperation between

 the authentication (tomcat) and the application (your filter).
 
 I think there were probably several reasons though for it, which 
 outweighed the reasons against, and I have heard a few of them.
 
 
 Adam
 
 On 04/12/2004 01:50 PM Martin Alley wrote:
 
Hi Adam,

Why do you think this behaviour changed from tomcat4 ?

I haven't gone into the full architecture of sitemesh, as yet, but I
know it includes a filter.

Martin

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 11:26
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

Yes your observations are correct. It's my understanding that filters 
are not invoked until after authentication. i.e. after the form-based 
login.

I have no experience of site-mesh, but it seems a bit weird anyway to 
put decorations on a page via a filter - surely you should be 
encapsulating that sort of stuff in a JSP or taglib?

Adam

On 04/12/2004 11:02 AM Martin Alley wrote:


Can anyone comment on this?

Thanks
Martin

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 09 April 2004 09:53
To: Tomcat Users List
Subject: tomcat 4 vs 5 form based container auth  filters

Hi,

Initial observation indicates that filters get executed when a form

for


form based container auth is served - under tomcat 4, but not under
tomcat 5. 

I'm using sitemesh.  The decorations go on the form based login page
under tomcat 4, but not under tomcat 5. 

I need to do more research, but can any one add to this?

Thanks
Martin





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





 
 


-- 
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5, cross context problem

2004-04-16 Thread Rainald Suchan
Hi,

I have 2 web applications, a JSP and a Servlet, that are in differed
contexts. For both I have set cross context to true. In the JSP I put
some attributes in the session and use a RequestDispatcher and call the
include() function to pass the request to the servlet. In the servlet I
get these attributes out of the session and put some other attributes in
the session. After returning to the JSP I get these new attributes again
out of the session. This all works ok with Tomcat 4. But now I tried
this with Tomcat 5.0.16 and the session passed between the two webapps
don't have the attributes in it any more in the other context. That
means If I put an attribute in the JSP in the session and get this
session back in the Servlet then this session doesn't contain my
attribute any more.
Is that a known issue with Tomcat 5?
Does anybody have a solution for this problem?

Regards

Rainald


Session expired

2004-04-16 Thread UmamaheswarKalluru




Hi,
I am working on a JSP / Servlet application where in the session is expired
as soon as I enter a servlet from the JSP page. I do not know the reason
why this is happening. From JSP to JSP it works good. I am using Tomcat
5.0.19

Any idea would be great.

Thank you,
Best Regards,
Uma


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session affinity with loadbalancing (apache2, mod_jk, tomcat5 on linux 9, jdk1.4.2)

2004-04-16 Thread ian
Yah I missed that one. thanks

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 15, 2004 3:50 PM
To: Tomcat Users List
Subject: RE: session affinity with loadbalancing (apache2, mod_jk,
tomcat5 on linux 9, jdk1.4.2)

Did you set the jvmRoute in the Engine tag in server.xml.

The value must match the name of the workers.
(I'm not shure if it's the name or the attribute 'tomcatid')


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



getContext() returns null

2004-04-16 Thread Umer Rashid
Hello,

I was able to acess A.war from B.war, but after I set B.war as ROOT (by setting 
Context path= in server.xml), getServletContext().getContext(/A) 
in B.war return null, even though I have set crossContext =true in Context tag of B. 
Can anyone tell me how this problem can be fixed? 

Regards, umer




RE: URI definitions for isapi_redirector2.dll IIS

2004-04-16 Thread Shlomi Levi
try http://www.dynamichostings.com/TomCat5IIS5.do

it helped me :)

-Original Message-
From: BARBEY Stuart R [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 12:34 AM
To: '[EMAIL PROTECTED]'
Subject: URI definitions for isapi_redirector2.dll  IIS


 Does anyone know where I can find a document which specifies valid URI
 formats for the workers2.properties file? I have been trying the following
 URI combinations but the URL requests aren't redirected from IIS to Tomcat
 by the isapi_redirector2.dll:

 URL: http://servername/webapp/servlet/packagename.classname
 URI: /servlet/package.*

 or

 URL: http://servername/webapp/servlet/packagename.classname
 URI: /webapp/servlet/packagename.*

 Any help is much appreciated.

 Thanks,

 Stuart.

 BTW: the following does work successfully, that is, IIS passes the URL to
 Tomcat.

 URL: http://servername/webapp/servlet/packagename.classname
 URI: /webapp/servlet/*

IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to
be read or used by the named addressee. It is confidential and may contain
legally privileged information. No confidentiality or privilege is waived or
lost by any mistaken transmission to you. The RTA is not responsible for any
unauthorised alterations to this e-mail or attachment to it. Views expressed
in this message are those of the individual sender, and are not necessarily
the views of the RTA. If you receive this e-mail in error, please
immediately delete it from your system and notify the sender. You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JNDI or LDAP services for tomcat

2004-04-16 Thread Shlomi Levi
Does anybody knows if Tomcat 5.0 is supplying LDAP engine?
if it does, can you direct me to the documentation?
if it doesn't, does anybody know of a pluging already written?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Attn: Mark Thomas

2004-04-16 Thread Tomcat User
Mark,

Here is a message sent from jakarta at trollingers dot com.

Maybe something on my end is filtering mail from lists but I doubt it.

Oh well.. We will see.

John


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



context/domain mapping issues

2004-04-16 Thread Wouter de Vaal
Hi,

I was wondering if the following scenario is possible and how it should 
be accomplished, or maybe how I should handle it differently.

I'm using tomcat 5.0.19 and I'm also using apache webserver 2.0.49

I've got in my webapps directory two applications A and B and I have two 
domains registered a.mycom.com and b.mycom.com.
What I would like to happen is that request are routed by apache webserver accordingly,
like this:

http://a.mycom.com - http://localhost:8080/a

http://b.mycom.com - http://localhost:8080/b

I have tried the proxy settings describe in the manual pages, but that
way I can only get it working by using
http://a.mycom.com/a - http://localhost:8080/a


But then again, I guess there would be problems with generated links to the server 
(which include the context path).
Any thoughts on this, best practices?

Regards,
Wouter de Vaal

Re: tomcat 4 vs 5 form based container auth filters

2004-04-16 Thread Adam Hardy
Martin,
how does it cater for it? Are you saying you can use web.xml to map 
filters to the j_security_check URL?

Adam

On 04/16/2004 11:41 AM Martin Alley wrote:
FYI this is catered for in tomcat 5 with the filter-mapping/dispatcher
element (see servlet 2.4 spec).
Thanks to Bill Barker for the info.

Martin

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 13 April 2004 16:35
To: 'Tomcat Users List'
Subject: RE: tomcat 4 vs 5 form based container auth  filters

Anyone?

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 16:42
To: 'Tomcat Users List'
Subject: RE: tomcat 4 vs 5 form based container auth  filters

Thanks Adam

It seems to me that the separation idea is not clear cut.  There is
certainly a down side.  I wonder whether this will stick.
Martin

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 13:48
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

I can see Yoav is blitzing the mailing list right now. Perhaps you'll 
get a more authoritative answer from him or the other hardcore tomcat 
people.

One of the problems of excluding filters from the authentication request

is to do with character-encoding in the request - I remember someone 
whose realm included users with user-names containing accented 
characters that had to be converted to the correct character-encoding 
for the realm database. He had used a filter to do it but obviously had 
to find another way.

Adam

On 04/12/2004 02:34 PM Martin Alley wrote:

Except with form based auth, you want the look at feel to be part of
the

application?  

What reasons did you hear? :-)

Whilst not knowing the full reasons, it would be nice if there was
some

config switch to control this, other wise it increases application
maintainence overhead if you want to change the look and feel.
I'll see if I can find anything in the tc5 release notes on this.

Thanks again
Martin
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 13:13
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

AFAIK it has something to do with providing a clean seperation between


the authentication (tomcat) and the application (your filter).

I think there were probably several reasons though for it, which 
outweighed the reasons against, and I have heard a few of them.

Adam

On 04/12/2004 01:50 PM Martin Alley wrote:


Hi Adam,

Why do you think this behaviour changed from tomcat4 ?

I haven't gone into the full architecture of sitemesh, as yet, but I
know it includes a filter.
Martin

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 11:26
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

Yes your observations are correct. It's my understanding that filters 
are not invoked until after authentication. i.e. after the form-based 
login.

I have no experience of site-mesh, but it seems a bit weird anyway to 
put decorations on a page via a filter - surely you should be 
encapsulating that sort of stuff in a JSP or taglib?

Adam

On 04/12/2004 11:02 AM Martin Alley wrote:



Can anyone comment on this?

Thanks
Martin
-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 09 April 2004 09:53
To: Tomcat Users List
Subject: tomcat 4 vs 5 form based container auth  filters

Hi,

Initial observation indicates that filters get executed when a form
for



form based container auth is served - under tomcat 4, but not under
tomcat 5. 

I'm using sitemesh.  The decorations go on the form based login page
under tomcat 4, but not under tomcat 5. 

I need to do more research, but can any one add to this?

Thanks
Martin




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]









--
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Why is this happening? :(

2004-04-16 Thread UmamaheswarKalluru




Hi,
I have an application where my JSP talks to the Servlet for further
processing of my form. I am maintaining the user information in a session(
UserDetails) object since the user has logged in.

My application works sometimes, but never works sometimes.

When I try to navigate within the same page sometime the UserDetails
object that is present in the session becomes null and sometime it works
great.

This is happening only with this jsp page of my application. The other
pages are working good and there is no session problem in them.

But why is that the session object becomes null sometimes and works
sometimes?

I am totally lost. Please help me.

Thank you,
Best Regards,
Uma


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: getContext() returns null

2004-04-16 Thread Shapira, Yoav

Hi,
Did you try setting crossContext to true for the A context as well? ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Umer Rashid [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 6:49 AM
To: Tomcat Users List
Subject: getContext() returns null

Hello,

I was able to acess A.war from B.war, but after I set B.war as ROOT (by
setting Context path= in server.xml),
getServletContext().getContext(/A)
in B.war return null, even though I have set crossContext =true in
Context tag of B. Can anyone tell me how this problem can be fixed?

Regards, umer





This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HttpProcessor Problem - Starting background thread

2004-04-16 Thread Shapira, Yoav

Hi,

2004-04-16 13:43:41 HttpProcessor[8080][6] Starting background thread

What does this mean? Please can any  tell me the scenarios it could
happen

It means there was sufficient concurrent load on the server that it
needed to start another processing threads, and that less than the
maximum number of threads for connector were already started, so it went
ahead and started another.

Can i do some thing before or after  this event is called, like
pesisting
the objects???

Only if you want to write some very tomcat-specific code, and you don't.
This is not a highly significant event in terms of resources, just
another thread, and the 6th (or 7th) one at that so it's not even a high
load scenario.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Migrating from Tomcat404 to Tomcat5019. Problem with Filter

2004-04-16 Thread Shapira, Yoav

Hi,
But I think the guesses are on the right path: it's definitely an IO problem.  I don't 
like an approach that's subject to breaking if the underlying stream processor 
implementation changes (as it did from tomcat 4 to 5).  Your 10KB/3KB approach 
suggests a buffering or chunking issue.  I have to run to a meeting though ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Antonio Fiol Bonnín [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 2:22 AM
To: Tomcat Users List
Subject: Re: Migrating from Tomcat404 to Tomcat5019. Problem with Filter

Two things I would double-check:

a) The approach of creating a PrintWriter at constructor time. Is that
the right way of doing that?
b) Think of implementing flush and/or close for your ServletOutputStream.

HTH (but these are mostly wild guesses)


Antonio Fiol


Alex Moots wrote:

 I've been using a custom made servlet filter developed for Tomcat404.
 It has worked perfectly for a long time.

 The basic idea of the filter is that it acts as a wrapper around the
 response filter capturing the response output so that the output can
 be sent to a second destination (ie an email message body or something
 similar).  We call this a Double Output Stream filter.  The code for
 this filter is quite simple and I've attached a simplified version of
 it below.  The whole thing is less than 70 lines of code.

 The problem is that this filter doesn't work properly in Tomcat5019.
 I don't get an exception during processing.  The problem is that the
 respByte [] (which should contain the array of bytes sent to the
 browser) is not populated, or is only partially populated.  And when
 this filter is invoked only a partial page is sent to the browser.
 For example, if my page is 10KB long only 3KB will be sent to the
 browser, and similarly only 3KB will be present in the respByte
 array.  It seems like what is happening is that Tomcat5019 is
 short-circuiting the execution of the page for some reason.  I don't
 know why.  The code worked fine in tomcat404 and I didn't change
 anything during the upgrade to tomcat5019.

 Can anyone give an idea of what is going wrong here?  I did some
 searching to see if the servlet filter API changed between tomcat404
 and 5019, but I didn't find anything to suggest that things have
 changed significantly.

 Thanks for your help.
 Alex.


 **CODE***

 public class SaveAsHTMLFilter implements Filter {
public void doFilter(ServletRequest request, ServletResponse
 response, FilterChain chain) throws IOException, ServletException {
//Re the real response in a DoubleResponseWrapper which
 encloses the
//real OutputStream, plus a ByteArrayOutputStream, into a
 DoubleOutputStream
DoubleResponseWrapper respWrap = new
 DoubleResponseWrapper((HttpServletResponse) response);

//Process the request to generate the output into the
 respWrap's DoubleOutputStream
chain.doFilter(request, respWrap);

//retrieve the ByteArray
byte respByte[] = respWrap.getRespByte();
// [SNIP]
// Send the respByte array (which is the response that was sent
 to the browser) to an email message or something similar
// [SNIP]
}
 }

 ***
 public class DoubleResponseWrapper extends HttpServletResponseWrapper {
 DoubleOutputStream dblOS;
 PrintWriter pw;
  public DoubleResponseWrapper(HttpServletResponse resp) throws
 IOException {
super(resp);
ServletOutputStream servOutp  = resp.getOutputStream();
ByteArrayOutputStream   byteArray = new ByteArrayOutputStream(32000);
dblOS = new DoubleOutputStream(servOutp, byteArray);
pw = new PrintWriter(dblOS);
  }
  public ServletOutputStream getOutputStream () throws IOException {
return dblOS;
  }
  public PrintWriter getWriter() throws IOException {
return pw;
  }
  public byte getRespByte()[] {
return dblOS.getRespByte();
  }
 }


 ***
 public class DoubleOutputStream extends ServletOutputStream {

  private ServletOutputStream ServOutp;
  private ByteArrayOutputStream ByteOutp;

  public DoubleOutputStream(ServletOutputStream sos,
 ByteArrayOutputStream bos) {
ServOutp = sos;
ByteOutp = bos;
  }

  public void write(int b) throws IOException {
try {
ServOutp.write(b);
ByteOutp.write(b);
  } catch (Exception e) {
  System.out.println(e);
  }
  }
  public byte [] getRespByte() {
return ByteOutp.toByteArray();
  }
 }





This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.



JDNI, DBCP and global naming resources - problem solved!

2004-04-16 Thread Thomas Nybro Bolding
Dunno if this might be of interest to others but I guess some might have 
or get the same problems as I have been through for the past couple of 
hours and therefore post my findings...

Setting up a database connection pool in Tomcat is pretty straightforward: 
either edit the server.xml or use the admin module. In either event you 
might want to follow the guide at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html.

But beware as this might result in a 
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null', cause: No suitable driver error even 
though you have followed the instructions. In this case simply move the 
ResourceParams name=jdbc/foo.../ResourceParams from the server.xml 
to your application located at ...\conf\Catalina\localhost\bar.xml as 
there seems to be an issue with global naming resources.

Does anyone know whether a bugzilla report has been filed on this subject 
(I couldnt find one) or if one should be reported at all...

Best regards Thomas



FONT SIZE=1 FACE=Arial___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. Hvis du 
ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om 
fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit 
system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri for 
virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori den modtages 
og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os ikke noget ansvar 
for tab og skade, som er opstaaet i forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you have 
received this message by mistake, please inform the sender of the mistake by sending a 
reply, then delete the message from your system without making, distributing or 
retaining any copies of it.
Although we believe that the message and any attachments are free from viruses and 
other errors that might affect the computer or IT system where it is received and 
read, the recipient opens the message at his or her own risk. We assume no 
responsibility for any loss or damage arising from the receipt or use of this message.
/FONT



RE: Session persistance

2004-04-16 Thread Shapira, Yoav

Hi,

I already RTFM. From the manual I understood that you are also part of
developing TFM. But in TFM, restoring of the session is mentioned as
automatic when the applicatio/server restarts. But I want to control
both
storing and restoring of the session using my code. Is this possible?

Of course it's possible, you just need to customize or write a new
Manager implementation.  That's true for any aspect of tomcat you need
to customize, one of the better benefits of open-source software.

It also would have been good to include the above requirements in your
original question:

 I need to
 1. Store the session object in a database (I can trigger this
operation
 from a jsp say logoff.jsp )
 2. Retrieve the session object from the database (I can trigger this
 operation from a jsp say login.jsp )
 
 Thoughts??

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



REQUEST_URI and mod_jk2

2004-04-16 Thread Herbert G. Fischer - Mamute
Hi,

I'm very lost using jk2. I've searched on the web for some tip without
success.

I'm using Apache 2 + jk2 + Tomcat 4.1 and trying to do a simple 404
ErrorDocument
with JSP.

I've tryed using REFERER to know what whas the requested page that generated
the
error, but some browsers do not send REFERERS (IE 5.0 for Mac).

I think that mod_jk2 do not pass the REQUEST_URI to Tomcat.

You know how to fix this ??

Thanks,

Herbert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RES: [work] RE: tomcat 5, Tiles and encoding

2004-04-16 Thread Paulo Alvim
Thanks Yan,

But I already have that enctype in my form declarations (in a Tiles ancestor
layout) and it used to work in Tomcat 4...

-Mensagem original-
De: Yansheng Lin [mailto:[EMAIL PROTECTED]
Enviada em: terca-feira, 13 de abril de 2004 17:47
Para: 'Tomcat Users List'
Assunto: [work] RE: tomcat 5, Tiles and encoding


Hi, did you get this one figured out yet?

If it's on a form, you might want to try method=posted and
enctype=multipart/form-data.

-Yan


-Original Message-
From: Paulo Alvim [mailto:[EMAIL PROTECTED]
Sent: Monday, April 12, 2004 9:11 AM
To: [EMAIL PROTECTED]
Subject: tomcat 5, Tiles and encoding


Hi!

I've just moved my Struts+Tiles application from TC4 to TC5 and I'm now
having encoding problems when trying to post data...(portuguese special
characters aren't being recognized).

I've read topics about Tomcat 5+encoding issues related to included JSPs
(ex: http://forum.java.sun.com/thread.jsp?forum=45thread=495792) and since
I use Tiles and Tiles uses RequestDispatcher.include calls to include
markup jsp components in layouts, I'm trying this way...but the labels in my
page are ok - just my posted data have the problem.

Is there anyone with the same issue?

Thanks in advance!

Paulo Alvim





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HttpProcessor Problem - Starting background thread

2004-04-16 Thread Namasivayam, Sudhakar (Cognizant)

thanks Yoav..

Actually The Thread hang was a DB problem and i confused with this log msg..


sudhakar


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 6:28 PM
To: Tomcat Users List
Subject: RE: HttpProcessor Problem - Starting background thread



Hi,

2004-04-16 13:43:41 HttpProcessor[8080][6] Starting background thread

What does this mean? Please can any  tell me the scenarios it could
happen

It means there was sufficient concurrent load on the server that it
needed to start another processing threads, and that less than the
maximum number of threads for connector were already started, so it went
ahead and started another.

Can i do some thing before or after  this event is called, like
pesisting
the objects???

Only if you want to write some very tomcat-specific code, and you don't.
This is not a highly significant event in terms of resources, just
another thread, and the 6th (or 7th) one at that so it's not even a high
load scenario.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

Visit us at http://www.cognizant.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

How to really destroy a Session

2004-04-16 Thread marc . baumgartner




Hi all,

I am using Tomcat 5.0.19.

In my application the generated sessions are identified by a cookie on the
client. I only allow single sign on. Now I want to destroy the session and
I call in a session an invalidate() and the session isn't available. Then
the application  redirect the request to the start page. But there is still
the cookie with JSESSIONID on the client and there is no new session
possible.

Is there a solution to remove these cookies?

Thanks,
Marc


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to really destroy a Session

2004-04-16 Thread Mike Curwen
The cookie is removed when the user closes the browser, no ?


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 16, 2004 8:34 AM
 To: [EMAIL PROTECTED]
 Subject: How to really destroy a Session
 
 
 
 
 
 
 Hi all,
 
 I am using Tomcat 5.0.19.
 
 In my application the generated sessions are identified by a 
 cookie on the client. I only allow single sign on. Now I want 
 to destroy the session and I call in a session an 
 invalidate() and the session isn't available. Then the 
 application  redirect the request to the start page. But 
 there is still the cookie with JSESSIONID on the client and 
 there is no new session possible.
 
 Is there a solution to remove these cookies?
 
 Thanks,
 Marc
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to really destroy a Session

2004-04-16 Thread Yang Xiao
That's if it's a session cookie, is it? You can always use the Cookie API to
force the cookie to expire.

-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 16, 2004 9:56 AM
To: 'Tomcat Users List'
Subject: RE: How to really destroy a Session

The cookie is removed when the user closes the browser, no ?


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 16, 2004 8:34 AM
 To: [EMAIL PROTECTED]
 Subject: How to really destroy a Session
 
 
 
 
 
 
 Hi all,
 
 I am using Tomcat 5.0.19.
 
 In my application the generated sessions are identified by a 
 cookie on the client. I only allow single sign on. Now I want 
 to destroy the session and I call in a session an 
 invalidate() and the session isn't available. Then the 
 application  redirect the request to the start page. But 
 there is still the cookie with JSESSIONID on the client and 
 there is no new session possible.
 
 Is there a solution to remove these cookies?
 
 Thanks,
 Marc
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Extending GenericPrincipal/RealmBase: Essentially a classloader question

2004-04-16 Thread Jeanfrancois Arcand


Rossen Raykov wrote:

Probably you can define interface and use casting while you are accessing
your Principle implementation. Frankly, I didnt try it but it seems like
usable solution.
There is another technique that is quarantined to work though. It is very
simple and employs only Javas Reflection.
Four days ago I send an e-mail to [EMAIL PROTECTED] explaining how
Reflection may be used to extract users password from
org.apache.catalina.realm.GenericPrincipal and so fare I didnt get any
response.
Probably this is not treated as security issue so let me make it public.
Attached you will find my original e-mail to [EMAIL PROTECTED] explaining
how this may be accomplished and how one can protect himself from such
exposure.
 

With the Security Manager turned on, this hack will not work. So there 
is no security issue here. Of course without SecurityManager, you can do 
whatever you want.

-- Jeanfrancois


Regards,
Rossen Raykov
 

-Original Message-
From: John H [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 15, 2004 1:32 PM
To: Tomcat Users List
Subject: Re: Extending GenericPrincipal/RealmBase: 
Essentially a classloader question

Webapps can see GenericPrincipal only when I move 
catalina.jar to common/lib. That's the kicker. Catalina has 
supplied a nice generic principal that implements 
java.security.Principal in useful ways, but then prevents me 
from using it in my webapps (directly or through extensions).

I must be missing the reasoning behind that.

- Original Message - 
From: Benjamin Armintor [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 12:34 PM
Subject: RE: Extending GenericPrincipal/RealmBase: 
Essentially a classloader question

Can your webapps see GenericPrincipal?  Looking at the 
JavaDocs for the Catalina api, it looks like the session 
faade your get app gets is going to have access to a 
java.security.Principal (likely also a faade), not a 
GenericPrincipal.  Maybe instead of extending a class in the 
server/Catalina classloader, you could implement another 
subclass of java.security.Principal, and have that class 
loaded in the common classloader.

Benjamin J. Armintor
Systems Analyst
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]


-Original Message-
From: John H [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 11:25 AM
To: Tomcat Users List
Subject: Extending GenericPrincipal/RealmBase: Essentially a 
classloader question

HI all,

He have implemented our own realm and principal buy extending 
org.apache.catalina.realm.RealmBase and GenericPrincipal.

(Using TC5.0.19 on Solaris and Windows. Realm defined in Context.)

By doing this, however, we've got ourselves into sort of a 
catch 22 in terms of classloading. Hopefully someone can 
offer some assistance.

I've referenced the Class Loader HOW-TO at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-h
   

owto.html, so I'll use it's terminology.

RealmBase and GenericPrincipal are located in catalina.jar, which resides
physically in server/lib. The howo defines this jar as in the Catalina class
loader. The definition says that the Catalina classes are totally invisible
to web applications, which seems true enough. In order to extend these, I
must locate my jar in server/lib. So far so good.
The problem is that I need to use my extension of GenericPrincipal within my
webapps.
I tried moving my jar to common/lib, since, according to the parent tree in
the howto, it is visible to both the Catalina branch and the webapp branch.
Doing this causes a NoClassDefFoundError for GenericPrincipal. Apparently
since the Catalina classloader is below the common classloader, it can't
find GenericPrincipal.
The only solution that appears to work is moving the entire contents of
server/lib to common/lib, essentially 'promoting' all of the classes
normally in the Catalina class loader to the common class loader.
Is this the best solution? It seems to me that I should be able to extend
RealmBase/GenericPrincipal without having to move jars around.
Any ideas?

John

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Subject:
Principal's password exposure
From:
Rossen Raykov [EMAIL PROTECTED]
Date:
Sun, 11 Apr 2004 23:31:07 -0400
To:
[EMAIL PROTECTED]
Tomcat's implementation of java.security.Principal
org.apache.catalina.realm.GenericPrincipal is exposing user's password to
the applications.
Class info:
GenericPrincipal is having method declared as:
code
public String getPassword()
/code
which returns principal's password.
This method is used by the various 

Re: security permissions

2004-04-16 Thread Jeanfrancois Arcand


Andrea Powles wrote:

Hi Tomcat users,

I wish for one of my web apps in Tomcat to execute another program on my computer using the exec method. I know that I cant currently do this due to the security restrictions. 

I have tried changing the Catalina policy file but Im unsure of exactly what to do so it didnt work. Can someone please advise me of exactly what I need to add or modify in order for my web app to have all permissions. 

I am aware of the security risks but at this stage it is more important that I get my application to work. My web app runs as a servlet and is in a web app directory called ruddis.
 

try the following in catalina.policy:

// These permissions apply only to your application
grant codeBase file:${catalina.home}/webapps/your webapp/- {
permission java.security.AllPermission;
};


-- Jeanfrancois

Thanks in advance 
Andrea Powles

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: How to really destroy a Session

2004-04-16 Thread Mike Curwen
well uh... we're talking about JSESSIONID, no?
 
So if you call session.invalidate on the server-side, then that
JSESSIONID is removed from whatever internal session management 'space'
that Tomcat uses.   When the client then makes additional requests, and
sends that JSESSIONID cookie along with those requests, it doesn't match
any JSESSIONID that Tomcat has in it's session space, and so the user
has  no session. But once the user closes the browser, JSESSIONID
cookie goes away.

Everything works at it should.  If you see JSESSIONID cookies, even
*After* a browser close and restart, that is a *browser* problem.
Worrying about cleaning up the JSESSIONID cookie is pointless... it's
not your responsibility.  Tomcat *told* the browser to clean up the
cookie when it exits. 


 -Original Message-
 From: Yang Xiao [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 16, 2004 9:04 AM
 To: 'Tomcat Users List'
 Subject: RE: How to really destroy a Session
 
 
 That's if it's a session cookie, is it? You can always use 
 the Cookie API to force the cookie to expire.
 
 -Original Message-
 From: Mike Curwen [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 16, 2004 9:56 AM
 To: 'Tomcat Users List'
 Subject: RE: How to really destroy a Session
 
 The cookie is removed when the user closes the browser, no ?
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] 
  Sent: Friday, April 16, 2004 8:34 AM
  To: [EMAIL PROTECTED]
  Subject: How to really destroy a Session
  
  
  
  
  
  
  Hi all,
  
  I am using Tomcat 5.0.19.
  
  In my application the generated sessions are identified by a
  cookie on the client. I only allow single sign on. Now I want 
  to destroy the session and I call in a session an 
  invalidate() and the session isn't available. Then the 
  application  redirect the request to the start page. But 
  there is still the cookie with JSESSIONID on the client and 
  there is no new session possible.
  
  Is there a solution to remove these cookies?
  
  Thanks,
  Marc
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Incomplete HTML

2004-04-16 Thread Leonardo Ribas
My tomcat is returning incomplete html pages when the html to be returned is
too big.
For example, when i want to create a combo box with all cities from my
country, tomcat return a incomplete html like this:
...
select
optioncity 1/option
optioncity 2/option
optioncity 3/option
...
optioncity 300/option
optioncity 301/option
HERE TOMCAT ENDS THE HTML FOR EXAMPLE.

Any idea about whats happening??

Thanks



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Setting a default Locale for Tomcat

2004-04-16 Thread Kevin Schroeder
Hello,
I'm running an installation of Tomcat for a client when a JSP formats a
currency it always uses the generic currency symbol ¤ rather than the $
sign.  How do I go about changing Tomcat's default locale so the $ comes up
instead of ¤.  I'm running about 5 different installations of Tomcat and
this is the first time I've seen it default to ¤.

Thanks,
Kevin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Antwort: RE: How to really destroy a Session

2004-04-16 Thread marc . baumgartner





I have tested some other cases:

We have a SessionListener who sets a flag of the user to logout out, when
there is a session invalidate. Now it seems that the session.invalidate()
don't calls the listener in Tomcat 5.0. is this possible?

Thanks,
Marc





   

  Mike Curwen

  [EMAIL PROTECTED] An:  'Tomcat Users List' 
[EMAIL PROTECTED] 
  m   Kopie:  

   Thema:   RE: How to really destroy a 
Session
  16.04.04 15:56   

  Bitte antworten  

  an Tomcat Users 

  List

   

   




The cookie is removed when the user closes the browser, no ?


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 16, 2004 8:34 AM
 To: [EMAIL PROTECTED]
 Subject: How to really destroy a Session






 Hi all,

 I am using Tomcat 5.0.19.

 In my application the generated sessions are identified by a
 cookie on the client. I only allow single sign on. Now I want
 to destroy the session and I call in a session an
 invalidate() and the session isn't available. Then the
 application  redirect the request to the start page. But
 there is still the cookie with JSESSIONID on the client and
 there is no new session possible.

 Is there a solution to remove these cookies?

 Thanks,
 Marc


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antwort: RE: How to really destroy a Session

2004-04-16 Thread Jacob Kjome
Quoting [EMAIL PROTECTED]:
 
 I have tested some other cases:
 
 We have a SessionListener who sets a flag of the user to logout out, when
 there is a session invalidate. Now it seems that the session.invalidate()
 don't calls the listener in Tomcat 5.0. is this possible?
 
 Thanks,
 Marc
 

I have seen similar behavior.  See
http://issues.apache.org/bugzilla/show_bug.cgi?id=18479

The bug is marked resolved fixed, but look at the messages where I (Jacob
Kjome) start commenting.  I think this bug shouldn't be marked fixed until
sessionDestroyed() is called properly just as valueUnbound() is now called
properly with the current fix for this bug.  Basically, sometimes the listener
collection returned by the following code in StandardSession is null, making it
so HttpSessionAttributeListener's are not called when they should be...

Context context = (Context) manager.getContainer();
Object listeners[] = context.getApplicationEventListeners();


If you can show an alternate way or reproducing this bug, maybe the Tomcat
committers will actually give attention to the issue, because I don't see them
paying any attention to it now, even though I've shown that it is a problem.


Jake


 
 
 
 
 
   Mike Curwen
   [EMAIL PROTECTED] An:  'Tomcat Users List'
 [EMAIL PROTECTED]
   m   Kopie:
Thema:   RE: How to really
 destroy a Session
   16.04.04 15:56
   Bitte antworten
   an Tomcat Users
   List
 
 
 
 
 
 The cookie is removed when the user closes the browser, no ?
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]
  Sent: Friday, April 16, 2004 8:34 AM
  To: [EMAIL PROTECTED]
  Subject: How to really destroy a Session
 
 
 
 
 
 
  Hi all,
 
  I am using Tomcat 5.0.19.
 
  In my application the generated sessions are identified by a
  cookie on the client. I only allow single sign on. Now I want
  to destroy the session and I call in a session an
  invalidate() and the session isn't available. Then the
  application  redirect the request to the start page. But
  there is still the cookie with JSESSIONID on the client and
  there is no new session possible.
 
  Is there a solution to remove these cookies?
 
  Thanks,
  Marc
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jboss tomcat integration

2004-04-16 Thread Peter Choe
i want to be able to use jboss as my ejb container and tomcat.  i know 
that jboss comes with tomcat integrated, but i want to be able use the 
tomcat instance that i already have running.

i have tried to look for documentation on how this can be done, but 
haven't found any clear answers.

has anyone integrated tomcat4.1 and jboss3.2?

peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Here

2004-04-16 Thread tomcat-user
Your file is attached.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: RequestDispatcher and pageEncoding question...

2004-04-16 Thread Yansheng Lin
Hi, 

You are confused with request and response.  The request is shared by the
forwarding jsp and the forwarded jsp, not the response(well kind of, but not
until it's being generated).  You will have to explicitly set the response
contentType to utf-8 in the forwarded page.  

-Yan


-Original Message-
From: Timothy Stone [mailto:[EMAIL PROTECTED] 
Sent: April 15, 2004 14:45
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: RequestDispatcher and pageEncoding question...


Timothy Stone wrote:

 Timothy Stone wrote:
 
 List,

 A servlet I am debugging and trying to understand sets the response's 
 contentType as follows:

 response.setContentType( text/html;charset=UTF-8 );

 Shortly following the following forward is done:

 request.getRequestDispatcher( jspPage ).forward( request, response );
 response.getWriter().flush();

 The JSP forwarded gets the response with the contentType set, but 
 commiting the response seems to reset the contentType to 
 text/html;charset=ISO-8859-1, the default.

 The JSP in the forward does not set a pageEncoding attribute in the 
 page directive, so I'm pointing the finger there at the moment. Can 
 someone outline what is going on behind the scenes of the 
 requestDispatcher call that would be reseting the response's contentType?
 
 
  From the documentation:
 
 ...Uncommitted output in the response buffer is automatically cleared 
 before the forward.
 
 So, is the call to response.setContentType() being reset on the 
 forward()? Can anyone elaborate?

I see that nearly exactly what I'm experiencing was discussed last year 
regarding the behavior as seen through Struts. No resolution given.

http://marc.theaimsgroup.com/?l=tomcat-userm=106323343414285w=2

I'll continue to watch this new thread for suggestions.

Again, with many thanks,
Tim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JNDI or LDAP services for tomcat

2004-04-16 Thread jerome moliere
Shlomi Levi wrote:

Does anybody knows if Tomcat 5.0 is supplying LDAP engine?
 

definitely NO

if it does, can you direct me to the documentation?
if it doesn't, does anybody know of a pluging already written?
 

no plugin needed, use a proper JNDI context  put the required library 
in  the tomcat classpath
 that's it!!!
Jerome

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



--
Auteur cahier du programmeur Java tome 2 - Eyrolles 10/2003
http://www.eyrolles.com/php.informatique/Ouvrages/ouvrage.php3?ouv_ean13=9782212111941


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat 5.0.19, IIS, Windows XP

2004-04-16 Thread Jay Rutten
After scrounging around in the Event Viewer and lots of other places, I have
come up with the idea that the load balancer was having problems. This was
in the event log:

Event Type: Warning
Event Source:   Apache Jakarta Connector2
Event Category: None
Event ID:   2
Date:   4/14/2004
Time:   2:49:02 PM
User:   N/A
Computer:   OCEAN
Description:
Error: [jk_worker_lb.c (427)]: lb.service() worker failed 12 for
ajp13:localhost:8009

My solution was to remove the load balancer from the worker2.properties file
(removing all lb references from the file listed below) and things started
working.


-Original Message-
From: Jay Rutten [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 01, 2004 10:52 AM
To: [EMAIL PROTECTED]
Subject: Tomcat 5.0.19, IIS, Windows XP

I am having problems getting the examples to work in an out of the box
scenario. Here is what I have installed:

1) JSDK 1.4.2_02 (auto-upgraded to 1.4.2_02-b03) with JAVA_HOME set
appropriately.
2) Tomcat 5.0.19 installed and running as a service. The only options
changed during install were the directory (changed to C:\Java\tomcat5.0.19)
and installing as a service. It appears to be working as going to
http://localhost:8080 brings up the manager appropriately. I can also get to
the examples with http://localhost:8080/jsp-examples.
3) JK2 redirector installed using the install4iis.js script included in the
zip file. I made a minor change to the script to create the Filters for the
default web site, which I am confident is correct. You don't need the change
if you have a Filter currently set up at that level. I copied the
workers2.properties.sample to my TOMCAT\conf area (killing the .samples). I
did have to change it slightly since the examples changed. Here are the
current contents:

[shm]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers.
file=anon

# Defines a load balancer named lb. Use even if you only have one machine.
[lb:lb]

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
group=lb

# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
group=lb

[uri:/jsp-examples/*]
group=lb

[uri:/servlets-examples/*]
group=lb

[status:]
info=Status worker, displays runtime information

[uri:/jkstatus/*]
info=The Tomcat /jkstatus handler
group=status:

I can successfully go to http://localhost/jkstatus. However, when I go to
http://localhost/jsp-examples, the browser just hangs. It doesn't even time
out. I also notice that in the application event log, there is the following
warning:

Event Type: Warning
Event Source:   Apache Jakarta Connector2
Event Category: None
Event ID:   2
Date:   4/1/2004
Time:   10:33:11 AM
User:   N/A
Computer:   OCEAN
Description:
Error: [jk_isapi_plugin.c (496)]: HttpExtensionProc worker is NULL


- Is the default server.xml sufficient to getting to these examples? Do I
have to uncomment the invoker servlet?
- What are the possible values that go in workers2.properties? I have
noticed in several examples on the web that a tomcatid value is used for the
uri entries, but it typically goes go localhost:8009. Do I need a worker
specification for each uri entry?

Any direction on where I could look would be greatly appreciated...



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Load balancing with apache2, mod_jk2 tomcat 5.0

2004-04-16 Thread Thomas D. Zeimet
HI again,

Are you using the AJP13 connector in tomcat or did you install and configure
the coyote connector.

Thanks,
-Tom

--- Yang Xiao [EMAIL PROTECTED] wrote:
 Hi,
 Hmm. I commented out the shm.file line in my jk2.properties because it
 doesn't seem to be working, but I just did a test with it uncommented, LD
 still works fine. 
 However, if I use anything other than file=anon in the workers2.properties
 file, I don't get the Scoreboard info on the jkstatus page, kind of strange.
 Yang
 
 
 -Original Message-
 From: Thomas D. Zeimet [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 15, 2004 4:55 PM
 To: Tomcat Users List
 Subject: RE: Load balancing with apache2, mod_jk2  tomcat 5.0
 
 Does the shm play a role in this?  I note that you have the following:
 [shm]
 info=Scoreboard. Requried for reconfiguration and status with multiprocess
 servers.
 file=anon
 #size=104856
 #debug=1
 
 Do your tomcat servers have a corresponding entry in their jk2.properties
 file?
  Like this?
 
 channelSocket.port=8019
 shm.file=/mnt/logs/jk2.shm
 
 Is this even necessary for load balancing?
 
 -Tom
 
 
 --- Yang Xiao [EMAIL PROTECTED] wrote:
  Yes.
  
  -Original Message-
  From: Thomas D. Zeimet [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, April 15, 2004 9:42 AM
  To: Tomcat Users List
  Subject: RE: Load balancing with apache2, mod_jk2  tomcat 5.0
  
  Thanks.  The only change that you made to the tomcat server.xml conf file
 is
  assigning your timcatid values to the jvmRoute property, correct?
  
  Engine name=Catalina defaultHost=localhost debug=0
  jvmRoute=psahammerhead
  
  -Tom
  
  --- Yang Xiao [EMAIL PROTECTED] wrote:
   This is pretty much what I have and it works fine.
   [logger]
   level=DEBUG
   [config:]
   debug=0
   debigEnv=0
   
   [uriMap:]
   info=Maps the requests, Options: debug
   debug=0
   
   # Alternate file logger
   [logger.file:0]
   level=DEBUG
   file=/usr/local/apache/logs/jk2.log
   
   [shm]
   info=Scoreboard. Requried for reconfiguration and status with
 multiprocess
   servers.
   file=anon
   #size=104856
   #debug=1
   
   [workerEnv:]
   info=Global server options
   debug=0
   logger=logger.file:0
   
   # Defines a load balancer named lb. Use even if you only have one
 machine.
   [lb:lb]
   info=Default Load Balancer
   debug=10
   
   # Example socket channel, override port and host.
   [channel.socket:localhost:8009]
   port=8009
   host=127.0.0.1
   lb_factor=5
   tomcatid=tomcat1
   
   # Second Scoket Channel
   [channel.socket:localhost:8019]
   port=8019
   host=127.0.0.1
   lb_factor=10
   tomcatid=tomcat2
   
   # Third Scoket Channel
   [channel.socket:localhost:8029]
   port=8029
   host=127.0.0.1
   lb_factor=10
   tomcatid=tomcat3
   
   # define the worker
   [ajp13:localhost:8009]
   channel=channel.socket:localhost:8009
   group=lb
   
   # define the second worker
   [ajp13:localhost:8019]
   channel=channel.socket:localhost:8019
   group=lb
   
   # define the Third worker
   [ajp13:localhost:8029]
   channel=channel.socket:localhost:8029
   group=lb
   
   # Map the Tomcat examples webapp to the Web server uri space
   [uri:/jsp-examples/*]
   info=JSP Examples
   group=lb
   
   
   [uri:/webtest/*]
   info=Test JSP Page
   group=lb
   
   [status:]
   
   -Original Message-
   From: Thomas D. Zeimet [mailto:[EMAIL PROTECTED] 
   Sent: Thursday, April 15, 2004 7:46 AM
   To: Tomcat Users List
   Subject: RE: Load balancing with apache2, mod_jk2  tomcat 5.0
   
   Yes.  I did a full stop and start of apache.  There are no errors in the
  log
   files either.  Do you, or anyone else, have a workers2.properties file
 of
  a
   working system that you are willing to share?  I've gone through all the
   sections and properties in the latest jakarta jk2 document as well as
  other
   How-Tos and don't see what I've missed (I'm afraid I don't understand
 all
  of
   it
   either :).  Does the shm section play a part?  I interpretted it to be
   needed
   only if one wants to share session data between the differnet tomcat
   servers,
   and does not have anything to do with load balancing.
   
   Thanks,
   -Tom
   
   
   --- Yang Xiao [EMAIL PROTECTED] wrote:
Hi,
Did you restart the Apache2 server? My understanding is JK only
 reloads
  it
only if the section you modified in workers.properties has ver
  defined.
Also, check your jk.log and Catalina.log files for errors.
Yang

-Original Message-
From: Thomas D. Zeimet [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 14, 2004 7:09 PM
To: Tomcat Users List
Subject: RE: Load balancing with apache2, mod_jk2  tomcat 5.0

Thanks but it doesn't seem to make any difference.  For each tomcat
  server
   I
added sections like the following:

[ajp13:psahammerhead:8009]
channel=channel.socket:psahammerhead:8009
group=lb
tomcatId=psahammerhead

It still only wants to use one of the servers.  There are 

RE: Incomplete HTML

2004-04-16 Thread Yansheng Lin
Hi,
Normally that's an indication of a programming error.  There is no file size
limit in java, so I don't think Tomcat would impose a limit all by itself.

-Yan

-Original Message-
From: Leonardo Ribas [mailto:[EMAIL PROTECTED] 
Sent: April 16, 2004 08:34
To: [EMAIL PROTECTED]
Subject: Incomplete HTML


My tomcat is returning incomplete html pages when the html to be returned is
too big.
For example, when i want to create a combo box with all cities from my
country, tomcat return a incomplete html like this:
...
select
optioncity 1/option
optioncity 2/option
optioncity 3/option
...
optioncity 300/option
optioncity 301/option
HERE TOMCAT ENDS THE HTML FOR EXAMPLE.

Any idea about whats happening??

Thanks



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JK connector -- isapi2 -- file upload

2004-04-16 Thread E Cunningham

We verified this using Tomcat 4.1.30 not 5.x.
Therein may be the problem. The connector code
in Tomcat. 

Let's ask this then. 
Is there a dependency between JK2 and Tomcat?
When they started to release separately one would
think that any JK2 would work with any Tomcat?

Does JK2 need to include a jk2.jar?
JoAnn, thanks for provoking more thought on this.
e

--- JoAnn Lemm [EMAIL PROTECTED] wrote:
 Hi All,
 
 I've search the archives and I've seen several posts
 indicating that there
 is a bug in the isapi connector in regards to large
 file uploads (or not
 that large, since the error seems to occur at or
 around 50Kb.) The problem
 being that the stream ended unexpectedly. 
 
 The strange thing is, I don't see this problem when
 I upload a large file
 (3M) within our intranet (I'm using IIS6, Tomcat 5 
 jk2.0.4), only when I
 try to access from the internet.
 
 This leads me to believe there is some sort of
 timing problem (the connector
 trying to grab data that hasn't yet arrived?) 
 Interestingly, I solved the
 problem by turning debug on - forcing the isapi
 connector to log debug
 messages and making is slow down a bit. That 3M file
 uploaded with no
 problem.
 
 So, here's the question ... is there a properties
 file, ini file ...
 anything ... where I can set the size of the buffer
 in the connector? It
 looks like it's grabbing about 8Kb each time.
 
 --JoAnn 
 
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 





__
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jboss tomcat integration

2004-04-16 Thread Jules Gosnell
Peter Choe wrote:
i want to be able to use jboss as my ejb container and tomcat.  i know 
that jboss comes with tomcat integrated, but i want to be able use the 
tomcat instance that i already have running.

i have tried to look for documentation on how this can be done, but 
haven't found any clear answers.

has anyone integrated tomcat4.1 and jboss3.2?

peter

get the following into the environment with which you build your 
InitialContext:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jboss.address:jboss.jndi.port
the code that looks up the EJB uses this context. Lookups will be done 
against the JNDI server running in your JBoss, and proxies for remote 
objects in that process will be returned.

You will probably need e.g. the jbossall-client.jar or similar in e.g. 
WEB-INF/lib.

Jules

/*
 * Jules Gosnell
 * Partner
 * Core Developers Network (Europe)
 * http://www.coredevelopers.net
 */
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Vedr.: IIS and Tomcat security

2004-04-16 Thread Insyde
Thomas

I can't get the 'remote user' information in my web application. I think
that is some wrong configuration. Can you send me  workers2.properties and
jk2.properties example files?

Thanks

Maurício Kanada


- Original Message - 
From: Thomas Nybro Bolding [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 16, 2004 4:28 AM
Subject: Vedr.: IIS and Tomcat security


Yes it does.

request.getRemoteUser() in your JSP gives you the IIS authenticated user.
Make sure your IIS is set to Integrated Windows authentication and insert
request.tomcatAuthentication=false in your jk2.properties file.

/Thomas





Insyde [EMAIL PROTECTED]
15-04-2004 18:06
Besvar venligst til Tomcat Users List


Til:[EMAIL PROTECTED]
cc:
Vedr.:  IIS and Tomcat security



Hi

Does JK2 connector pass a security information to Tomcat, like the
authenticated user? I coudn't find any information about this in JK2
documentation. In my project, I need that the IIS authenticates the users,
and then, the Tomcat executes my web application with users and roles
information.

Thanks

Maurício Kanada



FONT SIZE=1 FACE=Arial___
Vi gør opmærksom på, at denne e-mail kan indeholde fortrolig information.
Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst
informere afsender om fejlen ved at bruge svar-funktionen. Samtidig beder vi
dig slette e-mailen i dit system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhæftet bilag efter vores overbevisning er fri
for virus og andre fejl, som kan påvirke computeren eller it-systemet, hvori
den modtages og læses, åbnes den på modtagerens eget ansvar. Vi påtager os
ikke noget ansvar for tab og skade, som er opstået i forbindelse med at
modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you
have received this message by mistake, please inform the sender of the
mistake by sending a reply, then delete the message from your system without
making, distributing or retaining any copies of it.
Although we believe that the message and any attachments are free from
viruses and other errors that might affect the computer or IT system where
it is received and read, the recipient opens the message at his or her own
risk. We assume no responsibility for any loss or damage arising from the
receipt or use of this message.
/FONT




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Incomplete HTML

2004-04-16 Thread Adam Buglass
The only situation where I can imagine tomcat forcing a file size limit
is when it runs out of disk-space and this should produce an error
message.

I seem to remember a similar problem, I can't remember exactly how I
solved it ( I may have re-written the page ) but here are some things to
look for:
Does the page take a dis-proportionately long time to load or timeout?
-This could indicate that the program is stuck in a loop or other area.

Do you use nested loops (particularly while loops)?
-This could easily kill tomcat, a nested while loop with a lot of data
is often a killer!


Try running the program with verbose comments and / or with some kind of
step-through mode to see if it's a programming error.

HTH, apologies for any rambling / inconsistancies - it's 6pm on a friday
night and I'm knackered!!

Ad.


On Fri, 2004-04-16 at 17:49, Yansheng Lin wrote:
 Hi,
 Normally that's an indication of a programming error.  There is no file size
 limit in java, so I don't think Tomcat would impose a limit all by itself.
 
 -Yan
 
 -Original Message-
 From: Leonardo Ribas [mailto:[EMAIL PROTECTED] 
 Sent: April 16, 2004 08:34
 To: [EMAIL PROTECTED]
 Subject: Incomplete HTML
 
 
 My tomcat is returning incomplete html pages when the html to be returned is
 too big.
 For example, when i want to create a combo box with all cities from my
 country, tomcat return a incomplete html like this:
 ...
 select
 optioncity 1/option
 optioncity 2/option
 optioncity 3/option
 ...
 optioncity 300/option
 optioncity 301/option
 HERE TOMCAT ENDS THE HTML FOR EXAMPLE.
 
 Any idea about whats happening??
 
 Thanks
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RequestDispatcher and [contentType] question...

2004-04-16 Thread Timothy Stone
Yansheng Lin wrote:

Hi, 

You are confused with request and response.  The request is shared by the
forwarding jsp and the forwarded jsp, not the response(well kind of, but not
until it's being generated).  You will have to explicitly set the response
contentType to utf-8 in the forwarded page.  

-Yan
I see what you mean.

How I put it together in my mind--naively I can't say--is that the 
servlet begins constructing a response buffer to the request and the 
contentType gets set by res.setContentType(). Shortly following this, 
the request and response are forwarded for additional processing by a 
JSP page. Upon which the response buffer is cleared as it has not been 
committed. Since no attribute to the page directive is provided in the 
JSP, the default behavior is to set the contentType to 
text/html;charset=ISO-8859-1. The response returns to the controlling 
servlet and gets committed to the client, having overwritten the 
original call to setContentType.

Lesson learned: if one forwards control to a JSP page, the page 
directive must set contentType and/or pageEncoding, either electively or 
by requirement, otherwise the JSP defaults will supersede any work done 
prior to the forwarding of the request.

Thank you, Yansheng.

Tim



-Original Message-
From: Timothy Stone [mailto:[EMAIL PROTECTED] 
Sent: April 15, 2004 14:45
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: RequestDispatcher and pageEncoding question...

Timothy Stone wrote:


Timothy Stone wrote:


List,

A servlet I am debugging and trying to understand sets the response's 
contentType as follows:

response.setContentType( text/html;charset=UTF-8 );

Shortly following the following forward is done:

request.getRequestDispatcher( jspPage ).forward( request, response );
response.getWriter().flush();
The JSP forwarded gets the response with the contentType set, but 
commiting the response seems to reset the contentType to 
text/html;charset=ISO-8859-1, the default.

The JSP in the forward does not set a pageEncoding attribute in the 
page directive, so I'm pointing the finger there at the moment. Can 
someone outline what is going on behind the scenes of the 
requestDispatcher call that would be reseting the response's contentType?


From the documentation:

...Uncommitted output in the response buffer is automatically cleared 
before the forward.

So, is the call to response.setContentType() being reset on the 
forward()? Can anyone elaborate?


I see that nearly exactly what I'm experiencing was discussed last year 
regarding the behavior as seen through Struts. No resolution given.

http://marc.theaimsgroup.com/?l=tomcat-userm=106323343414285w=2

I'll continue to watch this new thread for suggestions.

Again, with many thanks,
Tim


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Vedr.: IIS and Tomcat security

2004-04-16 Thread Reynir Þór Hübner
Hi,
Just wanted to add one thing :
If I remember correctly, IIS only returns remoteUser on the 
authenticating request. If you want to use it's userid, you must grabb 
that in the first request and put it into the session, and use it from 
there afterwards.

If my understanding of the matter is correct, the NTLM (windows 
intergrated authentication) the connection is authenticated, but not the 
request as usual, there for the userid is not sent (by the client 
usually MS Internet Explorer) when the connection has been 
authenticated. Then this connection is held untill the browser 
disconnects, or the server disconnects it. That's why you only get the 
userid on the authenticating request (first request into the realm).

hope it helps
[EMAIL PROTECTED]




Insyde wrote:
Thomas

I can't get the 'remote user' information in my web application. I think
that is some wrong configuration. Can you send me  workers2.properties and
jk2.properties example files?
Thanks

Maurício Kanada

- Original Message - 
From: Thomas Nybro Bolding [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 16, 2004 4:28 AM
Subject: Vedr.: IIS and Tomcat security

Yes it does.

request.getRemoteUser() in your JSP gives you the IIS authenticated user.
Make sure your IIS is set to Integrated Windows authentication and insert
request.tomcatAuthentication=false in your jk2.properties file.
/Thomas





Insyde [EMAIL PROTECTED]
15-04-2004 18:06
Besvar venligst til Tomcat Users List
Til:[EMAIL PROTECTED]
cc:
Vedr.:  IIS and Tomcat security


Hi

Does JK2 connector pass a security information to Tomcat, like the
authenticated user? I coudn't find any information about this in JK2
documentation. In my project, I need that the IIS authenticates the users,
and then, the Tomcat executes my web application with users and roles
information.
Thanks

Maurício Kanada



FONT SIZE=1 FACE=Arial___
Vi gør opmærksom på, at denne e-mail kan indeholde fortrolig information.
Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst
informere afsender om fejlen ved at bruge svar-funktionen. Samtidig beder vi
dig slette e-mailen i dit system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhæftet bilag efter vores overbevisning er fri
for virus og andre fejl, som kan påvirke computeren eller it-systemet, hvori
den modtages og læses, åbnes den på modtagerens eget ansvar. Vi påtager os
ikke noget ansvar for tab og skade, som er opstået i forbindelse med at
modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you
have received this message by mistake, please inform the sender of the
mistake by sending a reply, then delete the message from your system without
making, distributing or retaining any copies of it.
Although we believe that the message and any attachments are free from
viruses and other errors that might affect the computer or IT system where
it is received and read, the recipient opens the message at his or her own
risk. We assume no responsibility for any loss or damage arising from the
receipt or use of this message.
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JK connector -- isapi2 -- file upload

2004-04-16 Thread JoAnn Lemm
While we're discussing this ... has anyone developed a work-around for this
problem? I have beta product clients calling me, so this is extremely
critical.

Leaving debug running seems to only fix the problem intermittently.

Is there another ISAPI that will work?

--JoAnn 

-Original Message-
From: E Cunningham [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 16, 2004 9:59 AM
To: Tomcat Users List
Subject: Re: JK connector -- isapi2 -- file upload


We verified this using Tomcat 4.1.30 not 5.x.
Therein may be the problem. The connector code
in Tomcat. 

Let's ask this then. 
Is there a dependency between JK2 and Tomcat?
When they started to release separately one would
think that any JK2 would work with any Tomcat?

Does JK2 need to include a jk2.jar?
JoAnn, thanks for provoking more thought on this.
e

--- JoAnn Lemm [EMAIL PROTECTED] wrote:
 Hi All,
 
 I've search the archives and I've seen several posts
 indicating that there
 is a bug in the isapi connector in regards to large
 file uploads (or not
 that large, since the error seems to occur at or
 around 50Kb.) The problem
 being that the stream ended unexpectedly. 
 
 The strange thing is, I don't see this problem when
 I upload a large file
 (3M) within our intranet (I'm using IIS6, Tomcat 5 
 jk2.0.4), only when I
 try to access from the internet.
 
 This leads me to believe there is some sort of
 timing problem (the connector
 trying to grab data that hasn't yet arrived?) 
 Interestingly, I solved the
 problem by turning debug on - forcing the isapi
 connector to log debug
 messages and making is slow down a bit. That 3M file
 uploaded with no
 problem.
 
 So, here's the question ... is there a properties
 file, ini file ...
 anything ... where I can set the size of the buffer
 in the connector? It
 looks like it's grabbing about 8Kb each time.
 
 --JoAnn 
 
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 





__
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Handling SOAP faults

2004-04-16 Thread Yansheng Lin
How about setting the fault on the response?  With 500 as status.  Or is
that what you asked for?

-Yan

-Original Message-
From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
Sent: April 15, 2004 19:04
To: Tomcat Users List
Subject: Handling SOAP faults


Hello,

I'm using Tomcat 4.2.14, JDK 1.4.1, and I need to be able to return 
a SOAP fault document with a response code of 500.  The only 
way I've found to do this seems a bit of a hack, and I was 
wondering if there was a better way.

Currently I'm passing the SOAP fault document in the session 
variable which gets picked up by the error-page handler (a jsp) 
when I issue the sendError(500).  This results in the SOAPfault 
message appearing in the error-stream on the client as it should, it 
just seems as though I ought to be able to write to the error-stream 
directly, but I can't find how  in the doc, or googling.

Can anyone assist?

Thanks,

Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: context/domain mapping issues

2004-04-16 Thread John H
We do this using apache's rewrite module. in httpd.conf:

IfModule !mod_rewrite.c
  LoadModule rewrite_module modules/mod_rewrite.so
/IfModule

VirtualHost *
ServerName a.mycom.com
RewriteEngine On
RewriteRule ^/$   /a [R,L]
/VirtualHost

from there, mod_jk takes over and maps the a.mycom.com/a to
a.mycom.com:8080/a, which should get you want you want.

I'm assuming you're familiar with apache to tomcat connecting via mod_jk.

- Original Message - 
From: Wouter de Vaal [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 16, 2004 7:39 AM
Subject: context/domain mapping issues


Hi,

I was wondering if the following scenario is possible and how it should
be accomplished, or maybe how I should handle it differently.

I'm using tomcat 5.0.19 and I'm also using apache webserver 2.0.49

I've got in my webapps directory two applications A and B and I have two
domains registered a.mycom.com and b.mycom.com.
What I would like to happen is that request are routed by apache webserver
accordingly,
like this:

http://a.mycom.com - http://localhost:8080/a

http://b.mycom.com - http://localhost:8080/b

I have tried the proxy settings describe in the manual pages, but that
way I can only get it working by using
http://a.mycom.com/a - http://localhost:8080/a


But then again, I guess there would be problems with generated links to the
server (which include the context path).
Any thoughts on this, best practices?

Regards,
Wouter de Vaal


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 4.1.3

2004-04-16 Thread Angus Mezick
Do you mean tomcat 4.1.30? If not, UPGRADE NOW!
--Angus

 -Original Message-
 From: Reis, Tom [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 13, 2004 9:47 AM
 To: Tomcat Users List (E-mail)
 Subject: Tomcat 4.1.3
 
 
   I was using Tomcat 4.0.4. I am now using 4.1.3. I cannot seem to
 load the application on 4.1.3. It appears I cannot even find 
 the directory
 the application is in. Is there something different in 4.1.3 
 to recognize
 and load an application. Thanks.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TLS encryption and application/pdf mime types

2004-04-16 Thread John Thaemlitz
I am running TomCat 5.0.19 on AIX 5.2 using IBM's J2RE 1.4.1

I have the TLS SSL encryption working and everything works great in
Mozilla.  However in IE I am unable to access PDF's.  HTML, forms and
images load/submit fine.  IE uses the acrobat plugin when I access PDF's
via the insecure port.  However when I access a PDF via the TLS
encrypted port, IE tries a file download to open Adobe Acrobat Control
for ActiveX.  If I click the save button, it gives a file not found
dialog.

Additional info:
The file is there, IE is pointed at a static file ending in .pdf
The TLS 1.0 encryption option is checked in IE
Basic web mimetypes work in IE
Everything works fine in Mozilla.
I have the mime-mapping in my web.xml file.
 mime-mapping
 extensionpdf/extension
 mime-typeapplication/pdf/mime-type
 /mime-mapping

Has anyone had this problem with the other SSL implementations?  Any
ideas on what triggers this IE bug would be appreciated.

Thanks,

JohnPT

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jboss tomcat integration

2004-04-16 Thread Peter Choe
thanks for the reply.

so, once the initialcontext is set up in the environment, i just need to 
put everything (jsp, servlets, ejbs) under the webapps directory?

and i would start jboss without starting the embedded tomcat?  how can i 
disable the embedded tomcat that comes with jboss not to start?

thanks for the help.

peter

Jules Gosnell wrote:
Peter Choe wrote:

i want to be able to use jboss as my ejb container and tomcat.  i know 
that jboss comes with tomcat integrated, but i want to be able use the 
tomcat instance that i already have running.

i have tried to look for documentation on how this can be done, but 
haven't found any clear answers.

has anyone integrated tomcat4.1 and jboss3.2?

peter

get the following into the environment with which you build your 
InitialContext:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jboss.address:jboss.jndi.port
the code that looks up the EJB uses this context. Lookups will be done 
against the JNDI server running in your JBoss, and proxies for remote 
objects in that process will be returned.

You will probably need e.g. the jbossall-client.jar or similar in e.g. 
WEB-INF/lib.

Jules

/*
 * Jules Gosnell
 * Partner
 * Core Developers Network (Europe)
 * http://www.coredevelopers.net
 */
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat 4.1.3

2004-04-16 Thread Mike Curwen
Otherwise, you might be running into the 'invoker disabled', that most
people run into when they upgrade from something before version 4.1.12
to something after that version.
 
It's in the tomcat faq.


 -Original Message-
 From: Angus Mezick [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 16, 2004 12:53 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1.3
 
 
 Do you mean tomcat 4.1.30? If not, UPGRADE NOW!
 --Angus
 
  -Original Message-
  From: Reis, Tom [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, April 13, 2004 9:47 AM
  To: Tomcat Users List (E-mail)
  Subject: Tomcat 4.1.3
  
  
  I was using Tomcat 4.0.4. I am now using 4.1.3. I 
 cannot seem to load 
  the application on 4.1.3. It appears I cannot even find the 
 directory
  the application is in. Is there something different in 4.1.3 
  to recognize
  and load an application. Thanks.
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Load balancing with apache2, mod_jk2 tomcat 5.0

2004-04-16 Thread Angus Mezick
The docs at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configwebcom.htm
l#How%20Load%20Balancing%20Works have been improved.  Try reading them
again.

 -Original Message-
 From: Thomas D. Zeimet [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 14, 2004 10:17 AM
 To: [EMAIL PROTECTED]
 Subject: Load balancing with apache2, mod_jk2  tomcat 5.0
 
 
 Hi,
 
 I have set up four tomcat 5.0 servers for load balancing 
 using an apache2
 server and mod_jk2 on RedHat 9.0.  The trouble that I am 
 having is that most of
 the user sessions are routed to only one of the tomcat 
 servers even though the
 lb_factor for all is the same, 10.  All tomcat servers seem 
 to be working since
 I can disable all but one in the workers2.properties file to 
 force that tomcat
 server to be used.  Chnaging the lb_factor can also cause a 
 different tomcat
 server to be used most of the time, but I haven't figured out 
 how to control
 the balancing by lb_factor.
 
 Below is the workers2.properties file that I am using.
 
 Thanks for any help you can provide,
 -Tom
 
 # workers2.properties 
 
 [logger]
 level=DEBUG
 
 [config:]
 debug=0
 debugEnv=0
 
 [uriMap:]
 info=Maps the requests. Options: debug
 debug=0
 
 # Alternate file logger
 [logger.file:0]
 level=DEBUG
 file=/usr/local/apache2/logs/jk2.log
 
 #[shm:]
 #info=Scoreboard. Required for reconfiguration and status 
 with multiprocess
 servers
 #file=/usr/local/apache2/logs/jk2.shm
 #size=100
 #debug=0
 #disabled=0
 
 [workerEnv:]
 info=Global server options
 debug=0
 timing=1
 # Default Native Logger (apache2 or win32 )
 # can be overriden to a file logger, useful
 # when tracing win32 related issues
 #logger=logger.file:0
 
 [lb:lb]
 ver=1
 info=Default load balancer.
 debug=10
 
 [channel.socket:psahammerhead:8009]
 ver=1
 graceful=0
 info=A tomcat instance - psahammerhead.
 debug=0
 disabled=0
 group=lb
 tomcatId=psahammerhead
 lb_factor=10
 
 [channel.socket:psashovelhead:8009]
 ver=1
 graceful=0
 info=A tomcat instance - psashovelhead.
 debug=0
 disabled=0
 group=lb
 tomcatId=psashovelhead
 lb_factor=10
 
 [channel.socket:psabonnethead:8009]
 ver=1
 graceful=0
 info=A tomcat instance - psabonnethead.
 debug=0
 disabled=1
 group=lb
 tomcatId=psabonnethead
 lb_factor=10
 
 [channel.socket:psawinghead:8009]
 ver=1
 graceful=0
 info=A tomcat instance - psawinghead.
 debug=0
 disabled=1
 group=lb
 tomcatId=psawinghead
 lb_factor=10
 
 [status:status]
 info=Status worker, displays runtime informations
 
 [uri:/jkstatus]
 group=status:status
 
 # Map the Tomcat examples webbapp
 [uri:/myapp/*]
 info=Map the whole webapp
 group=lb
 
 
 
 
 
   
   
 __
 Do you Yahoo!?
 Yahoo! Tax Center - File online by April 15th
 http://taxes.yahoo.com/filing.html
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Handling SOAP faults

2004-04-16 Thread Bill Harrelson
What the SOAP spec says is that a SOAPfault XML document 
needs to be returned in the errorStream and a response code of 
500 returned.

Sending a response 500 is easy, including a response message is 
also easy.  But, what is included in the response message is not 
written to the errorStream.  Tomcat seems to write whatever is 
generated by the error-page directive in the deployment descriptor 
to the error-stream, so I have currently solved the problem by 
passing the SOAPfault document through the session variable to 
the designated jsp listed in the error-page directive.

It just seems that this is a hackery way to do it, and my servlet 
should be able to write directly to the errorStream of the response, I 
just can't see how.

Any assistance is appreciated.

Thanks,

Bill


Send reply to:  Tomcat Users List [EMAIL PROTECTED]
From:   Yansheng Lin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject:RE: Handling SOAP faults
Date sent:  Fri, 16 Apr 2004 11:21:06 -0600

 How about setting the fault on the response?  With 500 as status.  Or is
 that what you asked for?
 
 -Yan
 
 -Original Message-
 From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
 Sent: April 15, 2004 19:04
 To: Tomcat Users List
 Subject: Handling SOAP faults
 
 
 Hello,
 
 I'm using Tomcat 4.2.14, JDK 1.4.1, and I need to be able to return 
 a SOAP fault document with a response code of 500.  The only 
 way I've found to do this seems a bit of a hack, and I was 
 wondering if there was a better way.
 
 Currently I'm passing the SOAP fault document in the session 
 variable which gets picked up by the error-page handler (a jsp) 
 when I issue the sendError(500).  This results in the SOAPfault 
 message appearing in the error-stream on the client as it should, it 
 just seems as though I ought to be able to write to the error-stream 
 directly, but I can't find how  in the doc, or googling.
 
 Can anyone assist?
 
 Thanks,
 
 Bill
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: how does lb factor work?

2004-04-16 Thread Angus Mezick
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configwebcom.htm
l#How%20Load%20Balancing%20Works

 -Original Message-
 From: ian [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 15, 2004 3:42 AM
 To: 'Tomcat Users List'
 Subject: how does lb factor work?
 
 
 Can anyone explain to me how lb factors work? What values are
 recommended?
 Thanks. 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Handling SOAP faults

2004-04-16 Thread Yansheng Lin
Hi, 
Ok, I think what happened here is: the response message is *overwritten*
since you already defined a custom error-page in your deployment descriptor.
You can do a few simple tests to find out whether this is true:
1) by taking out the error-page and see what's on the default 500
page
2) get the message from the response using scriptlet, I got a
feeling that there may be error-tags in jsp, but I cannot be sure without
checking with the manual.

-Yan

PS. SOAP is a really good idea. 

-Original Message-
From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
Sent: April 16, 2004 11:59
To: Tomcat Users List
Subject: RE: Handling SOAP faults


What the SOAP spec says is that a SOAPfault XML document 
needs to be returned in the errorStream and a response code of 
500 returned.

Sending a response 500 is easy, including a response message is 
also easy.  But, what is included in the response message is not 
written to the errorStream.  Tomcat seems to write whatever is 
generated by the error-page directive in the deployment descriptor 
to the error-stream, so I have currently solved the problem by 
passing the SOAPfault document through the session variable to 
the designated jsp listed in the error-page directive.

It just seems that this is a hackery way to do it, and my servlet 
should be able to write directly to the errorStream of the response, I 
just can't see how.

Any assistance is appreciated.

Thanks,

Bill


Send reply to:  Tomcat Users List [EMAIL PROTECTED]
From:   Yansheng Lin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject:RE: Handling SOAP faults
Date sent:  Fri, 16 Apr 2004 11:21:06 -0600

 How about setting the fault on the response?  With 500 as status.  Or is
 that what you asked for?
 
 -Yan
 
 -Original Message-
 From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
 Sent: April 15, 2004 19:04
 To: Tomcat Users List
 Subject: Handling SOAP faults
 
 
 Hello,
 
 I'm using Tomcat 4.2.14, JDK 1.4.1, and I need to be able to return 
 a SOAP fault document with a response code of 500.  The only 
 way I've found to do this seems a bit of a hack, and I was 
 wondering if there was a better way.
 
 Currently I'm passing the SOAP fault document in the session 
 variable which gets picked up by the error-page handler (a jsp) 
 when I issue the sendError(500).  This results in the SOAPfault 
 message appearing in the error-stream on the client as it should, it 
 just seems as though I ought to be able to write to the error-stream 
 directly, but I can't find how  in the doc, or googling.
 
 Can anyone assist?
 
 Thanks,
 
 Bill
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: IOException: Stream closed error when using custom tags

2004-04-16 Thread Yansheng Lin
Can you do a trace to see where it fails when you use jsp:include?  Is it
in doAfterBody() or doStartTag()?
Actually I don't quite understand your problem. You said it works fine when
you try to display it, but doesn't work when you set it as an attribute of
jsp:include.  Is that right?  If that's the case, normally what I would do
is break things up to two steps.  First get the url string, then set it in
the attribute.

-Yan

-Original Message-
From: shanmugampl [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 22:30
To: [EMAIL PROTECTED]
Subject: IOException: Stream closed error when using custom tags


Hi All,

I have a custom tag, which iterates through a data and provides a 
url to be included during every iteration. When i display the url as  a 
string, everything works fine. But when i try to include it through the 
jsp:include tag i am getting the following error.

java.io.IOException: Stream closed

org.apache.jasper.runtime.BodyContentImpl.ensureOpen(BodyContentImpl.java:62
4)

Once i get this error, reverting back to the old case(displaying the url as
a string) also throws the same error.
I cannot figure out the problem.

Also i have disabled tagpooling. Can anyone help me out on this.

Thanks
Shanmugam PL




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Extending GenericPrincipal/RealmBase: Essentially a classloader question

2004-04-16 Thread John H
Thanks for the replies.

I've tried some of the suggestions, and I guess I've hit a wall again.

From what I'm seeing, in order extend RealmBase/GenericPrincipal, your class
MUST exist in server/lib (given the default configuration). I see no other
way, unless I'm missing something. RealmBase is in catalina.jar, which is in
server/lib and is in the catalina classloader. In order for a class to
extend this, it too must be in the catalina classloader.

I tried this modification to catalina.properties:

common.loader=${catalina.base}/common/classes,${catalina.base}/common/endors
ed/*.jar,
${catalina.base}/common/lib/*.jar,${catalina.base}/server/classes,${catalina
.base}/server/lib/*.jar

(note my extension classes are in bbarealm.jar, which is in server/lib)

Withouth making any more changes (other than moving tomcat's jar's back to
their original locations), this worked. This seems exactly like moving all
the files from server/lib (including my bbarealm.jar) to common/lib, though.

Then I tried this: I moved my bbarealm.jar to shared/lib (making it visible
to the apps), changed the common loader back to it's original form, and
added
${catalina.home}/shared/lib/bbarealm.jar to the sever.loader line. This
results in a NCDF for org.apache.catalina.realm.RealmBase

*pulls hair* I'm not sure how catalina.policies is going to help me. This
isn't an priviledges issue. It's a classloader issue. The only classloader
that seems to allow me to extend RealmBase/GenericPrincipal is the catalina
classloader, and can't see a way to add a class to this classloader (other
than sticking it in server/lib, which makes it invisible to my apps!). There
is no 'catalina.loader' line in catalina.properties.

*sigh* Any thoughts?

- Original Message - 
From: Jeanfrancois Arcand [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 2:55 PM
Subject: Re: Extending GenericPrincipal/RealmBase: Essentially a classloader
question




 John H wrote:

 HI all,
 
 He have implemented our own realm and principal buy extending
org.apache.catalina.realm.RealmBase and GenericPrincipal.
 
 (Using TC5.0.19 on Solaris and Windows. Realm defined in Context.)
 
 By doing this, however, we've got ourselves into sort of a catch 22 in
terms of classloading. Hopefully someone can offer some assistance.
 
 I've referenced the Class Loader HOW-TO at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html, so
I'll use it's terminology.
 
 RealmBase and GenericPrincipal are located in catalina.jar, which resides
physically in server/lib. The howo defines this jar as in the Catalina class
loader. The definition says that the Catalina classes are totally invisible
to web applications, which seems true enough. In order to extend these, I
must locate my jar in server/lib. So far so good.
 
 The problem is that I need to use my extension of GenericPrincipal within
my webapps.
 
 I tried moving my jar to common/lib, since, according to the parent tree
in the howto, it is visible to both the Catalina branch and the webapp
branch. Doing this causes a NoClassDefFoundError for GenericPrincipal.
Apparently since the Catalina classloader is below the common classloader,
it can't find GenericPrincipal.
 
 The only solution that appears to work is moving the entire contents of
server/lib to common/lib, essentially 'promoting' all of the classes
normally in the Catalina class loader to the common class loader.
 
 Is this the best solution? It seems to me that I should be able to extend
RealmBase/GenericPrincipal without having to move jars around.
 
 Any ideas?
 
 
 One way will be to define, in your context.xml, the attribute
 privileged=true. This will give the web app access to all the
 server/lib classes (but that's not secure since your web app can play
 with the catalina internal).

 If you can turn the SecurityManager on, then  what you can do after is
 turning it on (this will protected all catalina classes from package
 definition/insertionsee catalina.properties for the list of
 protection), you can then add your web app codebase in the
 catalina.policy so only your web app will be able to use the catalina.jar.

 I don't see any other way to achieve what you want to do.

 -- Jeanfrancois



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat and TCP Window Size

2004-04-16 Thread Raines, David N
I am trying to run Tomcat on a special customer demo network
that I have set up.  The network includes an unnaturally long delay, and
we have found that we need to change the TCP Window Size for our
different programs to get good performance.

The server is Windows 2000 Server.  I've set the registry entries to 
change the window size.  Microsoft IIS responds to them (its 
performance improves as the window becomes larger) but Tomcat does
not.  I've also looked in the Tomcat Administration Tool, but none
of the options under Tomcat Server-Service (Cataline)-Connector(8080) seem to help.

How do I get Tomcat to work with a different TCP window size under
Windows 2000 Server?


The registery entries I set were:
HKEY_LOCAL_MACHIME\SYSTEM\CurrentControlSet\Services\Tapip\...
Parameters\GlobalMaxTcpWindowSize and TcpWindowSize and Tcp1323Opts.

Is Tomcat / Java supposed to be affected by those variables?
Is there some other way to solve the problem?

Thanks,
David

-- 
David Raines
Assoc. Software Engineer
Lockheed Martin, ISS
(240) 568-6463 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TLS encryption and application/pdf mime types

2004-04-16 Thread John Thaemlitz
I created a work around by setting up a servlet that streams the pdf to
the browser.  The key to making it work is setting Content-Disposition
in the respones header.

resp.setContentType(application/pdf);
resp.setHeader( Content-Disposition, inline; filename=my.pdf );
...

If someone knows how to configure this in TomCat I'd appreciate it.

Thanks,

JPT

-Original Message-
From: John Thaemlitz 
Sent: Friday, April 16, 2004 12:37 PM
To: [EMAIL PROTECTED]
Subject: TLS encryption and application/pdf mime types


I am running TomCat 5.0.19 on AIX 5.2 using IBM's J2RE 1.4.1

I have the TLS SSL encryption working and everything works great in
Mozilla.  However in IE I am unable to access PDF's.  HTML, forms and
images load/submit fine.  IE uses the acrobat plugin when I access PDF's
via the insecure port.  However when I access a PDF via the TLS
encrypted port, IE tries a file download to open Adobe Acrobat Control
for ActiveX.  If I click the save button, it gives a file not found
dialog.

Additional info:
The file is there, IE is pointed at a static file ending in .pdf The
TLS 1.0 encryption option is checked in IE Basic web mimetypes work in
IE Everything works fine in Mozilla. I have the mime-mapping in my
web.xml file.
 mime-mapping
 extensionpdf/extension
 mime-typeapplication/pdf/mime-type
 /mime-mapping

Has anyone had this problem with the other SSL implementations?  Any
ideas on what triggers this IE bug would be appreciated.

Thanks,

JohnPT

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Web Start and Tomcat 4.1.29 after upgrade

2004-04-16 Thread talley_angelina
Hello! We have a simple servlet that basically just queries a few things off
of the HttpServletRequest and spits back a dynamically generated JNLP file
for Java Web Start. For some reason, when we were running with Tomcat 4.0.6
this worked fine, but with the upgrade to Tomcat 4.1.29 it does not. IE
always prompts to open or save the file - it never just launches JWS
automatically anymore. Currently, we basically just use Tomcat 4.1.29 right
out of the box, no special modifications.

Any suggestions on what we can fix? I'll put the interesting parts of the
servlet below. Notice I already set the content type and turn on caching.
But, could I possibly do more? Or is it a Tomcat configuration problem? I
noticed Tomcat often appends the charset to a content type - is there some
way to avoid that?

Thanks in advance!

-Angelina Talley

public class JNLPServlet extends HttpServlet{

public void doGet(HttpServletRequest request, HttpServletResponse response) 
throws IOException, ServletException {
try { 
response.setHeader(Cache-Control, public);
response.setContentType(application/x-java-jnlp-file); 

String sessionId = getSessionId(request);
ServletOutputStream out = response.getOutputStream();

java.net.InetAddress[] hostNetAddrs = 
java.net.InetAddress.getAllByName(request.getServerName());
String hostIpAddr = hostNetAddrs[0].getHostAddress();
out.println(generateJNLP(sessionId, request.getServerName(),
hostIpAddr, request.getRemoteUser()));
out.flush(); 
}
catch (IOException ex) {
response.sendError(javax.servlet.http.HttpServletResponse.
   SC_SERVICE_UNAVAILABLE, ex.getMessage());
}
catch (Exception ex) {
response.sendError(javax.servlet.http.HttpServletResponse.
   SC_INTERNAL_SERVER_ERROR, ex.getMessage());
}
}
...
}



Re: jboss tomcat integration

2004-04-16 Thread Nikola Milutinovic
Peter Choe wrote:

thanks for the reply.

so, once the initialcontext is set up in the environment, i just need 
to put everything (jsp, servlets, ejbs) under the webapps directory?


No, I believe the idea is to let JBoss handle everything except 
JSP/Servlet. So EJBs will be on JBoss.

and i would start jboss without starting the embedded tomcat?  how can 
i disable the embedded tomcat that comes with jboss not to start?


JBoss' Tomcat is just another service in JBoss' current deployment. 
Locate the dir of your currently deployed server and just (re)move 
Tomcat's deployment SAR from that dir. If the docs are true, you don't 
even need to restart JBoss, it will automatically remove the service 
from the loaded services.

What's the big enchantment with running your own standalone Tomcat and 
not the one included (and integrated) with JBoss? Other than being able 
to run the lates Tomcat available. With JBoss you have it all neatly 
packet and integrated. And if you're warried about not using the latest 
and greatest, well, what about bugs in JBoss (IOW, not running the 
latest and greatest of JBoss)?

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Domain Names for Session Cookies

2004-04-16 Thread John Gibson
I'm running Tomcat 4.0.6 with Apache 2.0.46 on RedHat Advanced Server 
and I'm running into a problem with the domain for session cookies.

I have a host setup as foobar.com with an alias of www.foobar.com.
When a client visits foobar.com I create a cookie-based session for the 
user.  Everything behaves correctly as long as all of the user's 
requests to the server begin with foobar.com, however if the user visits 
www.foobar.com the browser will not send the session cookie and 
vice-versa.  As far as I can tell this is because the session cookies 
that Tomcat creates have a domain that matches the requested domain. 
However, if the cookies were created with a domain of .foobar.com then 
they browser would send the cookie to both http://foobar.com and 
http://www.foobar.com.

Is there any way to override the cookie domain that Tomcat uses when it 
creates a cookie?

If there is not a way to do that, then should I forego the usage of 
Tomcat's session cookies and create my own cookies for session 
management?  Is there a better way?

--
John Gibson
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


reload TC5.0.19 x TC 4.124

2004-04-16 Thread Paulo Alvim
Hi!
I've just migrated to TC 5.0.19 and I had TC4 configured to reload my apps
based on web.xml changes...since this isn't the default in TC 5.0.19
anymore, anyone knows how to make this configuration?

Thanks in advance

Paulo Alvim


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Extending GenericPrincipal/RealmBase: Essentially a classloader question

2004-04-16 Thread Jeanfrancois Arcand


John H wrote:

Thanks for the replies.

I've tried some of the suggestions, and I guess I've hit a wall again.

From what I'm seeing, in order extend RealmBase/GenericPrincipal, your class
MUST exist in server/lib (given the default configuration). I see no other
way, unless I'm missing something. RealmBase is in catalina.jar, which is in
server/lib and is in the catalina classloader. In order for a class to
extend this, it too must be in the catalina classloader.
I tried this modification to catalina.properties:

common.loader=${catalina.base}/common/classes,${catalina.base}/common/endors
ed/*.jar,
${catalina.base}/common/lib/*.jar,${catalina.base}/server/classes,${catalina
.base}/server/lib/*.jar
(note my extension classes are in bbarealm.jar, which is in server/lib)

Withouth making any more changes (other than moving tomcat's jar's back to
their original locations), this worked. This seems exactly like moving all
the files from server/lib (including my bbarealm.jar) to common/lib, though.
Then I tried this: I moved my bbarealm.jar to shared/lib (making it visible
to the apps), changed the common loader back to it's original form, and
added
${catalina.home}/shared/lib/bbarealm.jar to the sever.loader line. This
results in a NCDF for org.apache.catalina.realm.RealmBase
 

StrangeLet me investigate :-)

Have you tried the privileged attribute in context.xml instead? I'm 
confident it will work for what you are trying to do.

*pulls hair* I'm not sure how catalina.policies is going to help me. This
isn't an priviledges issue. It's a classloader issue. The only classloader
that seems to allow me to extend RealmBase/GenericPrincipal is the catalina
classloader, and can't see a way to add a class to this classloader (other
than sticking it in server/lib, which makes it invisible to my apps!). There
is no 'catalina.loader' line in catalina.properties.
 

Yes, but if all the web app you are deploying needs to have the 
privileged attribute, then you might want to turn on the SecurityManager.

-- Jeanfrancois

*sigh* Any thoughts?

- Original Message - 
From: Jeanfrancois Arcand [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 2:55 PM
Subject: Re: Extending GenericPrincipal/RealmBase: Essentially a classloader
question

 

John H wrote:

   

HI all,

He have implemented our own realm and principal buy extending
 

org.apache.catalina.realm.RealmBase and GenericPrincipal.
 

(Using TC5.0.19 on Solaris and Windows. Realm defined in Context.)

By doing this, however, we've got ourselves into sort of a catch 22 in
 

terms of classloading. Hopefully someone can offer some assistance.
 

I've referenced the Class Loader HOW-TO at
 

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html, so
I'll use it's terminology.
 

RealmBase and GenericPrincipal are located in catalina.jar, which resides
 

physically in server/lib. The howo defines this jar as in the Catalina class
loader. The definition says that the Catalina classes are totally invisible
to web applications, which seems true enough. In order to extend these, I
must locate my jar in server/lib. So far so good.
 

The problem is that I need to use my extension of GenericPrincipal within
 

my webapps.
 

I tried moving my jar to common/lib, since, according to the parent tree
 

in the howto, it is visible to both the Catalina branch and the webapp
branch. Doing this causes a NoClassDefFoundError for GenericPrincipal.
Apparently since the Catalina classloader is below the common classloader,
it can't find GenericPrincipal.
 

The only solution that appears to work is moving the entire contents of
 

server/lib to common/lib, essentially 'promoting' all of the classes
normally in the Catalina class loader to the common class loader.
 

Is this the best solution? It seems to me that I should be able to extend
 

RealmBase/GenericPrincipal without having to move jars around.
 

Any ideas?

 

One way will be to define, in your context.xml, the attribute
privileged=true. This will give the web app access to all the
server/lib classes (but that's not secure since your web app can play
with the catalina internal).
If you can turn the SecurityManager on, then  what you can do after is
turning it on (this will protected all catalina classes from package
definition/insertionsee catalina.properties for the list of
protection), you can then add your web app codebase in the
catalina.policy so only your web app will be able to use the catalina.jar.
I don't see any other way to achieve what you want to do.

-- Jeanfrancois

   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: shared/lib again...

2004-04-16 Thread Julio César Aguilar
I've done several tests in Windows and this is what I found.
To remember my settings
No CATALINA_BASE defined. Tests done with CATALINA_HOME/shared/lib.

1. As being told, I can find jars put in CATALINA_HOME/common/lib.

2.
   What exactly the moment when CNFE is thrown? You said that the 
applications is not even start due to CNFE, so that classes are needed 
during deployment or while normal application functioning?
The original problem was with a Filter, which was started at deployment.

If I place the jar that contains the Filter class in WEB-INF/lib then the
application starts, but looking for classes needed after deployment (during a
normal run) I can't find them if the corresponding jars are in shared/lib.
3. Something I had not mentioned about my application (I did not thought it was 
relevant) is that it lives outside the CATALINA_HOME directory, is referred to 
by a context.xml file in CATALINA_HOME/conf/Catalina/localhost.

Using a test application in CATALINA_HOME/webapps and compiling the 
IsThereThisClass servlet provided by Veniamin I can finally find the classes 
within shared/lib.

So, could this be the cause of my problem?

---
Julio César Aguilar Cabrera
[EMAIL PROTECTED]
Proyecto SIGC3, LANIA








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ServerLifecycleListener and SHUTDOWN

2004-04-16 Thread Ken McCloskey
I know that you can add a ServerLifecycleListener under Server in 
conf/server.xml to receive notifications for the major server lifecycle 
events, one of which is shutdown.

However, because of the way classloaders work in Tomcat, there is no way 
(that I know of) to call from the ServerLifecycleListener into application 
code to do resource cleanup.

In my particular scenario, I'm attempting to use JOTM to gain JTA 
functionality in Tomcat. However, if I use JOTM, I'm not able to cleanly 
shutdown Tomcat, since I can not call the JOTM stop method to shut down the 
transaction manager.

Any thoughts or help either in regard to usefully using the shutdown event 
or w/ a Tomcat/JTA solution?

Ken

_
Watch LIVE baseball games on your computer with MLB.TV, included with MSN 
Premium! 
http://join.msn.com/?page=features/mlbpgmarket=en-us/go/onm00200439ave/direct/01/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Classpath problems with tomcat on Linux 9

2004-04-16 Thread Andy Wadsworth

I'm just getting started with my JSP and tomcat experience, and while 
learning how JSP works, I'm can't get tomcat to recognize supporting
class definitions that I have placed in myapp/WEB-INF/classes.

Here's my setup:
* tomcat 5.0.19, running on RedHat Linux 9.0 Pro
* no customization to $CATALINA_HOME/conf/web.xml
  no customization to $CATALINA_HOME/conf/server.xml
  added my user account as a manager in $CATALINA_HOME/conf/tomcat-users.xml
* I'm running tomcat using the $CATALINA_HOME/bin/startup.sh
* I'm running tomcat as my normal login id, although I've also tried it as
  root just to make sure it wasn't a file permissions issue.
* I'm able to use the Tomcat manager at http://localhost:8080/manager to
  start/stop/reload/deploy applications
* The jsp-examples appear to work fine

Here's what I'm trying to do:
* Created the following index.jsp and placed it in
  $CATALINA_HOME/webapps/test

htmlbody
form method=post action =savename.jsp
What's your name?  input type=text name=username size=20
What's your email? input type=text name=email size=20
Pinput type=submit
/form/body/html

* Created the following as $CATALINA_HOME/webapps/test/savename.jsp
jsp:useBean id=user class=UserData scope=session/
jsp:setProperty name=user property=*/
htmlbody
Name: %= user.getUsername() %BR
Email: %= user.getEmail() %BR
/body/html

* Created a UserData.java file that defines a public class UserData
  with username and email fields as type String. Added public
  access methods for setUsername, getUsername, setEmail, getEmail.
  I compiled UserData.java using javac, and to produce UserData.class
  which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The
  UserData.java class does not define a package nor does it import
  anything (line 1 is public class UserData)

* deployed the test application using the tomcat manager and it shows
  that the application is deployed with no errors.

* Using IE 6.0, I enter the url to test.jsp and it displays the form as
  expected. I enter a name and email value into the form and press the
  submit button and I get the following:
 HTTP Status 500 -
 exception
 org.apache.jasper.JasperException: Unable to compile class for JSP
 An error occurred at line: 1 in jsp file: /savename.jsp

 Generated sevlet error:
[javac] Compiling 1 source file
.../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42
symbol : class UserData
location: class org.apache.jsp.savename_jsp
UserDAta user = null


I suspect this is a classpath issue but everything I read says that if you
put your classes in appdir/WEB-INF/classes, it will just work. 

There must be some basic thing I'm missing. Any help would be very much
apprciated.

Thanks in advance.
-Andy.

-- 
###
# Andy Wadsworth  #
# #
# BondMart Technologies, Inc. #
# [EMAIL PROTECTED]  #
# #
###





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JSP expression with null value

2004-04-16 Thread Rick Wong
Hi,

Should a JSP expression evaluate a null expression as a string 'null', 
or as an empty string ''?

In other words, should '%=null%' be evaluated to 'null' or ''?

Thanks,
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Classpath problems with tomcat on Linux 9

2004-04-16 Thread Caldarale, Charles R
 From: Andy Wadsworth [mailto:[EMAIL PROTECTED]
 Subject: Classpath problems with tomcat on Linux 9
 
 .../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42
   symbol : class UserData
 location: class org.apache.jsp.savename_jsp
 UserDAta user = null
   ^
   |

Seems awfully suspicious to have a capital A in the middle of the class name...

Are you sure the .jsp doesn't have a typo in it?

 - Chuck

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Request Filter Valve

2004-04-16 Thread Chirayu Shah
I am trying to set request filter at host level programatticaly for
Embedded Tomcat. It doesn't seem like working.
Anyone can poing out what i am supposed to do. Here, is the Code Snippet
that i am using:
host = embedded.createHost(localhost, getPath()

+ /webapps);

RemoteAddrValve filter = new RemoteAddrValve();

filter.setContainer(host);

filter.setDeny(10.45.10.55);

 
Chirayu Shah
 
 


Re: Migrating from Tomcat404 to Tomcat5019. Problem with Filter

2004-04-16 Thread Alex Moots
Thank you to both Antonio and Yoav for your suggestions.

I tried implementing a flush() method.  It is only called once toward 
the end of the 3KB of data that are transmitted.  close() is never 
called.  That seems kinda odd, but maybe it is normal?

Yoav, could you suggest where I could look for more information on the 
underlying stream processor implementation changes?  Also, it 
shouldn't matter if the underlying implementation changes, if I write to 
the API (which I believe I am) then the underlying implementation should 
be changeable (I know, famous last words).  Do you by any chance have 
any alternative suggestions for what I'm trying to do?  That is, I'm 
trying to capture the exact output of a servlet request (.jsps in my 
case) so that I can do other processing on it (for example, save it to a 
file).

Thanks for you help
Alex.
Shapira, Yoav wrote:

Hi,
But I think the guesses are on the right path: it's definitely an IO problem.  I don't 
like an approach that's subject to breaking if the underlying stream processor 
implementation changes (as it did from tomcat 4 to 5).  Your 10KB/3KB approach 
suggests a buffering or chunking issue.  I have to run to a meeting though ;)
Yoav Shapira
Millennium Research Informatics
 

-Original Message-
From: Antonio Fiol Bonnín [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 2:22 AM
To: Tomcat Users List
Subject: Re: Migrating from Tomcat404 to Tomcat5019. Problem with Filter
Two things I would double-check:

a) The approach of creating a PrintWriter at constructor time. Is that
the right way of doing that?
b) Think of implementing flush and/or close for your ServletOutputStream.
HTH (but these are mostly wild guesses)

Antonio Fiol

Alex Moots wrote:

   

I've been using a custom made servlet filter developed for Tomcat404.
It has worked perfectly for a long time.
The basic idea of the filter is that it acts as a wrapper around the
response filter capturing the response output so that the output can
be sent to a second destination (ie an email message body or something
similar).  We call this a Double Output Stream filter.  The code for
this filter is quite simple and I've attached a simplified version of
it below.  The whole thing is less than 70 lines of code.
The problem is that this filter doesn't work properly in Tomcat5019.
I don't get an exception during processing.  The problem is that the
respByte [] (which should contain the array of bytes sent to the
browser) is not populated, or is only partially populated.  And when
this filter is invoked only a partial page is sent to the browser.
For example, if my page is 10KB long only 3KB will be sent to the
browser, and similarly only 3KB will be present in the respByte
array.  It seems like what is happening is that Tomcat5019 is
short-circuiting the execution of the page for some reason.  I don't
know why.  The code worked fine in tomcat404 and I didn't change
anything during the upgrade to tomcat5019.
Can anyone give an idea of what is going wrong here?  I did some
searching to see if the servlet filter API changed between tomcat404
and 5019, but I didn't find anything to suggest that things have
changed significantly.
Thanks for your help.
Alex.
**CODE***

public class SaveAsHTMLFilter implements Filter {
  public void doFilter(ServletRequest request, ServletResponse
response, FilterChain chain) throws IOException, ServletException {
  //Re the real response in a DoubleResponseWrapper which
encloses the
  //real OutputStream, plus a ByteArrayOutputStream, into a
DoubleOutputStream
  DoubleResponseWrapper respWrap = new
DoubleResponseWrapper((HttpServletResponse) response);
  //Process the request to generate the output into the
respWrap's DoubleOutputStream
  chain.doFilter(request, respWrap);
  //retrieve the ByteArray
  byte respByte[] = respWrap.getRespByte();
  // [SNIP]
  // Send the respByte array (which is the response that was sent
to the browser) to an email message or something similar
  // [SNIP]
  }
}
***
public class DoubleResponseWrapper extends HttpServletResponseWrapper {
DoubleOutputStream dblOS;
PrintWriter pw;
public DoubleResponseWrapper(HttpServletResponse resp) throws
IOException {
  super(resp);
  ServletOutputStream servOutp  = resp.getOutputStream();
  ByteArrayOutputStream   byteArray = new ByteArrayOutputStream(32000);
  dblOS = new DoubleOutputStream(servOutp, byteArray);
  pw = new PrintWriter(dblOS);
}
public ServletOutputStream getOutputStream () throws IOException {
  return dblOS;
}
public PrintWriter getWriter() throws IOException {
  return pw;
}
public byte getRespByte()[] {
  return dblOS.getRespByte();
}
}
***
public class DoubleOutputStream extends ServletOutputStream {
private ServletOutputStream ServOutp;
private ByteArrayOutputStream ByteOutp;
public DoubleOutputStream(ServletOutputStream sos,
ByteArrayOutputStream bos) {
  ServOutp = sos;
  ByteOutp = bos;
}
public void write(int 

Re: auto generation of mod_jk.conf in tomcat 5

2004-04-16 Thread Emerson Cargnin
isn't missing the include to the mod_conf.xml

Yang Xiao wrote:
Hi,
In httpd.conf:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
JkLogFile /usr/local/tomcat/logs/mod_jk.log
JkLogLevel info
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /jsp-examples/* router
In server.xml
Add this under Server ...
Listener className=org.apache.jk.config.ApacheConfig
modJk=/usr/local/apache/modules/mod_jk.so /
and this under Host..

Listener className=org.apache.jk.config.ApacheConfig
append=true forwardAll=false modJk=/usr/local/apache/modules/mod_jk.so
workersConfig=/usr/local/tomcat/conf/workers.properties /
That's all there is to it.

Yang
-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 15, 2004 12:35 PM
To: Tomcat Users List
Subject: auto generation of mod_jk.conf in tomcat 5

When we used tomcat 3.2.3, I configured it to autogenerate the 
mod_jk.conf to be read by apache/mod_jk. In tomcat 5 I still can use 
it??? I like it becouse each time a app is deployed I just have to make 
apache re-read it's conf file to get the new map to work.

how do I configure tomcat 5 to auto-generate it???




--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Classpath problems with tomcat on Linux 9

2004-04-16 Thread Andy Wadsworth

Ah, if it was only that simple...
The capital A is a typo in the email message, not in the actual
error. I'm using IE on a WinXP box as my browser, but I sent my
email from my Linux machine and I can't copy/paste between the two.
-Andy.

On Friday 16 April 2004 03:32 pm, Caldarale, Charles R wrote:
  From: Andy Wadsworth [mailto:[EMAIL PROTECTED]
  Subject: Classpath problems with tomcat on Linux 9
 
  .../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42
  symbol : class UserData
  location: class org.apache.jsp.savename_jsp
  UserDAta user = null

^


 Seems awfully suspicious to have a capital A in the middle of the class
 name...

 Are you sure the .jsp doesn't have a typo in it?

  - Chuck

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- 
###
# Andy Wadsworth  #
# #
# BondMart Technologies, Inc. #
# [EMAIL PROTECTED]  #
# #
###
How To Make Love Endure...
Don't forget your wife's name ...
That will mess up the love.
Erin, age 8



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Handling SOAP faults

2004-04-16 Thread Bill Harrelson
Thanks for the interest and reply Yan, but you make assumptions 
that are incorrect:

 Ok, I think what happened here is: the response message is *overwritten*
 since you already defined a custom error-page in your deployment descriptor.

No, the response message is sent back as the error response 
message, _not_ as the errorStream.  I checked this (as this being 
the simplest approach) _before_ implementing the custom error-
page in the deployment descriptor.

Putting an error message into the sendError(error-code, message) 
call does not return an errorStream.  What gets returned in the 
errorStream in that case is the default html error page.

I'm still looking for a way to write to the errorStream directly.

Bill

 PS. SOAP is a really good idea.   
I'm not sure why you say this, but ok.  SOAP has been a reality in 
the world I work in for a couple of years now, but it's only recently 
that people have actually started generating and expecting 
SOAPfaults.

 
 -Original Message-
 From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
 Sent: April 16, 2004 11:59
 To: Tomcat Users List
 Subject: RE: Handling SOAP faults
 
 
 What the SOAP spec says is that a SOAPfault XML document 
 needs to be returned in the errorStream and a response code of 
 500 returned.
 
 Sending a response 500 is easy, including a response message is 
 also easy.  But, what is included in the response message is not 
 written to the errorStream.  Tomcat seems to write whatever is 
 generated by the error-page directive in the deployment descriptor 
 to the error-stream, so I have currently solved the problem by 
 passing the SOAPfault document through the session variable to 
 the designated jsp listed in the error-page directive.
 
 It just seems that this is a hackery way to do it, and my servlet 
 should be able to write directly to the errorStream of the response, I 
 just can't see how.
 
 Any assistance is appreciated.
 
 Thanks,
 
 Bill
 
 
 Send reply to:  Tomcat Users List [EMAIL PROTECTED]
 From:   Yansheng Lin [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Subject:RE: Handling SOAP faults
 Date sent:  Fri, 16 Apr 2004 11:21:06 -0600
 
  How about setting the fault on the response?  With 500 as status.  Or is
  that what you asked for?
  
  -Yan
  
  -Original Message-
  From: Bill Harrelson [mailto:[EMAIL PROTECTED] 
  Sent: April 15, 2004 19:04
  To: Tomcat Users List
  Subject: Handling SOAP faults
  
  
  Hello,
  
  I'm using Tomcat 4.2.14, JDK 1.4.1, and I need to be able to return 
  a SOAP fault document with a response code of 500.  The only 
  way I've found to do this seems a bit of a hack, and I was 
  wondering if there was a better way.
  
  Currently I'm passing the SOAP fault document in the session 
  variable which gets picked up by the error-page handler (a jsp) 
  when I issue the sendError(500).  This results in the SOAPfault 
  message appearing in the error-stream on the client as it should, it 
  just seems as though I ought to be able to write to the error-stream 
  directly, but I can't find how  in the doc, or googling.
  
  Can anyone assist?
  
  Thanks,
  
  Bill
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5, cross context problem

2004-04-16 Thread Norris Shelton
I have also had problems getting crossContext to work with
5.0.19.  No one ever gave an answer.

Good Luck.

--- Rainald Suchan [EMAIL PROTECTED] wrote:
 Hi,
 
 I have 2 web applications, a JSP and a Servlet, that are in
 differed
 contexts. For both I have set cross context to true. In the
 JSP I put
 some attributes in the session and use a RequestDispatcher and
 call the
 include() function to pass the request to the servlet. In the
 servlet I
 get these attributes out of the session and put some other
 attributes in
 the session. After returning to the JSP I get these new
 attributes again
 out of the session. This all works ok with Tomcat 4. But now I
 tried
 this with Tomcat 5.0.16 and the session passed between the two
 webapps
 don't have the attributes in it any more in the other context.
 That
 means If I put an attribute in the JSP in the session and get
 this
 session back in the Servlet then this session doesn't contain
 my
 attribute any more.
 Is that a known issue with Tomcat 5?
 Does anybody have a solution for this problem?
 
 Regards
 
 Rainald
 


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton





__
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Pager Tag Library v2.0 usage w/Tomcat 5

2004-04-16 Thread Tom K
I have pagination working with Tomcat 5 through a bean. I like the
flexible features that Pager Tag Library v2.0 has and would like to
implement it in my jsp. I know I have everything configured correctly
because I can get the paging to display but not more to the next or
previous page.
 
Does anyone have an example code I can see. I just dont understand the
examples well enough on their web site HYPERLINK
http://jsptags.com/tags/navigation/pager/index.jsphttp://jsptags.com/t
ags/navigation/pager/index.jsp
 
 
 
 
TIA
 
Tom K.
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 


RE: Classpath problems with tomcat on Linux 9

2004-04-16 Thread Berry, Layton
I'm guessing you need to put the UserData class in a package,
and import it into your savename page.

Quoting from JSP 2.0 spec, As of JSP 2.0, it is illegal
to refer to any classes from the unnamed (a.k.a. default) package.

-Layton

-Original Message-
From: Andy Wadsworth [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 2:26 PM
To: [EMAIL PROTECTED]
Subject: Classpath problems with tomcat on Linux 9



I'm just getting started with my JSP and tomcat experience, and while 
learning how JSP works, I'm can't get tomcat to recognize supporting
class definitions that I have placed in myapp/WEB-INF/classes.

Here's my setup:
* tomcat 5.0.19, running on RedHat Linux 9.0 Pro
* no customization to $CATALINA_HOME/conf/web.xml
  no customization to $CATALINA_HOME/conf/server.xml
  added my user account as a manager in 
$CATALINA_HOME/conf/tomcat-users.xml
* I'm running tomcat using the $CATALINA_HOME/bin/startup.sh
* I'm running tomcat as my normal login id, although I've also 
tried it as
  root just to make sure it wasn't a file permissions issue.
* I'm able to use the Tomcat manager at 
http://localhost:8080/manager to
  start/stop/reload/deploy applications
* The jsp-examples appear to work fine

Here's what I'm trying to do:
* Created the following index.jsp and placed it in
  $CATALINA_HOME/webapps/test

htmlbody
form method=post action =savename.jsp
What's your name?  input type=text name=username size=20
What's your email? input type=text name=email size=20
Pinput type=submit
/form/body/html

* Created the following as $CATALINA_HOME/webapps/test/savename.jsp
jsp:useBean id=user class=UserData scope=session/
jsp:setProperty name=user property=*/
htmlbody
Name: %= user.getUsername() %BR
Email: %= user.getEmail() %BR
/body/html

* Created a UserData.java file that defines a public class UserData
  with username and email fields as type String. Added public
  access methods for setUsername, getUsername, setEmail, getEmail.
  I compiled UserData.java using javac, and to produce UserData.class
  which I placed in $CATALINA_HOME/webapps/test/WEB-INF/classes. The
  UserData.java class does not define a package nor does it import
  anything (line 1 is public class UserData)

* deployed the test application using the tomcat manager and it shows
  that the application is deployed with no errors.

* Using IE 6.0, I enter the url to test.jsp and it displays the form as
  expected. I enter a name and email value into the form and press the
  submit button and I get the following:
 HTTP Status 500 -
 exception
 org.apache.jasper.JasperException: Unable to compile class for JSP
 An error occurred at line: 1 in jsp file: /savename.jsp

 Generated sevlet error:
[javac] Compiling 1 source file

.../work/Catalina/localhost/test/org/apache/jsp/savename_jsp.java:42
   symbol : class UserData
location: class org.apache.jsp.savename_jsp
UserDAta user = null


I suspect this is a classpath issue but everything I read says 
that if you
put your classes in appdir/WEB-INF/classes, it will just work. 

There must be some basic thing I'm missing. Any help would be very much
apprciated.

Thanks in advance.
-Andy.

-- 
###
# Andy Wadsworth  #
# #
# BondMart Technologies, Inc. #
# [EMAIL PROTECTED]  #
# #
###





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



configure data source

2004-04-16 Thread Niraj Alok

 Hi All,


 I am trying to obtain a connection using DataSource
 in Tomcat5 .

 I get the following error :

 org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
 class '' for connect URL 'null', cause:

 java.sql.SQLException: No suitable driver



 My source code is :

 Context ctx = new InitialContext();

 if (ctx == null)

 throw new Exception(No context got! Exception);

 System.out.println(got ctx);

 DataSource ds =

 (DataSource) ctx.lookup(java:comp/env/jdbc/hypersonic);


 if(ds == null)

 throw new Exception(No ds got! Exception);

 else

 {

 System.out.println(got ds);

 Connection con = ds.getConnection();

 if(con != null)

  
  ...
 }


 My server.xml looks like :

GlobalNamingResources

Environment name=simpleValue type=java.lang.Integer value=30/

Resource auth=Container description=User database that can be updated
and saved name=UserDatabase type=org.apache.catalina.UserDatabase/

Resource name=hypersonic type=javax.sql.DataSource/

ResourceParams name=UserDatabase

parameter

namefactory/name

valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value

/parameter

parameter

namepathname/name

valueconf/tomcat-users.xml/value

/parameter

/ResourceParams

ResourceParams name=hypersonic

parameter

namemaxWait/name

value5000/value

/parameter

parameter

namemaxActive/name

value20/value

/parameter

parameter

namepassword/name

value/value

/parameter

parameter

nameurl/name

valuejdbc:hsqldb:hsql://localhost:1701/value

/parameter

parameter

namedriverClassName/name

valueorg.hsqldb.jdbcDriver/value

/parameter

parameter

namemaxIdle/name

value2/value

/parameter

parameter

nameusername/name

valuesa/value

/parameter

/ResourceParams

/GlobalNamingResources



   My web.xml contains:



   resource-ref

   descriptionDB Connection/description

   res-ref-namejdbc/hypersonic/res-ref-name

   res-typejavax.sql.DataSource/res-type

   res-authContainer/res-auth

   /resource-ref



   Even if i comment this entry in web.xml the error is still the same.



   Can any one please tell me what am I doing wrong??

   Regards,
   Niraj




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Simple Hello World JSF... NO GO

2004-04-16 Thread Mike Sowka
Hey Folks,

I had used Tomcat5 for some simple JSP school projects, and now that I'm
evaluating Websphere Studio (for it's swell drag and drop features,
can't believe how easy it is!) I've run into a stump... and I refuse to
even consider using anything but Tomcat for serving purposes.

My Hello World JSF has NOTHING but a JSF template + a simple Hello
World paragraph in it... this worked great when serving in the
Websphere 5.1 Test Server, but as the Websphere 5.1.1 claims Tomcat4.1
is a supported server an this should work just as well. App fails to
deploy with:

Caused by: org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log

full log file attached...

Any suggestions are MUCH appreciated,
Mike
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploying class repositories to work 
directory /home/msowka/bin/tomcat4/work/Standalone/localhost/EChair
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy class files /WEB-INF/classes to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/classes
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR 
/WEB-INF/lib/commons-beanutils.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/commons-beanutils.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR 
/WEB-INF/lib/commons-collections.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/commons-collections.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR 
/WEB-INF/lib/commons-digester.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/commons-digester.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR 
/WEB-INF/lib/commons-fileupload-1.0.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/commons-fileupload-1.0.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/commons-logging.jar 
to /home/msowka/Projects/EChair/WebContent/WEB-INF/lib/commons-logging.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/dbbeans.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/dbbeans.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/i18n.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/i18n.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/jaxen-full.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/jaxen-full.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/jsf-api.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/jsf-api.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/jsf-ibm.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/jsf-ibm.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/jsf-ri.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/jsf-ri.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/jspsql.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/jspsql.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/jstl.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/jstl.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/jstl_el.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/jstl_el.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/mozutil.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/mozutil.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/saxpath.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/saxpath.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/standard.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/standard.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR 
/WEB-INF/lib/taglibs-application.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/taglibs-application.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR 
/WEB-INF/lib/taglibs-datetime.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/taglibs-datetime.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/taglibs-mailer.jar 
to /home/msowka/Projects/EChair/WebContent/WEB-INF/lib/taglibs-mailer.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/taglibs-page.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/taglibs-page.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/taglibs-request.jar 
to /home/msowka/Projects/EChair/WebContent/WEB-INF/lib/taglibs-request.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR 
/WEB-INF/lib/taglibs-response.jar to 
/home/msowka/Projects/EChair/WebContent/WEB-INF/lib/taglibs-response.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/taglibs-session.jar 
to /home/msowka/Projects/EChair/WebContent/WEB-INF/lib/taglibs-session.jar
2004-04-17 00:20:17 WebappLoader[/EChair]: Deploy JAR /WEB-INF/lib/taglibs-string.jar 
to /home/msowka/Projects/EChair/WebContent/WEB-INF/lib/taglibs-string.jar
2004-04-17 

File transfer very slow, my java httpd server much faster????

2004-04-16 Thread Kris Rasmussen
When transfering files over my lan via tomcat I get
very slow transfer speeds (20KB/s) where as when I use
a mini httpd server I wrote in java with the ability
to install custom extensions, I can transfer at
440KB/s, why is tomcat transfering so slowly

Kris




__
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: configure data source

2004-04-16 Thread twcTC
I have the same problem

-Original Message-
From: Niraj Alok [EMAIL PROTECTED]
Sent: Apr 16, 2004 8:04 PM
To: Tomcat Users List [EMAIL PROTECTED]
Subject: configure data source


 Hi All,


 I am trying to obtain a connection using DataSource
 in Tomcat5 .

 I get the following error :

 org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
 class '' for connect URL 'null', cause:

 java.sql.SQLException: No suitable driver



 My source code is :

 Context ctx = new InitialContext();

 if (ctx == null)

 throw new Exception(No context got! Exception);

 System.out.println(got ctx);

 DataSource ds =

 (DataSource) ctx.lookup(java:comp/env/jdbc/hypersonic);


 if(ds == null)

 throw new Exception(No ds got! Exception);

 else

 {

 System.out.println(got ds);

 Connection con = ds.getConnection();

 if(con != null)

  
  ...
 }


 My server.xml looks like :

GlobalNamingResources

Environment name=simpleValue type=java.lang.Integer value=30/

Resource auth=Container description=User database that can be updated
and saved name=UserDatabase type=org.apache.catalina.UserDatabase/

Resource name=hypersonic type=javax.sql.DataSource/

ResourceParams name=UserDatabase

parameter

namefactory/name

valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value

/parameter

parameter

namepathname/name

valueconf/tomcat-users.xml/value

/parameter

/ResourceParams

ResourceParams name=hypersonic

parameter

namemaxWait/name

value5000/value

/parameter

parameter

namemaxActive/name

value20/value

/parameter

parameter

namepassword/name

value/value

/parameter

parameter

nameurl/name

valuejdbc:hsqldb:hsql://localhost:1701/value

/parameter

parameter

namedriverClassName/name

valueorg.hsqldb.jdbcDriver/value

/parameter

parameter

namemaxIdle/name

value2/value

/parameter

parameter

nameusername/name

valuesa/value

/parameter

/ResourceParams

/GlobalNamingResources



   My web.xml contains:



   resource-ref

   descriptionDB Connection/description

   res-ref-namejdbc/hypersonic/res-ref-name

   res-typejavax.sql.DataSource/res-type

   res-authContainer/res-auth

   /resource-ref



   Even if i comment this entry in web.xml the error is still the same.



   Can any one please tell me what am I doing wrong??

   Regards,
   Niraj




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]