Re: Realm SSL : issue when logout

2011-09-27 Thread Chema
 Why getContext(/app) ??

 HTTP Sessions are local to each web application.

 If protected.html belongs to a different web application, it would
 not (and cannot) know that you invalidated session in this webapp.

Hi

You're right: protected.html belongs another web application.
But my Tomcat is configurated with Single Sign On and, about docs,

as soon as the user logs out of one web application (for example, by
invalidating the corresponding session if form based login is used),
the user's sessions in all web applications will be invalidated.

http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Single Sign On


Anyway,  this problem also occurs with a single and simple web application.
As I told in another thread, this issue was solved, at least, in Tomcat 7.0.21
( My tests were on 7.0.11 )


Regards

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



Overriding web.xml parameters

2011-09-27 Thread Romaric

Hi,

I'm using tomcat6 on fedora15 (installed via the tomcat6 package).

I have context parameters defined for my application in both web.xml and 
conf/Catalina/localhost/AppName.xml :


web.xml :

context-param
param-namename/param-name
param-valuevalue/param-value
/context-param

context.xml :

Context
Parameter name=name value=value override=false /
/Context

The problem is that the values in web.xml override those in context.xml 
when it should be the other way around.


Do you have any idea what the problem might be ?

Thanks.


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



Re: Overriding web.xml parameters

2011-09-27 Thread Markus Schönhaber
27.09.2011 11:00, Romaric:

 context.xml :
 
 Context
 Parameter name=name value=value override=false /
---^
 /Context
 
 The problem is that the values in web.xml override those in context.xml 
 when it should be the other way around.
 
 Do you have any idea what the problem might be ?

The above is not valid XML. The attribute name isn't properly quoted.

-- 
Regards
  mks



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



Re: combination of RemoteAddrValve und basic authentication

2011-09-27 Thread Remon Sadikni

Hi André, hi Christopher,

thanks for your answers.


The use of HTTP BASIC authentication confuses things here because of
the credential transfer mechanism (HTTP headers). I suppose you could
write a Valve that sniffs the user's IP address and then adds HTTP
headers to the request for the Authentication header to essentially
force a login. You'll have to decide what the user's Principal will
need to look like (because Tomcat will actually try to /verify/ the
fake-user's credentials and maintain a login for them, running
proper authorization checks, etc.) in order to actually work.


I think I will try this. Are there any tutorials for writing a Valve? I 
am a Java programmer but new to Valves.


Thank you very much,
Remon

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



Re: Overriding web.xml parameters

2011-09-27 Thread Romaric

Right, sorry for the typo.

The actual file is valid.
In addition, if I remove the parameters from web.xml, the values in 
context.xml are used.


Le 27/09/2011 11:10, Markus Schönhaber a écrit :

27.09.2011 11:00, Romaric:


context.xml :

Context
Parameter name=name value=value override=false /

---^

/Context

The problem is that the values in web.xml override those in context.xml
when it should be the other way around.

Do you have any idea what the problem might be ?

The above is not valid XML. The attribute name isn't properly quoted.




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



Re: Overriding web.xml parameters

2011-09-27 Thread Rainer Frey
On 27.09.2011, at 11:00, Romaric wrote:

 Hi,
 
 The problem is that the values in web.xml override those in context.xml when 
 it should be the other way around.
 Do you have any idea what the problem might be ?

Which exact version? The behavior sounds like a bug that was present from 
(AFAIK) 6.0.30-6.0.32.

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



catalina_pid file contains +1 pid number instead of correct pid

2011-09-27 Thread Raghu GS

Hello Everybody

We are using Tomcat 6.20 in CentOS 5.3 server.
I have recently enabled catalina_pid functionality using environment
variable.
The PID file got created and contains +1 PID number.

If the Tomcat's real PID number 5446, the pid file would contain 5447 as PID
number.
Please help me to resolve this problem as we are using tomcat in 10 of our
servers.

-- 
View this message in context: 
http://old.nabble.com/catalina_pid-file-contains-%2B1-pid-number-instead-of-correct-pid-tp32521407p32521407.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Overriding web.xml parameters

2011-09-27 Thread Romaric

6.0.32.
That might be the issue.
Is there a way to work this around other than removing the parameters 
from web.xml ?


Thanks for you help.


Le 27/09/2011 11:33, Rainer Frey a écrit :

On 27.09.2011, at 11:00, Romaric wrote:


Hi,

The problem is that the values in web.xml override those in context.xml when it 
should be the other way around.
Do you have any idea what the problem might be ?

Which exact version? The behavior sounds like a bug that was present from 
(AFAIK) 6.0.30-6.0.32.

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




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



Re: Overriding web.xml parameters

2011-09-27 Thread Rainer Frey
On 27.09.2011, at 11:38, Romaric wrote:

 Le 27/09/2011 11:33, Rainer Frey a écrit :
 On 27.09.2011, at 11:00, Romaric wrote:
 
 Hi,
 
 The problem is that the values in web.xml override those in context.xml 
 when it should be the other way around.
 Do you have any idea what the problem might be ?
 Which exact version? The behavior sounds like a bug that was present from 
 (AFAIK) 6.0.30-6.0.32.
 6.0.32.
 That might be the issue.
 Is there a way to work this around other than removing the parameters from 
 web.xml ?

Not that I know of (other than up- or downgrading).

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



Re: Overriding web.xml parameters

2011-09-27 Thread Romaric

Ok.
Thank you for your help.
Link for those looking for the bug : 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700


Romaric

Le 27/09/2011 11:40, Rainer Frey a écrit :

On 27.09.2011, at 11:38, Romaric wrote:


Le 27/09/2011 11:33, Rainer Frey a écrit :

On 27.09.2011, at 11:00, Romaric wrote:


Hi,

The problem is that the values in web.xml override those in context.xml when it 
should be the other way around.
Do you have any idea what the problem might be ?

Which exact version? The behavior sounds like a bug that was present from 
(AFAIK) 6.0.30-6.0.32.

6.0.32.
That might be the issue.
Is there a way to work this around other than removing the parameters from 
web.xml ?

Not that I know of (other than up- or downgrading).

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




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



Re: combination of RemoteAddrValve und basic authentication

2011-09-27 Thread André Warnier

Remon Sadikni wrote:

Hi André, hi Christopher,

thanks for your answers.


The use of HTTP BASIC authentication confuses things here because of
the credential transfer mechanism (HTTP headers). I suppose you could
write a Valve that sniffs the user's IP address and then adds HTTP
headers to the request for the Authentication header to essentially
force a login. You'll have to decide what the user's Principal will
need to look like (because Tomcat will actually try to /verify/ the
fake-user's credentials and maintain a login for them, running
proper authorization checks, etc.) in order to actually work.


I think I will try this. Are there any tutorials for writing a Valve? I 
am a Java programmer but new to Valves.




I am not really a Java programmer, so what I say below may be wrong, and should be 
confirmed by a better guru.


The reason why I was mentioning further complexity for the Valve solution, is that as far 
as I know, the HttpServletRequest object is immutable (iow read-only), as it is 
received.  So you cannot just take the incoming HttpServletRequest, and if the IP address 
matches, add a fake Authorization: header to it with some generic user-id/password.
You will have to wrap the original HttpServletRequest into a custom HttpServletRequest 
wrapper, (a la class CustomRequest extends HttpServletRequestWrapper), add the fake 
header there, and forward this CustomRequest instead of the original for further 
processing. In the wrapper class, you also have to override whichever method the Tomcat 
Basic authentication mechanism uses to retrieve the additional Authorization: header.

(getHeaderNames, getHeader, getHeaders,..)

At least, that is what I had to do the last time I wrote some Tomcat authentication code 
as a Servlet Filter.  Maybe for a Valve, the situation is different.
Maybe for a seasoned Java programmer this is all a piece of cake; but as for me I had to 
find out the above the hard way, and it was all a bit of a challenge.



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



Re: catalina_pid file contains +1 pid number instead of correct pid

2011-09-27 Thread Konstantin Kolinko
2011/9/27 Raghu GS raghu...@i10n.com:

 Hello Everybody

 We are using Tomcat 6.20 in CentOS 5.3 server.

6.0.20 ??

You should read
http://tomcat.apache.org/security-6.html

as well as all the fixed issues in changelog.

 I have recently enabled catalina_pid functionality using environment
 variable.
 The PID file got created and contains +1 PID number.

 If the Tomcat's real PID number 5446, the pid file would contain 5447 as PID
 number.

catalina.sh is a shell script file. There are not many secrets there
and it is editable.
You should try to debug what really goes on on your system.

IIRC there were some talks about using exec command vs eval
command  in the script to launch the process.

Anyway, if CATALINA_PID file were not working I think somebody would
report it, but 6.0.20 was so old ago and I do not remember such
reports.

 Please help me to resolve this problem as we are using tomcat in 10 of our
 servers.


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



endpoint.warn.unlockAcceptorFailed

2011-09-27 Thread Leo Donahue - PLANDEVX
Tomcat 6.0.32 and 6.0.33 32-bit windows zip - Windows XP Pro

[OT] I was experimenting with trying to profile memory on Tomcat when it is 
started via a Windows Service using jvisualvm.exe  Profiling tomcat memory 
using visualvm works great when Tomcat is started as a script using the 
startup.bat.  I've seen several articles that talk about profiling Tomcat as a 
windows service relating to the CATALINA_TMPDIR directory vs the windows tmp 
directory and other articles that talk about the account under which Tomcat is 
started vs the account under which the visualvm.exe is started.  I have not 
changed anything in catalina.bat at this point, or anything else - these were 
fresh downloads and checksums verified.
References: http://visualvm.java.net/troubleshooting.html
http://blogs.oracle.com/nbprofiler/entry/monitoring_java_processes_running_as
http://mballantyne.blogspot.com/2011/05/profiling-tomcat-with-visualvm-on-mac.html
 [/OT]

Running the shutdown.bat script, on .32 and .33, hung at trying to stop the 
coyote connector, which then produces the error message in the command prompt 
window endpoint.warn.unlockAcceptorFailed over and over.

Tomcat 7.0.21 32-bit windows zip starting and stopping via the startup and 
shutdown scripts doesn't give me this problem.

Any ideas what could be wrong?  Windows firewall maybe?

Leo


7.0.21 Redirects failing randomly

2011-09-27 Thread Jacob Champlin
Last night we went to 7.0.21, and this morning I had to roll it back 
because very randomly redirects were failing.  It was very much like all 
parameters to the redirect were lost.


I am still trying to debug this, but its clear its not happening in 
7.0.20, which leads me to believe its:


41718: Include a response body when sending a redirect. (markt)

or one of the AJP changes.

We are running Apache 2.2.21 with mod_ajp.

Our servlet framework is Stripes MVC and it seems to conform to the 
requirement in 41718.


Is anyone else having this issue?

Thank you,
Jacob Champlin

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



Tomcat 7 Embedded: Manager

2011-09-27 Thread Dark Before Dawn

Hi guys,
I am sorry to resurrect this topic, but I got stuck for weeks now.

I would like to provide an embedded Tomcat 7 instance in my JavaSE 1.6 
application (diploma thesis). This instance should run the 
Manager-Application for easy War-Deployment via ANT.


With help of this mailing-list I managed to create a privilged context 
which hosts the HTMLManagerServlet and the ManagerServlet.

Both show up correctly when browsing:
http://localhost:8080/manager/html/
http://localhost:8080/manager/text/

I guess the Deployer is running too = stdHost.addLifecycleListener(new 
HostConfig());


Problem 1:
ANT Script  ManagerServlet(Text): It is possible to 
deploy/undeploy/start/stop a Webapplication via ANT.
When deploying a WAR-file via Ant the file will be uploaded to webapps 
folder and expanded afterwards. The ANT-script terminates successful 
without warning.
When browsing the HTMLManagerServlet the freshly deployed webapp is 
shown correctly in the Application list.

= ContextPath is correct and even the DisplayName is shown correctly.
It is possible to Start/Stop/Repload/Undeploy this freshly deployed 
webapp(browser/ant). But it is not possible to browse this webapp, I 
just got 404 pages.


Problem 2:
HTMLManagerServlet won't upload WAR-file when selecting a WAR-file not 
located on the server.

Message: FAIL - File upload failed, no file

Folders:
C:\Users\darky\AppData\Local\Temp\tc7embedded
C:\Users\darky\AppData\Local\Temp\tc7embedded\work
C:\Users\darky\AppData\Local\Temp\tc7embedded\webapps

Code: http://pastie.org/268

Any help is appreciated! Thanks in advance!
Cheers Darky

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



Re: endpoint.warn.unlockAcceptorFailed

2011-09-27 Thread Konstantin Kolinko
2011/9/27 Leo Donahue - PLANDEVX leodona...@mail.maricopa.gov:
 Tomcat 6.0.32 and 6.0.33 32-bit windows zip - Windows XP Pro

 [OT] I was experimenting with trying to profile memory on Tomcat when it is 
 started via a Windows Service using jvisualvm.exe  Profiling tomcat memory 
 using visualvm works great when Tomcat is started as a script using the 
 startup.bat.  I've seen several articles that talk about profiling Tomcat as 
 a windows service relating to the CATALINA_TMPDIR directory vs the windows 
 tmp directory and other articles that talk about the account under which 
 Tomcat is started vs the account under which the visualvm.exe is started.  I 
 have not changed anything in catalina.bat at this point, or anything else - 
 these were fresh downloads and checksums verified.
 References: http://visualvm.java.net/troubleshooting.html
 http://blogs.oracle.com/nbprofiler/entry/monitoring_java_processes_running_as
 http://mballantyne.blogspot.com/2011/05/profiling-tomcat-with-visualvm-on-mac.html
  [/OT]

 Running the shutdown.bat script, on .32 and .33, hung at trying to stop the 
 coyote connector, which then produces the error message in the command prompt 
 window endpoint.warn.unlockAcceptorFailed over and over.

It is strange. It should occur once (after 30 seconds delay). Maybe
shutting down the server socket is not enough to break the Acceptor
thread...

I think a thread dump is needed to diagnose this.
(Especially what Apr Acceptor thread is doing).

Your report sounds as if it is reproducible.


Missing message is certainly a small bug.



 Tomcat 7.0.21 32-bit windows zip starting and stopping via the startup and 
 shutdown scripts doesn't give me this problem.

 Any ideas what could be wrong?  Windows firewall maybe?


Best regards,
Konstantin Kolinko

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



Re: 7.0.21 Redirects failing randomly

2011-09-27 Thread Konstantin Kolinko
2011/9/27 Jacob Champlin jac...@rentec.com:
 Last night we went to 7.0.21, and this morning I had to roll it back because
 very randomly redirects were failing.  It was very much like all parameters
 to the redirect were lost.

 I am still trying to debug this, but its clear its not happening in 7.0.20,
 which leads me to believe its:

 41718: Include a response body when sending a redirect. (markt)

The change itself was
http://svn.apache.org/viewvc?rev=1156533view=rev
http://svn.apache.org/viewvc?rev=1156603view=rev

This sample page works for me:
(to be placed as /examples/testRedirect.jsp )
%
response.sendRedirect(response.encodeRedirectURL(request.getContextPath() +
/servlets/servlet/RequestParamExample?firstname=barlastname=baz));
%

Though I tried it with HTTP connector and not with AJP one.



 or one of the AJP changes.

 We are running Apache 2.2.21 with mod_ajp.

 Our servlet framework is Stripes MVC and it seems to conform to the
 requirement in 41718.

 Is anyone else having this issue?


Best regards,
Konstantin Kolinko

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



Re: endpoint.warn.unlockAcceptorFailed

2011-09-27 Thread Konstantin Kolinko
2011/9/27 Konstantin Kolinko knst.koli...@gmail.com:
 2011/9/27 Leo Donahue - PLANDEVX leodona...@mail.maricopa.gov:
 Tomcat 6.0.32 and 6.0.33 32-bit windows zip - Windows XP Pro

 Running the shutdown.bat script, on .32 and .33, hung at trying to stop the 
 coyote connector, which then produces the error message in the command 
 prompt window endpoint.warn.unlockAcceptorFailed over and over.

I fixed the missing message r1176477.

The rest of the issue needs investigation.

I think you can file an issue in Bugzilla for this one.

Last changes in the shutdown code were
http://svn.apache.org/viewvc?view=revisionrevision=1065945


 I think a thread dump is needed to diagnose this.
 (Especially what Apr Acceptor thread is doing).


Best regards,
Konstantin Kolinko

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



Re: combination of RemoteAddrValve und basic authentication

2011-09-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remon,

On 9/27/2011 5:14 AM, Remon Sadikni wrote:
 Hi André, hi Christopher,
 
 thanks for your answers.
 
 The use of HTTP BASIC authentication confuses things here because
 of the credential transfer mechanism (HTTP headers). I suppose
 you could write a Valve that sniffs the user's IP address and
 then adds HTTP headers to the request for the Authentication
 header to essentially force a login. You'll have to decide what
 the user's Principal will need to look like (because Tomcat will
 actually try to /verify/ the fake-user's credentials and maintain
 a login for them, running proper authorization checks, etc.) in
 order to actually work.
 
 I think I will try this. Are there any tutorials for writing a
 Valve? I am a Java programmer but new to Valves.

It's a very simple interface:

 http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/Valve.html

You
 
should probably extend ValveBase so you don't have to implement
all the silly management methods.

 http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/ValveBase.html

This
 
will let you implement only the important method: invoke().

Note that the arguments to that method are Request and Response, which
are Tomcat internal classes. They are similar to the ServletRequest
and ServletResponse classes with which you may have some familiarity,
but they are different so you should make sure you have the Tomcat
Javadocs handy when writing your Valve.

See the documentation for the invoke() method for tips on how to
implement it properly. At some point, you have to make up your own
code to accomplish your own requirements, but you need to follow the
rules for making sure that the Valve actually works when you install it.

Install the Valve by adding a Valve declaration in your Context
element. I'm not entirely sure if your Valve will be invoked before
the Valves that do Tomcat's authentication and authorization, but you
have to make sure that yours run first. If yours appears to be
skipped, post back and we'll figure out how to get it to run before
the auth stuff.

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

iEYEARECAAYFAk6CCewACgkQ9CaO5/Lv0PBaIgCggciYF4svta9QFXepV5Zzb85E
pLYAn0orX31r9DbCBMrmfNlWYp6+jqqp
=BJEn
-END PGP SIGNATURE-

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



Re: 7.0.21 Redirects failing randomly

2011-09-27 Thread Jacob Champlin
We have finished debugging this issue.  It turns out that what is 
happening is in 7.0.21 responses are returning to the client before the 
filter chain is complete.  In 7.0.20 all filters complete before the 
response is returned to the client.


In our particular case, we have a TransactionFilter managing our DB 
transactions, so the response page was rendering before the DB 
transaction was commited giving the appearance that the post didn't succeed.


I think this is a MAJOR regression in 7.0.21.

Jacob Champlin

On 09/27/2011 10:35 AM, Jacob Champlin wrote:

Last night we went to 7.0.21, and this morning I had to roll it back
because very randomly redirects were failing. It was very much like all
parameters to the redirect were lost.

I am still trying to debug this, but its clear its not happening in
7.0.20, which leads me to believe its:

41718: Include a response body when sending a redirect. (markt)

or one of the AJP changes.

We are running Apache 2.2.21 with mod_ajp.

Our servlet framework is Stripes MVC and it seems to conform to the
requirement in 41718.

Is anyone else having this issue?

Thank you,
Jacob Champlin



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



Re: combination of RemoteAddrValve und basic authentication

2011-09-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 9/27/2011 7:40 AM, André Warnier wrote:
 The reason why I was mentioning further complexity for the Valve 
 solution, is that as far as I know, the HttpServletRequest object
 is immutable (iow read-only), as it is received.

For the most part, this is true.

 So you cannot just take the incoming HttpServletRequest, and if the
 IP address matches, add a fake Authorization: header to it with
 some generic user-id/password. You will have to wrap the original
 HttpServletRequest into a custom HttpServletRequest wrapper, (a la
 class CustomRequest extends HttpServletRequestWrapper), add the
 fake header there, and forward this CustomRequest instead of the
 original for further processing.

Correct.

 At least, that is what I had to do the last time I wrote some
 Tomcat authentication code as a Servlet Filter.  Maybe for a Valve,
 the situation is different.

Hmm... I was about to say that the Request object is mutable (which it
is), but apparently, headers are something that can't be modified, so
you'll need to wrap the Request in the same way as described above.

Those interested in doing something like this might be interested in
the attachment to this bug:

https://issues.apache.org/bugzilla/show_bug.cgi?id=45014

Hmm... I should go ahead and commit that. :)

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

iEYEARECAAYFAk6CD90ACgkQ9CaO5/Lv0PDNMQCdG7+FiiioqZYyLp9e+9jzaVr/
se0AnAh3gTkdCgrvcjnsKD+9/fpeKzVq
=ho/S
-END PGP SIGNATURE-

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



Re: 7.0.21 Redirects failing randomly

2011-09-27 Thread Konstantin Kolinko
2011/9/27 Jacob Champlin jac...@rentec.com:
 We have finished debugging this issue.  It turns out that what is happening
 is in 7.0.21 responses are returning to the client before the filter chain
 is complete.  In 7.0.20 all filters complete before the response is returned
 to the client.

It depends on the size of your response and on the size of buffers.
See ServletResponse#isCommitted().

I do not see any issue with that, but maybe I do not fully understand you.
Can you provide a simple web application that demonstrates this?


 In our particular case, we have a TransactionFilter managing our DB
 transactions, so the response page was rendering before the DB transaction
 was commited giving the appearance that the post didn't succeed.

 I think this is a MAJOR regression in 7.0.21.

 Jacob Champlin

Best regards,
Konstantin Kolinko

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



Re: 7.0.21 Redirects failing randomly

2011-09-27 Thread Jacob Champlin

Konstantin,

I believe the new flushBuffer() call you added to Response.java 
sendRedirect() line #1340.  Is breaking all ServletFilters but sending 
buy flushing the response before filters have a chance to modify the 
response.


Jacob



On 09/27/2011 10:35 AM, Jacob Champlin wrote:

Last night we went to 7.0.21, and this morning I had to roll it back
because very randomly redirects were failing. It was very much like all
parameters to the redirect were lost.

I am still trying to debug this, but its clear its not happening in
7.0.20, which leads me to believe its:

41718: Include a response body when sending a redirect. (markt)

or one of the AJP changes.

We are running Apache 2.2.21 with mod_ajp.

Our servlet framework is Stripes MVC and it seems to conform to the
requirement in 41718.

Is anyone else having this issue?

Thank you,
Jacob Champlin



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



Re: 7.0.21 Redirects failing randomly

2011-09-27 Thread Jacob Champlin

Konstantin,

Ok, so I see now why you added the flushBuffer() from spec:

http://java.sun.com/javaee/6/docs/api/javax/servlet/http/HttpServletResponse.html#sendRedirect%28java.lang.String%29

Sends a temporary redirect response to the client using the specified 
redirect location URL and clears the buffer.


Its just we have been running Tomcat, for 5 years and we have lots of 
code that relied on the fact that sendRedirect did not flush the buffer.


I will drop it, but going to be a while before we can go to 7.0.21.

Jacob

On 09/27/2011 02:32 PM, Jacob Champlin wrote:

Konstantin,

I believe the new flushBuffer() call you added to Response.java
sendRedirect() line #1340. Is breaking all ServletFilters but sending
buy flushing the response before filters have a chance to modify the
response.

Jacob



On 09/27/2011 10:35 AM, Jacob Champlin wrote:

Last night we went to 7.0.21, and this morning I had to roll it back
because very randomly redirects were failing. It was very much like all
parameters to the redirect were lost.

I am still trying to debug this, but its clear its not happening in
7.0.20, which leads me to believe its:

41718: Include a response body when sending a redirect. (markt)

or one of the AJP changes.

We are running Apache 2.2.21 with mod_ajp.

Our servlet framework is Stripes MVC and it seems to conform to the
requirement in 41718.

Is anyone else having this issue?

Thank you,
Jacob Champlin



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



cannot connect to server pc within a network

2011-09-27 Thread avengine

I have installed tomcat7 in 1 pc as a server and do all the test using
localhost:8080, no problem
then I use cmd in window xp to find the ip of the server using ipconfig /all
and find it is 192.168.1.111
then on second pc on the same network
http://192.168.1.111:8080/acts/member/login.jsp
error come up could not connect to 192.168.1.111:8080
what might be wrong?
I did turn off firewall, what else should I check?

-- 
View this message in context: 
http://old.nabble.com/cannot-connect-to-server-pc-within-a-network-tp32541962p32541962.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: cannot connect to server pc within a network

2011-09-27 Thread Christopher Schultz

To whom it may concern,

On 9/27/2011 3:51 PM, avengine wrote:


I have installed tomcat7 in 1 pc as a server and do all the test using
localhost:8080, no problem
then I use cmd in window xp to find the ip of the server using ipconfig /all
and find it is 192.168.1.111
then on second pc on the same network
http://192.168.1.111:8080/acts/member/login.jsp
error come up could not connect to 192.168.1.111:8080
what might be wrong?
I did turn off firewall, what else should I check?


Which firewall did you turn off?

-chris

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



Incorporating changes and compiling Tomcat

2011-09-27 Thread GILBERT.BERRY
Can any one please direct me to instructions on how to incorporate fixes and 
then recompile.  Target OS is Windows Server 2003.  Thanks!


Gilbert Berry
Blue Cross/Blue Shield of South Carolina
Tricare Post Adjudication Reporting
(803) 763-1873
x 31873
(803) 466-7282 cell
gilbert.be...@mytricare.commailto:gilbert.be...@mytricare.com

THIS EMAIL IS CONFIDENTIAL
http://www.bcbssc.com/confidentiality.htm




Re: Incorporating changes and compiling Tomcat

2011-09-27 Thread Konstantin Kolinko
2011/9/28  gilbert.be...@bcbssc.com:
 Can any one please direct me to instructions on how to incorporate fixes and 
 then recompile.  Target OS is Windows Server 2003.  Thanks!

RTFM?

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



bind webapps to different IP addresses on a single instance of tomcat

2011-09-27 Thread Robert Lafleur
I have a single instance of tomcat this is running two web applications. The
server hosting tomcat has IP addresses on two separate networks. I was able
to add address=ip for the Connectors in server.xml, but this is a global
setting. Is there a way to configure a single instance of tomcat to bind
webapps to different ip addresses, or do I have to configure two tomcat
instance to host each webapp?


RE: bind webapps to different IP addresses on a single instance of tomcat

2011-09-27 Thread Caldarale, Charles R
 From: Robert Lafleur [mailto:rlafl...@vbridges.com] 
 Subject: bind webapps to different IP addresses on a single instance of tomcat

 Is there a way to configure a single instance of tomcat 
 to bind webapps to different ip addresses, or do I have
 to configure two tomcat instance to host each webapp?

There are a few options in addition to running two instances of Tomcat.

1) Use virtual hosts to separate the requests; one Host per IP address.
http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html

2) Use a filter in each webapp to reject requests sent to the wrong IP address. 
 This one is fairly easier to configure:
http://www.tuckey.org/urlrewrite/

3) Write a single Valve at the Engine level to reject inappropriate 
requests.  I don't think there's a standard Valve to do this, but it should be 
fairly easy to extend an existing one.
http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

4) Configure two Service elements, each with one Connector, Engine, and 
Host.
http://tomcat.apache.org/tomcat-7.0-doc/config/service.html

 - Chuck


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


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



Re: bind webapps to different IP addresses on a single instance of tomcat

2011-09-27 Thread Robert Lafleur
Are these options available in Tomcat 6? I apologize for not including this
earlier ...

Regards,

Robert Lafleur  •  Sr. Systems Engineer  •  rlafl...@vbridges.com
Office: 512.343.1100 x313 | Cell: 512.657.7283 | Fax: 512.343.1101



On Tue, Sep 27, 2011 at 5:11 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Robert Lafleur [mailto:rlafl...@vbridges.com]
  Subject: bind webapps to different IP addresses on a single instance of
 tomcat

  Is there a way to configure a single instance of tomcat
  to bind webapps to different ip addresses, or do I have
  to configure two tomcat instance to host each webapp?

 There are a few options in addition to running two instances of Tomcat.

 1) Use virtual hosts to separate the requests; one Host per IP address.
 http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html

 2) Use a filter in each webapp to reject requests sent to the wrong IP
 address.  This one is fairly easier to configure:
 http://www.tuckey.org/urlrewrite/

 3) Write a single Valve at the Engine level to reject inappropriate
 requests.  I don't think there's a standard Valve to do this, but it should
 be fairly easy to extend an existing one.
 http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

 4) Configure two Service elements, each with one Connector, Engine,
 and Host.
 http://tomcat.apache.org/tomcat-7.0-doc/config/service.html

  - Chuck


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


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




RE: bind webapps to different IP addresses on a single instance of tomcat

2011-09-27 Thread Caldarale, Charles R
 From: Robert Lafleur [mailto:rlafl...@vbridges.com] 
 Subject: Re: bind webapps to different IP addresses on a single instance of 
 tomcat

 Are these options available in Tomcat 6?

Yes, all of them are.

 - Chuck


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


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



Re: Incorporating changes and compiling Tomcat

2011-09-27 Thread Mark Eggers
- Original Message -

 From: gilbert.be...@bcbssc.com gilbert.be...@bcbssc.com
 To: users@tomcat.apache.org
 Cc: 
 Sent: Tuesday, September 27, 2011 1:58 PM
 Subject: Incorporating changes and compiling Tomcat
 
 Can any one please direct me to instructions on how to incorporate fixes and 
 then recompile.  Target OS is Windows Server 2003.  Thanks!
 
 
 Gilbert Berry
 Blue Cross/Blue Shield of South Carolina
 Tricare Post Adjudication Reporting
 (803) 763-1873
 x 31873
 (803) 466-7282 cell
 gilbert.be...@mytricare.commailto:gilbert.be...@mytricare.com
 
 THIS EMAIL IS CONFIDENTIAL
 http://www.bcbssc.com/confidentiality.htm


I'm not a developer, although I keep a copy of the source via SVN for 5.5.x, 
6.0.x, 7.0.x, and trunk.

For Tomcat 7, the instructions are here:

http://tomcat.apache.org/tomcat-7.0-doc/building.html


I've never had any trouble building 5.5.x, 6.0.x, 7.0.x, or trunk from SVN.

. . . . just my two cents.
/mde/

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