Working with shared hosting on 5.5 - logging options?

2009-03-18 Thread Josh McDonald
Hey guys,

I'm working for the first time with a client that requires I deliver a .war,
and it gets deployed into a shared environment where I have no control and
can't get access to the logs. What can I do from within my .war file to get
a local copy of logs related to my application only redirected to a file
that I do have access to? I'd like to be able to get startup / shutdown logs
specific to my app as well as application logs if possible.

Any thoughts? I find documentation for logging very hard to find online if
you want to do anything remotely out of the ordinary.

Any pointers much appreciated!

-Josh

-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Josh 'G-Funk' McDonald
  -  j...@joshmcdonald.info
  -  http://twitter.com/sophistifunk
  -  http://flex.joshmcdonald.info/


error page configuration

2009-03-18 Thread Dinesh Gupta










Hi,

I am using tiles for template.
In body jsp got error.
Now I want to configure the error page if any of the included page have 
exception.

If anyone have idea about this please help.

Regards
Dinesh Gupta
_
How fun is this? IMing with Windows Live Messenger just got better.
http://www.microsoft.com/india/windows/windowslive/messenger.aspx

Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Rajat Gupta05
Hi All,

I have a configuration where Apache(2.2) --Mod_jk--Tomcat(5.0) for my program.
Now whenever I receive request or response having httpheaders with Japanese 
charaters, those are either replaced by ??? or they are replaced by some junk 
charateres.
Please see the Japanese headers are encoded with SHIFT_JIS encoding. Is there 
are a way where we can provide this encoding inside Apcahe/mod_jk/Tomcat.

Any help would be really appreciated.

Thanks
Rajat


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


Re: Userdirs on an NFS share

2009-03-18 Thread Anthony PAUL

Caldarale, Charles R a écrit :


type Status report
message /~paul/test.jsp
description The requested resource (/~paul/test.jsp) 
is not available.


Does the userid Tomcat is running under have access to the file in question?  
If not, you'll always get the 404.


Hello and thank you for your reply.
By now, I'm running it with the root user (I'm testing), but the NFS 
share is mounted with the no_root_squash option.
However, from / till the public_html, all the directories have rx access 
for everybody (and the .jsp as well), so I guess the files should be 
readable. (Actually, if I remove the :8080 in the URL, the source code 
is displayed, even Apache is running under www user)



If I change the homedirectory to a local directory, 
it works fine.


What do you mean by the homedirectory?  Tomcat's?  The user's?  Your own?


I meant users home directories.
Actually, for this test, I unmounted the NFS share, then copied my own 
home directory on the local filesystem (with the same rights).


Usually, I mount the NFS share on /NFS, but for this test I did:
umount /NFS
mkdir -p /NFS/homes/paul/public_html
vi /NFS/homes/paul/public_html/test.jsp
chmod -R 755 /NFS

Then on http://server:8080/~paul/test.jsp the jsp is executed.



But this doesn't work:
Listener className=org.apache.catalina.startup.UserConfig
 directoryName=public_html
 homeBase=/NFS/homes/
 userClass=org.apache.catalina.startup.HomesUserDatabase/


Where is the above Listener located?  What does doesn't work mean?  Be 
specific.


What I meant by doesn't work is the symptom I described above: the 
Tomcat 404 error:

type Status report
message /~paul/test.jsp
description The requested resource (/~paul/test.jsp) is not available.

The Listener is in the server.xml, inside the Host. Below, the whole file:

== server.xml ==

?xml version='1.0' encoding='utf-8'?
Server port=8005 shutdown=SHUTDOWN

Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /

Listener className=org.apache.catalina.core.JasperListener /
Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /


  GlobalNamingResources
Resource name=UserDatabase auth=Container
type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
pathname=conf/tomcat-users.xml /
  /GlobalNamingResources

 Service name=Catalina

 Connector port=8080 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443 /

  Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

  Engine name=Catalina defaultHost=localhost

  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/

  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

!-- MY OWN CONFIGURATION --
DefaultContext reloadable=true
/DefaultContext

Listener className=org.apache.catalina.startup.UserConfig
 directoryName=public_html
 homeBase=/NFS/homes/
 userClass=org.apache.catalina.startup.HomesUserDatabase/
!-- / MY OWN CONFIGURATION --

  /Host
/Engine
  /Service
/Server

== /server.xml ==



Sorry for my lack of details and thanks for your help.

Anthony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Userdirs on an NFS share

2009-03-18 Thread Anthony PAUL

Anthony J. Biacco a écrit :

Remember that over nfs, the client's access to the server will be as
user nobody or nfsnobody, depending on your system, so that user will
have to have access to all those directories/files, unless of course you
use the anonuid/anongid directives in your exports file.

-Tony



Yes, but the whole directories in my NFS share are rwxr-xr-x, so I think 
it should be ok...


/NFS (755)
/NFS/homes (755)
/NFS/homes/user (711) (but for the test, I changed it to 755)
/NFS/homes/user/public_html (755)
/NFS/homes/user/public_html/test.jsp (755)

Anthony

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat hangs due to socket reads?

2009-03-18 Thread Diego Manilla Suárez
Hi everyone. I'm running Tomcat 5.0.30 + Apache 2.2.3 on a SuSE EL 10. 
After a few days running, the CPU load increases, until Tomcat is eating 
99% of it, and I need to restart. The last time this happened, I 
executed jstack on the Tomcat VM, and I saw most of threads stacks are 
like this:


##
Thread 26701: (state = IN_NATIVE)
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, 
byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise)
- java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 
(Compiled frame)

- java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
- java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=256 
(Compiled frame)
- java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=313 
(Compiled frame)
- 
org.apache.jk.common.ChannelSocket.read(org.apache.jk.core.MsgContext, 
byte[], int, int) @bci=32, line=598 (Compiled frame)
- org.apache.jk.common.ChannelSocket.receive(org.apache.jk.core.Msg, 
org.apache.jk.core.MsgContext) @bci=38, line=535 (Compiled frame)
- 
org.apache.jk.common.ChannelSocket.processConnection(org.apache.jk.core.MsgContext) 
@bci=28, line=663 (Compiled frame)
- org.apache.jk.common.SocketConnection.runIt(java.lang.Object[]) 
@bci=8, line=866 (Interpreted frame)
- org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() 
@bci=167, line=684 (Interpreted frame)

- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)
##

This makes me think there is some issues with Apache - Tomcat connection 
or maybe some SO configuration, because the number of requests is not 
that high.


This is the configuration of the AJP connector on server.xml:

##
Connector port=8080
  maxThreads=10 minSpareThreads=1 maxSpareThreads=1
  enableLookups=false acceptCount=100
  debug=0
  disableUploadTimeout=true /
##

And the forwarding in Apache is done through mod_proxy_ajp, like this:

##
ProxyPass /frontdipuleon ajp://localhost:8009/myapp
ProxyPassReverse  /frontdipuleon ajp://localhost:8009/myapp
##

Any idea on what can be wrong? The only thing I tried now is setting a 
connectionTimeout on the AJP connector, but I think this wouldn't tell 
me the real cause of these problems. What else should I check?


Thanks in advance.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tracing port to port

2009-03-18 Thread André Warnier

Filip Hanik - Dev Lists wrote:

wireshark.org


Thanks.
I had seen that name several times, but it is only yesterday that 
someone told me that this was the new name for Ethereal.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tracing port to port

2009-03-18 Thread Gregor Schneider
André,

two questions:

what type of conenction is the servlet using? Is it RMI, Socket, something else?

If you're not happy with Wireshark, there might be an approach which
takes a bit more effort but might work in case the Java-classes are
not obfuscated:

Talking RMI:

- try to decompile the Java-classes from the war (nice software to do
that might be http://java.decompiler.free.fr or simply try JAD)

- find the RMI-interfaces

- write an RMI-proxy which dumps the information using either
console-output or log4j or whatever you like

- after that, forward the RMI-information from the proxy to the Java-Demon

Cheers

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs due to socket reads?

2009-03-18 Thread André Warnier

Diego Manilla Suárez wrote:
[...]
Hi.
No idea about your problem, but in the information you provide, you are 
showing the Apache connecting to port 8009 of Tomcat, but for Tomcat you 
are showing the Connector that listens on port 8080.

That's probably not very helpful.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat hangs due to socket reads?

2009-03-18 Thread Diego Manilla Suárez
Hi André. That was just an error when copying and pasting, I picked up 
the wrong connector. This is the right one:


##
Connector port=8009
   minProcessors=5 maxProcessors=150
   enableLookups=false redirectPort=443 debug=0
   protocol=AJP/1.3 /
##

Thanks for pointing that out.


André Warnier escribió:

Diego Manilla Suárez wrote:
[...]
Hi.
No idea about your problem, but in the information you provide, you 
are showing the Apache connecting to port 8009 of Tomcat, but for 
Tomcat you are showing the Connector that listens on port 8080.

That's probably not very helpful.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org










Re: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Mark Thomas
Rajat Gupta05 wrote:
 Hi All,
 
 I have a configuration where Apache(2.2) --Mod_jk--Tomcat(5.0) for my 
 program.
 Now whenever I receive request or response having httpheaders with Japanese 
 charaters, those are either replaced by ??? or they are replaced by some junk 
 charateres.
 Please see the Japanese headers are encoded with SHIFT_JIS encoding. Is there 
 are a way where we can provide this encoding inside Apcahe/mod_jk/Tomcat.
 
 Any help would be really appreciated.

http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q4

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Support for JSF 2.0

2009-03-18 Thread Martin Dubuc
I can't find the JSP 2.2 specification, but if you look at JSR-316, you will
see that the basis for Java EE 6 is servlet 3.0, JSP 2.2 and JSF 2.0. I am
not sure it makes much sense to align JSP 2.1 with servlet 3.0.

Martin

On Tue, Mar 17, 2009 at 4:34 PM, Mark Thomas ma...@apache.org wrote:

 Martin Dubuc wrote:
  It is my understanding that Java EE 6 will use JSP 2.2, servlet 3.0 and
 JSF
  2.0. I am wondering if Tomcat 7.0 should also support JSP 2.2 in addition
 to
  servlet 3.0.

 As far as I am aware, there is no JSP 2.2 spec in the works. If you know
 different, a reference would be useful.

 Mark

 
  I have seen on the Sun's JSF forum a poster claim that JSF 2.0 would work
  with JSP 2.0 and servlet 2.5, so I guess Tomcat 6.0.x would be sufficient
  for Web applications using JSF 2.0.
 
  Martin
 
  On Tue, Mar 17, 2009 at 11:02 AM, Mark Thomas ma...@apache.org wrote:
 
  Christopher Schultz wrote:
  Martin,
 
  On 3/9/2009 5:44 PM, Martin Dubuc wrote:
  I am wondering if there are plans to support JSF 2.0 when it is
  released. I
  assume that support for JSF 2.0 will require support for new
 servlet/JSP
  specs (somehting like servlet 3.0/JSP 2.2). Would this be done in
  version
  7.0 of Tomcat?
  http://wiki.apache.org/tomcat/TomcatVersions says there are no
 specific
  plans for Tomcat 7.0. It also links to several notes files that
 don't
  exist :(
  There are plans for Tomcat 7.0. I'll update that page and fix the links.
 
  There is no JSP 2.2 spec that I am aware of. Tomcat 7 will support
 servlet
  3.0
 
  Mark
 
  I would guess that 7.0 would be a good target for JSF 2.0 support (or
 at
  least support for those APIs that JSF 2.0 requires) but nobody's
  promising anything at this point.
 
  -chris
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




RE: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Rajat Gupta05
Hey Mark,

Thanks for your response... I have tried to isolate the issue if it is being 
caused by Apache/Mod_jk/Tomcat. Firstly I tried a request to standlone apache 
with customize d header having Japanese characters. The requested page displays 
the headers in the request. To my surprise Apache is not dealing with Japanese 
characters correctly and replacing them with some junk value. For example I 
addedミが完たソ税一使饅漢社氏ソ圧user1 in the request header and wht I received was 
~‚ªŠ®‚½ƒ\ÅˆêŽgé\Š¿ŽÐŽ¿ˆ³user1.

Also to add the same thing works when make request to apache configured to 
reverse proxy. Can any one provide explanation to that?

Thanks
Rajat

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Wednesday, March 18, 2009 6:27 PM
To: Tomcat Users List
Subject: Re: Issue in sending Request/response http headers containing Japanese 
charateres

Rajat Gupta05 wrote:
 Hi All,
 
 I have a configuration where Apache(2.2) --Mod_jk--Tomcat(5.0) for my 
 program.
 Now whenever I receive request or response having httpheaders with Japanese 
 charaters, those are either replaced by ??? or they are replaced by some junk 
 charateres.
 Please see the Japanese headers are encoded with SHIFT_JIS encoding. Is there 
 are a way where we can provide this encoding inside Apcahe/mod_jk/Tomcat.
 
 Any help would be really appreciated.

http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q4

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

Re: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Mark Thomas
Rajat Gupta05 wrote:
 Hey Mark,
 
 Thanks for your response... I have tried to isolate the issue if it is being 
 caused by Apache/Mod_jk/Tomcat. Firstly I tried a request to standlone apache 
 with customize d header having Japanese characters. The requested page 
 displays the headers in the request. To my surprise Apache is not dealing 
 with Japanese characters correctly and replacing them with some junk value. 
 For example I addedミが完たソ税一使饅漢社氏ソ圧user1 in the request header and wht I 
 received was ~‚ªŠ®‚½ƒ\ÅˆêŽgé\Š¿ŽÐŽ¿ˆ³user1.
 
 Also to add the same thing works when make request to apache configured to 
 reverse proxy. Can any one provide explanation to that?

RFC2616. You have to use ISO-8859-1.

Mark

 
 Thanks
 Rajat
 
 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org] 
 Sent: Wednesday, March 18, 2009 6:27 PM
 To: Tomcat Users List
 Subject: Re: Issue in sending Request/response http headers containing 
 Japanese charateres
 
 Rajat Gupta05 wrote:
 Hi All,

 I have a configuration where Apache(2.2) --Mod_jk--Tomcat(5.0) for my 
 program.
 Now whenever I receive request or response having httpheaders with Japanese 
 charaters, those are either replaced by ??? or they are replaced by some 
 junk charateres.
 Please see the Japanese headers are encoded with SHIFT_JIS encoding. Is 
 there are a way where we can provide this encoding inside 
 Apcahe/mod_jk/Tomcat.

 Any help would be really appreciated.
 
 http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q4
 
 Mark
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
  CAUTION - Disclaimer *
 This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
 for the use of the addressee(s). If you are not the intended recipient, 
 please 
 notify the sender by e-mail and delete the original message. Further, you are 
 not 
 to copy, disclose, or distribute this e-mail or its contents to any other 
 person and 
 any such actions are unlawful. This e-mail may contain viruses. Infosys has 
 taken 
 every reasonable precaution to minimize this risk, but is not liable for any 
 damage 
 you may sustain as a result of any virus in this e-mail. You should carry out 
 your 
 own virus checks before opening the e-mail or attachment. Infosys reserves 
 the 
 right to monitor and review the content of all messages sent to or from this 
 e-mail 
 address. Messages sent to or from this e-mail address may be stored on the 
 Infosys e-mail system.
 ***INFOSYS End of Disclaimer INFOSYS***


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Rajat Gupta05
In that case response is ??user1

Thanks
Rajat

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Wednesday, March 18, 2009 7:07 PM
To: Tomcat Users List
Subject: Re: Issue in sending Request/response http headers containing Japanese 
charateres

Rajat Gupta05 wrote:
 Hey Mark,
 
 Thanks for your response... I have tried to isolate the issue if it is being 
 caused by Apache/Mod_jk/Tomcat. Firstly I tried a request to standlone apache 
 with customize d header having Japanese characters. The requested page 
 displays the headers in the request. To my surprise Apache is not dealing 
 with Japanese characters correctly and replacing them with some junk value. 
 For example I addedミが完たソ税一使饅漢社氏ソ圧user1 in the request header and wht I 
 received was ~‚ªŠ®‚½ƒ\ÅˆêŽgé\Š¿ŽÐŽ¿ˆ³user1.
 
 Also to add the same thing works when make request to apache configured to 
 reverse proxy. Can any one provide explanation to that?

RFC2616. You have to use ISO-8859-1.

Mark

 
 Thanks
 Rajat
 
 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org] 
 Sent: Wednesday, March 18, 2009 6:27 PM
 To: Tomcat Users List
 Subject: Re: Issue in sending Request/response http headers containing 
 Japanese charateres
 
 Rajat Gupta05 wrote:
 Hi All,

 I have a configuration where Apache(2.2) --Mod_jk--Tomcat(5.0) for my 
 program.
 Now whenever I receive request or response having httpheaders with Japanese 
 charaters, those are either replaced by ??? or they are replaced by some 
 junk charateres.
 Please see the Japanese headers are encoded with SHIFT_JIS encoding. Is 
 there are a way where we can provide this encoding inside 
 Apcahe/mod_jk/Tomcat.

 Any help would be really appreciated.
 
 http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q4
 
 Mark
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
  CAUTION - Disclaimer *
 This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
 for the use of the addressee(s). If you are not the intended recipient, 
 please 
 notify the sender by e-mail and delete the original message. Further, you are 
 not 
 to copy, disclose, or distribute this e-mail or its contents to any other 
 person and 
 any such actions are unlawful. This e-mail may contain viruses. Infosys has 
 taken 
 every reasonable precaution to minimize this risk, but is not liable for any 
 damage 
 you may sustain as a result of any virus in this e-mail. You should carry out 
 your 
 own virus checks before opening the e-mail or attachment. Infosys reserves 
 the 
 right to monitor and review the content of all messages sent to or from this 
 e-mail 
 address. Messages sent to or from this e-mail address may be stored on the 
 Infosys e-mail system.
 ***INFOSYS End of Disclaimer INFOSYS***


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: error page configuration

2009-03-18 Thread Caldarale, Charles R
 From: Dinesh Gupta [mailto:dinesh.gupt...@hotmail.com] 
 Subject: error page configuration
 
 If anyone have idea about this please help.

http://www.catb.org/~esr/faqs/smart-questions.html

If you provide real information, you might get a real answer...

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



R

2009-03-18 Thread meamit221


-- 
View this message in context: http://www.nabble.com/R-tp22579395p22579395.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Load server.xml without restarting Tomcat 5.5.26 Server

2009-03-18 Thread meamit221

Hi,
   I am using Tomcat 5.5.26 server for my application. I need to add a host
entry inside server.xml everytime a user registers himself. But the server
does not recognize the new entry without restarting server. Is it possible
to reload the server.xml without restarting the server?

   
-- 
View this message in context: 
http://www.nabble.com/Load-server.xml-without-restarting-Tomcat-5.5.26-Server-tp22579538p22579538.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Load server.xml without restarting Tomcat 5.5.26 Server

2009-03-18 Thread Caldarale, Charles R
 From: meamit221 [mailto:amit.n...@aceicon.com] 
 Subject: Load server.xml without restarting Tomcat 5.5.26 Server
 
 Is it possible to reload the server.xml without restarting the server?

No.  However, if you examine the Tomcat source, you can build a webapp to call 
the appropriate APIs to register the new host; you may also be able to do the 
same via JMX.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread Mikolaj Rydzewski

Hello everybody,

I have faced interesting issue recently. Here are details:
I had to implement custom log4j appender that logs particular messages 
to database (JDBCAppender was not enough). So I did, using JNDI based 
datasources, not a difficult task. Of course I updated server.xml, 
context.xml and web.xml with datasource definition, etc.


Unfortunately every time I deployed application there was Name 
java:comp is not bound in this Context error  in logfile (see 
stacktrace at end of email).
It's strange, isn't it? java:comp is a standard Java root for all JNDI 
based resources. So I don't understand how does it happen that it is not 
bound.


My appender implementation tries to lookup datasource in JNDI just after 
all properties has been set (recommended way - 
http://tinyurl.com/dg4fxa). Then I moved JNDI lookup code to method that 
actully performs logging. And it started to work!


So, to summarize. My custom log4j code was not able to lookup JNDI 
resources during deployment process. But it was able to during normal 
webapplication usage.


Is it expected behaviour? It looks like Tomcat (5.5.26 on Sun's JDK 1.5 
in my case) fills JNDI context information after webapplication deployment.


On other hand, I wonder how does it keep separate copies of JNDI catalog 
per webapplication.



javax.naming.NameNotFoundException: Name java:comp is not bound in this 
Context

   at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
   at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
   at javax.naming.InitialContext.lookup(InitialContext.java:351)
   at 
mypackage.DataSourceAppender.activateOptions(DataSourceAppender.java:34)
   at 
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
   at 
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:220)
   at 
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)
   at 
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)
   at 
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)
   at 
org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:345)
   at 
org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:827)
   at 
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)
   at 
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)
   at 
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)

   at org.apache.log4j.LogManager.clinit(LogManager.java:122)
   at org.apache.log4j.Logger.getLogger(Logger.java:104)
   at 
org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)
   at 
org.apache.commons.logging.impl.Log4JLogger.init(Log4JLogger.java:109)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
   at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

   at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1116)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:914)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)

   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:704)
   at 
org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:381)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4119)
   at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
   at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
   at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at 

Re: tracing port to port

2009-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 3/17/2009 8:02 PM, Filip Hanik - Dev Lists wrote:
 wireshark.org

+1

Wireshark does full TCP capture but also understands protocols, so it
will show you only the HTTP details for a particular packet, etc.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBCXAACgkQ9CaO5/Lv0PA3GQCZAXUMXaj8xxJvkDCLdod2tC46
yEwAn0eneLEDM1ragxHBzElzPb010zoD
=6Ghf
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 3/18/2009 9:36 AM, Mark Thomas wrote:
 RFC2616. You have to use ISO-8859-1.

It's worse than that: it's ASCII, not ISO-8859-1.

HTTP headers are actually delegated (in section 4.2) to RFC822
(Internet Text Messages).

HTTP section 4.2
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2)

HTTP header fields, which include general-header (section 4.5),
request-header (section 5.3), response-header (section 6.2), and
entity-header (section 7.1) fields, follow the same generic format as
that given in Section 3.1 of RFC 822 [9]


RFC822 Section 3.1 (http://www.w3.org/Protocols/rfc822/)


The body is simply a sequence of lines containing ASCII characters.


- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBDDwACgkQ9CaO5/Lv0PCeiwCfeVwKCt9FQSl2IauiSvzve8T4
2n8AoKiKnY+p/Mdyuc//lJTKwjt73Kf/
=YC/M
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Load server.xml without restarting Tomcat 5.5.26 Server

2009-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Amit,

On 3/18/2009 10:36 AM, Caldarale, Charles R wrote:
 From: meamit221 [mailto:amit.n...@aceicon.com] 
 Subject: Load server.xml without restarting Tomcat 5.5.26 Server

 Is it possible to reload the server.xml without restarting the server?
 
 No. However, if you examine the Tomcat source, you can build a 
 webapp to call the appropriate APIs to register the new host; you may
 also be able to do the same via JMX.

Don't forget to also record this host information somewhere on the disk,
otherwise you will lose all your host info when you restart.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBDS0ACgkQ9CaO5/Lv0PDD3QCeJfcwE52MPJk2WSsfeXUbTupP
+xsAoJgANTNw4cAHJCvhkO8PsgW3q/Z0
=SIob
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 3/18/2009 8:57 AM, Mark Thomas wrote:
 Rajat Gupta05 wrote:
 Hi All,

 I have a configuration where Apache(2.2) --Mod_jk--Tomcat(5.0) for my 
 program.
 Now whenever I receive request or response having httpheaders with Japanese 
 charaters, those are either replaced by ??? or they are replaced by some 
 junk charateres.
 Please see the Japanese headers are encoded with SHIFT_JIS encoding. Is 
 there are a way where we can provide this encoding inside 
 Apcahe/mod_jk/Tomcat.

 Any help would be really appreciated.
 
 http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q4

I would like to update this wiki page with references to the sections of
the servlet specification, etc. that lay down these requirements. Would
that be acceptable? I wouldn't want to update the wiki, only to have
someone take it out for fear of cluttering the text.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBDgYACgkQ9CaO5/Lv0PAG5gCePVaIB2lVHoX4zvynkAfObllE
pGYAnAx9QTZGsB7kFuVVsvJt7+SdubT8
=TGly
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tracing port to port

2009-03-18 Thread Gregor Schneider
On Wed, Mar 18, 2009 at 3:47 PM, Christopher Schultz
ch...@christopherschultz.net wrote:

 Wireshark does full TCP capture but also understands protocols, so it
 will show you only the HTTP details for a particular packet, etc.

But will this help to find out the characterset of encoded string in
an RMI-object?

If I understand André correctly, he wants to find out the encoding
dirung the communication between servlet  java-demon - I doubt that
this goes as HTTP over the wire.

@André:

Maybe you could give a more detailled description of your problem, so
that we might come up with some more helpful ideas?

Cheers

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Mark Thomas
Christopher Schultz wrote:
 Mark,
 
 On 3/18/2009 8:57 AM, Mark Thomas wrote:
 Rajat Gupta05 wrote:
 Hi All,

 I have a configuration where Apache(2.2) --Mod_jk--Tomcat(5.0) for my 
 program.
 Now whenever I receive request or response having httpheaders with Japanese 
 charaters, those are either replaced by ??? or they are replaced by some 
 junk charateres.
 Please see the Japanese headers are encoded with SHIFT_JIS encoding. Is 
 there are a way where we can provide this encoding inside 
 Apcahe/mod_jk/Tomcat.

 Any help would be really appreciated.
 http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q4
 
 I would like to update this wiki page with references to the sections of
 the servlet specification, etc. that lay down these requirements. Would
 that be acceptable? I wouldn't want to update the wiki, only to have
 someone take it out for fear of cluttering the text.

Go for it. Maybe as a new question along the lines of Why does it have to be
like this?

Mark

 
 -chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread André Warnier

Rajat Gupta05 wrote:

In that case response is ??user1


Rajat,
you are talking about HTTP headers, so below is relevant if you are 
using the correct words and refer effectively to HTTP headers.


I think what Mark was tying to tell you before is :

The current HTTP specification does not allow for HTTP header values to 
be encoded in anything else than ASCII or, at the limit, ISO-8859-1.
The HTTP official specification, RFC2616, talks of octets for the 
value of a header (which theoretically would be any combination of 8-bit 
bytes), but also refers to another RFC, much older, RFC822.

And that one says :
3.1.2.  STRUCTURE OF HEADER FIELDS

Once a field has been unfolded, it may be viewed as being com-
posed of a field-name followed by a colon (:), followed by a
field-body, and  terminated  by  a  carriage-return/line-feed.
The  field-name must be composed of printable ASCII characters
(i.e., characters that  have  values  between  33.  and  126.,
decimal, except colon).  The field-body may be composed of any
ASCII characters, except CR or LF.  (While CR and/or LF may be
present  in the actual text, they are removed by the action of
unfolding the field.)

So, with Japanese characters in HTTP headers, you are outside of the 
HTTP specification, and you cannot expect any webserver (or proxy) to 
handle this in any consistent manner.


HTTP headers can specify the type and character set of the HTTP message 
/body/, but there exists to my knowledge no mechanism to specify the 
character set of a HTTP header.


However, if you are talking about the HTTP request line (the URL), and 
not about HTTP headers, then please restate your question correctly.







Thanks
Rajat

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Wednesday, March 18, 2009 7:07 PM

To: Tomcat Users List
Subject: Re: Issue in sending Request/response http headers containing Japanese 
charateres

Rajat Gupta05 wrote:

Hey Mark,

Thanks for your response... I have tried to isolate the issue if it is being 
caused by Apache/Mod_jk/Tomcat. Firstly I tried a request to standlone apache 
with customize d header having Japanese characters. The requested page displays 
the headers in the request. To my surprise Apache is not dealing with Japanese 
characters correctly and replacing them with some junk value. For example I 
addedミが完たソ税一使饅漢社氏ソ圧user1 in the request header and wht I received was 
~‚ªŠ®‚½ƒ\ÅˆêŽgé\Š¿ŽÐŽ¿ˆ³user1.

Also to add the same thing works when make request to apache configured to 
reverse proxy. Can any one provide explanation to that?


RFC2616. You have to use ISO-8859-1.

Mark


Thanks
Rajat

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Wednesday, March 18, 2009 6:27 PM

To: Tomcat Users List
Subject: Re: Issue in sending Request/response http headers containing Japanese 
charateres

Rajat Gupta05 wrote:

Hi All,

I have a configuration where Apache(2.2) --Mod_jk--Tomcat(5.0) for my program.
Now whenever I receive request or response having httpheaders with Japanese 
charaters, those are either replaced by ??? or they are replaced by some junk 
charateres.
Please see the Japanese headers are encoded with SHIFT_JIS encoding. Is there 
are a way where we can provide this encoding inside Apcahe/mod_jk/Tomcat.

Any help would be really appreciated.

http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q4

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.

***INFOSYS End of Disclaimer INFOSYS***



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional 

Re: tracing port to port

2009-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gregor,

On 3/18/2009 11:08 AM, Gregor Schneider wrote:
 On Wed, Mar 18, 2009 at 3:47 PM, Christopher Schultz
 ch...@christopherschultz.net wrote:

 Wireshark does full TCP capture but also understands protocols, so it
 will show you only the HTTP details for a particular packet, etc.

 But will this help to find out the characterset of encoded string in
 an RMI-object?

Er, RMI objects should be sent using no encoding... that is, serialized
objects encode themselves. For java.lang.String, the serialized form is
always in UTF-8. From section 6.2 (Stream Elements) of the java
serialization protocol:


The representation of String objects consists of length information
followed by the contents of the string encoded in modified UTF-8. The
modified UTF-8 encoding is the same as used in the JavaTM Virtual
Machine and in the java.io.DataInput and DataOutput interfaces; it
differs from standard UTF-8 in the representation of supplementary
characters and of the null character.


There should be no concern with RMI, here.

 If I understand André correctly, he wants to find out the encoding
 dirung the communication between servlet  java-demon - I doubt that
 this goes as HTTP over the wire.

He doesn't say whether he's using RMI, but my guess is he isn't. I
suspect he's using something ad-hoc.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBHLIACgkQ9CaO5/Lv0PByIgCgj7eMQkAc1ZcZ7ldy78Qts3eB
JOUAn3Yoo9AZ7gyExUC6A25xFhW6bnwF
=bw9A
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 3/18/2009 11:15 AM, André Warnier wrote:
 So, with Japanese characters in HTTP headers, you are outside of the
 HTTP specification, and you cannot expect any webserver (or proxy) to
 handle this in any consistent manner.
 
 HTTP headers can specify the type and character set of the HTTP message
 /body/, but there exists to my knowledge no mechanism to specify the
 character set of a HTTP header.

While this is correct, there's a somewhat obvious way to encode your
headers (including Japanese or other non-ASCII characters) so they will
work:

java.net.URLEncoder.encode(text, ASCII)

You'll get a string like foobar%45%67%65%43%45%45%78%69 You just
have to remember to decode the string on the other end in a similar way
(java.net.URLDecoder).

That should do it, though I would recommend using a POST body with a
properly-set Content-Type (including encoding!) for sending data that
isn't going to be ASCII-only.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBHb0ACgkQ9CaO5/Lv0PD10ACgjfpjy2S8iXmTyKLQaWowKTAH
eAcAn2ieCHyhRYMztzkYlPMuqoSxahnG
=cjuG
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tracing port to port

2009-03-18 Thread André Warnier

Gregor Schneider wrote:


If I understand André correctly, he wants to find out the encoding
dirung the communication between servlet  java-demon - I doubt that
this goes as HTTP over the wire.

True. It's not HTTP.
In fact it is .. well .. nothing, apart from TCP. The servlet just opens 
a socket to the external daemon, and writes to it with a PrintWriter.


Which kind of begs the question : how does Wireshark figure out if the 
contents of a packet are HTTP or not ?  It must be either heuristic by 
sniffing the content, or else just by the port in use ?  But that's kind 
of risky, no ?
I think I'll have to refresh my TCP knowledge base, to see if there is 
any byte somewhere in a TCP header specifying the internet protocol. 
But I don't think so.




@André:

Maybe you could give a more detailled description of your problem, so
that we might come up with some more helpful ideas?


Well, I realise now that my description, and wishes, were kind of 
stupid, particularly the bit about displaying in some specific encoding.

I wrote that late at night though ;-)
Of course I can do that by changing my locale and my terminal emulation 
I guess.

Duh.
Can one delete one's post from the Tomcat list archives, or is it 
preserved for posterity ? Please ?




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat for dummies, subtopic Acronyms

2009-03-18 Thread André Warnier

I think I've waited long enough with these.
Pointers to JMX and RMI, please ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Newline doesn't work

2009-03-18 Thread Mighty Tornado
Silly question.
I wrote a servlet that gets init params from the web.xml and stuffs them
into the request which is the displayed by JSP.

But when I try to make it a string with newline characters it still prints
everything in one line - like newline characters turn into regular space
characters.

This is the code:

String newline = System.getProperty(line.separator);

String rName = getServletConfig().getInitParameter(rName);

String kName = getServletConfig().getInitParameter(kName);

result += Family Members + newline;

result += rName + newline;

result += kName + newline;


I tried \n, and '\n' as well.


Thanks.


RE: Tomcat for dummies, subtopic Acronyms

2009-03-18 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com] 
 Subject: Tomcat for dummies, subtopic Acronyms
 
 Pointers to JMX and RMI, please ?

http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/
http://java.sun.com/javase/technologies/core/basic/rmi/index.jsp

Those are the starting points.  Do you have something more specific in mind?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Newline doesn't work

2009-03-18 Thread Timothy J Schumacher

Try

If this is going to be displayed by a browser then try:

String newline = br;

-Tim

Mighty Tornado wrote:

Silly question.
I wrote a servlet that gets init params from the web.xml and stuffs them
into the request which is the displayed by JSP.

But when I try to make it a string with newline characters it still prints
everything in one line - like newline characters turn into regular space
characters.

This is the code:

String newline = System.getProperty(line.separator);

String rName = getServletConfig().getInitParameter(rName);

String kName = getServletConfig().getInitParameter(kName);

result += Family Members + newline;

result += rName + newline;

result += kName + newline;


I tried \n, and '\n' as well.


Thanks.

  


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: tracing port to port

2009-03-18 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com] 
 Subject: Re: tracing port to port
 
 how does Wireshark figure out if the contents of a packet 
 are HTTP or not ?  It must be either heuristic by sniffing 
 the content, or else just by the port in use ?

It does both.  The protocol determination and analysis are extremely clever; 
even for SMB work, it's way better than Microsoft's NetMon.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Newline doesn't work

2009-03-18 Thread Caldarale, Charles R
 From: Mighty Tornado [mailto:mighty.torn...@gmail.com] 
 Subject: Newline doesn't work
 
 But when I try to make it a string with newline characters it 
 still prints everything in one line - like newline characters 
 turn into regular space characters.

That's the way HTML works.  You need to separate lines by p or br; 
experiment with both to see which is more to your liking.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



full stack trace?

2009-03-18 Thread Darrell Esau
Hi all,
Using tomcat 6.

Stack traces go to my logs -- however it appears that after a certain stack
trace is reported a few times, it'll stop posting the full stack trace with
line numbers, and just post the exception name.

For instance, I get a NullPointerException with the full stack trace, then a
few minutes later it happens again, and I only get:
SEVERE: Servlet.service() for servlet MyServlet threw exception
java.lang.NullPointerException


Is there any way to tell tomcat to ALWAYS show me the full stack trace?

Thanks,
-d


Re: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 3/18/2009 11:09 AM, Mark Thomas wrote:
 Go for it. Maybe as a new question along the lines of Why does it have to be
 like this?

Done. Now all the research I often re-do when someone asks this question
is collected in one place. I can now answer such questions with a
one-liner. And isn't that what life is really about?

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBLlwACgkQ9CaO5/Lv0PBSlACfXXQVYKac5E7se4UlFy6EHA9I
2SwAnjYnhVHoZTM/PN2vMKKfEZvwnina
=JNVl
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



[OT] RE: tracing port to port

2009-03-18 Thread Peter Crowther
 From: André Warnier [mailto:a...@ice-sa.com]
 I think I'll have to refresh my TCP knowledge base, to see if there is
 any byte somewhere in a TCP header specifying the internet protocol.
 But I don't think so.

Sort of :-).  The nearest you get is the four bytes specifying the source and 
destination port numbers - though as you already know that's subject to 
considerable latitude in interpretation!  In particular, if one of those values 
is a well-known port (http://www.iana.org/assignments/port-numbers), the 
corresponding protocol RFC-SHOULD* be in use

- Peter

* Acronym decoder for those who are about to complain: Internet Engineering 
Task Force (IETF) Requests for Comments (RFCs) frequently make use of MUST, 
SHOULD, MAY, SHOULD NOT or MUST NOT (capitalised in that way) to indicate how a 
correct system behaves.  This has entered some more general Internet 
parlance, so RFC-SHOULD can be taken to mean SHOULD as defined in RFC 2119 
(http://www.ietf.org/rfc/rfc2119.txt).

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Newline doesn't work

2009-03-18 Thread Ilya Kazakevich
Mighty, 

Here is good and small HTML tutorial, which I advice you to read:
http://www.w3schools.com/html/default.asp
 
-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, March 18, 2009 7:41 PM
To: Tomcat Users List
Subject: RE: Newline doesn't work

 From: Mighty Tornado [mailto:mighty.torn...@gmail.com]
 Subject: Newline doesn't work
 
 But when I try to make it a string with newline characters it still 
 prints everything in one line - like newline characters turn into 
 regular space characters.

That's the way HTML works.  You need to separate lines by p or br;
experiment with both to see which is more to your liking.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Newline doesn't work

2009-03-18 Thread Mighty Tornado
Thank you all. The answers were very valuable and I got the thing to work.

On Wed, Mar 18, 2009 at 1:41 PM, Ilya Kazakevich
kazakev...@devexperts.comwrote:

 Mighty,

 Here is good and small HTML tutorial, which I advice you to read:
 http://www.w3schools.com/html/default.asp

 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Sent: Wednesday, March 18, 2009 7:41 PM
 To: Tomcat Users List
 Subject: RE: Newline doesn't work

  From: Mighty Tornado [mailto:mighty.torn...@gmail.com]
  Subject: Newline doesn't work
 
  But when I try to make it a string with newline characters it still
  prints everything in one line - like newline characters turn into
  regular space characters.

 That's the way HTML works.  You need to separate lines by p or br;
 experiment with both to see which is more to your liking.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Newline doesn't work

2009-03-18 Thread André Warnier

Mighty Tornado wrote:

Thank you all. The answers were very valuable and I got the thing to work.

You don't seem to realise how nice they all were.  I tell you, no 
technical issue is too complex for these guys.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat for dummies, subtopic Acronyms

2009-03-18 Thread André Warnier

Caldarale, Charles R wrote:
From: André Warnier [mailto:a...@ice-sa.com] 
Subject: Tomcat for dummies, subtopic Acronyms


Pointers to JMX and RMI, please ?


http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/
http://java.sun.com/javase/technologies/core/basic/rmi/index.jsp

Those are the starting points.  Do you have something more specific in mind?


Thanks.
Nope, just that after people keep throwing mysterious acronyms at me, 
and several of them start to use the same ones, I get curious.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Access log behavior

2009-03-18 Thread Jonathan Mast
We're using the AccessLogValve extensively and I'm wondering if anyone can
tell me what happens when an active (ie. today's) access log file is
deleted?

Will Tomcat handle this gracefully or go bonkers?

I occasionally delete some log files that are active but are unimportant,
when that happens i restart Tomcat just to be safe but I'd rather not have
to do this.

My setup is:
Linux
Java 1.4.2
Tomcat 5.5.17


RE: full stack trace?

2009-03-18 Thread Caldarale, Charles R
 From: Darrell Esau [mailto:darrell.e...@gmail.com] 
 Subject: full stack trace?
 
 Using tomcat 6.

Which Tomcat 6, exactly?  What JVM?  What platform?

 For instance, I get a NullPointerException with the full 
 stack trace, then a few minutes later it happens again, 
 and I only get:
 SEVERE: Servlet.service() for servlet MyServlet threw exception
 java.lang.NullPointerException

I can't reproduce your observations on Tomcat 6.0.18 under JDK 6u7 on Windows 
XP.  I ran my buggy servlet 50 times and got 50 NPEs and full stack traces for 
each one in localhost.2009-03-18.log.

 Is there any way to tell tomcat to ALWAYS show me 
 the full stack trace?

I'm not aware of any configuration settings for this.  Are you using the 
default logging mechanism?  Post your server.xml and logging.properties for us 
to look at.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access log behavior

2009-03-18 Thread André Warnier

Jonathan Mast wrote:

We're using the AccessLogValve extensively and I'm wondering if anyone can
tell me what happens when an active (ie. today's) access log file is
deleted?

Will Tomcat handle this gracefully or go bonkers?


Well, did you try ? does it, like, go bonkers ?

In a general sense, I don't think you should really do that though, 
there must be better/safer ways.
But starting that discussion is likely to lead us into a discussion of 
Tomcat logging, which is a delicate subject on this list.
A bit like chaos theory : how the fluttering of a butterfly's wing in 
the Amazon can cause a tornado in the Midwest..


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Access log behavior

2009-03-18 Thread Caldarale, Charles R
 From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] 
 Subject: Access log behavior
 
 I'm wondering if anyone can tell me what happens when an 
 active (ie. today's) access log file is deleted?

There's not really any such thing as delete in Linux.  When you do an rm, all 
that happens is an unlink() of whatever path points to the inode of interest.  
If the inode is still busy (e.g., an open() has been done on *any* path to the 
inode and a close() has not been done on the returned handle), the inode will 
continue to exist and support I/O requests.

 Will Tomcat handle this gracefully or go bonkers?

Tomcat won't know it happened.  Whether or not the logger you're using does 
depends on if the logger keeps the file opened (most do), or closes and reopens 
it periodically.

 when that happens i restart Tomcat just to be safe but I'd 
 rather not have to do this.

Although the paths to the files are no longer accessible, the disk space 
they're consuming won't go away until you do the restart.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: full stack trace?

2009-03-18 Thread André Warnier

Darrell Esau wrote:

Hi all,
Using tomcat 6.

Stack traces go to my logs -- however it appears that after a certain stack
trace is reported a few times, it'll stop posting the full stack trace with
line numbers, and just post the exception name.

For instance, I get a NullPointerException with the full stack trace, then a
few minutes later it happens again, and I only get:
SEVERE: Servlet.service() for servlet MyServlet threw exception
java.lang.NullPointerException

If I were Tomcat and I was asked to print and re-print the same message 
over and over, I think I'd end up doing the same, maybe with just a note 
saying same as above, or ..again !.  So maybe this is a feature ?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Access log behavior

2009-03-18 Thread André Warnier

Caldarale, Charles R wrote:


Although the paths to the files are no longer accessible, the disk space 
they're consuming won't go away until you do the restart.

While this is a bit [OT] probably, how does that work ?  I mean, if the 
directory entry is deleted, but the original application keeps the file 
open and keeps writing, then how is that space reclaimed when the 
application finally closes the file ?  Is that automatic, or does one 
need to run an fsck or the like to really reclaim that space ?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Access log behavior

2009-03-18 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com] 
 Subject: Re: Access log behavior
 
 how is that space reclaimed when the application finally 
 closes the file ?  Is that automatic, or does one need 
 to run an fsck or the like to really reclaim that space ?

It's automatic.  The disk allocation is either part of or linked to from the 
inode; the file system makes such space available when both the link count and 
busy count on a regular file inode go to zero.  Only if the system crashes and 
you're using a non-journaling file system (e.g., ext2, FAT32) would you need to 
run fsck.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: full stack trace?

2009-03-18 Thread Darrell Esau
On Wed, Mar 18, 2009 at 12:16 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:

 Which Tomcat 6, exactly?  What JVM?  What platform?

Tomcat 6.0.13
jjava version 1.6.0_11
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)
Linux, CentOS 5.2, 2.6.18-53.1.14.el5PAE


 I'm not aware of any configuration settings for this.  Are you using the 
 default logging mechanism?  Post your server.xml and logging.properties for 
 us to look at.

Logging.properties:

handlers = 1catalina.org.apache.juli.FileHandler,
2localhost.org.apache.juli.FileHandler,
3manager.org.apache.juli.FileHandler,
4admin.org.apache.juli.FileHandler,
5host-manager.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler


# Handler specific properties.
# Describes specific configuration info for Handlers.


1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.

2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.

3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.

4admin.org.apache.juli.FileHandler.level = FINE
4admin.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4admin.org.apache.juli.FileHandler.prefix = admin.

5host-manager.org.apache.juli.FileHandler.level = FINE
5host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
5host-manager.org.apache.juli.FileHandler.prefix = host-manager.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter



# Facility specific properties.
# Provides extra control for each logger.


org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers
= 2localhost.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers
= 3manager.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].handlers
= 4admin.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers
= 5host-manager.org.apache.juli.FileHandler

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE
#org.apache.catalina.core.AprLifecycleListener.level=FINE


server.xml:
!-- Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves at this level.
 Documentation at /docs/config/server.html
 --
Server port=8005 shutdown=SHUTDOWN

  !--APR library loader. Documentation at /docs/apr.html --
  Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
  !--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html --
  Listener className=org.apache.catalina.core.JasperListener /
  !-- JMX Support for the Tomcat server. Documentation at
/docs/non-existent.html --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/

  !-- Global JNDI resources
   Documentation at /docs/jndi-resources-howto.html
  --
  GlobalNamingResources
!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users
--
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources

  !-- A Service is a collection of one or more Connectors that share
   a single Container Note:  A Service is not itself a Container,
   so you may not define subcomponents such as Valves at this level.
   Documentation at /docs/config/service.html
   --
  Service 

Re: full stack trace?

2009-03-18 Thread Mark Thomas
André Warnier wrote:
 Darrell Esau wrote:
 Hi all,
 Using tomcat 6.

 Stack traces go to my logs -- however it appears that after a certain
 stack
 trace is reported a few times, it'll stop posting the full stack trace
 with
 line numbers, and just post the exception name.

 For instance, I get a NullPointerException with the full stack trace,
 then a
 few minutes later it happens again, and I only get:
 SEVERE: Servlet.service() for servlet MyServlet threw exception
 java.lang.NullPointerException

 If I were Tomcat and I was asked to print and re-print the same message
 over and over, I think I'd end up doing the same, maybe with just a note
 saying same as above, or ..again !.  So maybe this is a feature ?

Nope. Too much hassle to work out it is the same message. Tomcat will log it in
full every time.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 5.0.28 and 6.0.18 on same server

2009-03-18 Thread Leo Donahue - PLANDEVX
I'd like to run two different versions of Tomcat on the same server if poss= 
ible.

I have Tomcat 5.0.28 running as a windows service from a non-zipped version= 
download. I'd like to be able to run Tomcat 6.0 on the same server.

I'm not trying to setup a test and development environment, I actually have= to 
support an webapp that requires Tomcat 5.0.28 but I would also like to = run a 
webapp that supports JSF 1.2

Some of the articles I've read offer different approaches to doing this. S= ome 
articles talk about editing the service.bat file, some articles talk ab= out 
just changing the start and shutdown ports between the two versions.

Can someone point me in the right direction to accomplish this?


Leo


RE: Tomcat URL Rewrite. Help with configuration.

2009-03-18 Thread Rodro

THERE'S NO context.xml.
Also, since my app is a third party (not properly Tomcat or Apache's)
server.xml does not contain any information ab them.
Server.xml was uploaded.
Thanks for the reply.


Caldarale, Charles R wrote:
 
 From: Rodro [mailto:rodrigo_alle...@ibi.com] 
 Subject: Re: Tomcat URL Rewrite. Help with configuration.
 
 Though redirection didn't work, but furthermore when I try to see
 http://localhost:8080/rewrite-status, I get the below error:
 Estado HTTP 404 - /rewrite-status
 
 That would be expected, since you don't appear to have a webapp named
 rewrite-status.
 
 You likely do not have your webapp deployed properly.  If you want your
 webapp to be the default one, it must be named ROOT (case sensitive, even
 on Windows).  Post your server.xml and the META-INF/context.xml file from
 your webapp (if it exists).
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
http://www.nabble.com/file/p22588199/server.xml server.xml 
-- 
View this message in context: 
http://www.nabble.com/Tomcat-URL-Rewrite.-Help-with-configuration.-tp22446210p22588199.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat 5.0.28 and 6.0.18 on same server

2009-03-18 Thread Caldarale, Charles R
 From: Leo Donahue - PLANDEVX [mailto:donah...@mail.maricopa.gov] 
 Subject: Tomcat 5.0.28 and 6.0.18 on same server
 
 I have Tomcat 5.0.28 running as a windows service from a 
 non-zipped version= download. I'd like to be able to run 
 Tomcat 6.0 on the same server.

Use the 6.0 zip download for this purpose.

 Some articles talk about editing the service.bat file

Whoever authored that is someone to avoid.

 some articles talk about just changing the start 
 and shutdown ports between the two versions.

That's one of the correct ways to do it.  You could also run separate IP 
addresses for the two Tomcats, if your environment allows that.

Look in the server.xml files; you'll see port numbers on the Server and 
Connector elements, and you may see IP addresses on Connector.  The 
shutdown port (normally 8005) must be unique, since it's used only on the fixed 
address 127.0.0.1.  If there are any Connector elements you don't need (e.g., 
AJP), comment them out to make your job easier.  The Connector elements left 
are the ones you'll need to make unique, either by IP address or port number.

To install Tomcat 6.0 as a service, simply supply a unique name (e.g., Tomcat6) 
for the service.bat script:
  service install Tomcat6

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: full stack trace?

2009-03-18 Thread Caldarale, Charles R
 From: Darrell Esau [mailto:darrell.e...@gmail.com] 
 Subject: Re: full stack trace?
 
 Logging.properties:

Nothing unusual there or in server.xml; if the stack traces are missing, I have 
to think it's your webapp that's catching the exception and making the decision 
about whether or not to log the whole stack trace.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.0.28 and 6.0.18 on same server

2009-03-18 Thread André Warnier

Leo Donahue - PLANDEVX wrote:

I'd like to run two different versions of Tomcat on the same server if poss= 
ible.

I have Tomcat 5.0.28 running as a windows service from a non-zipped version= 
download. I'd like to be able to run Tomcat 6.0 on the same server.

I'm not trying to setup a test and development environment, I actually have= to 
support an webapp that requires Tomcat 5.0.28 but I would also like to = run a 
webapp that supports JSF 1.2

Some of the articles I've read offer different approaches to doing this. S= ome 
articles talk about editing the service.bat file, some articles talk ab= out 
just changing the start and shutdown ports between the two versions.

Can someone point me in the right direction to accomplish this?

Allright, I'll bite.  And probably forget something along the way.  But 
you ask just to be pointed, right ?


1) you cannot run two http servers listening on the same port(s), on the 
same host.  So, no matter what you do, you are going to have to change 
the ports on which your second Tomcat will listen.

That means that the users of one Tomcat will access it like
http://yourserver:8080
and the users of the other Tomcat, like
http://yourserver:8081

If you really don't like that, it is also possible to avoid it, but it 
is more complicated and we'll leave that for a second phase.


To find out which ports the first Tomcat is listening on, look at the 
file server.xml which should be in the conf subdirectory of your 
first Tomcat. In that file, you will find at least two uncommented 
Connector sections, each having a port= attribute.

Note these port numbers.

If this Tomcat is currently running, open a command window and enter
netstat -an | more
and look for lines ending in LISTEN.  Each such line indicates that 
there is some program listening on a port, and two of them should match 
your Connector's ports above (look in the second column, for something 
like

127.0.0.1:8080
where the last part is the port number.

Yes ? then we're doing well.
Those are the ports to avoid with your second Tomcat.

2) you can also not run two Windows services with exactly the same name.
So you might have to change the service's name for the second Tomcat.

Other than that, there should not be big difficulties.

Download and install your second Tomcat in a different directory from 
the first one.
If you are using the non-zipped version, I guess this means the 
installer, and that means I have to do some guesswork from memory.
The second Tomcat will probably install properly, but it will not start, 
because of the ports conflict.
If so, find the server.xml of the second Tomcat, and change the ports in 
the Connector elements, to be different from the first Tomcat.

For example
8005 -- 8006
8080 -- 8081

Then try to start this Tomcat, and let us know what happens.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.0.28 and 6.0.18 on same server

2009-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 3/18/2009 5:09 PM, André Warnier wrote:
 1) you cannot run two http servers listening on the same port(s), on the
 same host.

Just to be clear, you /can/ bind to the same port more than once on the
same host if you have multiple IPs: you can bind to different IP
addresses using the same port. Presumably, your DNS records won't point
to two IPs that do different things, though.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBa7YACgkQ9CaO5/Lv0PASzQCfXrcAiNPUQQJ0aC4Hun8w/96g
K24An1+yna/ITMSXDjikc8/413Oj/1My
=qKdO
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.0.28 and 6.0.18 on same server

2009-03-18 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 3/18/2009 5:09 PM, André Warnier wrote:

1) you cannot run two http servers listening on the same port(s), on the
same host.


Just to be clear, you /can/ bind to the same port more than once on the
same host if you have multiple IPs: you can bind to different IP
addresses using the same port. Presumably, your DNS records won't point
to two IPs that do different things, though.


My, you're in a nitpicking mood today.
First, URL-encoded HTTP header values, now this..

OP, just for the sake of absolute correctness, Chris is right. 
Remember, for the future, that you /could/ give your host two different 
IP addresses, and two different corresponding DNS hostnames, and that 
this would allow you to run two different Tomcats listening on the same 
ports on the same physical host.
You could also of course install an Apache httpd in front of your 
Tomcats, and through the judicious use of connectors and/or proxying and 
URL rewriting rules, even manage to have the two different Tomcats 
/appear/ to respond on the very same port and IP address, while in 
reality they wouldn't.


But since by now you already have two proposed setups, one based on the 
zip version and the other on the exe installer, let's keep things simple 
and practical for now, shall we ?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat 5.0.28 and 6.0.18 on same server

2009-03-18 Thread Leo Donahue - PLANDEVX
You guys are good and for that I am thankful.  I wasn't trying to be pointed, I 
just didn't know.

Since Tomcat5028 was already running as a service, I downloaded the zip file 
for Tomcat6018 as suggested.  I edited the server.xml file and changed the 
Shutdown port to 8006 and the http port to 8081.

I ran the command:  service install Tomcat6018 
which installed Tomcat as a windows service with the name Apache Tomcat 
Tomcat6018.  I suppose I should have just gave it the version number, I can 
change that.

Thank you very much for your help.  Much appreciated.

I did have one problem when I issued the service command.  It gave me the 
reply:

The tomcat.exe was not found...
The CATALINA_HOME environment variable is not defined correctly.
This environment variable is needed to run this program

I checked the environment variables on the Advanced tab of system properties 
and the CATALINA_HOME variable was pointing to the install_dir for the 
Tomcat5028 version.  Since the setup docs for version 5.0.28 make no reference 
to setting this CATALINA_HOME environment variable, I deleted it.  That might 
have been a bad idea, however both Tomcats are working fine.  I don't know if 
the original third part app set that environment variable for some reason or if 
it was a relic from a previous install of something.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, March 18, 2009 2:47 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.0.28 and 6.0.18 on same server

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 3/18/2009 5:09 PM, André Warnier wrote:
 1) you cannot run two http servers listening on the same port(s), on 
 the same host.

Just to be clear, you /can/ bind to the same port more than once on the same 
host if you have multiple IPs: you can bind to different IP addresses using the 
same port. Presumably, your DNS records won't point to two IPs that do 
different things, though.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBa7YACgkQ9CaO5/Lv0PASzQCfXrcAiNPUQQJ0aC4Hun8w/96g
K24An1+yna/ITMSXDjikc8/413Oj/1My
=qKdO
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Support for JSF 2.0

2009-03-18 Thread Leo Donahue - PLANDEVX
 I am wondering if there are plans to support JSF 2.0 when it is 
 released.

Doesn't Tomcat 6.0 already support JSF 2.0 if it supports Servlet 2.5?  I had 
this same question this morning.

https://javaserverfaces.dev.java.net/nonav/rlnotes/2.0.0/releasenotes.html
 

-Original Message-
From: Martin Dubuc [mailto:martind1...@gmail.com] 
Sent: Wednesday, March 18, 2009 6:23 AM
To: Tomcat Users List
Subject: Re: Support for JSF 2.0

I can't find the JSP 2.2 specification, but if you look at JSR-316, you will 
see that the basis for Java EE 6 is servlet 3.0, JSP 2.2 and JSF 2.0. I am not 
sure it makes much sense to align JSP 2.1 with servlet 3.0.

Martin

On Tue, Mar 17, 2009 at 4:34 PM, Mark Thomas ma...@apache.org wrote:

 Martin Dubuc wrote:
  It is my understanding that Java EE 6 will use JSP 2.2, servlet 3.0 
  and
 JSF
  2.0. I am wondering if Tomcat 7.0 should also support JSP 2.2 in 
  addition
 to
  servlet 3.0.

 As far as I am aware, there is no JSP 2.2 spec in the works. If you 
 know different, a reference would be useful.

 Mark

 
  I have seen on the Sun's JSF forum a poster claim that JSF 2.0 would 
  work with JSP 2.0 and servlet 2.5, so I guess Tomcat 6.0.x would be 
  sufficient for Web applications using JSF 2.0.
 
  Martin
 
  On Tue, Mar 17, 2009 at 11:02 AM, Mark Thomas ma...@apache.org wrote:
 
  Christopher Schultz wrote:
  Martin,
 
  On 3/9/2009 5:44 PM, Martin Dubuc wrote:
  I am wondering if there are plans to support JSF 2.0 when it is
  released. I
  assume that support for JSF 2.0 will require support for new
 servlet/JSP
  specs (somehting like servlet 3.0/JSP 2.2). Would this be done in
  version
  7.0 of Tomcat?
  http://wiki.apache.org/tomcat/TomcatVersions says there are no
 specific
  plans for Tomcat 7.0. It also links to several notes files that
 don't
  exist :(
  There are plans for Tomcat 7.0. I'll update that page and fix the links.
 
  There is no JSP 2.2 spec that I am aware of. Tomcat 7 will support
 servlet
  3.0
 
  Mark
 
  I would guess that 7.0 would be a good target for JSF 2.0 support 
  (or
 at
  least support for those APIs that JSF 2.0 requires) but nobody's 
  promising anything at this point.
 
  -chris
  ---
  -- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
  ---
  -- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue in sending Request/response http headers containing Japanese charateres

2009-03-18 Thread André Warnier

Chris,

Christopher Schultz wrote:
[...]

 there's a somewhat obvious way to encode your

headers (including Japanese or other non-ASCII characters) so they will
work:

java.net.URLEncoder.encode(text, ASCII)

You'll get a string like foobar%45%67%65%43%45%45%78%69 You just
have to remember to decode the string on the other end in a similar way
(java.net.URLDecoder).

Yes, but in my humble opinion you would be, as they say, cruising for a 
bruise.  Your very example above demonstrates the bruise potential.


If the string contained any Japanese characters, what would happen is :
- the string would first be converted to ASCII.  Since ASCII does not 
support Japanese characters, you would get a string with plenty of ??? 
characters (unless java.net.URLEncoder triggers an exception for that).
- then this string would be URL-encoded, converting the embedded ??? 
into their percent-encoded representation.
...and there is thus no chance at all that the server would ever be able 
to retrieve the original Japanese characters.


So let's say that we rectify your undoubtedly slip of the keyboard 
mistake above, and replace this by :

java.net.URLEncoder.encode(text, UTF-8)

And let's say that the client and server have somehow (?) agreed on this 
in advance, and also agreed that they will do this only in headers 
clearly marked as non-standard (á la X-header-name:), and agreed in 
advance in which headers, and agreed in advance that they will both use 
the same encoding.
Then, the server application would presumably obtain the content of this 
header via a request.getHeader(X-header-name), and receive a Unicode 
string containing foobar%45%67%65%43%45%45%78%69
It would then decode it using java.net.URLEncoder.decode(text, UTF-8), 
in order to obtain back the original string.

And it would work fine.

But in a totally non-portable way (meaning just between that client and 
that application), and with just too many conditional tenses to make 
this comfortable.


Once again, I think what we are bumping against is a shortcoming of the 
HTTP protocol, but until such a time as the powers-that-be at that level 
decide to publish another revision, I think it is safer to stick to the 
one we've got.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.0.28 and 6.0.18 on same server

2009-03-18 Thread André Warnier

Leo Donahue - PLANDEVX wrote:
You guys are good 

We're trying our best, modestly.
...
  Thank you very much for your help.  Much appreciated.
No problem, we like to show off.
...


I did have one problem when I issued the service command.  It gave me the 
reply:

The tomcat.exe was not found...
The CATALINA_HOME environment variable is not defined correctly.
This environment variable is needed to run this program

I checked the environment variables on the Advanced tab of system properties 
and the CATALINA_HOME variable was pointing to the install_dir for the Tomcat5028 
version.  Since the setup docs for version 5.0.28 make no reference to setting this 
CATALINA_HOME environment variable, I deleted it.  That might have been a bad idea, 
however both Tomcats are working fine.  I don't know if the original third part app set 
that environment variable for some reason or if it was a relic from a previous install of 
something.



Yep, I forgot about that one.
It was probably set by your first install.
CATALINA_HOME should be set to the base of your Tomcat installation (the 
directory in which you installed the software, and which contains the 
conf, bin, webapps etc.. subdirectories).
(CATALINA_BASE is used when you have multiple instances of the same 
Tomcat version running. If you have a single instance, it is equivalent 
to CATALINA_HOME.)


In your case however, it's a bit iffy, since you are under Windows, 
where there is only one global CATALINA_HOME variable, but you have two 
different code bases running.


The logical thing, I guess, would be to define two different users on 
your system, each with its own set of variables, and run each Tomcat 
under a different user, allowing each user to have its own CATALINA_HOME.


I don't know exactly what, apart from the startup scripts that you will 
find in the conf subdirectory of each Tomcat, may reference this 
CATALINA_HOME.
But since you are running both Tomcats as services, they do not use 
those scripts anyway.


Which is probably why nothing bad happened when you deleted the variable.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread David Smith
Try java:/comp instead.  If that doesn't help, then we'll need more info:

- OS:
- where you got tomcat from  (tomcat.apache.org or third party repackage)
- Details of your setup like what's in tomcat's common/lib folder?
- Config (relevant parts of server.xml, the webapp's context.xml and
WEB-INF/web.xml)
- The code used to access JNDI if available:

Links to any docs you used to get you to this point would also be great
just in case they are providing bad advice.

--David

Mikolaj Rydzewski wrote:
 Hello everybody,

 I have faced interesting issue recently. Here are details:
 I had to implement custom log4j appender that logs particular messages
 to database (JDBCAppender was not enough). So I did, using JNDI based
 datasources, not a difficult task. Of course I updated server.xml,
 context.xml and web.xml with datasource definition, etc.

 Unfortunately every time I deployed application there was Name
 java:comp is not bound in this Context error  in logfile (see
 stacktrace at end of email).
 It's strange, isn't it? java:comp is a standard Java root for all
 JNDI based resources. So I don't understand how does it happen that it
 is not bound.

 My appender implementation tries to lookup datasource in JNDI just
 after all properties has been set (recommended way -
 http://tinyurl.com/dg4fxa). Then I moved JNDI lookup code to method
 that actully performs logging. And it started to work!

 So, to summarize. My custom log4j code was not able to lookup JNDI
 resources during deployment process. But it was able to during normal
 webapplication usage.

 Is it expected behaviour? It looks like Tomcat (5.5.26 on Sun's JDK
 1.5 in my case) fills JNDI context information after webapplication
 deployment.

 On other hand, I wonder how does it keep separate copies of JNDI
 catalog per webapplication.


 javax.naming.NameNotFoundException: Name java:comp is not bound in
 this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at
 mypackage.DataSourceAppender.activateOptions(DataSourceAppender.java:34)
at
 org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at
 org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:220)

at
 org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)

at
 org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)

at
 org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)

at
 org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:345)

at
 org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:827)
at
 org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)

at
 org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)

at
 org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)

at org.apache.log4j.LogManager.clinit(LogManager.java:122)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at
 org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)

at
 org.apache.commons.logging.impl.Log4JLogger.init(Log4JLogger.java:109)
at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at
 org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1116)

at
 org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:914)

at
 org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)

at
 org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)

at
 org.apache.commons.logging.LogFactory.getLog(LogFactory.java:704)
at
 org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:381)
at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4119)
at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)

at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at
 org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)

at
 org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)

at
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
  

RE: Tomcat 5.0.28 and 6.0.18 on same server

2009-03-18 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com] 
 Subject: Re: Tomcat 5.0.28 and 6.0.18 on same server
 
  The tomcat.exe was not found...
  The CATALINA_HOME environment variable is not defined correctly.
  This environment variable is needed to run this program

You do not (and should not) set the CATALINA_HOME environment variable.  Run 
the service.bat script from a command prompt, with the current directory set to 
Tomcat's bin directory.  The script will find the executable.

  Since the setup docs for version 5.0.28 make no 
  reference to setting this CATALINA_HOME environment
  variable, I deleted it.

Good; you should not have it set explicityly.

 The logical thing, I guess, would be to define two different users on 
 your system, each with its own set of variables, and run each Tomcat 
 under a different user, allowing each user to have its own 
 CATALINA_HOME.

No, no, no.  Don't set CATALINA_HOME at all.  The scripts will use the proper 
directories when you run them from a command prompt and have current directory 
set properly.  The Tomcat service does not utilize any environment variables, 
of course.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread Caldarale, Charles R
 From: David Smith [mailto:d...@cornell.edu] 
 Subject: Re: JNDI: Name java:comp is not bound in this Context
 
 Try java:/comp instead.

That's not in the spec; what is in the spec is java:comp/env, so java:comp 
should work.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Issue in sending Request/response http headers containing Japanesecharateres

2009-03-18 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com] 
 Subject: Re: Issue in sending Request/response http headers 
 containing Japanesecharateres
 
  java.net.URLEncoder.encode(text, ASCII)
  You'll get a string like 
  foobar%45%67%65%43%45%45%78%69

 Yes, but in my humble opinion you would be, as they say, 
 cruising for a bruise.

That's cruisin' for a bruisin', to be precise.

I think Chris meant:
java.net.URLEncoder.encode(text, UTF-8)
which is what W3C recommends.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread Caldarale, Charles R
 From: David Smith [mailto:d...@cornell.edu] 
 Subject: Re: JNDI: Name java:comp is not bound in this Context
 
 My copy of the spec is at work at the moment

What?  You use paper?

 Someone should probably fix the docs at
 http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 since it recommends exactly what I posted.

It's the same way in the 6.0 docs.  For all I know, a leading slash might be 
ignored, but I agree the docs should be fixed to be consistent with the spec.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: JNDI: Name java:comp is not bound in this Context

2009-03-18 Thread Caldarale, Charles R
 From: Caldarale, Charles R 
 Subject: RE: JNDI: Name java:comp is not bound in this Context
 
 For all I know, a leading slash might be ignored

It looks like java:comp/env and java:/comp/env are equivalent; the leading 
slash is indeed ignored, and the same object is retrieved for either name.  
Don't know if that holds true for all containers, or just Tomcat.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: error page configuration

2009-03-18 Thread Dinesh Gupta

Hi,

In my application, using tiles
at the run time from the database we pick the the jsp file.
But some times exception occurred.So that if any include page got exception I 
want to go to the error page.

In my case blank page comes or some time header displayed  body part is blank.

Now My question is that Can we handle the included page error by using 
filter,coz I don't use in each page isErrorPage tag.

Regards,
Dinesh Gupta

 From: chuck.caldar...@unisys.com
 To: users@tomcat.apache.org
 Date: Wed, 18 Mar 2009 08:52:21 -0500
 Subject: RE: error page configuration
 
  From: Dinesh Gupta [mailto:dinesh.gupt...@hotmail.com] 
  Subject: error page configuration
  
  If anyone have idea about this please help.
 
 http://www.catb.org/~esr/faqs/smart-questions.html
 
 If you provide real information, you might get a real answer...
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

_
The new Windows Live Messenger. You don’t want to miss this.
http://www.microsoft.com/india/windows/windowslive/messenger.aspx

RE: Issue in sending Request/response http headers containing Japanesecharateres

2009-03-18 Thread Rajat Gupta05
Thanks everyone for there comments.



I was actually comparing the behavior between IIS and Apache, since IIS(5/6) is 
able to handle Japanese characters inside the headervalues not the header name.



Thanks

Rajat



-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Thursday, March 19, 2009 6:56 AM
To: Tomcat Users List
Subject: RE: Issue in sending Request/response http headers containing 
Japanesecharateres



 From: André Warnier [mailto:a...@ice-sa.com]

 Subject: Re: Issue in sending Request/response http headers

 containing Japanesecharateres



  java.net.URLEncoder.encode(text, ASCII)

  You'll get a string like

  foobar%45%67%65%43%45%45%78%69



 Yes, but in my humble opinion you would be, as they say,

 cruising for a bruise.



That's cruisin' for a bruisin', to be precise.



I think Chris meant:

java.net.URLEncoder.encode(text, UTF-8)

which is what W3C recommends.



 - Chuck





THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



-

To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

For additional commands, e-mail: users-h...@tomcat.apache.org



 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


RE: Load server.xml without restarting Tomcat 5.5.26 Server

2009-03-18 Thread meamit221


Thanks Charles for quick reply.
However, can you assist me with some hints that can help me to do so (with
Tomcat APIs)?


Caldarale, Charles R wrote:
 
 From: meamit221 [mailto:amit.n...@aceicon.com] 
 Subject: Load server.xml without restarting Tomcat 5.5.26 Server
 
 Is it possible to reload the server.xml without restarting the server?
 
 No.  However, if you examine the Tomcat source, you can build a webapp to
 call the appropriate APIs to register the new host; you may also be able
 to do the same via JMX.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Load-server.xml-without-restarting-Tomcat-5.5.26-Server-tp22579538p22594121.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org