Where is the POSTED data on login redirect?

2007-10-28 Thread Peter Coppens

Hello,

When a user posts data to a servlet after the session has expired (timeout)
tomcat automatically redirects to my login page. After successful login,
tomcat will redirect to the original request.

I am looking for way to access the originally posted data when it 'arrives'
in the servlet (after tomcat has redirected after the login).

Any guidance or pointers would be most warmly welcomed!

Thanks,

Peter


-- 
View this message in context: 
http://www.nabble.com/Where-is-the-POSTED-data-on-login-redirect--tf4706256.html#a13451670
Sent from the Tomcat - User mailing list archive at Nabble.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]



Re: Where is the POSTED data on login redirect?

2007-10-28 Thread david delbecq (jakarta)
They are automatically saved by form authentification system and
restored after form authentification. Your servlet won't be able to make
the difference between a direct hit and a hit with post restored after
form authentification.

Please note, however, that the size of post request saved by tomcat is
limited by default to 4K. If it's bigger, your servlet will get an empty
request. To increase that size, go to Http connector configuration of
tomcat, and change or set the maxSavePostSize.

http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

Regards,
Delbecq David

Op zondag 28-10-2007 om 02:41 uur [tijdzone -0700], schreef Peter
Coppens:
 Hello,
 
 When a user posts data to a servlet after the session has expired (timeout)
 tomcat automatically redirects to my login page. After successful login,
 tomcat will redirect to the original request.
 
 I am looking for way to access the originally posted data when it 'arrives'
 in the servlet (after tomcat has redirected after the login).
 
 Any guidance or pointers would be most warmly welcomed!
 
 Thanks,
 
 Peter
 
 


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



Unrecoverable error 200, request failed

2007-10-28 Thread Ingo Düppe

Hello,

I found the following lines in my mod_jk.log every 20 to 30 seconds for 
all of my instances.


[info] jk_ajp_common.c (1511): Writing to client aborted or client 
network problems
[info] jk_ajp_common.c (1996): (plexus12) request failed, because of 
client write error without recovery in send loop attempt=0
[info] jk_lb_worker.c (1092): unrecoverable error 200, request failed. 
Client failed in the middle of request, we can't recover to another 
instance.

[info] mod_jk.c (2270): Aborting connection for worker=plexus

First I thought, this is caused because of some related network traffic 
problem, but also the two Tomcat instances on the same machine appear in 
the log.


My configuration exist of Windows 2003 SP2 Servers, Apache httpd 2.2.6, 
mod_jk 1.2.25, and Tomcat 6.0.14.



Please, can anybody tell me what's wrong with my configuration and what 
is the meaning of these lines.


Thx in advanced

Ingo



My workers.properties:

workers.tomcat_home=C:\Server\tomcat-6.0.14
workers.java_home=c:\java\jdk-6.0
ps=\
worker.list=plexus,jkstatus

worker.plexus11.port=8109
worker.plexus11.host=openuss01
worker.plexus11.type=ajp13
worker.plexus11.lbfactor=10
...
worker.plexus52.port=8209
worker.plexus52.host=openuss05
worker.plexus52.type=ajp13
worker.plexus52.lbfactor=10

worker.jkstatus.type=status
worker.plexus.type=lb
worker.plexus.sticky_session=true
worker.plexus.socket_timeout=20
worker.plexus.reply_timeout=3000
worker.plexus.max_reply_timeouts=4
worker.plexus.balance_workers=plexus11,plexus21,plexus12,plexus22,plexus51,plexus31,plexus52




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



jkMount

2007-10-28 Thread BuildSmart

I'm trying to get around a configuration issue.

My webapp builds dynamic script content but the generated scripts are  
not accessible.


For example, calling http://domain.tld/index.jsp? 
ip=192.168.0.10count=10key=robot should generate some  
subdirectories and builds some jsp pages with content and this seems  
to work as expected but from apache these are not accessible but from  
the Tomcat port I can access the pages without issue, is there a way  
to resolve this?


I can't pre-define the mount points for the subdirectories because I  
don't know what they are in advance, there doesn't seem to be a way  
to define access to Tomcat based on the file extension since it wont  
let you assign a mount point without a leading /.


Maybe I should be using a different protocol that allows assignment  
by file extension (if one exists) but google has done nothing but  
create more confusion for me.


___

My apache config contains:
___

IfModule mod_jk.c
JKWorkersFile /etc/httpd/workers.ajp13.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /*.jsp ajp13
JkOptions +ForwardKeySize +ForwardURICompat
/IfModule
___

my workers.ajp13.properties contains:
___

ps=/

# Define 1 real worker using ajp13
worker.list=ajp13

# 
# First worker server
# 
# Set properties for ajp13 (ajp13)
worker.ajp13.host=localhost
worker.ajp13.port=8019
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1

#
# END workers.properties
#
___


-- Dale





PGP.sig
Description: This is a digitally signed message part


Re: Unrecoverable error 200, request failed

2007-10-28 Thread Rainer Jung

Hi,

usually those info messages indicate, that the request took to long, so 
the user in front of the browser did a retry or back or something 
similar. In this case the browser closes the existing connection to the 
web server, although parts of the response are still missing. When 
Tomcat send the next part of the response to the web server (e.G. Apache 
httpd), and the web server tries to send it back to the client 
(=browser), it detects a closed connection and this info message gets 
written into the log.


Depending on your load, the performance of the app and the patience of 
your users, a message every 20 to 30 seconds seems a bit to much.


You can add %D to your httpd access log, which will log microseconds 
response time to the access log, and also %{pid}P and %{tid}P, which 
will give the process id and the thread id of the thread serving the 
request. mod_jk also logs the process id and thread id automatically for 
each line, so there is a chance, that you can match those lines and find 
out, if they come from special requests (e.g. long running ones), from 
special users (IPs, Browsers) etc.


For the httpd access log configuration see

http://httpd.apache.org/docs/2.2/mod/mod_log_config.html

Caution: the timestamp in the jk log file, is the moment the problem got 
detected, the time stamp in the access log is the moment the request 
started (so you need to add the %d value to make them match).


Some more hints about your config included below.

Regards,

Rainer

Ingo Düppe wrote:

Hello,

I found the following lines in my mod_jk.log every 20 to 30 seconds for 
all of my instances.


[info] jk_ajp_common.c (1511): Writing to client aborted or client 
network problems
[info] jk_ajp_common.c (1996): (plexus12) request failed, because of 
client write error without recovery in send loop attempt=0
[info] jk_lb_worker.c (1092): unrecoverable error 200, request failed. 
Client failed in the middle of request, we can't recover to another 
instance.

[info] mod_jk.c (2270): Aborting connection for worker=plexus

First I thought, this is caused because of some related network traffic 
problem, but also the two Tomcat instances on the same machine appear in 
the log.


My configuration exist of Windows 2003 SP2 Servers, Apache httpd 2.2.6, 
mod_jk 1.2.25, and Tomcat 6.0.14.



Please, can anybody tell me what's wrong with my configuration and what 
is the meaning of these lines.


Thx in advanced

Ingo



My workers.properties:

workers.tomcat_home=C:\Server\tomcat-6.0.14
workers.java_home=c:\java\jdk-6.0
ps=\


The three above are not used since a long time. Remove them.


worker.list=plexus,jkstatus
worker.plexus11.port=8109
worker.plexus11.host=openuss01
worker.plexus11.type=ajp13
worker.plexus11.lbfactor=10
...
worker.plexus52.port=8209
worker.plexus52.host=openuss05
worker.plexus52.type=ajp13
worker.plexus52.lbfactor=10

worker.jkstatus.type=status
worker.plexus.type=lb
worker.plexus.sticky_session=true
worker.plexus.socket_timeout=20
worker.plexus.reply_timeout=3000


3 seconds reply timeout sounds a bit ambitious (but I don't know what 
your app does)



worker.plexus.max_reply_timeouts=4


This max_reply_timeouts sounds a bit high. It controls after how many 
reply_timeouts a single sub worker of an lb gets put into an error state 
(and thus will not be used for a minute, before it gets tried again).


The counter gets incremented for each reply_timeout missed and gets 
divided by 2 about every minute. So assuming a steady flow of missed 
reply_timeouts, the value 4 corresponds to about 2 
reply_timeouts missed per minute.


worker.plexus.balance_workers=plexus11,plexus21,plexus12,plexus22,plexus51,plexus31,plexus52 


-
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: jkMount

2007-10-28 Thread Rainer Jung

Hi,

BuildSmart wrote:

I'm trying to get around a configuration issue.

My webapp builds dynamic script content but the generated scripts are 
not accessible.


For example, calling 
http://domain.tld/index.jsp?ip=192.168.0.10count=10key=robot; should 
generate some subdirectories and builds some jsp pages with content and 
this seems to work as expected but from apache these are not accessible 
but from the Tomcat port I can access the pages without issue, is there 
a way to resolve this?


With respect to what is following below, I'm not actually sure, if I 
understand, what you mean by not accessible.


I can't pre-define the mount points for the subdirectories because I 
don't know what they are in advance, there doesn't seem to be a way to 
define access to Tomcat based on the file extension since it wont let 
you assign a mount point without a leading /.


JkMount /*.jsp myworker

would be perfectly valid. You can combine prefixes and suffixes.
If there are no rules at all (no known prefixes and no known suffixes) 
then your URL space is weird and you can only use


JkMount /* myworker

and live with the consequences :(

In case it would be easier to describe, what *not* to forward, you can 
combine JkMount with JkUnmount


See

http://tomcat.apache.org/connectors-doc/reference/apache.html
and
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

See further comments inline.

Maybe I should be using a different protocol that allows assignment by 
file extension (if one exists) but google has done nothing but create 
more confusion for me.


___

My apache config contains:
___

IfModule mod_jk.c
JKWorkersFile /etc/httpd/workers.ajp13.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 


That was our old default JkLogStampFormat. If you omit the lines, you 
will get milliseconds for free starting with mod_jk 1.2.25.



JkMount /*.jsp ajp13


Uups: there you are, you already use a suffix pattern!


JkOptions +ForwardKeySize +ForwardURICompat


It's very likely, that you won't need the +ForwardURICompat when using 
an up-to-date mod_jk.



/IfModule
___

my workers.ajp13.properties contains:
___

ps=/


This defines a variable ps, which you are never using. Simply delete this.


# Define 1 real worker using ajp13
worker.list=ajp13

# 
# First worker server
# 
# Set properties for ajp13 (ajp13)
worker.ajp13.host=localhost
worker.ajp13.port=8019
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1

#
# END workers.properties
#
___


-- Dale


Regards,

Rainer

-
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: Unrecoverable error 200, request failed

2007-10-28 Thread Ingo Düppe

Hi Rainer,

thank you very much for your detailed answer.
Now I can analyse whats going to slow :-)

Am I'm right, that with the following setting a reply_timeout is 
detected when the tomcat doesn't reply within 10 seconds and it will be 
set into error if more than 15 timeouts in a minutes are detected?


worker.plexus.reply_timeout=1
worker.plexus.max_reply_timeouts=30

Regards
Ingo

Rainer Jung schrieb:

Hi,

usually those info messages indicate, that the request took to long, 
so the user in front of the browser did a retry or back or something 
similar. In this case the browser closes the existing connection to 
the web server, although parts of the response are still missing. When 
Tomcat send the next part of the response to the web server (e.G. 
Apache httpd), and the web server tries to send it back to the client 
(=browser), it detects a closed connection and this info message gets 
written into the log.


Depending on your load, the performance of the app and the patience of 
your users, a message every 20 to 30 seconds seems a bit to much.


You can add %D to your httpd access log, which will log microseconds 
response time to the access log, and also %{pid}P and %{tid}P, which 
will give the process id and the thread id of the thread serving the 
request. mod_jk also logs the process id and thread id automatically 
for each line, so there is a chance, that you can match those lines 
and find out, if they come from special requests (e.g. long running 
ones), from special users (IPs, Browsers) etc.


For the httpd access log configuration see

http://httpd.apache.org/docs/2.2/mod/mod_log_config.html

Caution: the timestamp in the jk log file, is the moment the problem 
got detected, the time stamp in the access log is the moment the 
request started (so you need to add the %d value to make them match).


Some more hints about your config included below.

Regards,

Rainer

Ingo Düppe wrote:

Hello,

I found the following lines in my mod_jk.log every 20 to 30 seconds 
for all of my instances.


[info] jk_ajp_common.c (1511): Writing to client aborted or client 
network problems
[info] jk_ajp_common.c (1996): (plexus12) request failed, because of 
client write error without recovery in send loop attempt=0
[info] jk_lb_worker.c (1092): unrecoverable error 200, request 
failed. Client failed in the middle of request, we can't recover to 
another instance.

[info] mod_jk.c (2270): Aborting connection for worker=plexus

First I thought, this is caused because of some related network 
traffic problem, but also the two Tomcat instances on the same 
machine appear in the log.


My configuration exist of Windows 2003 SP2 Servers, Apache httpd 
2.2.6, mod_jk 1.2.25, and Tomcat 6.0.14.



Please, can anybody tell me what's wrong with my configuration and 
what is the meaning of these lines.


Thx in advanced

Ingo



My workers.properties:

workers.tomcat_home=C:\Server\tomcat-6.0.14
workers.java_home=c:\java\jdk-6.0
ps=\


The three above are not used since a long time. Remove them.


worker.list=plexus,jkstatus
worker.plexus11.port=8109
worker.plexus11.host=openuss01
worker.plexus11.type=ajp13
worker.plexus11.lbfactor=10
...
worker.plexus52.port=8209
worker.plexus52.host=openuss05
worker.plexus52.type=ajp13
worker.plexus52.lbfactor=10

worker.jkstatus.type=status
worker.plexus.type=lb
worker.plexus.sticky_session=true
worker.plexus.socket_timeout=20
worker.plexus.reply_timeout=3000


3 seconds reply timeout sounds a bit ambitious (but I don't know what 
your app does)



worker.plexus.max_reply_timeouts=4


This max_reply_timeouts sounds a bit high. It controls after how many 
reply_timeouts a single sub worker of an lb gets put into an error 
state (and thus will not be used for a minute, before it gets tried 
again).


The counter gets incremented for each reply_timeout missed and gets 
divided by 2 about every minute. So assuming a steady flow of missed 
reply_timeouts, the value 4 corresponds to about 2 
reply_timeouts missed per minute.


worker.plexus.balance_workers=plexus11,plexus21,plexus12,plexus22,plexus51,plexus31,plexus52 



-
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: Unrecoverable error 200, request failed

2007-10-28 Thread Rainer Jung

Hi Ingo,

Ingo Düppe wrote:
Am I'm right, that with the following setting a reply_timeout is 
detected when the tomcat doesn't reply within 10 seconds and it will be 
set into error if more than 15 timeouts in a minutes are detected?


worker.plexus.reply_timeout=1


Yes. The timeout gets reset every time mod_jk waits for the next 
package. So it's not an overall response time timeout, but it limits the 
longest pause allowed between reposnse packets. Usually it will fire, 
between the point in time the request was forwarded to Tomcat and the 
first request packet arrives. Most apps don't have huge delays after 
that point.


See also

http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html

for a description of all possible timeouts.


worker.plexus.max_reply_timeouts=30


In case you assume a steady rate of long running requests, yes: 15 per 
minute. In case there were no long running requests for a long time, our 
intrnal counter will be zero and we will allo up to 30 long running 
requests before triggering the error status.


The counter gets divided by 2 every minute, so that older events count 
less the longer they are away. A worker that worked fast for a long time 
can use all of the 30 events, if it already had 30 (or 29) timeouts in 
the minute before, only 15 are free the next minute.


Regards,

Rainer

-
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: jkMount

2007-10-28 Thread BuildSmart


On Oct 28, 2007, at 08:32:50, Rainer Jung wrote:


Hi,

BuildSmart wrote:

I'm trying to get around a configuration issue.
My webapp builds dynamic script content but the generated scripts  
are not accessible.
For example, calling http://domain.tld/index.jsp? 
ip=192.168.0.10count=10key=robot should generate some  
subdirectories and builds some jsp pages with content and this  
seems to work as expected but from apache these are not accessible  
but from the Tomcat port I can access the pages without issue, is  
there a way to resolve this?


With respect to what is following below, I'm not actually sure, if  
I understand, what you mean by not accessible.


not accessible means apache cannot access the pages, gives an error  
-- page does not exist.


if the content pages that are built have the following paths:
docroot/index.jsp -- the main page
docroot/example/user.jsp -- generated by main page
docroot/example/data.jsp -- generated by main page

I cannot access any pages in examples directory from apache.

I cannot code the subdirectory because they are generated on the fly  
and I do not know in advance that they are.


I cannot use /* because apache also has other content handlers like  
php and then Tomcat errors on the php file.




I can't pre-define the mount points for the subdirectories because  
I don't know what they are in advance, there doesn't seem to be a  
way to define access to Tomcat based on the file extension since  
it wont let you assign a mount point without a leading /.


JkMount /*.jsp myworker

would be perfectly valid. You can combine prefixes and suffixes.
If there are no rules at all (no known prefixes and no known  
suffixes) then your URL space is weird and you can only use


JkMount /* myworker

and live with the consequences :(

In case it would be easier to describe, what *not* to forward, you  
can combine JkMount with JkUnmount


Now I'd be getting into a complicated and bastardized configuration.



See

http://tomcat.apache.org/connectors-doc/reference/apache.html
and
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

See further comments inline.

Maybe I should be using a different protocol that allows  
assignment by file extension (if one exists) but google has done  
nothing but create more confusion for me.

___
My apache config contains:
___
IfModule mod_jk.c
JKWorkersFile /etc/httpd/workers.ajp13.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 


That was our old default JkLogStampFormat. If you omit the lines,  
you will get milliseconds for free starting with mod_jk 1.2.25.



JkMount /*.jsp ajp13


Uups: there you are, you already use a suffix pattern!


JkOptions +ForwardKeySize +ForwardURICompat


It's very likely, that you won't need the +ForwardURICompat when  
using an up-to-date mod_jk.



/IfModule
___
my workers.ajp13.properties contains:
___
ps=/


This defines a variable ps, which you are never using. Simply  
delete this.



# Define 1 real worker using ajp13
worker.list=ajp13
# 
# First worker server
# 
# Set properties for ajp13 (ajp13)
worker.ajp13.host=localhost
worker.ajp13.port=8019
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
#
# END workers.properties
#
___
-- Dale


Regards,

Rainer


Forgive me for complaining but why on earth has no servlet handler/ 
module been developed that processes by file extension rather than  
only by context.


It would be nice to do:
jkMount *.jsp ajp13

then all .jsp files would be processed by the handler, of course  
mod_jk doesn't allow it and to do it by file extension would be too  
intelligent and renders a lot of current configuration complicated  
methods obsolete.


adding mode_rewrite or having to configure more than a single webapp  
host makes no sense if all you want to do is gain access to the java  
engine to deploy pgaes from within apache and having to define more  
than one host/port in Tomcat is a retarded concept by any standards.


I believe that one host/port can be used by any apache virtualhost to  
server pages from the apache virtualhost DOCUMENT_ROOT and not the  
webapp docroot making it's implementation far more dynamic and  
useable rather than all the complicated configuring of the current  
methods discussed on this list.


A good example of this in action is BlueDragon, it has a custom  
connector and a module to handle the communication between the webapp  
server and apache.


Adobe CF does something similiar with mod_jrun but it's configuration  
is a little more complicated and also not a free useable solution.


BlueDragon makes integration and use from apache very easy to  
achieve, does not require telling the webapp server where the apache 

Re: jkMount

2007-10-28 Thread Rainer Jung

Comments inline

BuildSmart wrote:


On Oct 28, 2007, at 08:32:50, Rainer Jung wrote:


Hi,

BuildSmart wrote:

I'm trying to get around a configuration issue.
My webapp builds dynamic script content but the generated scripts are 
not accessible.
For example, calling 
http://domain.tld/index.jsp?ip=192.168.0.10count=10key=robot 
http://domain.tld/index.jsp?ip=192.168.0.10count=10key=robot 
should generate some subdirectories and builds some jsp pages with 
content and this seems to work as expected but from apache these are 
not accessible but from the Tomcat port I can access the pages 
without issue, is there a way to resolve this?


With respect to what is following below, I'm not actually sure, if I 
understand, what you mean by not accessible.


not accessible means apache cannot access the pages, gives an error 
-- page does not exist.


if the content pages that are built have the following paths:
docroot/index.jsp -- the main page
docroot/example/user.jsp -- generated by main page
docroot/example/data.jsp -- generated by main page

I cannot access any pages in examples directory from apache.

I cannot code the subdirectory because they are generated on the fly and 
I do not know in advance that they are.


I cannot use /* because apache also has other content handlers like php 
and then Tomcat errors on the php file.




I can't pre-define the mount points for the subdirectories because I 
don't know what they are in advance, there doesn't seem to be a way 
to define access to Tomcat based on the file extension since it wont 
let you assign a mount point without a leading /.


JkMount /*.jsp myworker

would be perfectly valid. You can combine prefixes and suffixes.
If there are no rules at all (no known prefixes and no known suffixes) 
then your URL space is weird and you can only use


JkMount /* myworker

and live with the consequences :(

In case it would be easier to describe, what *not* to forward, you can 
combine JkMount with JkUnmount


Now I'd be getting into a complicated and bastardized configuration.



See

http://tomcat.apache.org/connectors-doc/reference/apache.html
and
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

Forgive me for complaining but why on earth has no servlet 
handler/module been developed that processes by file extension rather 
than only by context.


It would be nice to do:
jkMount *.jsp ajp13


That's exaclty what happens, if you use

JkMount /*.jsp ajp13

then all .jsp files would be processed by the handler, of course mod_jk 
doesn't allow it and to do it by file extension would be too intelligent 
and renders a lot of current configuration complicated methods obsolete.


*It does allow it*
I already included this example in my previous mail. You didn't comment 
that example.


adding mode_rewrite or having to configure more than a single webapp 
host makes no sense if all you want to do is gain access to the java 
engine to deploy pgaes from within apache and having to define more than 
one host/port in Tomcat is a retarded concept by any standards.


Currently due to the lack of functionality based on the current ajp 
connector and mod_jk, my current solution to execute the .jsp files from 
the apache DOCUMENT_ROOT's is limited to the .jsp files being at the 
first level of the DOCUMENT_ROOT because mod_jk is too stupid to allow 
mapping by file extension and this is not acceptable.


No idea, why you claim that.

If it involves more than a simple configuration of the apache module 
then the method is tainted.


I want to server the .jsp pages from any apache DOCUMENT_ROOT without 
requiring a degree to configure several modules to achieve the goal.


I'd pay someone to write the connector and module for me cause my java 
skills suck but I'm currently so dumb-founded that no one else has 
achieved or even complained that the current method of implementation is 
useless in a production environment where apache virtualhosts are the norm.


I have a partial solution based on the modified Ajp13Connector class and 
a modified mod_jk module but as I stated earlier, it's limited to the 
first level of DOCUMENT_ROOT because mapping by file extension is not 
possible.


The above example is *not* restricted to one level of directory. A '*' 
in a JkMount URI matches any sequence of charaters, including a '/'.


Concerning vhosts, I didn't understand, what you try to achieve. Please 
try the above JkMount first. As soon as that works for you, we can 
discuss further requirements.


Note: Jkmount by default doesn't get inhertited between vhosts, because 
usually mounts are vhost specific. You need to put the JkMount into the 
vhost (or use JkMountCopy). See the docs.


Regards,

Rainer

-
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 5x SSI

2007-10-28 Thread Mark Thomas
Mark Thomas wrote:
 Samik Basu wrote:
 Yes, I have tried it out but turning it on in Web.xml. However it did not
 help. For example - this variable is set to 1 and then I invoked
 /Tomcat/cgi-bin/test.cgi
 /cgi-bin/test.cgi   - error is context not found
 ../cgi-bin/test.cgi   (assume that the shtml file just under the root of the
 project directory) - error is file not found
 I cannot give ../WEB-INF/cgi/test,cgi as that will just show the cgi
 program - not the result of its execution.
 I am sure I am missing something simple. Please post if I can provide some
 more info.
 
 Could be a bug - let me look into it.

Yep, it is a bug. I'll get it fixed.

Mark


-
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: Where is the POSTED data on login redirect?

2007-10-28 Thread Peter Coppens

Thanks David, that helps.

Something seem to go wrong for me though. I guess my question was not
sufficiently exact.

The data is posted as application/xml and the servlet consumes it using
request.getReader().read(...) The thing is that when the authentication
process completes and redirects the original post to the servlet, the
request.getReader().read(...) immediately returns -1. The data is in the
buffer alright, but the pointer into the buffer is not positioned at the
beginning. I have tried adding a reset but that does not seem to help.

Any thoughts?

Thanks!

Peter


David Delbecq-2 wrote:
 
 They are automatically saved by form authentification system and
 restored after form authentification. Your servlet won't be able to make
 the difference between a direct hit and a hit with post restored after
 form authentification.
 
 Please note, however, that the size of post request saved by tomcat is
 limited by default to 4K. If it's bigger, your servlet will get an empty
 request. To increase that size, go to Http connector configuration of
 tomcat, and change or set the maxSavePostSize.
 
 http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
 
 Regards,
 Delbecq David
 
 Op zondag 28-10-2007 om 02:41 uur [tijdzone -0700], schreef Peter
 Coppens:
 Hello,
 
 When a user posts data to a servlet after the session has expired
 (timeout)
 tomcat automatically redirects to my login page. After successful login,
 tomcat will redirect to the original request.
 
 I am looking for way to access the originally posted data when it
 'arrives'
 in the servlet (after tomcat has redirected after the login).
 
 Any guidance or pointers would be most warmly welcomed!
 
 Thanks,
 
 Peter
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Where-is-the-POSTED-data-on-login-redirect--tf4706256.html#a13456772
Sent from the Tomcat - User mailing list archive at Nabble.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]



Re: jkMount

2007-10-28 Thread BuildSmart


On Oct 28, 2007, at 10:47:19, Rainer Jung wrote:


Comments inline

BuildSmart wrote:

On Oct 28, 2007, at 08:32:50, Rainer Jung wrote:

Hi,

BuildSmart wrote:

I'm trying to get around a configuration issue.
My webapp builds dynamic script content but the generated  
scripts are not accessible.
For example, calling http://domain.tld/index.jsp? 
ip=192.168.0.10count=10key=robot http://domain.tld/index.jsp? 
ip=192.168.0.10count=10key=robot should generate some  
subdirectories and builds some jsp pages with content and this  
seems to work as expected but from apache these are not  
accessible but from the Tomcat port I can access the pages  
without issue, is there a way to resolve this?


With respect to what is following below, I'm not actually sure,  
if I understand, what you mean by not accessible.
not accessible means apache cannot access the pages, gives an  
error -- page does not exist.

if the content pages that are built have the following paths:
docroot/index.jsp -- the main page
docroot/example/user.jsp -- generated by main page
docroot/example/data.jsp -- generated by main page
I cannot access any pages in examples directory from apache.
I cannot code the subdirectory because they are generated on the  
fly and I do not know in advance that they are.
I cannot use /* because apache also has other content handlers  
like php and then Tomcat errors on the php file.


I can't pre-define the mount points for the subdirectories  
because I don't know what they are in advance, there doesn't  
seem to be a way to define access to Tomcat based on the file  
extension since it wont let you assign a mount point without a  
leading /.


JkMount /*.jsp myworker

would be perfectly valid. You can combine prefixes and suffixes.
If there are no rules at all (no known prefixes and no known  
suffixes) then your URL space is weird and you can only use


JkMount /* myworker

and live with the consequences :(

In case it would be easier to describe, what *not* to forward,  
you can combine JkMount with JkUnmount

Now I'd be getting into a complicated and bastardized configuration.


See

http://tomcat.apache.org/connectors-doc/reference/apache.html
and
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

Forgive me for complaining but why on earth has no servlet handler/ 
module been developed that processes by file extension rather than  
only by context.

It would be nice to do:
jkMount *.jsp ajp13


That's exaclty what happens, if you use

JkMount /*.jsp ajp13

then all .jsp files would be processed by the handler, of course  
mod_jk doesn't allow it and to do it by file extension would be  
too intelligent and renders a lot of current configuration  
complicated methods obsolete.


*It does allow it*
I already included this example in my previous mail. You didn't  
comment that example.


jkMount /* myworker -- your example.

It didn't work and only further proves that mod_jk lacks any real  
intelligence in functionality.


Well it sorta worked, it worked but only with localhost, none of my  
virtual hosts worked and I lost perl and php functionality so it  
really didn't work.




adding mode_rewrite or having to configure more than a single  
webapp host makes no sense if all you want to do is gain access to  
the java engine to deploy pgaes from within apache and having to  
define more than one host/port in Tomcat is a retarded concept by  
any standards.


Currently due to the lack of functionality based on the current  
ajp connector and mod_jk, my current solution to execute the .jsp  
files from the apache DOCUMENT_ROOT's is limited to the .jsp files  
being at the first level of the DOCUMENT_ROOT because mod_jk is  
too stupid to allow mapping by file extension and this is not  
acceptable.


No idea, why you claim that.


Because it's true and I have seen no proof of the contrary, what I do  
get are well intentioned individuals offering advice however the  
advice must be incomplete because none of the offered suggestions work.




If it involves more than a simple configuration of the apache  
module then the method is tainted.
I want to server the .jsp pages from any apache DOCUMENT_ROOT  
without requiring a degree to configure several modules to achieve  
the goal.
I'd pay someone to write the connector and module for me cause my  
java skills suck but I'm currently so dumb-founded that no one  
else has achieved or even complained that the current method of  
implementation is useless in a production environment where apache  
virtualhosts are the norm.
I have a partial solution based on the modified Ajp13Connector  
class and a modified mod_jk module but as I stated earlier, it's  
limited to the first level of DOCUMENT_ROOT because mapping by  
file extension is not possible.


The above example is *not* restricted to one level of directory. A  
'*' in a JkMount URI matches any sequence of charaters, including a  
'/'.


using anything but localhost in the url does not 

Application state in ServletContext

2007-10-28 Thread lightbulb432

There's a requirement to allow code anywhere throughout the application to
store and access application-wide state by using a class as shown below. The
code cannot directly touch the ServletContext class, but may do so through
an interface (shown below).

public class ApplicationState {

  private static MapString,Object stateValues;

  public static Object getStateValue(String key) {
return stateValues.get(key);
// return servletContext.getAttribute(key);
  }

}

However, I noticed that because the class above is being initialized in a
context listener, would you even need to bother using ServletContext? Can't
I just take advantage of the fact that the class is being loaded by the
application's classloader, and therefore all code within the application
(and not other applications) will be able to access the static state of this
class?

Are there any tradeoffs with using my proposed approach over backing the
above class with a ServletContext? Anything to do with the way Tomcat loads
classes? 

Would the answer be different if that class weren't initialized in a context
listener, but rather with the first access of ApplicationState happening in
a servlet?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Application-state-in-ServletContext-tf4708314.html#a13457524
Sent from the Tomcat - User mailing list archive at Nabble.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]



Re: Where is the POSTED data on login redirect?

2007-10-28 Thread David Delbecq
Unfortunately for you, i see nothing in specs about keeping POST 
information during a form based login. So this feature may be tomcat 
specific only. It may be also that the tomcat connector keep POST datas 
only for application/x-www-form-urlencoded and makes it available 
using getParameter()... Also, if anything before Post saving do call 
getParameters(), the Reader is not available anymore because it has been 
consumed by call to getParameters() (used for Post content parsing).


So you should probably consider this impossible to do :) OOr ask the 
tomcat devs about this ^ ^


Peter Coppens schreef:

Thanks David, that helps.

Something seem to go wrong for me though. I guess my question was not
sufficiently exact.

The data is posted as application/xml and the servlet consumes it using
request.getReader().read(...) The thing is that when the authentication
process completes and redirects the original post to the servlet, the
request.getReader().read(...) immediately returns -1. The data is in the
buffer alright, but the pointer into the buffer is not positioned at the
beginning. I have tried adding a reset but that does not seem to help.

Any thoughts?

Thanks!

Peter


David Delbecq-2 wrote:
  

They are automatically saved by form authentification system and
restored after form authentification. Your servlet won't be able to make
the difference between a direct hit and a hit with post restored after
form authentification.

Please note, however, that the size of post request saved by tomcat is
limited by default to 4K. If it's bigger, your servlet will get an empty
request. To increase that size, go to Http connector configuration of
tomcat, and change or set the maxSavePostSize.

http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

Regards,
Delbecq David

Op zondag 28-10-2007 om 02:41 uur [tijdzone -0700], schreef Peter
Coppens:


Hello,

When a user posts data to a servlet after the session has expired
(timeout)
tomcat automatically redirects to my login page. After successful login,
tomcat will redirect to the original request.

I am looking for way to access the originally posted data when it
'arrives'
in the servlet (after tomcat has redirected after the login).

Any guidance or pointers would be most warmly welcomed!

Thanks,

Peter


  

-
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: Where is the POSTED data on login redirect?

2007-10-28 Thread Bill Barker

Peter Coppens [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

 Thanks David, that helps.

 Something seem to go wrong for me though. I guess my question was not
 sufficiently exact.

 The data is posted as application/xml and the servlet consumes it using
 request.getReader().read(...) The thing is that when the authentication
 process completes and redirects the original post to the servlet, the
 request.getReader().read(...) immediately returns -1. The data is in the
 buffer alright, but the pointer into the buffer is not positioned at the
 beginning. I have tried adding a reset but that does not seem to help.

 Any thoughts?


From a very quick look at the code, it looks like a Tomcat bug (Tomcat's not 
sending 100-continue soon enough to save the post body).  However, this 
isn't the way I would expect to happen.  It would help if you could sniff 
the request and response headers for this case, and post what you find.

 Thanks!

 Peter


 David Delbecq-2 wrote:

 They are automatically saved by form authentification system and
 restored after form authentification. Your servlet won't be able to make
 the difference between a direct hit and a hit with post restored after
 form authentification.

 Please note, however, that the size of post request saved by tomcat is
 limited by default to 4K. If it's bigger, your servlet will get an empty
 request. To increase that size, go to Http connector configuration of
 tomcat, and change or set the maxSavePostSize.

 http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

 Regards,
 Delbecq David

 Op zondag 28-10-2007 om 02:41 uur [tijdzone -0700], schreef Peter
 Coppens:
 Hello,

 When a user posts data to a servlet after the session has expired
 (timeout)
 tomcat automatically redirects to my login page. After successful login,
 tomcat will redirect to the original request.

 I am looking for way to access the originally posted data when it
 'arrives'
 in the servlet (after tomcat has redirected after the login).

 Any guidance or pointers would be most warmly welcomed!

 Thanks,

 Peter




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




 -- 
 View this message in context: 
 http://www.nabble.com/Where-is-the-POSTED-data-on-login-redirect--tf4706256.html#a13456772
 Sent from the Tomcat - User mailing list archive at Nabble.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]

 




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



'wan' application in 5.5.25

2007-10-28 Thread Ankit Dangi
Hi all,

I was earlier using Apache Tomcat 5.5.20, and now am using 5.5.25. In the
'webapps' directory, I created an application with the name as 'wan'. It
works fine with .20, and doesn't work with .25. When I changed the name of
my application from 'wan' to something else, only then it works on .25. Why
is this happening? Has the term 'wan' kept as reserved in .25 version?

-- 
Ankit Dangi