Re: Problems configuring a Context path=xx using Apache/Tomcat

2006-10-24 Thread Michael Courcy

Hi
Can you explain where you define context.xml ?
Here is a fragment of
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
path : [...] The value of this field must not be set except when 
statically defining a Context in server.xml, as it will be infered from 
the filenames used for either the .xml context file or the docBase.


Mic


René Schade a écrit :

Hi List,

 


I'm running Apache 2.0, Tomcat 5.5.17, jdk 1.5

 


I'm upgrading from Apache 1.3 Tomcat 3.* jdk 1.4

 


In my Apache log file I have the following:

 


JkMount /manager* foo

JkMount /servlets/* foo

 


The manager application works fine, when typing the URL

 

http://website/manager/html 

 


Everything is ok, the manager application is launched.

 


Now I'm trying to install an application on the path /servlets/myapplication. 
The Context file looks like this:

 


Context  reloadable=true path=/servlets/myapplication/ 
docBase=${catalina.home}/home/schade/myapplication/ debug=5 allowoverride=true

  Valve className=org.apache.catalina.valves.AccessLogValve

prefix=kvisremote_by_schade. suffix=.txt

 pattern=common/

/Context

 


Typing a URL like http://website/servlets/myapplication/testfile.html does not 
trigger this context. I've made a similar Valve for the manager-application, and here 
every request to the manager Context is logged. Logging the host verifies 
that requests sent to http://website/servlets/kvisremote are sent to the host, but it 
does not seam to know which context to forward the request to.

 


I guess it has something to do with the path-attribute. A similar solution 
worked fine on the old server...

 

I've been struggling with this for a while now, so any kinds of suggestions are appreciated. 

 


Regards,
René


  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems configuring a Context path=xx using Apache/Tomcat

2006-10-24 Thread Michael Courcy

Have a look there as well

http://issues.apache.org/bugzilla/show_bug.cgi?id=39120

René Schade a écrit :

Hi List,

 


I'm running Apache 2.0, Tomcat 5.5.17, jdk 1.5

 


I'm upgrading from Apache 1.3 Tomcat 3.* jdk 1.4

 


In my Apache log file I have the following:

 


JkMount /manager* foo

JkMount /servlets/* foo

 


The manager application works fine, when typing the URL

 

http://website/manager/html 

 


Everything is ok, the manager application is launched.

 


Now I'm trying to install an application on the path /servlets/myapplication. 
The Context file looks like this:

 


Context  reloadable=true path=/servlets/myapplication/ 
docBase=${catalina.home}/home/schade/myapplication/ debug=5 allowoverride=true

  Valve className=org.apache.catalina.valves.AccessLogValve

prefix=kvisremote_by_schade. suffix=.txt

 pattern=common/

/Context

 


Typing a URL like http://website/servlets/myapplication/testfile.html does not 
trigger this context. I've made a similar Valve for the manager-application, and here 
every request to the manager Context is logged. Logging the host verifies 
that requests sent to http://website/servlets/kvisremote are sent to the host, but it 
does not seam to know which context to forward the request to.

 


I guess it has something to do with the path-attribute. A similar solution 
worked fine on the old server...

 

I've been struggling with this for a while now, so any kinds of suggestions are appreciated. 

 


Regards,
René


  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with connection beetwen Tomcat and Apache via mod_jk?

2006-10-24 Thread Michael Courcy

Have a look on this thread, I'm not sure it's a OS specific problem

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

Christopher Garwood a écrit :

Hi Pawel,

I'm afraid I can't help you with your specific problem but have a 
question of my own.  Are you setting up your multiple Tomcats on UNIX 
or Windows?  If you're setting up on windows, could you tell me how 
you went about this?  I've been struggling with it for a while now and 
I have no previous experience setting this kind of thing up.  Thanks.


Chris.




Paweł Skrzypek wrote:


Hi,
I'm using Apache and Tomcat connected via apjv13 protocol using 
mod_jk. I
have one instance of Apache installed on server 1 and several 
instances of

Tomcat installed on other servers with load balancing between them.
Sometimes users of our application getting blank page in theirs web
browsers, refershing usually hepls to get proper page. In mod_jk log I
found lines as below, but I'm not sure that this is associated.
I'm using mod_jk 1.2.15. Could anybody help me, what could be a problem?
Please send answer to me also directly.
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f0043 6C 69
63 6B 3D 64 6F 63 75 6D 65 6E 74 2E 6C  - Click=document.l
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f106F 63 61
74 69 6F 6E 3D 22 64 6F 73 74 65 70 6E  - ocation=dostepn
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f2065 5F 70
72 6F 6D 6F 63 6A 65 2E 6A 73 70 22 3E  - e_promocje.jsp
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f3026 6E 62
73 70 3B 26 6E 62 73 70 3B 3C 69 6E 70  - nbsp;nbsp;inp
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f4075 74 20
74 79 70 65 3D 22 62 75 74 74 6F 6E 22  - ut.type=button
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f5020 76 61
6C 75 65 3D 22 41 6E 75 6C 75 6A 22 20  - .value=Anuluj.
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f606F 6E 43
6C 69 63 6B 3D 64 6F 63 75 6D 65 6E 74  - onClick=document
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f702E 6C 6F
63 61 74 69 6F 6E 3D 22 6D 61 69 6E 2E  - .location=main.
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f806A 73 70
22 3E 26 6E 62 73 70 3B 26 6E 62 73 70  - jspnbsp;nbsp
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1f903B 3C 69
6E 70 75 74 20 74 79 70 65 3D 22 73 75  - ;input.type=su
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1fa062 6D 69
74 22 20 76 61 6C 75 65 3D 22 44 61 6C  - bmit.value=Dal
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1fb065 6A 22
3E 26 6E 62 73 70 3B 26 6E 62 73 70 3B  - ejnbsp;nbsp;
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1fc00D 0A 09
09 09 3C 2F 74 64 3E 0D 0A 09 09 3C 2F  - ./td/
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1fd074 72 3E
0D 0A 09 09 3C 74 72 3E 0D 0A 09 09 09  - trtr.
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1fe03C 74 64
20 63 6F 6C 73 70 61 6E 3D 22 35 22 20  - td.colspan=5.
[Mon Oct 23 17:17:30 2006] [41665:] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1037): 1ff062 67 63
6F 6C 6F 72 3D 23 36 30 00 00 00 00 00  - bgcolor=#60.
[Mon Oct 23 17:17:30 2006] [41665:] [trace]
ajp_connection_tcp_get_message::jk_ajp_common.c (1043): exit
[Mon Oct 23 17:17:30 2006] [41665:] [trace]
ajp_process_callback::jk_ajp_common.c (1362): enter
[Mon Oct 23 17:17:30 2006] [41665:] [debug] ws_write::mod_jk.c 
(412):

written -1 out of 8184
[Mon Oct 23 17:17:30 2006] [41665:] [info]
ajp_process_callback::jk_ajp_common.c (1384): Connection aborted or
network problems
[Mon Oct 23 17:17:30 2006] [41665:] [trace]
ajp_process_callback::jk_ajp_common.c (1386): exit
[Mon Oct 23 17:17:30 2006] [41665:] [trace]
ajp_get_reply::jk_ajp_common.c (1602): exit
[Mon Oct 23 17:17:30 2006] [41665:] [info]
ajp_service::jk_ajp_common.c (1731): Receiving from tomcat failed, 
because

of client error without recovery in send loop 0
[Mon Oct 23 17:17:30 2006] [41665:] [trace]
ajp_service::jk_ajp_common.c (1735): exit
[Mon Oct 23 17:17:30 2006] [41665:] [trace] 
ajp_done::jk_ajp_common.c

(2044): enter
[Mon Oct 23 17:17:30 2006] [41665:] [debug] 

Re: problem with truststoreFile in server.xml

2006-10-24 Thread Michael Courcy

Hi,

Just to be a bit less stupid on certificate, a certificate always 
include the public and the private key doesn't it ?


Is it for this reason you don't see the need of including the private 
key once again in the PKCS12 ?


Víctor Torres - UPF a écrit :

Thanks, but this does not solve my problem.
What I can see in your directions is that you are using JKS keystore 
and you are importing the certificate and the private key.
What I was saying is that it should NOT be necessary to import the 
private keys into a truststoreFile. In fact, when I use as 
truststoreFile a PKCS12 with the certificate and private key it works. 
It fails when the PKCS12 only contains the certificate. This seems to 
me strange.


Any other suggestions?


- Original Message - From: Martin Gainty [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org; Víctor Torres - 
UPF [EMAIL PROTECTED]

Sent: Tuesday, October 24, 2006 5:41 PM
Subject: Re: problem with truststoreFile in server.xml



Hello Victor-

you may want to follow the directions on how to create an empty 
keystore and then import Import the private key/certificate chain 
into the java keystore using extkeytool

http://www.switch.ch/aai/certificates/certificateupdate.html

then take a look at the keys afterwards at
keytool -v -list -keystore www.example.edu.jks

Anyone else?
M--
This e-mail communication and any attachments may contain 
confidential and privileged information for the use of the
designated recipients named above. If you are not the intended 
recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, 
dissemination, distribution or copying of it or its

contents
- Original Message - From: Víctor Torres - UPF 
[EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Tuesday, October 24, 2006 9:14 AM
Subject: problem with truststoreFile in server.xml



Dear all,

I have configured my Tomcat 5.5.17 to require SSL client 
authentication. For
this purpose, I have stored my root CA certificate into a PKCS12 
keystore
which I use as truststoreFile by configuring server.xml. This CA 
certificate

is used to sign user certificates that I want to be trusted.

The problem I have is the following:
- truststoreFile (PKCS12) contains root CA certificate + private key -
everything works perfectly.
- truststoreFile (PKCS12) contains root CA certificate - clients 
cannot

connect.

truststoreFile should not contain private keys, so why does Tomcat 
behave in

this way?

Thanks in advance.






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache Tomcat Connector

2006-10-23 Thread Michael Courcy

Can you send a complete request
ie http://x.com/page.jsp
that return 400 code.

Matthew Dickinson a écrit :

Hi,

I'm running into an issue of a new install of Tomcat and the Connector to
integrate with an existing apache site.

RHEL4
httpd-2.0.55-2
tomcat5-5.5.17-6jpp_2rh
Mod_jk-1.2.19 built from source

The error that I'm seeing is I get a 400 status code for any page I'm trying
to serve - looking at the mod_jk.log file, I see a no host matches server
name server.domain.fqdn. I've tried many things to try and resolve this,
but am unable to. Do anyone have any info please?

Please find attached the mod_jk.log extract

Thanks,

Matthew

___
Httpd.conf extract

LoadModule jk_module modules/mod_jk.so
JkWorkersFile /etc/httpd/conf/worker.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /*.jsp worker1
_

/etc/httpd/conf/worker.properties

# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
#worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300

___
  



map_uri_to_worker::jk_uri_worker_map.c (513): Attempting to map URI 
'/~dickinsonmg/test.jsp' from 1 maps
map_uri_to_worker::jk_uri_worker_map.c (525): Attempting to map context URI 
'/*.jsp'
map_uri_to_worker::jk_uri_worker_map.c (539): Found a wildchar match worker1 - 
/*.jsp
jk_handler::mod_jk.c (1920): Into handler jakarta-servlet worker=worker1 
r-proxyreq=0
wc_get_worker_for_name::jk_worker.c (111): found a worker worker1
wc_maintain::jk_worker.c (318): Maintaining worker worker1
wc_get_name_for_type::jk_worker.c (287): Found worker type 'ajp13'
init_ws_service::mod_jk.c (568): Service protocol=HTTP/1.1 method=GET 
host=dhcp.server.fqdn addr=128.xxx.xxx.xx name=babbage.server.fqdn port=
80 auth=(null) user=(null) laddr=128.xxx.xxx.xxx raddr=128.xxx.xxx.xxx
ajp_get_endpoint::jk_ajp_common.c (2251): acquired connection pool slot=0
ajp_marshal_into_msgb::jk_ajp_common.c (547): ajp marshaling done
ajp_service::jk_ajp_common.c (1734): processing worker1 with 2 retries
jk_open_socket::jk_connect.c (334): socket TCP_NODELAY set to On
jk_open_socket::jk_connect.c (347): socket SO_KEEPALIVE set to On
jk_open_socket::jk_connect.c (397): timeout 300 set for socket=16
jk_open_socket::jk_connect.c (432): trying to connect socket 16 to 
127.0.0.1:8009
jk_open_socket::jk_connect.c (458): socket 16 connected to 127.0.0.1:8009
ajp_connect_to_endpoint::jk_ajp_common.c (846): Connected socket 16 to 
(127.0.0.1:8009)
ajp_connection_tcp_send_message::jk_ajp_common.c (892): sending to ajp13 pos=4 
len=507 max=8192
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 12 34 01 F7 02 
02 00 08 48 54 54 50 2F 31 2E 31  - .4..HTTP/1.1
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 001000 00 16 2F 7E 
64 69 63 6B 69 6E 73 6F 6E 6D 67  - .../~dickinsonmg
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00202F 74 65 73 74 
2E 6A 73 70 00 00 0E 31 32   - /test.jsp...
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 0030 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00  - x
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 0040 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00  - xxx
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 0050 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00  - babba
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 006000 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00  - ge.server.fqdn
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 007000 00 00 00 50 
00 00 0A A0 0B 00 17 62 61 62 62  - P...babb
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 008061 67 65 2E 63 
73 2E 6D 69 73 73 6F 75 72 69 2E  - age.cs.missouri.
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 009065 64 75 00 A0 
0E 00 6E 4D 6F 7A 69 6C 6C 61 2F  - edunMozilla/
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00a035 2E 30 20 28 
57 69 6E 64 6F 77 73 3B 20 55 3B  - 5.0.(Windows;.U;
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00b020 57 69 6E 64 
6F 77 73 20 4E 54 20 35 2E 31 3B  - .Windows.NT.5.1;
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00c020 65 6E 2D 55 
53 3B 20 72 76 3A 31 2E 38 2E 30  - .en-US;.rv:1.8.0
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00d02E 35 29 20 47 
65 63 6B 6F 2F 32 30 30 36 30 37  - .5).Gecko/200607
ajp_connection_tcp_send_message::jk_ajp_common.c (892): 00e032 31 20 4D 75 
6C 74 69 5A 69 6C 6C 61 2F 31 2E  - 21.MultiZilla/1.

Re: commons-logging, Tomcat 5.5 and Hibernate 3.2

2006-10-20 Thread Michael Courcy
Tomcat use commons.logging, so you can choose either java.util.logging 
or Log4J http://logging.apache.org/log4j,

http://tomcat.apache.org/tomcat-5.5-doc/logging.html
But hibernate use Log4J
http://www.hibernate.org/97.html

I permanantly use Tomcat/hibenate/Spring without any logging issue ?

Here is my log4j.properties

# Global logging configuration
log4j.rootLogger=INFO, stdout

# configuration...
org.apache.commons.digester.Digester=INFO

# Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n

Put it somewhere in your classPath (like in the WEB-INF/classes 
directory) and all the logs should drop in catalina.out.


Hope this helps.


Mic.

You should have
ave Kennedy a écrit :

The issue seems to be with commons-logging, Tomcat and Hibernate

There are lot of articles on the Web on this but I still can't resolve 
this

Anyone have Hibernate 3.2 and Tomcat 5.5 logging with commons-logging?


From: Dave Kennedy [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: users@tomcat.apache.org
Subject: How to log INFO in Tomcat
Date: Thu, 19 Oct 2006 14:14:46 -0700

Hi,
ENV1: Struts 1.2.9, Tomcat 5.5, Eclipse 3.2.0
ENV2: Struts 1.2.9, Tomcat 5.5, Eclipse 3.2.0, Hibernate 3.1

The info below is logged to Tomcat in ENV1 but not ENV2.
How is Tomcat configured to log info?

log/localhost.2006-10-19.log
...
Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action: Processing a POST for /process
Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action:  Looking for ActionForm bean under attribute 'detailForm'
Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action:  Creating new ActionForm instance of class 
'action.DetailForm'

Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action:  Storing instance under attribute 'detailForm' in scope 
'request'

Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action:  Populating bean properties from this request
Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action:  Validating input form properties
Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action:  Looking for Action instance for class 
action.ProcessDVDAction

Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action:   Double checking for Action instance already there
Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action:   Creating new Action instance
Oct 19, 2006 1:20:31 PM org.apache.catalina.core.ApplicationContext log
INFO: action: Processing a POST for /cancel

_
Ready for the world's first international mobile film festival 
celebrating the creative potential of today's youth? Check out Mobile 
Jam Fest for your a chance to WIN $10,000! www.mobilejamfest.com



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



_
Experience Live Search from your PC or mobile device today. 
http://www.live.com/?mkt=en-ca



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Program to obtain a performance in tomcat server

2006-10-20 Thread Michael Courcy

Have a look there
http://jakarta.apache.org/jmeter/

Acácio Furtado Costa a écrit :
Does anyone know some product or java program(s) that I can install in one tomcat server to measure the performance or response time. 
 
Something that works like SITESPEED offers in www.numion.com but Sitespeed program is in PERL.
 
The intention is of comparing Windows with Linux in environment Apache  + Tom Cat.

We made some measurements and no matter how incredible it seems, the windows (web editon) it ended up being a little faster (small difference).

Now we want to obtain a test of load in two optimized (so compiled and with only necessary modules).  
  
Also, it´s many interesting for us to obtain cases of another people's reports and it´s results, with this kind of tests.  

Thanks in advance
 


Acacio Furtado Costa
Pesquisa e Tecnologia

GIA - Magnesita S/A


 

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Receiving PUT-messages - calling doPUT

2006-10-20 Thread Michael Courcy

Why not this

public  void doPut(HttpServletRequest req, HttpServletResponse resp) 
throws IOException {

   doGet(req, resp);
}

and you implement only doGet

Of course it's not consistent if your request need to handle put and get 
request differently.


Mic

Philipp Südmeyer a écrit :

Hi,

I need to receive data via the PUT-method instead of POST. Unfortunately
Tomcat by default calls the doGET-method of a given Servlet instead of 
doPUT

when it receives data by put-method. I know that I usually could use POST
and everything would be fine, but in this special case I can't.
So I would really appreciate if anubody explains to me, how I can change
Tomcat's behaviour.

Thanks for your help!

Cheers
Philipp




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: placing context.xml in META-INF works?

2006-10-19 Thread Michael Courcy

Caldarale, Charles R a écrit :
From: Michael Courcy [mailto:[EMAIL PROTECTED] 
Subject: Re: placing context.xml in META-INF works?


How do you manage the problem, if you need to define a Host element 
whith many Alias ?



Hosts are a completely different problem, since they are not subordinate
to an app.

  
Can you put the definition of your Host element in  
%TOMCAT_HOME%/conf/[ENGINE]/[HOST]/myApp.xml, and nest the context 
definition inside the host definition ?



No.  Check the doc for the proper hierarchy of elements.

You can programmatically add hosts on the fly - the admin app does it.

 - Chuck
  

Ok thanks.


Re: Downloadable file name is not correct on Linux/Unix box

2006-10-19 Thread Michael Courcy

Did you try to add the mime type in your header ?
Content-Type: application/octet-stream

Mic


Umar Zubair a écrit :

I am using Tomcat5.5. I have a jsp page with option to download xls and pdf
files. When I click the link to download file and try to save it, I can not
see the exact file name. It shows the jsp file name.

By the way, if I run same application on windows box, it works perfect. I am
using following line of code in jsp page.

 


String filename = summaryReport.xls




response.setHeader(Content-Disposition, attachment; filename= +
fileName);

// Open the output stream

OutputStream outS = response.getOutputStream();

// Transfer bytes from the ZIP file to the output file

byte[] buf = new byte[1024];

int len;

while ((len = in.read(buf))  0) {

outS.write(buf, 0, len);

//out.wr

}

outS.close();

 


Instead of showing summaryReport.xls, system shows jsp file name.

Regards,

Umar Zubair

 


NOTE: This communication is intended for the above named person and is
confidential and / or legally privileged. Any opinion(s) expressed in this
communication are not necessarily those of Total Technologies and Solutions
FZ-LLC. If this eMail has come to you in error you must take no action based
upon it, nor must you print it, copy it, forward it, or show it to anyone.
Please delete and destroy this eMail and any attachments and inform the
sender immediately. 


Since the integrity and security of this message cannot be fully guaranteed
on the Internet, we strongly advise that you understand and observe this
lack of security when eMailing us. Total Technologies and Solutions FZ-LLC
is not responsible for the political, religious, racial or partisan opinion
in any correspondence conducted by its domain users. Therefore, any such
opinion expressed, whether explicitly or implicitly implied is not to be
interpreted as that of Total Technologies and Solutions FZ-LLC. 


Although Total Technologies and Solutions FZ-LLC has taken steps to ensure
that all our eMails and attachments are free from any virus, we advise that,
in keeping with best business practices, the recipient must ensure they are
actually virus free. 

 



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat, Apache and mod_jk configuration

2006-10-19 Thread Michael Courcy

Hello

Here is a fragment of my server.xml

Host name=www.verlina.com appBase=
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false

Aliasverlina.com/Alias
Aliastique-et-puce.fr/Alias
Aliaswww.tique-et-puce.fr/Alias
Aliasshampooing-chien.fr/Alias
Aliaswww.shampooing-chien.fr/Alias
   


   Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs  prefix=verlina.com_access_log. 
suffix=.txt

pattern=common resolveHosts=false/

   Valve 
className=org.apache.catalina.valves.FastCommonAccessLogValve
directory=logs  prefix=verlina.com_access_log. 
suffix=.txt

pattern=common resolveHosts=false/

   Context path= docBase=/home/verlina/www/ debug=0 
   Resource name=jdbc/verlina auth=Container 
type=javax.sql.DataSource

maxActive=100 maxIdle=30 maxWait=1
 removeAbandoned=true removeAbandonedTimeout=60 
logAbandoned=true

username=*** password=
   driverClassName=com.mysql.jdbc.Driver
   
url=jdbc:mysql://localhost:3306/verlina_com?autoReconnect=true/

/Context

/Host

And here is a fragment of my httpd.conf

VirtualHost 87.98.218.193
ServerName www.verlina.com
ServerAlias verlina.com
ServerAlias tique-et-puce.fr
ServerAlias www.tique-et-puce.fr
ServerAlias shampooing-chien.fr
ServerAlias www.shampooing-chien.fr

JkMount /* ajp13

ServerAdmin [EMAIL PROTECTED]
#DocumentRoot /home/verlina/www
User verlina
Group users

CustomLog logs/verlina-access_log combined
ScriptAlias /cgi-bin/ /home/verlina/cgi-bin/
/VirtualHost

The idea is to put the JkMount inside the virtualHost of Apache.

But discussing with Mr Caldarale, this layout is weak, even if it works.

Because if you make any change to the context, you're forced to restart 
tomcat instead of just redeploying your context.


There should be a way for your app to programatticly communicate to 
tomcat  the list of domain the app should handle, but I don't know how 
to do that.


Cheers.




DE VINZELLES, Guillaume (ext.) a écrit :

Hi there,

Here is my problem. I got a working Tomcat 5.5.20 handling 4 webapps in 
/var/tomcat/webapps. I got a working Apache 2, configured with several 
virtualhosts.
I managed to connect the Apache to the Tomcat using an AJP13 connector, and 
everything is working fine.
Now, I'd like to map each one of my webapps to a different virtualhost.
For instance, I'd like that my webapp example1, which is in 
/var/tomcat/webapps/example1, should be accessible through www.example1.com 
(and NOT www.example1.com/example1 - I've already that working).
How do you achieve this using the jkMount directives?
I've tried with jkMount /example1/* ajp13 and my webapp is accessible only 
through www.example1.com/example1.

Thanks in advance for your answers!

Guillaume de Vinzelles
DSI/PFS Neuf Cegetel
Altran Technologies
 
[EMAIL PROTECTED]
 
01 70 18 21 64



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat, Apache and mod_jk configuration

2006-10-19 Thread Michael Courcy

Yes it's what I mean,

in your JkMount declaration change

jkMount /struts-dev-1/*.do ajp13
jkMount /struts-dev-1/*.jsp ajp13

By 


jkMount /*.do ajp13
jkMount /*.jsp ajp13

And your server.xml fragment should look this way

Host name=preprod.skyce.net appBase=
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

  Context path= docBase=/var/tomcat/webapps/struts-dev-1/ debug=0 /

/Host

It should works.





DE VINZELLES, Guillaume (ext.) a écrit :

In fact, I've already put the jkMount directive in the VirtualHost conf.
It looks like:

VirtualHost 88.191.24.6:80
DocumentRoot /var/www/preprod.skyce.net/htdocs
Directory /var/www/preprod.skyce.net/htdocs
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
/Directory
ServerName preprod.skyce.net
ErrorLog /var/www/preprod.skyce.net/log/error_log
CustomLog /var/www/preprod.skyce.net/log/access_log common
jkMount /struts-dev-1/*.do ajp13
jkMount /struts-dev-1/*.jsp ajp13
/VirtualHost

And I'd like to have my webapp accessible through http://preprod.skyce.net/ 
instead of http://preprod.skyce.net/struts-dev-1/.

The pertinent fragment of my server.xml is:

Host name=preprod.skyce.net appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

My webapps are located in /var/tomcat/webapps, and I got:
CATALINA_BASE: /var/tomcat and CATALINA_HOME: /opt/tomcat5

Thanks !

Guillaume de Vinzelles
DSI/PFS Neuf Cegetel
Altran Technologies
 
[EMAIL PROTECTED]
 
01 70 18 21 64


-Message d'origine-
De : Michael Courcy [mailto:[EMAIL PROTECTED] 
Envoyé : jeudi 19 octobre 2006 14:51

À : Tomcat Users List
Objet : Re: Tomcat, Apache and mod_jk configuration

Hello

Here is a fragment of my server.xml

Host name=www.verlina.com appBase=
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

 Aliasverlina.com/Alias
 Aliastique-et-puce.fr/Alias
 Aliaswww.tique-et-puce.fr/Alias
 Aliasshampooing-chien.fr/Alias
 Aliaswww.shampooing-chien.fr/Alias



Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=verlina.com_access_log. 
suffix=.txt

 pattern=common resolveHosts=false/

Valve 
className=org.apache.catalina.valves.FastCommonAccessLogValve
 directory=logs  prefix=verlina.com_access_log. 
suffix=.txt

 pattern=common resolveHosts=false/

Context path= docBase=/home/verlina/www/ debug=0 
Resource name=jdbc/verlina auth=Container 
type=javax.sql.DataSource

 maxActive=100 maxIdle=30 maxWait=1
  removeAbandoned=true removeAbandonedTimeout=60 
logAbandoned=true

 username=*** password=
driverClassName=com.mysql.jdbc.Driver

url=jdbc:mysql://localhost:3306/verlina_com?autoReconnect=true/

 /Context

 /Host

And here is a fragment of my httpd.conf

VirtualHost 87.98.218.193
ServerName www.verlina.com
ServerAlias verlina.com
ServerAlias tique-et-puce.fr
ServerAlias www.tique-et-puce.fr
ServerAlias shampooing-chien.fr
ServerAlias www.shampooing-chien.fr

JkMount /* ajp13

ServerAdmin [EMAIL PROTECTED]
#DocumentRoot /home/verlina/www
User verlina
Group users

CustomLog logs/verlina-access_log combined
ScriptAlias /cgi-bin/ /home/verlina/cgi-bin/
/VirtualHost

The idea is to put the JkMount inside the virtualHost of Apache.

But discussing with Mr Caldarale, this layout is weak, even if it works.

Because if you make any change to the context, you're forced to restart 
tomcat instead of just redeploying your context.


There should be a way for your app to programatticly communicate to 
tomcat  the list of domain the app should handle, but I don't know how 
to do that.


Cheers.




DE VINZELLES, Guillaume (ext.) a écrit :
  

Hi there,

Here is my problem. I got a working Tomcat 5.5.20 handling 4 webapps in 
/var/tomcat/webapps. I got a working Apache 2, configured with several 
virtualhosts.
I managed to connect the Apache to the Tomcat using an AJP13 connector, and 
everything is working fine.
Now, I'd like to map each one of my webapps to a different virtualhost.
For instance, I'd like that my webapp example1, which is in 
/var/tomcat/webapps/example1, should be accessible through www.example1.com 
(and NOT www.example1.com/example1 - I've already that working).
How do you achieve this using the jkMount directives?
I've tried with jkMount /example1/* ajp13 and my webapp is accessible only 
through www.example1.com/example1.

Thanks in advance for your answers!

Guillaume de Vinzelles
DSI/PFS Neuf Cegetel
Altran Technologies
 
[EMAIL PROTECTED]
 
01 70 18 21 64

Re: Tomcat, Apache and mod_jk configuration

2006-10-19 Thread Michael Courcy

Yes it's what I mean,

in your JkMount declaration change

jkMount /struts-dev-1/*.do ajp13
jkMount /struts-dev-1/*.jsp ajp13

By 


jkMount /*.do ajp13
jkMount /*.jsp ajp13

And your server.xml fragment should look this way

Host name=preprod.skyce.net appBase=
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

  Context path= docBase=/var/tomcat/webapps/struts-dev-1/ debug=0 /

/Host

It should works.





DE VINZELLES, Guillaume (ext.) a écrit :

In fact, I've already put the jkMount directive in the VirtualHost conf.
It looks like:

VirtualHost 88.191.24.6:80
DocumentRoot /var/www/preprod.skyce.net/htdocs
Directory /var/www/preprod.skyce.net/htdocs
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
/Directory
ServerName preprod.skyce.net
ErrorLog /var/www/preprod.skyce.net/log/error_log
CustomLog /var/www/preprod.skyce.net/log/access_log common
jkMount /struts-dev-1/*.do ajp13
jkMount /struts-dev-1/*.jsp ajp13
/VirtualHost

And I'd like to have my webapp accessible through http://preprod.skyce.net/ 
instead of http://preprod.skyce.net/struts-dev-1/.

The pertinent fragment of my server.xml is:

Host name=preprod.skyce.net appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

My webapps are located in /var/tomcat/webapps, and I got:
CATALINA_BASE: /var/tomcat and CATALINA_HOME: /opt/tomcat5

Thanks !

Guillaume de Vinzelles
DSI/PFS Neuf Cegetel
Altran Technologies
 
[EMAIL PROTECTED]
 
01 70 18 21 64


-Message d'origine-
De : Michael Courcy [mailto:[EMAIL PROTECTED] 
Envoyé : jeudi 19 octobre 2006 14:51

À : Tomcat Users List
Objet : Re: Tomcat, Apache and mod_jk configuration

Hello

Here is a fragment of my server.xml

Host name=www.verlina.com appBase=
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

 Aliasverlina.com/Alias
 Aliastique-et-puce.fr/Alias
 Aliaswww.tique-et-puce.fr/Alias
 Aliasshampooing-chien.fr/Alias
 Aliaswww.shampooing-chien.fr/Alias



Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=verlina.com_access_log. 
suffix=.txt

 pattern=common resolveHosts=false/

Valve 
className=org.apache.catalina.valves.FastCommonAccessLogValve
 directory=logs  prefix=verlina.com_access_log. 
suffix=.txt

 pattern=common resolveHosts=false/

Context path= docBase=/home/verlina/www/ debug=0 
Resource name=jdbc/verlina auth=Container 
type=javax.sql.DataSource

 maxActive=100 maxIdle=30 maxWait=1
  removeAbandoned=true removeAbandonedTimeout=60 
logAbandoned=true

 username=*** password=
driverClassName=com.mysql.jdbc.Driver

url=jdbc:mysql://localhost:3306/verlina_com?autoReconnect=true/

 /Context

 /Host

And here is a fragment of my httpd.conf

VirtualHost 87.98.218.193
ServerName www.verlina.com
ServerAlias verlina.com
ServerAlias tique-et-puce.fr
ServerAlias www.tique-et-puce.fr
ServerAlias shampooing-chien.fr
ServerAlias www.shampooing-chien.fr

JkMount /* ajp13

ServerAdmin [EMAIL PROTECTED]
#DocumentRoot /home/verlina/www
User verlina
Group users

CustomLog logs/verlina-access_log combined
ScriptAlias /cgi-bin/ /home/verlina/cgi-bin/
/VirtualHost

The idea is to put the JkMount inside the virtualHost of Apache.

But discussing with Mr Caldarale, this layout is weak, even if it works.

Because if you make any change to the context, you're forced to restart 
tomcat instead of just redeploying your context.


There should be a way for your app to programatticly communicate to 
tomcat  the list of domain the app should handle, but I don't know how 
to do that.


Cheers.




DE VINZELLES, Guillaume (ext.) a écrit :
  

Hi there,

Here is my problem. I got a working Tomcat 5.5.20 handling 4 webapps in 
/var/tomcat/webapps. I got a working Apache 2, configured with several 
virtualhosts.
I managed to connect the Apache to the Tomcat using an AJP13 connector, and 
everything is working fine.
Now, I'd like to map each one of my webapps to a different virtualhost.
For instance, I'd like that my webapp example1, which is in 
/var/tomcat/webapps/example1, should be accessible through www.example1.com 
(and NOT www.example1.com/example1 - I've already that working).
How do you achieve this using the jkMount directives?
I've tried with jkMount /example1/* ajp13 and my webapp is accessible only 
through www.example1.com/example1.

Thanks in advance for your answers!

Guillaume de Vinzelles
DSI/PFS Neuf Cegetel
Altran Technologies
 
[EMAIL PROTECTED]
 
01 70 18 21 64

Re: Tomcat, Apache and mod_jk configuration

2006-10-19 Thread Michael Courcy
Yes it looks much more powerful than my solution. Especially if you want 
to guarantee a minimum JVM heap size for each app.


Thanks a lot.

JVM
It looks like what to have more than one webapp as the root webapp.

My suggestion would be to run each webapp in a different instance of
Tomcat. It's much easier than you think is it to do this. I use Tomcat
4.1.x, but I'm sure the same is possible with very few changes on 5.5.x:

1. Create a directory structure for each webapp (outside of Tomcat's
installation directory) like this:

struts-dev-1/
struts-dev-1/conf
struts-dev-1/conf/server.xml
struts-dev-1/conf/web.xml
struts-dev-1/webapps
struts-dev-1/logs
struts-dev-1/temp

** Make sure to set your port numbers for your shutdown and connector
ports to something unique among your webapps. I usually use 8x85 for the
ajp13 connector port and 8x86 for the shutdown port.

2. Install your webapp to the directory struts-dev-1/webapps/struts-dev-1

3. Configure Tomcat to use struts-dev-1 as your root webapp (usually
by specifying that the path is  instead of /struts-dev-1).

4. Start each Tomcat instance like this:

$ export JAVA_HOME=...
$ export CATALINA_HOME=/path/to/full/tomcat/install
$ export CATALINA_BASE=/path/to/struts-dev-1
$ export CATALINA_TMPDIR=/path/th/struts-dev-1/temp
$ /path/to/full/tomcat/install/bin/startup.sh

This setup allows you to have separate root webapps (or any other kind
of setup). You also have the benefit (I choose to see it as a benefit)
of separate JVMs and Tomcat instances. You can take one down without
bothering the others.

Hope that helps,
-chris


  




Re: placing context.xml in META-INF works?

2006-10-18 Thread Michael Courcy



Take out the path attribute - it's not allowed unless the Context
element is in server.xml, which is strongly discouraged.

  

why ?

Mic

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: placing context.xml in META-INF works?

2006-10-18 Thread Michael Courcy


 


Because you have to restart Tomcat if you make any changes to server.xml
- it's only read during initialization.  Consequently, updating the app
on the fly when its Context tag is in server.xml is not possible.  To
quote from the doc:
  

ok


Actually I'm not pretty sure to be ok.

How do you manage the problem, if you need to define a Host element 
whith many Alias ?
Can you put the definition of your Host element in  
%TOMCAT_HOME%/conf/[ENGINE]/[HOST]/myApp.xml, and nest the context 
definition inside the host definition ?


Mic.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat unable to find the apr library

2006-10-17 Thread Michael Courcy
Hum,  I remember that I had to download the source apr-1.2.7.tar.gz  
for APR directly from the apache website and use the classic ./configure 
 make  make install,


Then I untar tomcat-native.tar.gz in the bin directory and run again 
configure --with-apr=/usr/local/apr/bin/  make  make install


This is true I dit not consider 32- or 64-bit compilation and the server 
use a 32 processor.


Is there 2 differents packages 32 or 64 bit, or different compilation 
directive ?


Thanks.


Caldarale, Charles R a écrit :
From: Michael Courcy [mailto:[EMAIL PROTECTED] 
Subject: Tomcat unable to find the apr library


I wanted my tomcat instance use the APR (Apache Portable 
Runtime) so I installed it.



Where did you get it in Linux-installable form?  You normally have to
build it for the platform it's going to be run on, using 32- or 64-bit
compilation to match the JVM you have.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




Re: SV: Problem with filter and calling Perl-script with Tomcat 5.5.20

2006-10-17 Thread Michael Courcy

Can't u use

request.sendRedirect(myperlscript.cgi?aparam=+request.getParameter(blah));

Mic

[EMAIL PROTECTED] a écrit :

Hi,

The problem is not to get the parameters in my java filter. 
The problem is that I need to pass the posted parameters from the form plus one additional parameter to my Perl script.


Regards
Gunnar
 

  

-Ursprungligt meddelande-
Från: Martin Gainty [mailto:[EMAIL PROTECTED] 
Skickat: den 16 oktober 2006 18:06

Till: Tomcat Users List
Ämne: Re: Problem with filter and calling Perl-script with 
Tomcat 5.5.20


Gunnar-

String AStringWhichHoldsPostedOrQSValue;
if(HttpServletRequest.getMethod()  ==  POST) { //Post only  
AStringWhichHoldsPostedOrQSValue = 
HttpServletRequest.getParameter(whatever);

}
else
{ //Get Only..
 AStringWhichHoldsPostedOrQSValue =  
HttpServletRequest.getQueryString();

}
It has been my experience that getParameterWhatever does 
NOT retrieve POSTed values when Method = 'Get')



M-

This e-mail communication and any attachments may contain 
confidential and privileged information for the use of the 
designated recipients named above. If you are not the 
intended recipient, you are hereby notified that you have 
received this communication in error and that any review, 
disclosure, dissemination, distribution or copying of it or 
its contents

- Original Message -
From: [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, October 16, 2006 11:09 AM
Subject: Problem with filter and calling Perl-script with 
Tomcat 5.5.20



Hi,

I've a problem with the new 5.5.20 Tomcat version.
I think this has to do with this bug fix 
http://issues.apache.org/bugzilla/show_bug.cgi?id=37285.


The problem is that I have a filter that adds a parameter 
before the CGI-filter calling out to a Perl-script.


This code worked with Tomcat 5.5.17 and works with 5.5.20 if 
the request is a GET but not a POST.


This is the relevant code:

HttpServletRequest httpServletRequest = (HttpServletRequest) 
request; HashMapString, String[] parameters = new 
HashMapString, String[](

   (HashMapString, String[]) httpServletRequest.getParameterMap());
fillUserInfo(parameters);
httpServletRequest = generateWrapper(httpServletRequest, 
parameters); chain.doFilter(httpServletRequest, response);



Can you advise me what to do?

Regards
Gunnar

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




Re: problems with unpacking ROOT.war

2006-10-17 Thread Michael Courcy

Maybe a stupid clue but instead of

Context path= debug=1

/Context

What happen if u try

Context path=/ debug=1

/Context


[EMAIL PROTECTED] a écrit :

Hi again,

OK - here are some steps you can try out to reproduce the problem I am
experiencing - I'm hoping this will tempt someone into taking a look :-).

The problem we have is that tomcat 5.5.x (I tried 5.5.12 and 5.5.17) won't
unpack ROOT.war when it is started up, if a file called ROOT.xml is present
in conf/Catalina/localhost.

(1) Build a simple webapp, for example containing:

success.html
WEB-INF/web.xml

and place these into a war file called ROOT.war.

(2) Place a ROOT.xml context file into conf/Catalina/localhost with:

?xml version=1.0 encoding=UTF-8?

Context path= debug=1
/Context

The server.xml file can stick to the defaults that you get with tomcat
5.5.17 (or 5.5.12):

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

(3) Delete any directory under webapps called ROOT, and drop the war file
into webapps.

(4) Start tomcat.

-- doesn't unpack war.

(5) delete ROOT.xml from conf/Catalina/localhost, and restart tomcat

-- does unpack the war file.

Similarly, a war file containing META-INF/context.xml will be deployed, as
long as there isn't a file called ROOT.xml inside conf/Catalina/localhost.
The problem for us is that we would like to deploy the war on different
servers, offering different JNDI resources.  So shipping a war file
containing a context.xml isn't an option for us.

I have searched the mailing lists for a solution to this problem, but so
far without luck.  There was a useful mail trail last year that resulted in
a document being placed in bugzilla containing instructions on how to
deploy a root app using tomcat's manager (
http://issues.apache.org/bugzilla/show_bug.cgi?id=35063).  However our
production environments don't support the manager app.

I have tried tweaking some of the parameters.  For example, if I set a
docBase of ${CATALINA_HOME}/webapps/ROOT, I'll see a warning in the logs
saying that a docBase [...] inside the host appBase has been specified,
and will be ignored - which at least shows that ROOT.xml is being parsed.
Likewise, changing the the docBase to point to a directory outside of
${CATALINA_HOME} doesn't solve the problem.

(Am I right in thinking docBase *isn't* a required attribute?  If I leave
this out of ROOT.xml, and expand the war file manually, the ROOT app will
pick up JNDI resources correctly).

I've also played with some of the host attributes in server.xml, e.g.
adding deployOnStartup=true to server.xml (it is true by default), or
setting autoDeploy=false, but none of these tweaks helped.

So - is it a bug (or a feature?!) that ROOT.war won't unpack if ROOT.xml is
already present in conf/Catalina/localhost?

Thanks for any help,

Andy Cooke



Hi there,

We have been finding it difficult to persuade tomcat (5.5.12 and 5.5.17) to
unpack a ROOT.war file, either when starting up tomcat from scratch, or
hot-deploying.

We *were* able to get tomcat to expand the war file if it contains a
META-INF directory containing a context.xml file.  However if this
directory is missing from the war, and instead a ROOT.xml context file is
present in conf/Catalina/localhost before starting tomcat - the war file
*isn't* expanded.

Our server.xml file contains the default settings (unpackWARs=true
autoDeploy=true).

Any ideas?  We would rather not include context.xml files in the war, as
the same war file will be deployed on different servers, which require
different JNDI resources.

thanks

Andy Cooke


-
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase  Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org

Re: best way to setup servlet and filter for REST style URLs

2006-10-17 Thread Michael Courcy

Hi,

If you don't want to use a filter you should consider the urlrewrite 
capacity of apache.


Here is a tech note that should help you

http://www.amitysolutions.com.au/documents/URLRewriting-technote.pdf

Of course if u use tomcat as a stand alone server it could be not adapted.

Though It's not very clear for me that u prevent bad thing to happen 
with apache mod_rewrite, because you're still responsible for the 
interpretation of the url.



Cheers.

Jason Novotny a écrit :


Hi,

   I'm developing a web application and have a couple important 
constraints:


+ URLs should look nice and be bookmarkable in the style of REST 
e.g. http://localhost/myapp/mylayout/someaction/
+ Should be relatively easy to move the WAR  call it myapp.war to some 
other WAR e.g. someappp.war so that is accessible as 
http://localhost/someapp/ with as little configuration changes as 
possible in web.xml and elsewhere


   The approach I started to take was to use a servlet filter that 
could take any request e.g. myapp?foo=barcolor=red and  by using 
request.getPathInfo() do a forward to the servlet  myapp with the 
additional params tacked on. This seemed to be a good strategy since 
the forward hides the additional params so in the browser you see only 
the /myapp/mylayout/someaction/ as desired.
   However, I noticed depending on the initial URL a user put in, 
sometimes bad or unexpected things happened so I thought maybe using a 
filter with a forward is very fragile code.


   Has anyone else done this kind of thing-- I tried looking at some 
popular frameworks but they didn't seem to offer much...


   Thanks very much, Jason



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat unable to find the apr library

2006-10-17 Thread Michael Courcy

Hi,

I follow your advice and compiled successfully doing

$ ./buildconf --with-apr=/home/ovh/src/soft/apr-1.2.7
$ ./configure --with-apr=/home/ovh/src/soft/apr-1.2.7
$ make
$ make install

All that went fine, the last message of make install was that libraries 
where put in /usr/local/apr/lib


So I set my env var LD_LIBRARY_PATH

$ export LD_LIBRARY_PATH=/usr/local/apr/lib:/usr/local/apr

And restart tomcat... But still the same message :

17 oct. 2006 23:08:15 org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance 
in production environments was not found on the java.library.path: 
/usr/java/jdk1.5.0_07/jre/lib/i386/client:/usr/java/jdk1.5.0_07/jre/lib/i386:/usr/java/jdk1.5.0_07/jre/../lib/i386:/usr/local/apr/lib:/usr/local/apr


Honestly it does not matter that much, I'm going to work the best I can 
do to rely on apache server for serving static content and right now 
it's going to be enough.


Thanks for your answer anyway.

Cheers








Mladen Turk a écrit :

Michael Courcy wrote:
Hum,  I remember that I had to download the source 
apr-1.2.7.tar.gz  for APR directly from the apache website and use 
the classic ./configure  make  make install,




You need apr sources only if building from SVN, then you first
have to ./buildconf.sh --with-apr=/location/of/the/apr-1.2.7

Then I untar tomcat-native.tar.gz in the bin directory and run again 
configure --with-apr=/usr/local/apr/bin/  make  make install


Usually that's the
configure --with-apr=/usr/local/apr
(if the APR was installed in a normal way)

make  make install
will then copy the tcnative .so to the
/usr/local/apr/lib

Regards,
Mladen.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat unable to find the apr library

2006-10-16 Thread Michael Courcy

Hi,

I wanted my tomcat instance use the APR (Apache Portable Runtime) so I 
installed it.


Installation went fine, and the library where installed in 
/usr/local/apr/lib.


Then I set the env variable LD_LIBRAY_PATH to /usr/local/apr/lib.

I restart tomcat, but I still get this message in the log
INFO: The Apache Tomcat Native library which allo..[...]..s was not 
found on the java.library.path:  [...]:/usr/local/apr/lib/


So I don't understand, because it looks like, all information to load 
the APR library is given, but tomcat failed to use it


Any help ?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]