RE: Application Data sharing -- store large object?

2005-04-11 Thread Stefan Frank
You should maybe take a look into the various caching-libraries available
(ehcache, swarmcache, jboss-treecache etc.) - these libraries deal with
cacheing, which is a little different from what the
application/session-objects offer, as application and session have to be
absolutely reliable. If you store something in it, you can safely expect to
find it again. Therefore, this objects cannot deal with things like running
out of memory - they cannot simply throw out objects, when things get too
crowded. 

On the other hand, Cacheing-Systems always have policies to deal with such
situations(eg. Swarm-cache dynamically adapts to your usage-patterns) and
can throw out old or un-needed objects, whenever it gets too crowded -
therefore, you cannot always expect an object that you put into the cache to
be still present after a while - so you have to deal with refetching it,
when you have nop cache-hit. You may want to look into O\R-Mapping
Frameworks  like hibernate: they already have these caches built in and take
care of re-fetching objects, when they have expired from the cache.

From a pure memory point of view, there is no difference. If you absolutely
need your complex object 100% of the time, it makes no difference, if you
keep it in the application or if you put it in an in-memory cache. 

Hope this helps
stf   

 -Original Message-
 From: Daxin Zuo [mailto:[EMAIL PROTECTED] 
 Sent: Sonntag, 10. April 2005 19:23
 To: Tomcat Users List
 Subject: Application Data sharing -- store large object?
 
 In my program, an object that contains a large amount of data 
 (complicated data strustures) is used in many pages. When I 
 start doing it, I heard that it is better to not store large 
 object in Application. So I let the program create a new one 
 when ever this object is needed. Now I like to question if it 
 is good to put this object in 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]



Non-obsolete way of running Tomcat as a Windows Service?

2005-04-11 Thread Jon Skeet
The documentation for tomcat5.exe and tomcat5w.exe in 5.5 starts with:

quote
NOTICE

This section of the documentation applies to procrun 1.0, and is now
obsolete.
/quote

Now, it seems to work perfectly well, but I'm always wary about running
things which are claimed to be obsolete. Is there a preferred way of
running Tomcat as a Wndows service? The Windows installer isn't a good
option for us (as far as I can tell), as we need a customised version of
Tomcat to be installed as part of another installation process.

Jon Skeet


Clearswift monitors, controls and protects all its messaging traffic in 
compliance with its corporate email policy using Clearswift products.
Find out more about Clearswift, its solutions and services at 
http://www.clearswift.com

This communication is confidential and may contain privileged information 
intended solely for the named addressee(s). It may not be used or disclosed 
except for the purpose for which it has been sent. If you are not the intended 
recipient, you must not copy, distribute or take any action in reliance on it. 
Unless expressly stated, opinions in this message are those of the individual 
sender and not of Clearswift. If you have received this communication in error, 
please notify Clearswift by emailing [EMAIL PROTECTED] quoting the sender and 
delete the message and any attached documents. Clearswift accepts no liability 
or responsibility for any onward transmission or use of emails and attachments 
having left the Clearswift domain.

This footnote confirms that this email message has been swept by MIMEsweeper 
for Content Security threats, including computer viruses.

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



RE: about Jakarta Slide commercial use

2005-04-11 Thread Peter Crowther
 From: Yu Jie [mailto:[EMAIL PROTECTED] 
 Though we know that Jakarta Slide
 is under the Apache License 2.0 , we are still not
 quite sure what to do with the situation of commercial
 use. 

DISCLAIMER: The following is personal opinion.  I am not a lawyer.  You
should not rely on this advice.  If you are concerned about the
implications of a license, you should consult your lawyers before taking
any further action.

That said...

Nothing in the Apache License 2.0 stops you from selling software
distributed under that license.  You can charge whatever you want for
your software.  You do not need to distribute the source code of any
software - yours or the software under the Apache license.  However, you
do have to keep to the terms in section 4 of the license.  You do not
need to contribute your code as Open Source.  You do not need to pay
anyone in order to use the software (although donations to the Apache
Foundation or to individual coders are always very welcome).

The Apache license is, deliberately, a very free license.

- Peter

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



Webdav issue with non ASCII characters

2005-04-11 Thread Fernando Salazar de Paz
I can PUT archives but I am not be able to read them anymore.

 

For example:

 

Archive:manualín.pdf

 

In WebdavServlet::service

 

protected void service(HttpServletRequest req, HttpServletResponse resp)

throws ServletException, IOException {

 

String method = req.getMethod();

 

if (debug  0) {

(1)log([ + req.getRequestURI() + ]);

String path = getRelativePath(req);

(3)  log([ + method + ]  + path);

}

 

The output:

 

INFO: webdav: [/webdav/manual%C3%ADn.pdf]  (1)

 

DefaultServlet::getRelativePath   request.getPathInfo() (2)

INFO: webdav: DefaultServlet::getRelativePath.
request.getPathInfo()=/manualín.pdf

 

INFO: webdav: [HEAD] /manualín.pdf  (3)

 

 

In NTFS Tomcat has written manualín.pdf instead of manualín.pdf

 

 

I have tried with DefaultServlet’s languageEncoding init parameter using
UTF-8 with no result. 

 

 

Thanks in advance



HELP Tomcat CGI

2005-04-11 Thread Scholtyssek Siegfried
 Hello,
 
 I use the Apache Tomcat.5.0.16 on the SUNOS 5.8   UNIX
 
 With Tomcat we want execute cgi-scripts. So I modified all in web.xml
 and removed the file servlets-cgi.renametojar to servlets-cgi.jar
 If I start with Netscape the follow URL:
 http://localhost:8080/cgi-bin/test.pl   so I get the follow ERROR:
 
 Can't open perl Script ./test.pl No such file or direktory
 Use -S to search $PATH for it.   
 
 If I delete and make a follow link:
 
 rm /usr/bin/perl
 
 ln -s /usr/bin/ksh  /usr/bin/perlthen it is running.
 
 Whats wrong ??? What I have to do, that it is running with ln -s
 /usr/local/bin/perl  /usr/bin/perl 
 
 In the first line of the test.pl I have still #!/usr/local/bin/perl
 and I made chmod a+x test.pl and with command from xterm I can execute
 it with the full path from the errormessage Can't open perl Script
 .  !
 
 Please help me because I will be else crazy :-)
 
 Thanks and regards
 
 Siggi
 
 


RE: HELP Tomcat CGI

2005-04-11 Thread Raghupathy,Gurumoorthy
Why don't you run perl in apache and integrate it with tomcat ?
Tomcat should not be used with CGI ( security issues ) 

Guru

-Original Message-
From: Scholtyssek Siegfried [mailto:[EMAIL PROTECTED] 
Sent: 11 April 2005 09:29
To: tomcat-user@jakarta.apache.org
Subject: HELP Tomcat CGI
Importance: High


 Hello,
 
 I use the Apache Tomcat.5.0.16 on the SUNOS 5.8   UNIX
 
 With Tomcat we want execute cgi-scripts. So I modified all in web.xml
 and removed the file servlets-cgi.renametojar to servlets-cgi.jar
 If I start with Netscape the follow URL:
 http://localhost:8080/cgi-bin/test.pl   so I get the follow ERROR:
 
 Can't open perl Script ./test.pl No such file or direktory
 Use -S to search $PATH for it.   
 
 If I delete and make a follow link:
 
 rm /usr/bin/perl
 
 ln -s /usr/bin/ksh  /usr/bin/perlthen it is running.
 
 Whats wrong ??? What I have to do, that it is running with ln -s
 /usr/local/bin/perl  /usr/bin/perl 
 
 In the first line of the test.pl I have still #!/usr/local/bin/perl
 and I made chmod a+x test.pl and with command from xterm I can execute
 it with the full path from the errormessage Can't open perl Script
 .  !
 
 Please help me because I will be else crazy :-)
 
 Thanks and regards
 
 Siggi
 
 

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



problem with installing tomcat in linux

2005-04-11 Thread Shaik . ShabeenaImam
hi,
  I have a problem with installing tomcat in linux.
i am getting the following error

 The BASEDIR environment variable is not defined
 This environment variable is needed to run this program
can anybody help me out.
   thanx in advance,
 shabeena


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



RE: problem with installing tomcat in linux

2005-04-11 Thread Sir John Nueva
Did you set up CATALINA_HOME pointing to the tomcat folder?



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 6:30 PM
To: tomcat-user@jakarta.apache.org
Subject: problem with installing tomcat in linux


hi,
  I have a problem with installing tomcat in linux.
i am getting the following error

 The BASEDIR environment variable is not defined
 This environment variable is needed to run this program
can anybody help me out.
   thanx in advance,
 shabeena


-
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: problem with installing tomcat in linux

2005-04-11 Thread Cédric Buschini
hi,
if errors occur when you try to start the server you have to set 
variable such as $CATALINA_HOME and $JAVA_HOME. I've do it adding in 
/etc/profile
CATALINA_HOME=/path/to/bin
JAVA_HOME=/path/to/jdkXX
export CATALINA JAVA_HOME

and it works 
[EMAIL PROTECTED] wrote:
hi,
 I have a problem with installing tomcat in linux.
i am getting the following error
The BASEDIR environment variable is not defined
This environment variable is needed to run this program
can anybody help me out.
  thanx in advance,
shabeena
-
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: still not clear with connection pooling in tomcat

2005-04-11 Thread ajay kumar
Hi   
   I also struggled for the Tomcat Connection Pooling problem for
one week and i got the solution.

write the follwing code snippets in respective files:

-web.xml--
 resource-ref
   res-ref-namejdbc/TestDB/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
/resource-ref

--server.xml---
write the following code in server.xml in Context tag
Resource
name=jdbc/TestDB
auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/TestDB
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namedriverClassName/name
valuewriter the driver class which you are using/value
/parameter
parameter
nameurl/name
valuewrite the url here/value
/parameter
parameter
nameusername/name
value/value
/parameter
parameter
namepassword/name
value/value
/parameter
parameter
namemaxActive/name
value20/value
/parameter
parameter
namemaxIdle/name
value10/value
/parameter
parameter
namemaxWait/name
value-1/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
parameter
nameremoveAbandonedTimeout/name
value300/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter
/ResourceParams

and also add the following code in the file in which you are using
database code and import javax.naming.* and javax.sql.* packages..

 Context ctx=new InitialContext();
 DataSource ds=(DataSource)ctx.lookup(java:/comp/env/jdbc/TestDB);
 Connection con=ds.getConnection();  
 Statement st = con.createStatement(); 

Make sure that commons-dbcp,commons-collections and commons-pool files
in common/lib directory.
 I hope that this mail will help you in finding out the solution.

regards,

-Ajay Kumar

On Apr 10, 2005 1:20 AM, Krishnakant Mane [EMAIL PROTECTED] wrote:
 thanks a lot doug,
 if I have any problem I will trouble again.
 just a couple of questions.
 there were two parameters in the email you sent the
 other day.
 I did not get the meaning of those parameters stating
 that active connections should be 100 and the other
 with 30 as the value.
 what is the difference between max active and inactive
 connections?
 and just a curious question,
 is tomcat really used on heavy duty commertial
 websites?
 thanks
 Krishnakant.
 
 Send instant messages to your online friends http://uk.messenger.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Ajay

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



How to check whether session has expired or not

2005-04-11 Thread ajay kumar
Hi Friends
 
  I am developing e-commerce based web applications,I want to
check whether user session has expired, so that i will display Your
session has expired message to the user.So how to find out that
session expiry. This is very important as i am  doing e-commerce
apllications.
   
Regards
 --Ajay Kumar

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



Re: How to check whether session has expired or not

2005-04-11 Thread Trond G. Ziarkowski
Hi,
there was a long discussion on this topic a while ago. Search the 
archives for 'detect expired session'.

Trond
ajay kumar wrote:
Hi Friends
 I am developing e-commerce based web applications,I want to
check whether user session has expired, so that i will display Your
session has expired message to the user.So how to find out that
session expiry. This is very important as i am  doing e-commerce
apllications.
  
Regards
--Ajay Kumar

-
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]


Could not init service for worker

2005-04-11 Thread Spencer
Hi,
Goal: To have apache forward connections for a name based virtual host to  
a Tomcat instance. No load balancing is fine for now.

Current state: Both Apache and Tomcat work separatly. When I request a  
page that uses the connector I get a Internal Server Error (from  
Apache). I also get the following error messages in the JkLogFile:

  ..
  [debug] wc_get_worker_for_name::jk_worker.c (94): did not find a worker  
ajp13w
  [error] jk_handler::mod_jk.c (1813): Could not init service for  
worker=ajp13w

I get the same message when Tomcat is running as well as when it is _not_  
running.

Can someone point me to why the service for my worker could not be  
initialized?

Thanks,
Spencer


My setup: Linux, Apache 1.3, Tomcat 5.0.28, jk-1.2.10 (also tried jk-1.2.8)
 server.xml - Begin 

Connector port=8009 enableLookups=false redirectPort=8443 debug=2  
protocol=AJP/1.3 /

 server.xml - End 

 httpd.conf - Begin 
...
LoadModule jk_module /usr/lib/apache/1.3/mod_jk.so
...
NameVirtualHost 192.168.1.9
...
VirtualHost 192.168.1.9
ServerName www.foo.com
DocumentRoot /home/tomcat/jakarta-tomcat-5.0.28/webapps/ROOT
ServerAdmin [EMAIL PROTECTED]
# Log Set-Up
ErrorLog  /var/log/apache/www.foo.com-error_log
LogFormat %h %l %u %t \%r\ %s %b common
CustomLog /var/log/apache/www.foo.com-access.log common
JkLogFile /var/log/apache/mod_jk.log
JkLogLeveltrace
JkRequestLogFormat %w %U %r
JkMount /* ajp13w
#   JkWorkersFile /etc/httpd/conf/workers.properties
JkWorkerProperty worker.list=ajp13w
JkWorkerProperty worker.ajp13w.type=ajp13
JkWorkerProperty worker.ajp13w.host=192.168.1.9
JkWorkerProperty worker.ajp13w.port=8009
Location /WEB-INF
  Options None
  AllowOverride None
  order deny,allow
  deny from all
   /Location
   Directory /home/tomcat/jakarta-tomcat-5.0.28/webapps/ROOT
 Options None
 AllowOverride None
 order deny,allow
 allow from all
   /Directory
/VirtualHost
VirtualHost 192.168.1.9
  ServerAdmin [EMAIL PROTECTED]
  DocumentRoot /var/www/
  ErrorLog /var/log/apache/default-error.log
  CustomLog /var/log/apache/default-access.log common
/VirtualHost
 httpd.conf - End 
 jk2.properties - Start 
## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.
## COMMENTS WILL BE _LOST_
## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
# Set the desired handler list
# handler.list=apr,request,channelJni
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config  is working
# shm.file=${jkHome}/work/jk2.shm
# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:
# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# apr.jniModeSo=inprocess
 jk2.properties - End 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Could not init service for worker

2005-04-11 Thread Raghupathy,Gurumoorthy
Send me the httpd.conf worker.properties and server.xml 

Regards
Guru 

-Original Message-
From: Spencer [mailto:[EMAIL PROTECTED] 
Sent: 11 April 2005 12:02
To: tomcat-user@jakarta.apache.org
Subject: Could not init service for worker


Hi,

Goal: To have apache forward connections for a name based virtual host to  
a Tomcat instance. No load balancing is fine for now.

Current state: Both Apache and Tomcat work separatly. When I request a  
page that uses the connector I get a Internal Server Error (from  
Apache). I also get the following error messages in the JkLogFile:

   ..
   [debug] wc_get_worker_for_name::jk_worker.c (94): did not find a worker  
ajp13w
   [error] jk_handler::mod_jk.c (1813): Could not init service for  
worker=ajp13w

I get the same message when Tomcat is running as well as when it is _not_  
running.


Can someone point me to why the service for my worker could not be  
initialized?

Thanks,

Spencer





My setup: Linux, Apache 1.3, Tomcat 5.0.28, jk-1.2.10 (also tried jk-1.2.8)

 server.xml - Begin 

Connector port=8009 enableLookups=false redirectPort=8443 debug=2  
protocol=AJP/1.3 /

 server.xml - End 

 httpd.conf - Begin 
...
LoadModule jk_module /usr/lib/apache/1.3/mod_jk.so
...
NameVirtualHost 192.168.1.9
...
VirtualHost 192.168.1.9
 ServerName www.foo.com
 DocumentRoot /home/tomcat/jakarta-tomcat-5.0.28/webapps/ROOT

 ServerAdmin [EMAIL PROTECTED]

 # Log Set-Up
 ErrorLog  /var/log/apache/www.foo.com-error_log
 LogFormat %h %l %u %t \%r\ %s %b common
 CustomLog /var/log/apache/www.foo.com-access.log common


 JkLogFile /var/log/apache/mod_jk.log
 JkLogLeveltrace
 JkRequestLogFormat %w %U %r

 JkMount /* ajp13w
#   JkWorkersFile /etc/httpd/conf/workers.properties
 JkWorkerProperty worker.list=ajp13w
 JkWorkerProperty worker.ajp13w.type=ajp13
 JkWorkerProperty worker.ajp13w.host=192.168.1.9
 JkWorkerProperty worker.ajp13w.port=8009

 Location /WEB-INF
   Options None
   AllowOverride None
   order deny,allow
   deny from all
/Location

Directory /home/tomcat/jakarta-tomcat-5.0.28/webapps/ROOT
  Options None
  AllowOverride None
  order deny,allow
  allow from all
/Directory
/VirtualHost


VirtualHost 192.168.1.9
   ServerAdmin [EMAIL PROTECTED]
   DocumentRoot /var/www/
   ErrorLog /var/log/apache/default-error.log
   CustomLog /var/log/apache/default-access.log common
/VirtualHost
 httpd.conf - End 

 jk2.properties - Start 
## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.

## COMMENTS WILL BE _LOST_

## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

# Set the desired handler list
# handler.list=apr,request,channelJni
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config  is working
# shm.file=${jkHome}/work/jk2.shm

# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:

# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# apr.jniModeSo=inprocess
 jk2.properties - End 


-
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]



Filtering remote host access from web.xml

2005-04-11 Thread Fredrik Jonson
Hello,

I want to limit access to a specific servlet based on the requesting clients 
host name and address. I'm aware of the RemoteHostValve, but as I understand 
the specification it can only be used by editing the server.xml file, and I 
would prefer to have a method to control it in the web.xml file.

Basically, what I'd need is a RemoteHostFilter, but i find no reference to a 
such a creature. Of course I could write one myself, but I cannot imagine that 
no one have had this problem before me.

So, what is a good approach on this?

(I'm using tomcat 4.1.31)

regards,
--
Fredrik Jonson


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



Filtering remote host access in web.xml

2005-04-11 Thread Fredrik Jonson
Hello,

I want to limit access to a specific servlet based on the requesting clients 
host name and address. I'm aware of the RemoteHostValve, but as I understand 
the specification it can only be used by editing the server.xml file, and I 
would prefer to have a method to control it in the web.xml file.

Basically, what I'd need is a RemoteHostFilter, but i find no reference to a 
such a creature. Of course I could write one myself, but I cannot imagine that 
no one have had this problem before me.

So, what is a good approach on this?

regards,
--
Fredrik Jonson


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



Re: problem with installing tomcat in linux

2005-04-11 Thread Shaik . ShabeenaImam
yes i did exported those env variables.
but still i am getting the following error

Cannot find ./catalina.sh
This file is needed to run this program

  I have even checked for the file permission mode.
and also tried these commands
   #dos2unix startup.sh ...
 Still i am not getting.
 hi,

 if errors occur when you try to start the server you have to set
 variable such as $CATALINA_HOME and $JAVA_HOME. I've do it adding in
 /etc/profile
 CATALINA_HOME=/path/to/bin
 JAVA_HOME=/path/to/jdkXX
 export CATALINA JAVA_HOME

 and it works 


 [EMAIL PROTECTED] wrote:

hi,
  I have a problem with installing tomcat in linux.
i am getting the following error

 The BASEDIR environment variable is not defined
 This environment variable is needed to run this program
can anybody help me out.
   thanx in advance,
 shabeena


-
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: Filtering remote host access from web.xml

2005-04-11 Thread Raghupathy,Gurumoorthy
You can write a filter on the context and based on
request.getRemoteAddr()  do the processing

Guru


-Original Message-
From: Fredrik Jonson [mailto:[EMAIL PROTECTED] 
Sent: 11 April 2005 12:12
To: tomcat-user@jakarta.apache.org
Subject: Filtering remote host access from web.xml


Hello, 

I want to limit access to a specific servlet based on the requesting clients
host name and address. I'm aware of the RemoteHostValve, but as I understand
the specification it can only be used by editing the server.xml file, and I
would prefer to have a method to control it in the web.xml file. 

Basically, what I'd need is a RemoteHostFilter, but i find no reference to a
such a creature. Of course I could write one myself, but I cannot imagine
that no one have had this problem before me. 

So, what is a good approach on this? 

(I'm using tomcat 4.1.31)

regards, 
-- 
Fredrik Jonson


-
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]



jsvc restart trouble

2005-04-11 Thread Trond G. Ziarkowski
Hi all,
I'm using tomcat 5.5.7 with latest jsvc from cvs. In my development 
environment I frequently run into the java.lang.OutOfMemoryError: 
PermGen space because of many reloads of my app. To restart Tomcat I 
issue 'kill -s SIGHUP $PID'. This works well when Tomcat is running 
normally, but after the java.lang.OutOfMemoryError: PermGen space it 
just kills the process.

Anyone else having the same problem?
How do you restart Tomcat using jsvc?
Trond
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


server/webapps

2005-04-11 Thread Michal Kwiatek
Hello all,

Is it possible to deploy an application from the server/webapps
directory? I would like my application to be deployed in the same way as
manager or admin application are deployed.

Thanks in advance,
Michal.

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



Webdav, WEB_INF

2005-04-11 Thread Rolotec AG new
Hi all
When i connect to a webdav resource, the WEB-INF directory remains 
invisible. I'm running tomcat standalone. What do i have to do to make 
WEB-INF directory visible when mounting WEBDAV resources?

Thank you for any help
Patrick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: server/webapps

2005-04-11 Thread Tim Funk
Yes, but not through the admin or manager webapp.
-Tim
Michal Kwiatek wrote:
Hello all,
Is it possible to deploy an application from the server/webapps
directory? I would like my application to be deployed in the same way as
manager or admin application are deployed.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Webdav, WEB_INF

2005-04-11 Thread Tim Funk
IIRC - you cannot see the WEB-INF directory using the webdav webapp. Its a 
constraint imposed by the servlet spec that any request to WEB-INF is not 
allowed.

-Tim
Patrick Sifneos (Rolotec AG new) wrote:
Hi all
When i connect to a webdav resource, the WEB-INF directory remains 
invisible. I'm running tomcat standalone. What do i have to do to make 
WEB-INF directory visible when mounting WEBDAV resources?

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


Fatal: Stack size too small. Use 'java -Xss' to increase default stack size.

2005-04-11 Thread Ronald Klop
Hello,
My Tomcat logs this in catalina.out.
Fatal: Stack size too small. Use 'java -Xss' to increase default stack size.
I don't see a stack trace, so I can't figure out what is really going wrong 
here.
My current setup is jdk 1.4.2_08 on linux 2.6.x with Tomcat 5.0.28. We are 
using these parameters to start Java/Tomcat: -Xmx1024m -Xms1024m 
-Djava.awt.headless=true -Dsun.net.inetaddr.ttl=60. Tomcat is clustered with 3 
nodes.
Is this a known problem for anybody? Does increasing -Xss solve the problem or 
does it only make it happen less often?
We are running a heavy webapp with 2500 users logged in for 8 hours a day (so 
sessions live long).
Ronald.


RE: server/webapps

2005-04-11 Thread Michal Kwiatek
How, then? 

Michal.

 

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED] 
 Sent: Monday, April 11, 2005 2:28 PM
 To: Tomcat Users List
 Subject: Re: server/webapps
 
 Yes, but not through the admin or manager webapp.
 
 -Tim
 
 Michal Kwiatek wrote:
 
  Hello all,
  
  Is it possible to deploy an application from the server/webapps 
  directory? I would like my application to be deployed in 
 the same way 
  as manager or admin application are deployed.
  
 
 -
 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: Webdav issue with non ASCII characters

2005-04-11 Thread Fernando Salazar de Paz
Internet Explorer uses UTF-8 to encode URLs and Tomcat tries ISO-8859-1 in
decoding. The result is a wrong filename.

String fileName = URLEncoder.encode(manualín.pdf, ISO-8859-1);

*1
System.out.println(fileName+ produce +URLDecoder.decode(fileName,
UTF-8));

fileName = URLEncoder.encode(manualín.pdf, UTF-8);

*2
System.out.println(fileName+ produce +URLDecoder.decode(fileName,
ISO-8859-1));

- OUTPUT follows -
*1 manual%EDn.pdf produce manual?n.pdf
*2 manual%C3%ADn.pdf produce manualín.pdf


manualín.pdf=  manualín.pdf


Other browsers uses ISO-8859-1 but we need to be compatible with IE.


Thanks and regards



-Mensaje original-
De: Fernando Salazar de Paz [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 11 de abril de 2005 10:24
Para: tomcat-user@jakarta.apache.org
Asunto: Webdav issue with non ASCII characters

I can PUT archives but I am not be able to read them anymore.

 

For example:

 

Archive:manualín.pdf

 

In WebdavServlet::service

 

protected void service(HttpServletRequest req, HttpServletResponse resp)

throws ServletException, IOException {

 

String method = req.getMethod();

 

if (debug  0) {

(1)log([ + req.getRequestURI() + ]);

String path = getRelativePath(req);

(3)  log([ + method + ]  + path);

}

 

The output:

 

INFO: webdav: [/webdav/manual%C3%ADn.pdf]  (1)

 

DefaultServlet::getRelativePath   request.getPathInfo() (2)

INFO: webdav: DefaultServlet::getRelativePath.
request.getPathInfo()=/manualín.pdf

 

INFO: webdav: [HEAD] /manualín.pdf  (3)

 

 

In NTFS Tomcat has written manualín.pdf instead of manualín.pdf

 

 

I have tried with DefaultServlet’s languageEncoding init parameter using
UTF-8 with no result. 

 

 

Thanks in advance



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



Re: Webdav, WEB_INF

2005-04-11 Thread Patrick [EMAIL PROTECTED] AG
Thanks for the Info Tim! This is too bad. That means, i have to install 
Apache abd run tomcat using Apache as Web-Server. It is then possible 
to see the WEB-INF directory!

On 11.04.2005, at 14:28, Tim Funk wrote:
IIRC - you cannot see the WEB-INF directory using the webdav webapp. 
Its a constraint imposed by the servlet spec that any request to 
WEB-INF is not allowed.

-Tim
Patrick Sifneos (Rolotec AG new) wrote:
Hi all
When i connect to a webdav resource, the WEB-INF directory remains 
invisible. I'm running tomcat standalone. What do i have to do to 
make WEB-INF directory visible when mounting WEBDAV resources?
-
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: Webdav, WEB_INF

2005-04-11 Thread Raghupathy,Gurumoorthy
Yes .. You can use an Alias 

-Original Message-
From: Patrick [EMAIL PROTECTED] AG [mailto:[EMAIL PROTECTED] 
Sent: 11 April 2005 13:53
To: Tomcat Users List
Subject: Re: Webdav, WEB_INF


Thanks for the Info Tim! This is too bad. That means, i have to install 
Apache abd run tomcat using Apache as Web-Server. It is then possible 
to see the WEB-INF directory!


On 11.04.2005, at 14:28, Tim Funk wrote:

 IIRC - you cannot see the WEB-INF directory using the webdav webapp. 
 Its a constraint imposed by the servlet spec that any request to 
 WEB-INF is not allowed.

 -Tim

 Patrick Sifneos (Rolotec AG new) wrote:

 Hi all
 When i connect to a webdav resource, the WEB-INF directory remains 
 invisible. I'm running tomcat standalone. What do i have to do to 
 make WEB-INF directory visible when mounting WEBDAV resources?

 -
 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: server/webapps

2005-04-11 Thread Tim Funk
You need to manually place a file in the conf/Catalina/localhost directory. 
(YMMV on the actual dir) The easiest way is to copy manager.xml to 
mywebapp.xml and make the appropriate tweaks.

-TIm
Michal Kwiatek wrote:
How, then? 

Michal.
 


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 11, 2005 2:28 PM
To: Tomcat Users List
Subject: Re: server/webapps

Yes, but not through the admin or manager webapp.
-Tim
Michal Kwiatek wrote:

Hello all,
Is it possible to deploy an application from the server/webapps 
directory? I would like my application to be deployed in 
the same way 

as manager or admin application are deployed.

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


RE: server/webapps

2005-04-11 Thread Michal Kwiatek
It works.Thanks a lot.

Michal. 

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED] 
 Sent: Monday, April 11, 2005 3:11 PM
 To: Tomcat Users List
 Subject: Re: server/webapps
 
 You need to manually place a file in the 
 conf/Catalina/localhost directory. 
 (YMMV on the actual dir) The easiest way is to copy 
 manager.xml to mywebapp.xml and make the appropriate tweaks.
 
 -TIm
 
 Michal Kwiatek wrote:
 
  How, then? 
  
  Michal.
  
   
  
  
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 11, 2005 2:28 PM
 To: Tomcat Users List
 Subject: Re: server/webapps
 
 Yes, but not through the admin or manager webapp.
 
 -Tim
 
 Michal Kwiatek wrote:
 
 
 Hello all,
 
 Is it possible to deploy an application from the server/webapps 
 directory? I would like my application to be deployed in
 
 the same way
 
 as manager or admin application are deployed.
 
 
 -
 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: DBCP Please Help Get Working Properly

2005-04-11 Thread David Smith
Ok, define 'no results'. In reality, the naming import isn't the only 
thing that changed. Your web.xml file *looks* like 2.3 spec from what I 
can see and you are using JSP 2.x spec syntax in your jsp. If you want 
the JSP 2.x spec features, you need to declare your web.xml file for 
servlet 2.4 spec. This should be up at the top of your web.xml (pasted 
from the specification for servlet 2.4):

?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4
Then just put all your servlet-mappings, etc., ... after that. The 
taglib declarations need to be inside a jsp-config element for the 2.4 
spec web.xml file too. That's how I'm guessing you have a 2.3 spec 
web.xml file. The full spec can be found at 
http://www.jcp.org/en/jsr/detail?id=154

--David
Scott Purcell wrote:
Hello,
I am trying to use the DBCP features of Tomcat 5.5.7. I created a webapp named 
testDB and put it under $CATALINA_HOME/webapps/testDB. Then I created a 
testDB.xml file under $CATALINA_HOME/conf/Catalina/localhost/testDB.xml.
// here it is
Context path=/testDB docBase=testDB
   debug=5 reloadable=true crossContext=true
 Resource name=jdbc/testDB auth=Container type=javax.sql.DataSource
  maxActive=100 maxIdle=30 maxWait=1
  username=javauser password=javadude 
driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/fritest?autoReconnect=true/
/Context
I have been following the notes from: 
http://localhost/tomcat-docs/jndi-datasource-examples-howto.html

I made sure I completed the rest of the tasks.
WEB-INF has the two tag locations, and the resource ref.
eg:
   taglib
   taglib-uri/WEB-INF/sql.tld/taglib-uri
   taglib-location/WEB-INF/sql.tld/taglib-location
   /taglib
   taglib
   taglib-uri/WEB-INF/c.tld/taglib-uri
   taglib-location/WEB-INF/c.tld/taglib-location
   /taglib
 resource-ref
 descriptionDB Connection/description
 res-ref-namejdbc/testDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
I finally hit my jsp page which is this:
%@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql %
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
sql:query var=rs dataSource=jdbc/testDB
select id, foo, bar from testdata
/sql:query
html
 head
   titleDB Test/title
 /head
 body
 h2Results/h2
 
c:forEach var=row items=${rs.rows}
   Foo ${row.foo}br/
   Bar ${row.bar}br/
/c:forEach

 /body
/html
And I get no results:
Now I am pretty sure I have all configured. Because if I use a fallback (Tomcat 
4.1) code piece I had, I get results using the same settings:
package foo;
import javax.naming.*;
import javax.sql.*;
import java.sql.*;
public class DBTest {
 String foo = Not Connected;
 int bar = -1;
   
 public void init() {
   try{
 Context ctx = new InitialContext();
 if(ctx == null ) 
 throw new Exception(Boom - No Context);

 DataSource ds = 
   (DataSource)ctx.lookup(
  java:comp/env/jdbc/testDB);

 if (ds != null) {
   Connection conn = ds.getConnection();
 
   if(conn != null)  {
   foo = Got Connection +conn.toString();
   Statement stmt = conn.createStatement();
   ResultSet rst = 
   stmt.executeQuery(
 select id, foo, bar from testdata);
   while(rst.next()) {
  System.out.println(next );
  foo=rst.getString(2);
  bar=rst.getInt(3);
   }
   conn.close();
   }
 }
   }catch(Exception e) {
 e.printStackTrace();
   }
}

public String getFoo() { return foo; }
public int getBar() { return bar;}
}
And using the above class works all day.
The only difference I see is that the class using a naming import and the jsp 
does not. Can anyone help.
Thanks,
Scott




-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, April 08, 2005 1:14 PM
To: Tomcat Users List
Subject: Re: Add Context Path, Tomcat 5.5.7
Hi.
Take a look at this for where to put Context elements:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
This is new with Tomcat 5.0 and is continued in Tomcat 5.5
--David
Scott Purcell wrote:
 

Hello,
I am following the information here to add DBCP to my application.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
I am reading to add the Context path=/DBTest ... from the above docs. The 
instructions say to .
Configure the JNDI DataSource in Tomcat by adding a declaration for your 
resource to $CATALINA_HOME/conf/server.xml.
Add this in between the /Context tag of the examples context and the /Host 
tag closing the localhost definition.

So cool, I opened up the server.xml, but do not see any existing context or 
host tags in it. Here is my 

Re: Webdav, WEB_INF

2005-04-11 Thread Patrick [EMAIL PROTECTED] AG
Yes what? Is it possible with tomcat standalone?
On 11.04.2005, at 15:08, Raghupathy,Gurumoorthy wrote:
Yes .. You can use an Alias
-Original Message-
From: Patrick [EMAIL PROTECTED] AG [mailto:[EMAIL PROTECTED]
Sent: 11 April 2005 13:53
To: Tomcat Users List
Subject: Re: Webdav, WEB_INF
Thanks for the Info Tim! This is too bad. That means, i have to install
Apache abd run tomcat using Apache as Web-Server. It is then possible
to see the WEB-INF directory!
On 11.04.2005, at 14:28, Tim Funk wrote:
IIRC - you cannot see the WEB-INF directory using the webdav webapp.
Its a constraint imposed by the servlet spec that any request to
WEB-INF is not allowed.
-Tim
Patrick Sifneos (Rolotec AG new) wrote:
Hi all
When i connect to a webdav resource, the WEB-INF directory remains
invisible. I'm running tomcat standalone. What do i have to do to
make WEB-INF directory visible when mounting WEBDAV resources?
-
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: Webdav, WEB_INF

2005-04-11 Thread Raghupathy,Gurumoorthy
With Apache HTTP server and WEBDAV module you can ... Not with tomcat
standalone 

-Original Message-
From: Patrick [EMAIL PROTECTED] AG [mailto:[EMAIL PROTECTED] 
Sent: 11 April 2005 14:20
To: Tomcat Users List
Subject: Re: Webdav, WEB_INF


Yes what? Is it possible with tomcat standalone?


On 11.04.2005, at 15:08, Raghupathy,Gurumoorthy wrote:

 Yes .. You can use an Alias

 -Original Message-
 From: Patrick [EMAIL PROTECTED] AG [mailto:[EMAIL PROTECTED]
 Sent: 11 April 2005 13:53
 To: Tomcat Users List
 Subject: Re: Webdav, WEB_INF


 Thanks for the Info Tim! This is too bad. That means, i have to install
 Apache abd run tomcat using Apache as Web-Server. It is then possible
 to see the WEB-INF directory!


 On 11.04.2005, at 14:28, Tim Funk wrote:

 IIRC - you cannot see the WEB-INF directory using the webdav webapp.
 Its a constraint imposed by the servlet spec that any request to
 WEB-INF is not allowed.

 -Tim

 Patrick Sifneos (Rolotec AG new) wrote:

 Hi all
 When i connect to a webdav resource, the WEB-INF directory remains
 invisible. I'm running tomcat standalone. What do i have to do to
 make WEB-INF directory visible when mounting WEBDAV resources?

 -
 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: DBCP Please Help Get Working Properly

2005-04-11 Thread Scott Purcell
Thank David for the below information.

This makes some sense, and I will try and make the changes. But this of course 
leads to a follow-up question. Why isn't there any decent documentation to get 
the DBCP running in Tomcat. I am talking about a simple example, that explains 
container versions, jsp versions, possibly better ways to use then putting the 
connection into a JSP page. Connecting in a JSP page is just plain dirty, I 
would like to connect in some class where I can call connections from. Does 
this make sense?

As I mentioned, I followed the example that comes with the documentation for my 
5.5 Tomcat that displays when you go to localhost.

So, is there any good documentation that shows how to do this, step by step?


Thanks,
Scott






-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 8:18 AM
To: Tomcat Users List
Subject: Re: DBCP Please Help Get Working Properly


Ok, define 'no results'. In reality, the naming import isn't the only 
thing that changed. Your web.xml file *looks* like 2.3 spec from what I 
can see and you are using JSP 2.x spec syntax in your jsp. If you want 
the JSP 2.x spec features, you need to declare your web.xml file for 
servlet 2.4 spec. This should be up at the top of your web.xml (pasted 
from the specification for servlet 2.4):

?xml version=1.0 encoding=ISO-8859-1?

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

Then just put all your servlet-mappings, etc., ... after that. The 
taglib declarations need to be inside a jsp-config element for the 2.4 
spec web.xml file too. That's how I'm guessing you have a 2.3 spec 
web.xml file. The full spec can be found at 
http://www.jcp.org/en/jsr/detail?id=154

--David

Scott Purcell wrote:

Hello,

I am trying to use the DBCP features of Tomcat 5.5.7. I created a webapp named 
testDB and put it under $CATALINA_HOME/webapps/testDB. Then I created a 
testDB.xml file under $CATALINA_HOME/conf/Catalina/localhost/testDB.xml.

// here it is
Context path=/testDB docBase=testDB
debug=5 reloadable=true crossContext=true

  Resource name=jdbc/testDB auth=Container type=javax.sql.DataSource
   maxActive=100 maxIdle=30 maxWait=1
   username=javauser password=javadude 
 driverClassName=com.mysql.jdbc.Driver
   url=jdbc:mysql://localhost:3306/fritest?autoReconnect=true/
/Context

I have been following the notes from: 
http://localhost/tomcat-docs/jndi-datasource-examples-howto.html

I made sure I completed the rest of the tasks.
WEB-INF has the two tag locations, and the resource ref.
eg:

taglib
taglib-uri/WEB-INF/sql.tld/taglib-uri
taglib-location/WEB-INF/sql.tld/taglib-location
/taglib


taglib
taglib-uri/WEB-INF/c.tld/taglib-uri
taglib-location/WEB-INF/c.tld/taglib-location
/taglib

  resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/testDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref

I finally hit my jsp page which is this:
%@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql %
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %

sql:query var=rs dataSource=jdbc/testDB
select id, foo, bar from testdata
/sql:query

html
  head
titleDB Test/title
  /head
  body

  h2Results/h2
  
c:forEach var=row items=${rs.rows}
Foo ${row.foo}br/
Bar ${row.bar}br/
/c:forEach


  /body
/html

And I get no results:

Now I am pretty sure I have all configured. Because if I use a fallback 
(Tomcat 4.1) code piece I had, I get results using the same settings:

package foo;

import javax.naming.*;
import javax.sql.*;
import java.sql.*;

public class DBTest {

  String foo = Not Connected;
  int bar = -1;

  public void init() {
try{
  Context ctx = new InitialContext();
  if(ctx == null ) 
  throw new Exception(Boom - No Context);

  DataSource ds = 
(DataSource)ctx.lookup(
   java:comp/env/jdbc/testDB);

  if (ds != null) {
Connection conn = ds.getConnection();
  
if(conn != null)  {
foo = Got Connection +conn.toString();
Statement stmt = conn.createStatement();
ResultSet rst = 
stmt.executeQuery(
  select id, foo, bar from testdata);
while(rst.next()) {
   System.out.println(next );
   foo=rst.getString(2);
   bar=rst.getInt(3);
}
conn.close();
}
  }
}catch(Exception e) {
  e.printStackTrace();
}
 }

 public String getFoo() { return foo; }
 public int getBar() { return bar;}
}

And using the above class works all day.

The only difference I see is that the class using a naming import and the 

Re: problem with installing tomcat in linux

2005-04-11 Thread Paul Puschmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] wrote:
 yes i did exported those env variables.
 but still i am getting the following error
 
 Cannot find ./catalina.sh
 This file is needed to run this program
 
   I have even checked for the file permission mode.
 and also tried these commands
#dos2unix startup.sh ...
  Still i am not getting.
 
can't you get a packaged version from your linux distribution?

(SuSE, Debian, ...)

Kind regards,

Paul

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (MingW32)

iEYEARECAAYFAkJaflEACgkQqErKtBWD7VTGgQCffu5VcknvuFOI2GDR6vF6ilge
3GwAoKW4iRneSxmDVzWQshgoWs5jJ14p
=BBAu
-END PGP SIGNATURE-


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



connection pooling with JTOpen Toolbox_tomcat 5.5.7

2005-04-11 Thread sudip shrestha
Using: tomcat 5.5.7, JTOpen 4.7 JDBC Driver for AS/400 DB2
The DBAdmin of the company I work for ends the subsystems at night
time for the backup, so the connection dies during that time and when
I try to reconnect to application server via my webapp in the morning,
it throws me exception saying that the connection does not exist:

WARN http-8080-Processor22 net.sf.hibernate.util.JDBCExceptionReporter
- SQL Error: -9, SQLState: 08003
 ERROR http-8080-Processor22
net.sf.hibernate.util.JDBCExceptionReporter - The connection does not
exist.

However, after I try it couple of times I am able to connect, probably
Tomcat re-establishes the connection to AS/400, so I was wondering if
there was any parameter such as autoreconnect (such as in mysql)
that can be provided in server.xml file, which will automatically
reconnect in the first try instead of having to try if few times.

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



Re: problem with installing tomcat in linux

2005-04-11 Thread Hassan Schroeder
[EMAIL PROTECTED] wrote:
yes i did exported those env variables.
but still i am getting the following error
Cannot find ./catalina.sh
This file is needed to run this program
Executables, including shell scripts, are only found if they're
in your PATH. Either add the $CATALINA_HOME/bin directory to your
PATH setting or start Tomcat directly using:
prompt $CATALINA_HOME/bin/catalina.sh start
It would probably be useful to look at that startup script as well,
to understand the role of various environment variables...
HTH!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


Problem : TOMCAT stops randomly

2005-04-11 Thread THOMAZON Fabien
Hi,

·We have an application on TOMCAT 4.1.27 and IIS 5.0 on Windows 2000.
·While arriving to some pages of the application (examples : scroll bar
manipulation, direct access to the page, … ), TOMCAT stops randomly. In the
TOMCAT logs, nothing is indicated.
·We have 2 servers that should be configured in the same way. On one of
them, we have this error but it is impossible to reproduce it on the other
one.
·We tried to increase TOMCAT memory size but it didn’t solve the 
problem.
·Is there anyone who had the same problem ? How can I manage to find out
the origin of the problem ?

Regards.

Fabien


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



Jjwvzlvaoytjjbsc

2005-04-11 Thread craigmcc
Mail transaction failed. Partial message is available.


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

war file producing jsp problems

2005-04-11 Thread PGibbonsX
Hi There,
i've build an app with jsp pages which use a bean and calls java  classes.  
This works fine  dandy, outside of a war file.
 
However, i've  placed the app within a war file under webapps, removed  the 
original directories etc  and restarted tomcat.
 
Now when i load my jsp page, the tag libs dont seem to work, ie i have the  
following code in my jsp page:
 
%@ taglib prefix=c uri=_http://java.sun.com/jsp/jstl/core_ 
(http://java.sun.com/jsp/jstl/core)   %
jsp:useBean id=nc class=hall.CheckStandAlone scope=page  /
jsp:setProperty name=nc property=phone  value=${param['phone']} /
 
using a war file it logs:
INFO Check - number:${param['phone']}
 
instead of logging:
 
INFO Check - number:01215554455
 
So, basically the same code works ok outisde of the war container, but  fails 
within the  war container.  Inside the war container the jsp  page does not 
seem to be able to interpret the ${param['phone']} to an actual  value.
 
Any suggestions on what is wrong here?  I am using Tomcat version  5.5.7, 
java version 1.5

 


RE: Webdav issue with non ASCII characters

2005-04-11 Thread Fernando Salazar de Paz
Using URIEncoding parameter, at Server.xml, PUT and DELETE methods works ok.
I am still having trouble with GET method.


!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector
port=8080   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   connectionTimeout=2 disableUploadTimeout=true
URIEncoding=UTF-8 /


--- Tomcat log 
INFO: webdav: [HEAD] /última-guía.pdf
11-abr-2005 16:31:32 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveResource:  Serving resource
'/última-guía.pdf' headers only
11-abr-2005 16:31:32 org.apache.catalina.core.ApplicationContext log
INFO: webdav: [PUT] /última-guía.pdf
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: [GET] /última-guía.pdf
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveResource:  Serving resource
'/última-guía.pdf' headers and data
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveFile:  contentType='application/pdf'
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveFile:  contentLength=202259
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: [GET] /?ltima-gu?a.pdf
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveResource:  Serving resource
'/?ltima-gu?a.pdf' headers and data
11-abr-2005 16:31:57 org.apache.catalina.core.ApplicationContext log
INFO: webdav: [DELETE] /última-guía.pdf
--- Tomcat log 



-Mensaje original-
De: Fernando Salazar de Paz [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 11 de abril de 2005 14:36
Para: 'Tomcat Users List'
Asunto: RE: Webdav issue with non ASCII characters

Internet Explorer uses UTF-8 to encode URLs and Tomcat tries ISO-8859-1 in
decoding. The result is a wrong filename.

String fileName = URLEncoder.encode(manualín.pdf, ISO-8859-1);

*1
System.out.println(fileName+ produce +URLDecoder.decode(fileName,
UTF-8));

fileName = URLEncoder.encode(manualín.pdf, UTF-8);

*2
System.out.println(fileName+ produce +URLDecoder.decode(fileName,
ISO-8859-1));

- OUTPUT follows -
*1 manual%EDn.pdf produce manual?n.pdf
*2 manual%C3%ADn.pdf produce manualín.pdf


manualín.pdf=  manualín.pdf


Other browsers uses ISO-8859-1 but we need to be compatible with IE.


Thanks and regards



-
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: war file producing jsp problems

2005-04-11 Thread David Smith
How are you declaring your web.xml file. If you are declaring with the 
servlet 2.3 DTD, you won't be able to use the ${} operators available in 
the JSP 2 spec. Use the 2.4 schema instead.

?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4
--David
[EMAIL PROTECTED] wrote:
Hi There,
i've build an app with jsp pages which use a bean and calls java  classes.  
This works fine  dandy, outside of a war file.

However, i've  placed the app within a war file under webapps, removed  the 
original directories etc  and restarted tomcat.

Now when i load my jsp page, the tag libs dont seem to work, ie i have the  
following code in my jsp page:

%@ taglib prefix=c uri=_http://java.sun.com/jsp/jstl/core_ 
(http://java.sun.com/jsp/jstl/core)   %
jsp:useBean id=nc class=hall.CheckStandAlone scope=page  /
jsp:setProperty name=nc property=phone  value=${param['phone']} /

using a war file it logs:
INFO Check - number:${param['phone']}
instead of logging:
INFO Check - number:01215554455
So, basically the same code works ok outisde of the war container, but  fails 
within the  war container.  Inside the war container the jsp  page does not 
seem to be able to interpret the ${param['phone']} to an actual  value.

Any suggestions on what is wrong here?  I am using Tomcat version  5.5.7, 
java version 1.5


 


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


tomcat 5.5.9 installlation doesn't seem to work

2005-04-11 Thread Walter Lee
Hi,
I downloaded the Tomcat 5.5.9 beta and unzipped it. I get a message saying that 
it failed to install Tomcat Service and gives me the option to abort it or 
ignore it. I chose ignore and it finished unzipping. Then it shows a progress 
bar about service being installed. When all this finished I did the 
http://localhost:8080http://localhost:8080/ and the Tomcat 5.0.28 main page 
came up. I don't understand how this happened. I have checked out every option 
I can find and nothing seems wrong. I also changed to JRE 5.0 Update 2. Any 
thoughts on this?

Wally Lee

Re: DBCP Please Help Get Working Properly

2005-04-11 Thread David Smith
Well yes it does make a lot of sense, but is more a question answered by 
design patterns.  It's a little beyond the scope of Tomcat docs to 
address issues like separation of roles.  Both Struts and Spring 
projects address issues like this with the Model-View-Controller (MVC) 
pattern and there are innumerable books on the subject as well.  
Specific to data access methods, Hibernate also addresses this issue.

As far as step by step docs, you are best off picking a framework, 
getting a good book on it and go from there.

Hope this helps.
--David
Scott Purcell wrote:
Thank David for the below information.
This makes some sense, and I will try and make the changes. But this of course 
leads to a follow-up question. Why isn't there any decent documentation to get 
the DBCP running in Tomcat. I am talking about a simple example, that explains 
container versions, jsp versions, possibly better ways to use then putting the 
connection into a JSP page. Connecting in a JSP page is just plain dirty, I 
would like to connect in some class where I can call connections from. Does 
this make sense?
As I mentioned, I followed the example that comes with the documentation for my 
5.5 Tomcat that displays when you go to localhost.
So, is there any good documentation that shows how to do this, step by step?
Thanks,
Scott


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 8:18 AM
To: Tomcat Users List
Subject: Re: DBCP Please Help Get Working Properly
Ok, define 'no results'. In reality, the naming import isn't the only 
thing that changed. Your web.xml file *looks* like 2.3 spec from what I 
can see and you are using JSP 2.x spec syntax in your jsp. If you want 
the JSP 2.x spec features, you need to declare your web.xml file for 
servlet 2.4 spec. This should be up at the top of your web.xml (pasted 
from the specification for servlet 2.4):

?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4
Then just put all your servlet-mappings, etc., ... after that. The 
taglib declarations need to be inside a jsp-config element for the 2.4 
spec web.xml file too. That's how I'm guessing you have a 2.3 spec 
web.xml file. The full spec can be found at 
http://www.jcp.org/en/jsr/detail?id=154

--David
Scott Purcell wrote:
 

Hello,
I am trying to use the DBCP features of Tomcat 5.5.7. I created a webapp named 
testDB and put it under $CATALINA_HOME/webapps/testDB. Then I created a 
testDB.xml file under $CATALINA_HOME/conf/Catalina/localhost/testDB.xml.
// here it is
Context path=/testDB docBase=testDB
  debug=5 reloadable=true crossContext=true
Resource name=jdbc/testDB auth=Container type=javax.sql.DataSource
 maxActive=100 maxIdle=30 maxWait=1
 username=javauser password=javadude 
driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/fritest?autoReconnect=true/
/Context
I have been following the notes from: 
http://localhost/tomcat-docs/jndi-datasource-examples-howto.html

I made sure I completed the rest of the tasks.
WEB-INF has the two tag locations, and the resource ref.
eg:
  taglib
  taglib-uri/WEB-INF/sql.tld/taglib-uri
  taglib-location/WEB-INF/sql.tld/taglib-location
  /taglib
  taglib
  taglib-uri/WEB-INF/c.tld/taglib-uri
  taglib-location/WEB-INF/c.tld/taglib-location
  /taglib
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/testDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
I finally hit my jsp page which is this:
%@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql %
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
sql:query var=rs dataSource=jdbc/testDB
select id, foo, bar from testdata
/sql:query
html
head
  titleDB Test/title
/head
body
h2Results/h2
c:forEach var=row items=${rs.rows}
  Foo ${row.foo}br/
  Bar ${row.bar}br/
/c:forEach
/body
/html
And I get no results:
Now I am pretty sure I have all configured. Because if I use a fallback (Tomcat 
4.1) code piece I had, I get results using the same settings:
package foo;
import javax.naming.*;
import javax.sql.*;
import java.sql.*;
public class DBTest {
String foo = Not Connected;
int bar = -1;
  
public void init() {
  try{
Context ctx = new InitialContext();
if(ctx == null ) 
throw new Exception(Boom - No Context);

DataSource ds = 
  (DataSource)ctx.lookup(
 java:comp/env/jdbc/testDB);

if (ds != null) {
  Connection conn = ds.getConnection();

  if(conn != null)  {
  foo = Got Connection +conn.toString();
  Statement stmt = conn.createStatement();
  ResultSet rst = 
  stmt.executeQuery(
select id, foo, bar from testdata);
  

crossContext not working

2005-04-11 Thread Ron Crayton
I'm trying to forward a request from an app running in Tomcat 5.5.7 to an html 
document outside of the app's context.  The html document is in the htdocs 
folder of Apache HTTP Server 2.0.  
 
My context.xml document for the app looks like this:
 
?xml version=1.0 encoding=UTF-8?
Context path=/LoginApp docBase=LoginApp debug=0 reloadable=true 
crossContext=true
Logger className=org.apache.catalina.logger.FileLogger 
prefix=LoginApp. suffix=.log timestamp=true/
/Context
 
The code looks like this:
 
ServletContext context = getServletConfig().getServletContext();
ServletContext foreignContext = context.getContext(/);
RequestDispatcher requestDispatcher = 
foreignContext.getRequestDispatcher(/try.html);
requestDispatcher.forward(request, response);

The problem:  foreignContext is always null.
 
I thought that the crossContext attribute was supposed to fix this but it isn't 
working.
 
Please help.
 
Thank you.
 


-
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 

Re: tomcat 5.5.9 installlation doesn't seem to work

2005-04-11 Thread Parsons Technical Services
It appears you have two versions on your machine. And since you have not 
changed the defaults you cannot run both at the same time. Shut down the 
5.0.28 version and try starting the 5.5.9 version. OR change the server xml 
to have the 5.5.9 listen on different ports. If the 5.0.28 is also installed 
as a service, there is a good chance this was the cause of the error.

Doug
- Original Message - 
From: Walter Lee [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Monday, April 11, 2005 10:48 AM
Subject: tomcat 5.5.9 installlation doesn't seem to work

Hi,
I downloaded the Tomcat 5.5.9 beta and unzipped it. I get a message saying 
that it failed to install Tomcat Service and gives me the option to abort it 
or ignore it. I chose ignore and it finished unzipping. Then it shows a 
progress bar about service being installed. When all this finished I did the 
http://localhost:8080http://localhost:8080/ and the Tomcat 5.0.28 main 
page came up. I don't understand how this happened. I have checked out every 
option I can find and nothing seems wrong. I also changed to JRE 5.0 Update 
2. Any thoughts on this?

Wally Lee 


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


Re: war file producing jsp problems

2005-04-11 Thread PGibbonsX
thanks for your comment, that does the trick..
 
many thanks pg..


RE: Application Data sharing -- store large object?

2005-04-11 Thread Daxin Zuo
I means if it is good to put a large Object in the ServletContext. This
Object contains a lot of complicated data structure, the data is dymanically
used.

In all the text books, when they tell the usage of ServletContext object,
always use simple string, int, or simple bean.
I heard before that it is not good to put too much data in ServletContext.
If it is true, how it will hurt the system or the data stored in
ServletContext if put tool much data in it. So I can decide how to do
according to my reality. I donnot consern the amount of memory. Please
forward instruction.
Thanks

-Original Message-
From: Jerome Jar [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 10, 2005 8:28 PM
To: Tomcat Users List
Subject: Re: Application Data sharing -- store large object?


Cofused about your question.
A Singleton object???

On Apr 11, 2005 1:22 AM, Daxin Zuo [EMAIL PROTECTED] wrote:
 In my program, an object that contains a large amount of data (complicated
 data strustures) is used in many pages. When I start doing it, I heard
that
 it is better to not store large object in Application. So I let the
program
 create a new one when ever this object is needed. Now I like to question
if
 it is good to put this object in 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]



Problem with mod_jk 1.2.8 (and 1.2.10) and Tomcat 4.0.4

2005-04-11 Thread Laurent LE PRIEUR
Hello,
I have a problem of ping pong between the connector mod_jk and tomcat 4.0.4 
which entraine a significant load network.

Sequence 1234 APACHE MOD_JK to TOMCAT
Response AB (TOMCAT to APACHE MOD_JK)
http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/common/AJPv13.html
I manage to reproduce the problem in the following way:  I have an 
application which allows me to send a file (I a file of 5 Mo takes for 
example) and I the transfer stops while close my navigator at this time 
there sequence AB/1234 never stops (infinite).  Useless to say to you that 
if 20 or 30 users make celà, one arrives at a load very significant network.

tcpdump on localhost showed me that there is continues traffic between
both the httpd/mod_jk and the tomcat server (ajpv13).  The traffic is
always the same.  A request from the container (AB - in ajpv13
this means Get Body Chunk) and a reply from the server (1234|00|00 -
this is an 'empty packet' telling there is nothing more to be sent).
I found only one mail in this direction in mailing list archive.  And no 
response to this problem.  Can you help me?
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg118112.html

Best Regards,
Laurent LE PRIEUR
Rectorat de Nancy Metz
Education Nationale - FRANCE
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: war file producing jsp problems

2005-04-11 Thread PGibbonsX
 
I must be going mad!  I'm sure i had this working, maybe i was looking  at 
the wrong page when i was testing it, but i just cannot get this to work,  even 
with the ammended web.xml as below:
 
any suggestions?
 
?xml version=1.0 encoding=ISO-8859-1?
 
 web-app version=2.4 xmlns=_http://java.sun.com/xml/ns/j2ee_ 
(http://java.sun.com/xml/ns/j2ee) 
xmlns:xsi=_http://www.w3.org/2001/XMLSchema-instance_ 
(http://www.w3.org/2001/XMLSchema-instance) 
xsi:schemaLocation=_http://java.sun.com/xml/ns/j2ee_ 
(http://java.sun.com/xml/ns/j2ee)  
_http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd_ 
(http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd)  
 
  !-- The Usual Welcome File List --
welcome-file-list
welcome-filenon_retail_numchk.jsp/welcome-file
/welcome-file-list
 
/web-app


In a message dated 11/04/2005 15:53:44 GMT Daylight Time, [EMAIL PROTECTED]  
writes:

web-app  xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4






Returning a different .jsp than the one the browser asked for...

2005-04-11 Thread Kurt Overberg
Gang,
I've scoured the net looking for something that would help me do this- currently 
looking at Wrapping the HttpServletRequest, but not having much luck.

Environment: tomcat 5.0.28 on linux, also using struts 1.1
I'm trying to make my system so that if a user asks for something like 
/pages/testing.jsp, it does a check to see if /pages/en_us/testing.jsp exists 
and if it does, it returns (executes, whatever) that page.  Otherwise it will 
return /pages/testing.jsp.  It seems like the tomcat (or was it struts?) used to 
do something like this where if testing_fr.jsp existed, and the person's locale 
was set to FR it would return that, but that appears to have gone away and I 
can't really find anything on it.  ANY help or pointers would be greatly 
appreciated!  Thanks!

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


RE: Webdav issue with non ASCII characters

2005-04-11 Thread Fernando Salazar de Paz
The problem arises with pdf files, for example. Although I am using IE (it
uses UTF-8 in the encoding process), when I request a PDF file a new
(second) request is made by Acrobat Reader. Acrobat Reader uses ISO-8859-1
and Tomcat will not be able to decode the uri properly. What is the reason
for the second request ?, with ZIP files, txt files I have no problem.

I am getting mad :0 


It's a client issue, but what can I do at server side to provide
compatibility ? can I guess the encoding at servlet's service method ?

Thanks in advance


-Mensaje original-
De: Fernando Salazar de Paz [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 11 de abril de 2005 16:41
Para: 'Tomcat Users List'
Asunto: RE: Webdav issue with non ASCII characters

Using URIEncoding parameter, at Server.xml, PUT and DELETE methods works ok.
I am still having trouble with GET method.


!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector
port=8080   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   connectionTimeout=2 disableUploadTimeout=true
URIEncoding=UTF-8 /


--- Tomcat log 
INFO: webdav: [HEAD] /última-guía.pdf
11-abr-2005 16:31:32 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveResource:  Serving resource
'/última-guía.pdf' headers only
11-abr-2005 16:31:32 org.apache.catalina.core.ApplicationContext log
INFO: webdav: [PUT] /última-guía.pdf
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: [GET] /última-guía.pdf
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveResource:  Serving resource
'/última-guía.pdf' headers and data
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveFile:  contentType='application/pdf'
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveFile:  contentLength=202259
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: [GET] /?ltima-gu?a.pdf
11-abr-2005 16:31:40 org.apache.catalina.core.ApplicationContext log
INFO: webdav: DefaultServlet.serveResource:  Serving resource
'/?ltima-gu?a.pdf' headers and data
11-abr-2005 16:31:57 org.apache.catalina.core.ApplicationContext log
INFO: webdav: [DELETE] /última-guía.pdf
--- Tomcat log 





-
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: Webdav issue with non ASCII characters

2005-04-11 Thread Peter Crowther
 From: Fernando Salazar de Paz [mailto:[EMAIL PROTECTED] 
 when I request a PDF file a new
 (second) request is made by Acrobat Reader. Acrobat Reader 
 uses ISO-8859-1
 and Tomcat will not be able to decode the uri properly. What 
 is the reason for the second request ?

The Acrobat reader IE plug-in wants to control the download of the PDF
rather than leave it to IE.  I would expect some other plug-ins to work
the same way.

- Peter

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



Session object not the same in different JSP's

2005-04-11 Thread Adam Lipscombe
Folks,


I have an odd problem the manifests intermittently with TC 5.0.27 and Struts
1.1. I am not sure if it's a TC problem or Struts. I think its TC, but
apologies if this is not the correct forum.

The problem is this:

If validation errors are detected the app code stores them in the Struts
ActionError(s) object in the usual manner. The source JSP is then
re-displayed and a modal dialog box (another JSP) is popped (via calling a
Struts .do URL) to display the errors. 

The ActionErrors object is passed from the ,ain JSP to the modal dialog box
JSP by storing it in the session object. The dialog code then fishes out the
ActionErrors object and loops through the errors, displaying each one.

Most of the time this works fine. However occasionally the session object
that is used by the caller (i.e. the JSP) and the dialog are not the same
instance. i.e. The ActionErrors Object is stored in session X but the modal
dialog JSP uses session Y.


I was surprised by this to put it mildly. I thought the session had to be
the same.


If I restart TC having cleared out the work dir it all seem OK again.


Does anyone have any ideas? 


TIA - Adam




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



Re: Returning a different .jsp than the one the browser asked for...

2005-04-11 Thread Dakota Jack
I don't know if this is helpful, but if you have a front controller in
your architecture, which would be normal,, this sort of behavior would
be simple to code.  Do you have a front controller?

On Apr 11, 2005 9:43 AM, Kurt Overberg [EMAIL PROTECTED] wrote:
 
 Gang,
 
 I've scoured the net looking for something that would help me do this- 
 currently
 looking at Wrapping the HttpServletRequest, but not having much luck.
 
 Environment: tomcat 5.0.28 on linux, also using struts 1.1
 
 I'm trying to make my system so that if a user asks for something like
 /pages/testing.jsp, it does a check to see if /pages/en_us/testing.jsp exists
 and if it does, it returns (executes, whatever) that page.  Otherwise it will
 return /pages/testing.jsp.  It seems like the tomcat (or was it struts?) used 
 to
 do something like this where if testing_fr.jsp existed, and the person's 
 locale
 was set to FR it would return that, but that appears to have gone away and I
 can't really find anything on it.  ANY help or pointers would be greatly
 appreciated!  Thanks!
 
 /kurt
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
You can lead a horse to water but you cannot make it float on its back.
~Dakota Jack~

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



Re: Session object not the same in different JSP's

2005-04-11 Thread Dakota Jack
Is there any chance that you are finding these results while running
two instances of the same browser on the same client machine?



On Apr 11, 2005 9:56 AM, Adam Lipscombe [EMAIL PROTECTED] wrote:
 Folks,
 
 I have an odd problem the manifests intermittently with TC 5.0.27 and Struts
 1.1. I am not sure if it's a TC problem or Struts. I think its TC, but
 apologies if this is not the correct forum.
 
 The problem is this:
 
 If validation errors are detected the app code stores them in the Struts
 ActionError(s) object in the usual manner. The source JSP is then
 re-displayed and a modal dialog box (another JSP) is popped (via calling a
 Struts .do URL) to display the errors.
 
 The ActionErrors object is passed from the ,ain JSP to the modal dialog box
 JSP by storing it in the session object. The dialog code then fishes out the
 ActionErrors object and loops through the errors, displaying each one.
 
 Most of the time this works fine. However occasionally the session object
 that is used by the caller (i.e. the JSP) and the dialog are not the same
 instance. i.e. The ActionErrors Object is stored in session X but the modal
 dialog JSP uses session Y.
 
 I was surprised by this to put it mildly. I thought the session had to be
 the same.
 
 If I restart TC having cleared out the work dir it all seem OK again.
 
 Does anyone have any ideas?
 
 TIA - Adam
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
You can lead a horse to water but you cannot make it float on its back.
~Dakota Jack~

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



Wrapping a Request (was Re: Tomcat user 'roles' question)

2005-04-11 Thread Wendy Smoak
Bill Barker wrote:
 You could use a Valve, but it sounds like for what you want, you could
 simply wrap the HttpServletRequest in your Filter with a wrapper that
 overrides isUserInRole.

Wrapping the request sounds like a good way to go, but I'm on Tomcat 4.1 and
the HttpRequestWrapper appears to be deprecated without suggesting a
replacement:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/connector/HttpRequestWrapper.html

Should I use something else?

-- 
Wendy Smoak


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



Tomcat 5.0.19 restarted without explicit shutdown and startup

2005-04-11 Thread Richard Wang
Hello,
 
 We are running Tomcat (version 5.0.19) with Apache (version: 2.0.50) 
redirection on Windows 2000 (with latest fixes and patches). Last week, we 
observed that Tomcat unloaded and then reloaded our main application context 
without any obvious reasons. We have already searched without any luck the 
Tomcat bugs database and internet to find any documentation on this behavior. 
We are writing to this email list as a last ditch effort in the hope to get 
some help and tips.
 
 We appreciate your help in this regards.
 
 
Thanks,
Richard Wang
[EMAIL PROTECTED]
 
 


Re: Session object not the same in different JSP's

2005-04-11 Thread Wendy Smoak
From: Adam Lipscombe [EMAIL PROTECTED]
 Most of the time this works fine. However occasionally the session object
 that is used by the caller (i.e. the JSP) and the dialog are not the same
 instance. i.e. The ActionErrors Object is stored in session X but the
modal
 dialog JSP uses session Y.

How do you know, are you printing out the session id?  If you're just going
by the fact that you're not getting the correct list of errors, could the
browser have cached the contents of the popup window?

-- 
Wendy Smoak


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



Re: Wrapping a Request (was Re: Tomcat user 'roles' question)

2005-04-11 Thread Wendy Smoak

- Original Message - 
From: Wendy Smoak [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Monday, April 11, 2005 9:59 AM
Subject: Wrapping a Request (was Re: Tomcat user 'roles' question)


 Bill Barker wrote:
  You could use a Valve, but it sounds like for what you want, you could
  simply wrap the HttpServletRequest in your Filter with a wrapper that
  overrides isUserInRole.

 Wrapping the request sounds like a good way to go, but I'm on Tomcat 4.1
and
 the HttpRequestWrapper appears to be deprecated without suggesting a
 replacement:


http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/connector/HttpRequestWrapper.html

 Should I use something else?

 -- 
 Wendy Smoak


 -
 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: Wrapping a Request (was Re: Tomcat user 'roles' question)

2005-04-11 Thread Wendy Smoak
(Apologies for the repost a minute ago... wrong button.)

From: Wendy Smoak [EMAIL PROTECTED]
 Wrapping the request sounds like a good way to go, but I'm on Tomcat 4.1
and
 the HttpRequestWrapper appears to be deprecated without suggesting a
 replacement:


http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/connector/HttpRequestWrapper.html

 Should I use something else?

Apparently...
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/servletapi/javax/servlet/http/HttpServletRequestWrapper.html

So, in my Filter, I have:
  HttpServletRequestWrapper wrappedRequest = new MyRequestWrapper(
request );
  chain.doFilter( wrappedRequest, response );

and
public class MyRequestWrapper extends HttpServletRequestWrapper  { ... }

Google didn't turn up any examples, so I'm feeling my way through this.
Please yell if I've gotten off on the wrong track,(otherwise I'll be back
when something stops working...)

-- 
Wendy Smoak


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



META-INF/context.xml question

2005-04-11 Thread Scott Purcell
Hello,
I am still configuring my Tomcat 5.5.7 on a PC. I am configuring a Context 
element and would like to put it in the META-INF/context.xml for my webapp. The 
docs say this would be fine.

My question is, so I need anytype of doctype heading for this, since it is a 
xml file?

Or do I just create the context.xml in an editor, and start with my Context 
elements?

Thanks,
Scott



 

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



RE: Application Data sharing -- store large object?

2005-04-11 Thread Daxin Zuo
Stefan,
   Thank you for your reply. It is very helpful. I may use a CACHE as you
mentioned.
I like to ask another question.
  1) The object I am going to cache is large, and dynamically changed
according to users  actions.
  2) Currently our program runs with Tomcat/Apache, it has to support other
java application servers -- Weblogic, ..., and different platforms -- Unix,
Linux, Windows.

 Do you have instruction for the selection among the various CACHE plug-in?

Thanks again.

-Original Message-
From: Stefan Frank [mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 12:04 AM
To: 'Tomcat Users List'
Subject: RE: Application Data sharing -- store large object?


You should maybe take a look into the various caching-libraries available
(ehcache, swarmcache, jboss-treecache etc.) - these libraries deal with
cacheing, which is a little different from what the
application/session-objects offer, as application and session have to be
absolutely reliable. If you store something in it, you can safely expect to
find it again. Therefore, this objects cannot deal with things like running
out of memory - they cannot simply throw out objects, when things get too
crowded.

On the other hand, Cacheing-Systems always have policies to deal with such
situations(eg. Swarm-cache dynamically adapts to your usage-patterns) and
can throw out old or un-needed objects, whenever it gets too crowded -
therefore, you cannot always expect an object that you put into the cache to
be still present after a while - so you have to deal with refetching it,
when you have nop cache-hit. You may want to look into O\R-Mapping
Frameworks  like hibernate: they already have these caches built in and take
care of re-fetching objects, when they have expired from the cache.

From a pure memory point of view, there is no difference. If you absolutely
need your complex object 100% of the time, it makes no difference, if you
keep it in the application or if you put it in an in-memory cache.

Hope this helps
stf

 -Original Message-
 From: Daxin Zuo [mailto:[EMAIL PROTECTED]
 Sent: Sonntag, 10. April 2005 19:23
 To: Tomcat Users List
 Subject: Application Data sharing -- store large object?

 In my program, an object that contains a large amount of data
 (complicated data strustures) is used in many pages. When I
 start doing it, I heard that it is better to not store large
 object in Application. So I let the program create a new one
 when ever this object is needed. Now I like to question if it
 is good to put this object in 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: META-INF/context.xml question

2005-04-11 Thread David Owens
Mine looks like this:

?xml version='1.0' encoding='utf-8'?
Context displayName=My Web App
docBase=myapp
path=/myapp
workDir=work/Catalina/localhost/myapp
antiJARLocking=true
antiResourceLocking=true
swallowOutput=true

...

/Context

-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 11, 2005 11:58 AM
To: tomcat-user@jakarta.apache.org
Subject: META-INF/context.xml question

Hello,
I am still configuring my Tomcat 5.5.7 on a PC. I am configuring a
Context element and would like to put it in the META-INF/context.xml
for my webapp. The docs say this would be fine.

My question is, so I need anytype of doctype heading for this, since it
is a xml file?

Or do I just create the context.xml in an editor, and start with my
Context elements?

Thanks,
Scott



 

-
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]



RequestDispatcher.forward() to doc located on HTTP Server

2005-04-11 Thread Ron Crayton
Is it possible to use Request.forward() to forward a request to an html 
document located on an HTTP Server?
 
I'm using Tomcat 5.5.7 and Apache 2.0.
 
I have a document setting in the htdocs folder of Apache 2.0 that I'm trying to 
forward to from an application deployed in Tomcat 5.5.7.
 
I have this context in my server.xml file:
 
Context path=/LoginApp docBase=LoginApp debug=0 reloadable=true 
crossContext=true
Logger className=org.apache.catalina.logger.FileLogger prefix=LoginApp. 
suffix=.log timestamp=true/
/Context
 
I have this code in my app:
 
ServletContext context = getServletConfig().getServletContext();
String uri = request.getQueryString();

ServletContext foreignContext = context.getContext(/);
RequestDispatcher requestDispatcher = foreignContext.getRequestDispatcher(uri);
requestDispatcher.forward(request, response);
 
The uri comes from the query string of the original request.
When the code runs it says that the requested resource is not available - Error 
404.
 
Am I trying to do something that's impossible?
 
Please help.
 
 


-
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 

[ANN] Tomcat 5.5.9 voted stable

2005-04-11 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce the immediate availability
of Tomcat 5.5.9 stable. This build contains numerous bug fixes, documentation
updates, and other improvements.

Please note that while all core features have been tested and voted stable,
there is a known issue in this build related to the clustering module. The fix
for this issue is available by itself at Bugzilla, and will be included in
subsequent Tomcat releases. Again, this issue only impacts users of Tomcat's
native clustering module.

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html

Downloads: http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi

The stability voting thread is available at MARC at AIMS.

The Apache Jakarta Tomcat Team 

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



Re: HELP Tomcat CGI

2005-04-11 Thread Mark Thomas
Should not is rather strong and a little misleading.
What you need to keep in mind is the warning in the docs.
quote
CAUTION - CGI scripts are used to execute programs external to the 
Tomcat JVM. If you are using the Java SecurityManager this will bypass 
your security policy configuration in catalina.policy.
/quote

Mark
Raghupathy,Gurumoorthy wrote:
Why don't you run perl in apache and integrate it with tomcat ?
Tomcat should not be used with CGI ( security issues ) 

Guru
-Original Message-
From: Scholtyssek Siegfried [mailto:[EMAIL PROTECTED] 
Sent: 11 April 2005 09:29
To: tomcat-user@jakarta.apache.org
Subject: HELP Tomcat CGI
Importance: High


Hello,
I use the Apache Tomcat.5.0.16 on the SUNOS 5.8   UNIX
With Tomcat we want execute cgi-scripts. So I modified all in web.xml
and removed the file servlets-cgi.renametojar to servlets-cgi.jar
If I start with Netscape the follow URL:
http://localhost:8080/cgi-bin/test.pl   so I get the follow ERROR:
Can't open perl Script ./test.pl No such file or direktory
Use -S to search $PATH for it.   

If I delete and make a follow link:
rm /usr/bin/perl
ln -s /usr/bin/ksh  /usr/bin/perlthen it is running.
Whats wrong ??? What I have to do, that it is running with ln -s
/usr/local/bin/perl  /usr/bin/perl 

In the first line of the test.pl I have still #!/usr/local/bin/perl
and I made chmod a+x test.pl and with command from xterm I can execute
it with the full path from the errormessage Can't open perl Script
.  !
Please help me because I will be else crazy :-)
Thanks and regards
Siggi


-
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.0.19 restarted without explicit shutdown and startup

2005-04-11 Thread Mark Thomas
Have a look at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Automatic%20Application%20Deployment

It describes all the circumstances where a 5.0.x Tomcat will do a redploy.
Mark
Richard Wang wrote:
Hello,
 
 We are running Tomcat (version 5.0.19) with Apache (version: 2.0.50) redirection on Windows 2000 (with latest fixes and patches). Last week, we observed that Tomcat unloaded and then reloaded our main application context without any obvious reasons. We have already searched without any luck the Tomcat bugs database and internet to find any documentation on this behavior. We are writing to this email list as a last ditch effort in the hope to get some help and tips.
 
 We appreciate your help in this regards.
 
 
Thanks,
Richard Wang
[EMAIL PROTECTED]
 
 


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


Logging assistance.

2005-04-11 Thread Scott Purcell
Hello,
I am trying to get the logging to work for a webapp I am working on. I am using 
Tomcat 5.5.7 and I am here:
http://localhost/tomcat-docs/logging.html

I followed the instructions but do not get what I assume is proper behavior.

1) created the log4j.properties file and placed under common/classes.

2) then I made sure I got the latest logj.jar and commons-logging.jar and 
placed both under common/lib

Then in my JSP file I have this:
%@ page import=org.apache.log4j.Logger %
% log.debug(alive.); %


Now I see the log file that was created, named Tomcat.log, but all that is in 
there are a bunch of Catalina messages and not my alive statement?

Anyone have an idea why this is not working? Do I need to create a resource, or 
something outside the docs?

Thanks,



Scott K Purcell | Developer | VERTIS |
555 Washington Ave. 4th Floor | St. Louis, MO 63101 |
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
 

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



Re: RequestDispatcher.forward() to doc located on HTTP Server

2005-04-11 Thread Mark Thomas
You might have better luck using a redirect. This should cause the 
client to request the alternate resource which Apache would then serve.

Mark
Ron Crayton wrote:
Is it possible to use Request.forward() to forward a request to an html document located on an HTTP Server?
 
I'm using Tomcat 5.5.7 and Apache 2.0.
 
I have a document setting in the htdocs folder of Apache 2.0 that I'm trying to forward to from an application deployed in Tomcat 5.5.7.
 
I have this context in my server.xml file:
 
Context path=/LoginApp docBase=LoginApp debug=0 reloadable=true crossContext=true
Logger className=org.apache.catalina.logger.FileLogger prefix=LoginApp. suffix=.log timestamp=true/
/Context
 
I have this code in my app:
 
ServletContext context = getServletConfig().getServletContext();
String uri = request.getQueryString();

ServletContext foreignContext = context.getContext(/);
RequestDispatcher requestDispatcher = foreignContext.getRequestDispatcher(uri);
requestDispatcher.forward(request, response);
 
The uri comes from the query string of the original request.
When the code runs it says that the requested resource is not available - Error 404.
 
Am I trying to do something that's impossible?
 
Please help.
 
 

		
-
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 

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


Help needed with Tomcat 5.5.7 admin app (MBeanServer is not available)

2005-04-11 Thread Fritz Schneider
Simon,

 

I had the same problem. Then I discovered that the admin app had to be
installed under ${Catalina.home}/server/webapps rather than just
${Catalina.home}/webapps. Once I moved the directory to where the Context
docBase said it was supposed to be, it started working.

 

Fritz

  _  

From: Simon Watson [EMAIL PROTECTED]
Subject: Help needed with Tomcat 5.5.7 admin app (MBeanServer is not
available)
Date: Sun, 06 Feb 2005 16:18:49 GMT

  _  

Hi there,
 
I've just installed Tomcat 5.5.7 (using the .exe installer on WinXP)
and, whilst the server and manager app work fine, I'm having problems
with the optional admin webapp.
 
I downloaded the admin zip file and extracted the files to the
appropriate locations. The admin app starts ok and I can log in, but
when I click on Environmental Entries (or try to add a datasource),
I get a 500 response with the message MBeanServer is not available
(stack trace from stdout log below).
 

 



Re: [ANN] Tomcat 5.5.9 voted stable

2005-04-11 Thread Christoph Kutzinski
Yoav Shapira wrote:
Please note that while all core features have been tested and voted stable,
there is a known issue in this build related to the clustering module. The fix
for this issue is available by itself at Bugzilla, and will be included in
subsequent Tomcat releases. Again, this issue only impacts users of Tomcat's
native clustering module.
Where can I find information about this issue? I found nothing in the 
release notes.

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


Re: Returning a different .jsp than the one the browser asked for...

2005-04-11 Thread Kurt Overberg
I was kinda able to do what I needed by using a filter- thanks for your reply!
/kurt

Dakota Jack wrote:
I don't know if this is helpful, but if you have a front controller in
your architecture, which would be normal,, this sort of behavior would
be simple to code.  Do you have a front controller?
On Apr 11, 2005 9:43 AM, Kurt Overberg [EMAIL PROTECTED] wrote:
Gang,
I've scoured the net looking for something that would help me do this- currently
looking at Wrapping the HttpServletRequest, but not having much luck.
Environment: tomcat 5.0.28 on linux, also using struts 1.1
I'm trying to make my system so that if a user asks for something like
/pages/testing.jsp, it does a check to see if /pages/en_us/testing.jsp exists
and if it does, it returns (executes, whatever) that page.  Otherwise it will
return /pages/testing.jsp.  It seems like the tomcat (or was it struts?) used to
do something like this where if testing_fr.jsp existed, and the person's locale
was set to FR it would return that, but that appears to have gone away and I
can't really find anything on it.  ANY help or pointers would be greatly
appreciated!  Thanks!
/kurt
-
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: Application Data sharing -- store large object?

2005-04-11 Thread Larry Meadors
Maybe I am missing something, but this sounds like a data model that should 
live in a database. 

That way, you could have your database layer (iBATIS or Hibernate) cahce it 
for you, and use standard APIs to get to the data.

Larry

On Apr 11, 2005 11:59 AM, Daxin Zuo [EMAIL PROTECTED] wrote:
 
 Stefan,
 Thank you for your reply. It is very helpful. I may use a CACHE as you
 mentioned.
 I like to ask another question.
 1) The object I am going to cache is large, and dynamically changed
 according to users actions.
 2) Currently our program runs with Tomcat/Apache, it has to support other
 java application servers -- Weblogic, ..., and different platforms -- 
 Unix,
 Linux, Windows.
 
 Do you have instruction for the selection among the various CACHE plug-in?
 
 Thanks again.
 
 -Original Message-
 From: Stefan Frank [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 11, 2005 12:04 AM
 To: 'Tomcat Users List'
 Subject: RE: Application Data sharing -- store large object?
 
 You should maybe take a look into the various caching-libraries available
 (ehcache, swarmcache, jboss-treecache etc.) - these libraries deal with
 cacheing, which is a little different from what the
 application/session-objects offer, as application and session have to be
 absolutely reliable. If you store something in it, you can safely expect 
 to
 find it again. Therefore, this objects cannot deal with things like 
 running
 out of memory - they cannot simply throw out objects, when things get too
 crowded.
 
 On the other hand, Cacheing-Systems always have policies to deal with such
 situations(eg. Swarm-cache dynamically adapts to your usage-patterns) and
 can throw out old or un-needed objects, whenever it gets too crowded -
 therefore, you cannot always expect an object that you put into the cache 
 to
 be still present after a while - so you have to deal with refetching it,
 when you have nop cache-hit. You may want to look into O\R-Mapping
 Frameworks like hibernate: they already have these caches built in and 
 take
 care of re-fetching objects, when they have expired from the cache.
 
 From a pure memory point of view, there is no difference. If you 
 absolutely
 need your complex object 100% of the time, it makes no difference, if you
 keep it in the application or if you put it in an in-memory cache.
 
 Hope this helps
 stf
 
  -Original Message-
  From: Daxin Zuo [mailto:[EMAIL PROTECTED]
  Sent: Sonntag, 10. April 2005 19:23
  To: Tomcat Users List
  Subject: Application Data sharing -- store large object?
 
  In my program, an object that contains a large amount of data
  (complicated data strustures) is used in many pages. When I
  start doing it, I heard that it is better to not store large
  object in Application. So I let the program create a new one
  when ever this object is needed. Now I like to question if it
  is good to put this object in 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: [ANN] Tomcat 5.5.9 voted stable

2005-04-11 Thread Remy Maucherat
On Apr 11, 2005 9:35 PM, Christoph Kutzinski [EMAIL PROTECTED] wrote:
 Yoav Shapira wrote:
 
  Please note that while all core features have been tested and voted stable,
  there is a known issue in this build related to the clustering module. The 
  fix
  for this issue is available by itself at Bugzilla, and will be included in
  subsequent Tomcat releases. Again, this issue only impacts users of Tomcat's
  native clustering module.
 
 Where can I find information about this issue? I found nothing in the
 release notes.

It's here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=34389

-- 
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



RE: [ANN] Tomcat 5.5.9 voted stable

2005-04-11 Thread Richard Mixon (qwest)
Christoph Kutzinski wrote:
 Yoav Shapira wrote:

 Please note that while all core features have been tested and voted
 stable, there is a known issue in this build related to the
 clustering module. The fix for this issue is available by itself at
 Bugzilla, and will be included in subsequent Tomcat releases. Again,
 this issue only impacts users of Tomcat's native clustering module.

 Where can I find information about this issue? I found nothing in the
 release notes.

Probably the release notes were already cut before the fix was created.
It is bug #34389. Here is the link:
  http://issues.apache.org/bugzilla/show_bug.cgi?id=34389

In the future just go to this link and search:
  http://issues.apache.org/bugzilla/
It is well documented under the support links.

HTH - Richard


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



Re: Clean shutdown? Can sessions survive a jsvc stop/start ?

2005-04-11 Thread August Detlefsen
Where do you get the non-buggy version? The TC 5.5 release notes don't
mention anything changing in jsvc since version 5.5.3. 

Is 5.5.9 now released? Does it include the jsvc fixes? 






--- Bill Barker [EMAIL PROTECTED] wrote:
 
 August Detlefsen [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  In TC 5.5.7, the tomcat start/stop script for Linux/Solaris
  (/etc/init.d/tomcat) stops tomcat by simply killing the process:
 
   stop)
 #
 # Stop Tomcat
 #
 PID=`cat /var/run/jsvc.pid`
 kill $PID
 ;;
 
  Do user sessions ever get a chance to be serialized if tomcat is
  stopped in such a manner?
 
 They do if you're not using the broken version of jsvc that ships
 with 
 Tomcat.  The non-buggy jsvc program catches SIGTERM and performs a
 clean 
 shutdown of Tomcat.
 
 
  I have noticed that users are forced to login again (we determine
 login
  status based on an object in a user's session) after tomcat
 restarts
  and I need to know if the object is getting serialized at all.
 
  Is there a better stop procedure?
 
 Nope. 
 
 
 
 
 -
 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: Clean shutdown? Can sessions survive a jsvc stop/start ?

2005-04-11 Thread August Detlefsen
One mroe question: 

If you are using jsvc can you still use the
$CATALINA_HOME/bin/[shutdown|startup].sh scripts to do manual tomcat
restarts? 




--- August Detlefsen [EMAIL PROTECTED] wrote:
 Where do you get the non-buggy version? The TC 5.5 release notes
 don't
 mention anything changing in jsvc since version 5.5.3. 
 
 Is 5.5.9 now released? Does it include the jsvc fixes? 
 
 
 
 
 
 
 --- Bill Barker [EMAIL PROTECTED] wrote:
  
  August Detlefsen [EMAIL PROTECTED] wrote in message 
  news:[EMAIL PROTECTED]
   In TC 5.5.7, the tomcat start/stop script for Linux/Solaris
   (/etc/init.d/tomcat) stops tomcat by simply killing the process:
  
stop)
  #
  # Stop Tomcat
  #
  PID=`cat /var/run/jsvc.pid`
  kill $PID
  ;;
  
   Do user sessions ever get a chance to be serialized if tomcat is
   stopped in such a manner?
  
  They do if you're not using the broken version of jsvc that ships
  with 
  Tomcat.  The non-buggy jsvc program catches SIGTERM and performs a
  clean 
  shutdown of Tomcat.
  
  
   I have noticed that users are forced to login again (we determine
  login
   status based on an object in a user's session) after tomcat
  restarts
   and I need to know if the object is getting serialized at all.
  
   Is there a better stop procedure?
  
  Nope. 
  
  
  
  
 
 -
  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 Cluster Sharing File System (NetApp)

2005-04-11 Thread Michael Marrotte
In the midst of architecting a new system and considering clustering Tomcat
servers to share the same files from a NetApp mount point.  Specifically,
configuring multiple instances (server.xml) of Tomcat to share the same
/usr/local/tomcat, webapps, etc.  Does Catalina support this type (e.g.
master/slaves file share) of architecture?  Has anyone implemented this that
can comment on any issues?  I was wondering how things like autodeploy and
JSP compile would be coordinated between multiple instances.  I'm thinking
that each instance has it's own server.xml that controls that, but would
like to get a sanity check.

 

Any help is greatly appreciated.

 

Thanks,

 

--Mike M.



test

2005-04-11 Thread luke
test
-- 
._
:|  .| |.|/.|_
:|__.|_|.|\.|_
:0421 276 282.

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



Re: META-INF/context.xml question

2005-04-11 Thread luke
 Hi,
 
 11Apr2005 @ 12:57 Scott Purcell thusly spake
  My question is, so I need anytype of doctype heading for this, since it is a 
  xml file?
  Or do I just create the context.xml in an editor, and start with my Context 
  elements?
 
 Following is a version of a context.xml file that goes in the META-INF 
directory of a webapp.
 
 ?xml version=1.0 encoding=UTF-8?
 Context path=/Ex12
   Logger className=org.apache.catalina.logger.FileLogger prefix=Ex12. 
suffix=.log timestamp=true/
   Realm className=org.apache.catalina.realm.MemoryRealm 
pathname=conf/myUsers.xml /
 /Context
 
 hth,
 
 L.
 
 -- 
 ._
 :|  .| |.|/.|_
 :|__.|_|.|\.|_
 :0421 276 282.

-- 
._
:|  .| |.|/.|_
:|__.|_|.|\.|_
:0421 276 282.

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



Getting Env Vars from Apache 2

2005-04-11 Thread Hoda Nadeem
I'm having trouble getting Apache environment variables through Tomcat
4.1, for example, I would like to get the mod_ssl additional environment
variable SSL_CLIENT_CERT. 
 
How do I get that value on the requesting server from Apache?
 
Thanks.


Specifying logging.properties file via system property doesn't work?

2005-04-11 Thread Jonathan Eric Miller
Until Tomcat 5.5.9 I was specifying my java.util.logging.config.file using a 
system property set using CATALINA_OPTS like the following.

CATALINA_OPTS='-Djava.util.logging.config.file=/opt/jakarta-tomcat-dev/conf/logging.properties 
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger'After removing, the logging.properties file from common/classes (Call mecrazy, but, I like having all my apps log to a single file (that way I don'thave to check 5 files for errors)) I found that nothing would get logged(even though I specified the logging.properties file using the systemproperty).I was able to solve the problem by simply copying my logging.properties fileto common/classes. It seems like using the system property should work toothough...Jon

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


Absosule path in appBase?

2005-04-11 Thread jesper
Hello.

When using appBase with an absolute path (inside Host 
server=blaj.example.com  ), i get error 400 no such host, when using 
webapp as appBase no problem.

refer to this discussion
http://www.codecomments.com/archive257-2005-3-414468.html

regards

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



How to use Database persistence for tomcat clustering?

2005-04-11 Thread hang zhao
Hi, everyone

I am trying some configuration with my small tomcat
cluster (2 tomcats, 1 apache, connected with mod_jk2
as load balancer).

The problem is that I want to use a shared database
(Mysql) to do session replication instead of in-memory
session replication. 

But to the best of my knowledge, you seems can not
make session level fail over to work with shared
database  session replication. The changed session
data is not sent to database immediately.

In another word, how can I configure so that when I
change session data, it is sent to database
immediately. And so when some nodes dies, the other
node can pick up the unfinished request silently
without session data loss.


Thanks in advance

Hang 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

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



logging to seperate log file per war file

2005-04-11 Thread quentin . compson
is this possible using context.xml or some other way?  im using log4j but some
output still goes to stdout (e.g System.out.println()).

thx


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



change to server.xml requires restart 5.5.4

2005-04-11 Thread quentin . compson
tomcat 5.5.4 on win2k server, jvm 1.4.x

it seems that every time i make a change to the server.xml (db connection
pools), i have to restart tomcat.  i assume thats normal, but i was hoping maybe
not to have to do it. or maybe 5.5.9 supports something like this?  

thx


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



Re: change to server.xml requires restart 5.5.4

2005-04-11 Thread Parsons Technical Services
I don't think that has changed, but I could be wrong. One thought is that 
unless you have a lot of apps using the DB you could move the resource to 
the context for the app. Then only the app would have to be restarted.

But that begs the question, if you are changing the global db resource what 
are the apps doing? If you are making a change such as this why is 
restarting Tomcat an issue?

Just trying to understand to better help.
Doug
- Original Message - 
From: quentin.compson [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Monday, April 11, 2005 11:08 PM
Subject: change to server.xml requires restart 5.5.4


tomcat 5.5.4 on win2k server, jvm 1.4.x
it seems that every time i make a change to the server.xml (db connection
pools), i have to restart tomcat.  i assume thats normal, but i was hoping 
maybe
not to have to do it. or maybe 5.5.9 supports something like this?

thx
-
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: still not clear with connection pooling in tomcat

2005-04-11 Thread Krishnakant Mane
hello Mr. Ajay Kumar,
thanks a lot.
I am using tomcat 5.0.25 and I have the context file
in the conf/Catalina/localhost directory.
in that file where should I put the code u provided in
server.xml
after the tag is over or before the tag is closed?
thanks
Krishnakant.

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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