Re: IIS 7.5 2008 Server

2011-07-15 Thread Ian Porter
Hi pid

I am using tomcat version 7.0, I have read the documentation below
thanks, but it does not say that it is working with iis 7.5 ?

I shall reinstall it again, and redo the files etc ? Is there any
version you recommend of tomcat to work with iis 7.5 ?(with the isapi
redirect.dll)

Or is it because I am using iis 7.5 or something else ?

Regards
Ian


On Friday, July 15, 2011, Pid  wrote:
> On 15/07/2011 22:21, Ian Porter wrote:
>> Hi All
>>
>> I am trying to get the tomcat server to work on IIS 7.5 with 2008
>> Server, I have tried many different ways and websites that say that
>> they work, but when I go through there examples I am just not able to
>> get it to work :(
>
> Which version of Tomcat?
>
>> I have enabled the execute rights on the dll, virtual directory.
>>
>> I was wondering if there was any advice or this way works for sure or
>> this website example really does work. because I am at a loss for why
>> the IIS redirect is not working.
>
> Did you read this website?
>
>  http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
>
>  http://tomcat.apache.org/tomcat-7.0-doc/setup.html#Windows
>
>  http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
>
>
>
> p
>
>
>

-- 
Kind regards
Ian Porter

www: www.codingfriends.com

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



Re: RedHat and mod_jk

2011-07-15 Thread Mark Eggers
- Original Message -

> From: Christopher Schultz 
> To: Tomcat Users List 
> Cc: 
> Sent: Friday, July 15, 2011 9:09 PM
> Subject: Re: RedHat and mod_jk
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Thad,
> 
> On 7/15/2011 9:59 PM, Thad Humphries wrote:
>>  If you rely on RedHat, Novell, OpenSuSE, Unbuntu, etc. you can wait
>>  for some things until you are old and gray.
> 
> Sing it. We're stuck on MySQL 5.0 in production because of this very
> fact. Sometimes I pine for the days of Gentoo. Only sometimes.
> 
>>  Worse is to have some update that you haven't screened stomp on 
>>  something you need.
> 
> Most package managers have provisions for holding a package (or the
> whole repo) at a certain level.
> 
> Actually, the really nice thing about Debian, for instance, is that
> their releases are all stable (assuming you don't follow Sid like an
> idiot): you should never get stomped with anything. The bad news is that
> you have to wait for a major upgrade in order to get that next version
> of whatever - like MySQL 5.1 :(
> 
> - -chris


Yep. I think if you have critical requirements (technical, security, business) 
that aren't being met by your distribution's package release you have to roll 
your own. Manage it just like any other software release.

The issues are then mostly management (culpability and support). How those 
issues are dealt with becomes a matter of business culture.

I've been successful in the past in getting permission to build critical 
components locally. I've also been in environments where this was strictly 
forbidden, even at the expense of not meeting business requirements and/or 
exposing the infrastructure to known security risks. Meeting requirements is 
preferred (in my book).

It also appears that more and more admins are uncomfortable with building, 
installing, and then managing systems with locally installed software. This 
goes back to the challenge that the original poster had. Why an admin would 
balk at learning how to do this is another question . . .

Friday night ramblings are worth less than two cents . . . ;-)

/mde/

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



Re: RedHat and mod_jk

2011-07-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thad,

On 7/15/2011 9:59 PM, Thad Humphries wrote:
> If you rely on RedHat, Novell, OpenSuSE, Unbuntu, etc. you can wait
> for some things until you are old and gray.

Sing it. We're stuck on MySQL 5.0 in production because of this very
fact. Sometimes I pine for the days of Gentoo. Only sometimes.

> Worse is to have some update that you haven't screened stomp on 
> something you need.

Most package managers have provisions for holding a package (or the
whole repo) at a certain level.

Actually, the really nice thing about Debian, for instance, is that
their releases are all stable (assuming you don't follow Sid like an
idiot): you should never get stomped with anything. The bad news is that
you have to wait for a major upgrade in order to get that next version
of whatever - like MySQL 5.1 :(

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

iEYEARECAAYFAk4hDu4ACgkQ9CaO5/Lv0PCo5QCfVVYRpdFV57ozYxayaYiG++6o
z6UAn0++hlbaUR0SeP51s8zDxO/JVfOP
=TssM
-END PGP SIGNATURE-

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



Re: RedHat and mod_jk

2011-07-15 Thread Thad Humphries
It's been my experience that it's best *not* to rely on the distro for any
mission critical piece of software. Either download the binary from a
trusted source or build it yourself.  If you rely on RedHat, Novell,
OpenSuSE, Unbuntu, etc. you can wait for some things until you are old and
gray. Worse is to have some update that you haven't screened stomp on
something you need.

On Fri, Jul 15, 2011 at 5:27 PM, Mark Eggers  wrote:

> ...
> Sounds like this is a topic that could be brought up on the Fedora
> development IRC (or mailing list). I imagine the immediate response would
> be, "If you're interested, why don't you build and maintain the package".
>
> I can't see any technical reason for RedHat not to provide a package. The
> RPMs required for building it already exist in the distribution, the actual
> software build is trivial, and they already provide RPMs for things like
> mod_perl, mod_python, and svn.
> ...


-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v, 121-24)


Re: Why we have duplicate JSESSIONIDSSO cookies ?

2011-07-15 Thread Konstantin Kolinko
2011/7/15 Mathan Karthik :
> Why tomcat maintaining duplicate JSESSIONIDSSO cookies for the same hostname 
> and context path? Is it a bug?

Tomcat is not "maintaining" them. Cookies are stored in the browser
and are sent with request. Check what is data in your browser and thus
what is it doing.

If it reproducible, provide a step by step instruction how to
reproduce it - see "smart questions" as advised by Mark.

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



Re: Terminating Timer Thread Gracefully

2011-07-15 Thread Terence M. Bandoian

 On 1:59 PM, Mark Thomas wrote:

On 14/07/2011 23:59, Terence M. Bandoian wrote:

  On 1:59 PM, Mark Thomas wrote:

On 14/07/2011 06:11, Terence M. Bandoian wrote:

I can live with this.  It's just one of those "it would be nice not to
have to explain" things and if Thread.sleep does the trick, I'm happy.
As I mentioned in my original post, I wanted to find out if there was a
another way to accomplish the same thing that I'd missed.

Daft question, why not set clearReferencesStopTimerThreads="true" on the
Context and get Tomcat to do the clean-up for you?

Mark

With that set, I get a similar SEVERE error message that says the web
application has started but "failed to stop" a TimerThread and that it
was "forcibly canceled" to "prevent a memory leak".

So what is to prevent you from using the same code Tomcat does to stop
the thread properly?

Mark


Yielding after canceling the timer appears to accomplish the same 
purpose.  Thanks for the pointer.


-Terence


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



Re: Tomcat 7 generated web.xml

2011-07-15 Thread Pid
On 15/07/2011 22:38, Stephen Munro wrote:
> No, that wasn't the way it was pitched. The video was from springsource and
> a Mark Thomas was discussing the feature in question (
> http://www.youtube.com/watch?v=HSPo8k6DbTs&feature=related). 

Mark is a Tomcat committer.

He did say that
> this feature was good for ensuring nothing was enabled accidentally through
> web-fragments and that the log feature would help sanity check the web-app
> configuration. 

That is very true.

However, he did state it was a good way for improving performance.

Not all optimisations are aimed at production.

This was purely out of my own curiosity and I've not looked
> into Tomcat much and it seemed (to me at least) worth asking about. As you
> seemed to have implied in your comment, unless the app is rebooted on a
> regular basis, it may not be worth dumping the in memory copy to a generated
> web.xml file.

Indeed.


p


> On 15 July 2011 22:28, Pid  wrote:
> 
>> On 15/07/2011 22:25, Stephen Munro wrote:
>>> Yeah, you may be right out it's usefulness, but on the video I watched,
>> it
>>> was being pitched as a performance boost if you had a massive web app
>> (with
>>> annotations and web-fragments). So the use case would be, develop the app
>>> with annotations enabled and in production, switch them off and use the
>>> master (generated) web.xml, that's what my understanding of it was. So,
>> with
>>> that in mind, I'd have thought a web.xml file would have been created and
>>> that could be checked into version control without the user having to do
>>> anything.
>>
>> Does the video describe an app which is rebooted frequently in production?
>>
>>
>> p
>>
>>
>>> This may not be what had been envisioned for it's primary use, it just
>>> struck me as a nice feature to have.
>>>
>>> On 15 July 2011 22:18, Jesse Farinacci  wrote:
>>>
 Greetings,

 On Fri, Jul 15, 2011 at 5:10 PM, Stephen Munro
  wrote:
> Thanks for the quick reply! I've got it working, so thanks. I'm a
>> little
> curious why the web-app structure is dumped directly to the logs rather
 than
> have it written to a .xml for convenience say...web-generated.xml?

 Great! The configuration option name has "log" right in it. I wouldn't
 expect it to do anything other than log the effective web.xml. Having
 this effective web.xml output to a special file seems of limited
 value, you can simply copy and paste in the rare event that you
 actually require it.

 -Jesse

 --
 There are 10 types of people in this world, those
 that can read binary and those that can not.

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


>>>
>>>
>>
>>
>>
> 
> 




signature.asc
Description: OpenPGP digital signature


Re: Tomcat 7 generated web.xml

2011-07-15 Thread Stephen Munro
No, that wasn't the way it was pitched. The video was from springsource and
a Mark Thomas was discussing the feature in question (
http://www.youtube.com/watch?v=HSPo8k6DbTs&feature=related). He did say that
this feature was good for ensuring nothing was enabled accidentally through
web-fragments and that the log feature would help sanity check the web-app
configuration. However, he did state it was a good way for improving
performance.  This was purely out of my own curiosity and I've not looked
into Tomcat much and it seemed (to me at least) worth asking about. As you
seemed to have implied in your comment, unless the app is rebooted on a
regular basis, it may not be worth dumping the in memory copy to a generated
web.xml file.



On 15 July 2011 22:28, Pid  wrote:

> On 15/07/2011 22:25, Stephen Munro wrote:
> > Yeah, you may be right out it's usefulness, but on the video I watched,
> it
> > was being pitched as a performance boost if you had a massive web app
> (with
> > annotations and web-fragments). So the use case would be, develop the app
> > with annotations enabled and in production, switch them off and use the
> > master (generated) web.xml, that's what my understanding of it was. So,
> with
> > that in mind, I'd have thought a web.xml file would have been created and
> > that could be checked into version control without the user having to do
> > anything.
>
> Does the video describe an app which is rebooted frequently in production?
>
>
> p
>
>
> > This may not be what had been envisioned for it's primary use, it just
> > struck me as a nice feature to have.
> >
> > On 15 July 2011 22:18, Jesse Farinacci  wrote:
> >
> >> Greetings,
> >>
> >> On Fri, Jul 15, 2011 at 5:10 PM, Stephen Munro
> >>  wrote:
> >>> Thanks for the quick reply! I've got it working, so thanks. I'm a
> little
> >>> curious why the web-app structure is dumped directly to the logs rather
> >> than
> >>> have it written to a .xml for convenience say...web-generated.xml?
> >>
> >> Great! The configuration option name has "log" right in it. I wouldn't
> >> expect it to do anything other than log the effective web.xml. Having
> >> this effective web.xml output to a special file seems of limited
> >> value, you can simply copy and paste in the rare event that you
> >> actually require it.
> >>
> >> -Jesse
> >>
> >> --
> >> There are 10 types of people in this world, those
> >> that can read binary and those that can not.
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
> >
>
>
>


-- 
Warmest Regards,

Stephen Munro


Re: IIS 7.5 2008 Server

2011-07-15 Thread Pid
On 15/07/2011 22:21, Ian Porter wrote:
> Hi All
> 
> I am trying to get the tomcat server to work on IIS 7.5 with 2008
> Server, I have tried many different ways and websites that say that
> they work, but when I go through there examples I am just not able to
> get it to work :(

Which version of Tomcat?

> I have enabled the execute rights on the dll, virtual directory.
> 
> I was wondering if there was any advice or this way works for sure or
> this website example really does work. because I am at a loss for why
> the IIS redirect is not working.

Did you read this website?

 http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html

 http://tomcat.apache.org/tomcat-7.0-doc/setup.html#Windows

 http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html



p




signature.asc
Description: OpenPGP digital signature


Re: How can i change JSESSIONIDSSO cookie name?

2011-07-15 Thread Pid
On 15/07/2011 13:08, Mathan Karthik wrote:
> Currently I'm running two web applications in the same machine, but using two 
> different tomcat servers. Both the applications has the same context path, 
> but port numbers are different. 

Wouldn't it be easier just to run the apps on two different IP addresses?


p



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 7 generated web.xml

2011-07-15 Thread Pid
On 15/07/2011 22:25, Stephen Munro wrote:
> Yeah, you may be right out it's usefulness, but on the video I watched, it
> was being pitched as a performance boost if you had a massive web app (with
> annotations and web-fragments). So the use case would be, develop the app
> with annotations enabled and in production, switch them off and use the
> master (generated) web.xml, that's what my understanding of it was. So, with
> that in mind, I'd have thought a web.xml file would have been created and
> that could be checked into version control without the user having to do
> anything.

Does the video describe an app which is rebooted frequently in production?


p


> This may not be what had been envisioned for it's primary use, it just
> struck me as a nice feature to have.
> 
> On 15 July 2011 22:18, Jesse Farinacci  wrote:
> 
>> Greetings,
>>
>> On Fri, Jul 15, 2011 at 5:10 PM, Stephen Munro
>>  wrote:
>>> Thanks for the quick reply! I've got it working, so thanks. I'm a little
>>> curious why the web-app structure is dumped directly to the logs rather
>> than
>>> have it written to a .xml for convenience say...web-generated.xml?
>>
>> Great! The configuration option name has "log" right in it. I wouldn't
>> expect it to do anything other than log the effective web.xml. Having
>> this effective web.xml output to a special file seems of limited
>> value, you can simply copy and paste in the rare event that you
>> actually require it.
>>
>> -Jesse
>>
>> --
>> There are 10 types of people in this world, those
>> that can read binary and those that can not.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 
> 




signature.asc
Description: OpenPGP digital signature


Re: RedHat and mod_jk

2011-07-15 Thread Mark Eggers
- Original Message -

> From: Christopher Schultz 
> To: Tomcat Users List 
> Cc: 
> Sent: Friday, July 15, 2011 12:55 PM
> Subject: Re: RedHat and mod_jk
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Mark,
> 
> On 7/15/2011 2:54 PM, Mark Eggers wrote:
>>  I wonder if there's a problem building mod_jk with OpenJDK. I have 
>>  Oracle's JDK installed here, so I don't know.
> 
> mod_jk does not have any Java components. The tomcat-connectors package
> does have some Java code in it, but it looks like more of a toy than
> anything else. It's not part of the httpd module.
> 
> - -chris


Chris,

Yep, see my previous mea culpa.

Sounds like this is a topic that could be brought up on the Fedora development 
IRC (or mailing list). I imagine the immediate response would be, "If you're 
interested, why don't you build and maintain the package".

I can't see any technical reason for RedHat not to provide a package. The RPMs 
required for building it already exist in the distribution, the actual software 
build is trivial, and they already provide RPMs for things like mod_perl, 
mod_python, and svn.

/mde/

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



Re: Tomcat 7 generated web.xml

2011-07-15 Thread Stephen Munro
Yeah, you may be right out it's usefulness, but on the video I watched, it
was being pitched as a performance boost if you had a massive web app (with
annotations and web-fragments). So the use case would be, develop the app
with annotations enabled and in production, switch them off and use the
master (generated) web.xml, that's what my understanding of it was. So, with
that in mind, I'd have thought a web.xml file would have been created and
that could be checked into version control without the user having to do
anything.

This may not be what had been envisioned for it's primary use, it just
struck me as a nice feature to have.

On 15 July 2011 22:18, Jesse Farinacci  wrote:

> Greetings,
>
> On Fri, Jul 15, 2011 at 5:10 PM, Stephen Munro
>  wrote:
> > Thanks for the quick reply! I've got it working, so thanks. I'm a little
> > curious why the web-app structure is dumped directly to the logs rather
> than
> > have it written to a .xml for convenience say...web-generated.xml?
>
> Great! The configuration option name has "log" right in it. I wouldn't
> expect it to do anything other than log the effective web.xml. Having
> this effective web.xml output to a special file seems of limited
> value, you can simply copy and paste in the rare event that you
> actually require it.
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Warmest Regards,

Stephen Munro


IIS 7.5 2008 Server

2011-07-15 Thread Ian Porter
Hi All

I am trying to get the tomcat server to work on IIS 7.5 with 2008
Server, I have tried many different ways and websites that say that
they work, but when I go through there examples I am just not able to
get it to work :(

I have enabled the execute rights on the dll, virtual directory.

I was wondering if there was any advice or this way works for sure or
this website example really does work. because I am at a loss for why
the IIS redirect is not working.

-- 
Kind regards
Ian Porter

www: www.codingfriends.com

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



Re: How can i change JSESSIONIDSSO cookie name?

2011-07-15 Thread Mark Eggers
- Original Message -

> From: Mathan Karthik 
> To: Tomcat Users List 
> Cc: 
> Sent: Friday, July 15, 2011 1:30 PM
> Subject: Re: How can i change JSESSIONIDSSO cookie name?
> 
> Hi Mark
> 
> Thanks for your swift response. Sorry i missed to mention my tomcat version. 
> One 
> of my application using tomcat_6_0_28 and another application using 
> tomcat_5_0_28. 
> 
> I have added org.apache.catalina.SSO_SESSION_COOKIE_NAME and 
> org.apache.catalina.SESSION_COOKIE_NAME. Now my JSESSIONID cookie name got 
> changed. But JSESSIONIDSSO name didn't get changed. Am i missing anything?
> 
> 
> Regards,
> Mathan Karthik R


A quick look at the docs (and javadocs) seems to indicate that this is not 
possible for 5.0.x. All interesting fields are public static final String. Time 
to upgrade.

For 6.0.28, why did you change both? I was under the impression that you only 
wanted the SSO cookie name changed.

>From the the documentation:

org.apache.catalina.SESSION_COOKIE_NAME

Note that the Servlet specification requires this to be JSESSIONID. You should 
not rely on being able to change this.

How did you set the system property? Did you read this?

http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q29


In particular, it's a good idea to create a setenv.sh file in 
$CATALINA_HOME/bin (or $CATALINA_BASE/bin if you're running several Tomcats 
from a base installation) and add the appropriate setting to CATALINA_OPTS. 
Something like:

#!/bin/bash
CATALINA_OPTS="-Dorg.apache.catalina.SSO_SESSION_COOKIE_NAME=JNONSTANDARDSSO"
export CATALINA_OPTS

might work.


This is based on my reading of the documentation. I've not tried this.

. . . . just my two cents.

/mde/

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



Re: Tomcat 7 generated web.xml

2011-07-15 Thread Jesse Farinacci
Greetings,

On Fri, Jul 15, 2011 at 5:10 PM, Stephen Munro
 wrote:
> Thanks for the quick reply! I've got it working, so thanks. I'm a little
> curious why the web-app structure is dumped directly to the logs rather than
> have it written to a .xml for convenience say...web-generated.xml?

Great! The configuration option name has "log" right in it. I wouldn't
expect it to do anything other than log the effective web.xml. Having
this effective web.xml output to a special file seems of limited
value, you can simply copy and paste in the rare event that you
actually require it.

-Jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

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



Re: Tomcat 7 generated web.xml

2011-07-15 Thread Stephen Munro
Thanks for the quick reply! I've got it working, so thanks. I'm a little
curious why the web-app structure is dumped directly to the logs rather than
have it written to a .xml for convenience say...web-generated.xml?

On 15 July 2011 21:04, Jesse Farinacci  wrote:

> Greetings,
>
> On Fri, Jul 15, 2011 at 3:52 PM, Stephen Munro
>  wrote:
> > I'm looking for details on how to get the generated web.xml after all the
> > annotations have been processed.
>
> See http://tomcat.apache.org/tomcat-7.0-doc/config/context.html and
> look for logEffectiveWebXml.
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Warmest Regards,

Stephen Munro


Re: How can i change JSESSIONIDSSO cookie name?

2011-07-15 Thread Mathan Karthik
Hi Mark

Thanks for your swift response. Sorry i missed to mention my tomcat version. 
One of my application using tomcat_6_0_28 and another application using 
tomcat_5_0_28. 

I have added org.apache.catalina.SSO_SESSION_COOKIE_NAME and 
org.apache.catalina.SESSION_COOKIE_NAME. Now my JSESSIONID cookie name got 
changed. But JSESSIONIDSSO name didn't get changed. Am i missing anything?


Regards,
Mathan Karthik R



 On Sat, 16 Jul 2011 01:05:27 +0530 Mark 
Eggers wrote  


- Original Message - 
 
> From: Mathan Karthik  
> To: users@tomcat.apache.org 
> Cc: 
> Sent: Friday, July 15, 2011 5:08 AM 
> Subject: How can i change JSESSIONIDSSO cookie name? 
> 
> Hi Guys, 
> 
> I have JSESSIONIDSSO cookie related problem. 
> 
> Currently I'm running two web applications in the same machine, but using 
> two different tomcat servers. Both the applications has the same context 
path, 
> but port numbers are different. 
> 
> I've enabled single sign on feature in in one of the tomcat's 
> application. It is using JSESSIONIDSSO cookie for this feature. 
> 
> 
> If i logged into one of the application, another one get logged out. It 
happens 
> due to same JSESSIONIDSSO cookie name. To avoid this issue, i want to 
change 
> JSESSIONIDSSO cookie name in one of the application. So i can avoid this 
name 
> conflict. 
> 
> 
> I know, i can change JSESSIONID name. Is it possible to change 
JSESSIONIDSSO 
> name? Any other way to solve this problem? 
> 
> 
> Note: If i change context path of the both the application, It will work. 
But 
> unfortunately, i can't change. Both the applications are running in same 
> context path but in different ports. 
> 
> 
> Regards, 
> Mathan Karthik R 
> 
 
Better, but we still have no idea what version, system, etc. 
 
However, a quick search in the documentation shows: 
 
http://tomcat.apache.org/tomcat-5.5-doc/config/systemprops.html#Sessions 
 
http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html#Sessions 
 
http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html#Sessions 
 
 
 
/mde/ 
 
- 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
For additional commands, e-mail: users-h...@tomcat.apache.org 
 



Re: How to send binary data in a form field via Java

2011-07-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paritosh,

On 7/15/2011 11:23 AM, Paritosh Patel wrote:
> The client specified content-type to be 
> "application/x-www-form-urlencoded" right now, but I have tried
> several others.

Note that application/x-www-form-urlencoded requires that you properly
set the "Content-Type" header with an appropriate "charset" parameter.
Are you doing that? If not, your stuff will break.

> Then, for encoding, I have tried encoding the bytes using URLEncoder
> 
> ByteArrayOutputStream osBytes = new ByteArrayOutputStream(); byte[]
> val = "..."  // My binary data String valStr = new String((byte[])
> val); osBytes.write(URLEncoder.encode(valStr, "UTF-8").getBytes());

So, a few problems, here. First, new String(byte[]) will destroy your
data because you are not specifying a charset to use. Second, never put
binary data into a String because it's going to end up destroyed.

Second, URLEncoding the string will just make things worse. You don't
need ? changed to %whatever, etc.

> DataOutputStream  os = new
> DataOutputStream(urlConn.getOutputStream()); 
> os.write(osBytes.toByteArray());
> 
> Now, on the servlet side, I do a request.getParameter() to get the 
> field. It is already decoded (I assume URL decoding) by the servlet 
> container. Do I have control over the decoding?

Okay, you're in a giant mess at this point. Instead of continuing to
read what it certainly to be a great tale of tilting at windmills, let
me make two suggestions (pick one):

1. Use base64-encoded values and treat them as strings. The only
   changes would be to base64-encode the value before you
   stick it into the form (where it becomes an ASCII-compatible string)
   and then de-code it in your servlet.

2. Use multipart/form-data and have a separate MIME part that has
   MIME type of application/octet-stream where you dump your raw
   bytes to the binary stream. Note that you can't use a "writer"
   to write this data: you must use an OutputStream.

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

iEYEARECAAYFAk4gnTIACgkQ9CaO5/Lv0PApogCgkSezcapQx+D2i5qW7SI79lAy
aXIAoIZoFUVsI47hU/pSRoZjDGmIxqsM
=3War
-END PGP SIGNATURE-

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



Re: Tomcat 7 generated web.xml

2011-07-15 Thread Jesse Farinacci
Greetings,

On Fri, Jul 15, 2011 at 3:52 PM, Stephen Munro
 wrote:
> I'm looking for details on how to get the generated web.xml after all the
> annotations have been processed.

See http://tomcat.apache.org/tomcat-7.0-doc/config/context.html and
look for logEffectiveWebXml.

-Jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

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



Re: RedHat and mod_jk

2011-07-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 7/15/2011 2:54 PM, Mark Eggers wrote:
> I wonder if there's a problem building mod_jk with OpenJDK. I have 
> Oracle's JDK installed here, so I don't know.

mod_jk does not have any Java components. The tomcat-connectors package
does have some Java code in it, but it looks like more of a toy than
anything else. It's not part of the httpd module.

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

iEYEARECAAYFAk4gmxoACgkQ9CaO5/Lv0PCTsgCdGfNYaKTgL99bH2nbZTCkM1E2
lJcAnR63jci/jXAVMWqPGA/5esl0BQOj
=Zi7U
-END PGP SIGNATURE-

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



Tomcat 7 generated web.xml

2011-07-15 Thread Stephen Munro
I'm looking for details on how to get the generated web.xml after all the
annotations have been processed.  I had watched a video
on this feature and as I understand it, once the annotations have been
processed, it's possible to log the web.xml generated from it and
use it for production, which means you can disable annotations thus
improving performance. How do I do this?

-- 
Warmest Regards,

Stephen Munro


Re: RedHat and mod_jk

2011-07-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

On 7/15/2011 7:40 AM, Martin Gainty wrote:
> not having (publicly available) apt/rpm package for at least one of 
> the mod_jk distros will cause RH to lose market-share

RHEL is one of the only Linux distros that are supported by some managed
hosting providers like RackSpace. I don't think RH is hurting in market
share in spite of them not providing a package for free.

As André says, RH does provide a package... you just have to pay for an
special license to get it.

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

iEYEARECAAYFAk4gmjsACgkQ9CaO5/Lv0PADVACfZiMkn91J2wnE9l2O4w74OHfU
mCQAoIhDeTvSGdjyh0xTvJW2USSy/+Mw
=lLzg
-END PGP SIGNATURE-

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



Re: RedHat and mod_jk

2011-07-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 7/15/2011 4:23 AM, André Warnier wrote:
> I would suppose that RedHat has good lawyers, and that they are 
> "allowed" to do such a thing.  Personally, I find this a bit
> "cheeky", specially from a company that presents itself as a champion
> of Open Source. It is not an unmitigated feeling, because on the
> other hand I also recognise that mod_jk is a complex piece of
> software, and that supporting it for customers certainly has a cost.

Yes, it does cost money. Odd that they have httpd packages available but
not the mod_jk package. As we've said many times on this list, it's
trivial to build. Package managers can easily support it. Debian does
it, why not Red Hat?

> In the practice thus, it probably means that a number of people will
> no longer use mod_jk on RHEL systems in the future, and I find this a
> pity, because even from a purely technical point of view, it is
> always better to have some alternatives.

It's just not feasible for Apache to supply binaries for every
environment. Apache cannot force RHEL to provide a package.

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

iEYEARECAAYFAk4gmbkACgkQ9CaO5/Lv0PB5tgCgjGeDXQ5l9sxLQQ7Bru7bpTuc
N1kAnAxUFN8z/mLTAYh2TPH6yGMZIuQ6
=HyIf
-END PGP SIGNATURE-

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



Re: RedHat and mod_jk

2011-07-15 Thread Mark Eggers
- Original Message -

> From: Rainer Jung 
> To: users@tomcat.apache.org
> Cc: 
> Sent: Friday, July 15, 2011 12:24 PM
> Subject: Re: RedHat and mod_jk
> 
> On 15.07.2011 20:54, Mark Eggers wrote:
>>  I find it a bit odd as well. It appears that mod_jk was never really a part 
> of Fedora. jpackage.org maintained an RPM for Apache 2.0 and RedHat platforms 
> until about Fedora 3 or Fedora 4, and then it was dropped. I don't find a 
> package in Fedora 14, RHELS 4, or RHELS5.
>> 
>>  I guess this could be asked on the Fedora developers' mailing list or 
> IRC (which feeds into Fedora, which feeds into RHELS).
>> 
>>  I wonder if there's a problem building mod_jk with OpenJDK. I have 
> Oracle's JDK installed here, so I don't know.
> 
> You don't need Java to build mod_jk. Only Apache and APR including dev
> packets.
> 
> Regards,
> 
> Rainer


Oops, right. I was looking at libtcnative to make sure I had all the 
dependencies listed.

Sorry 'bout that :-(

/mde/

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



Re: How can i change JSESSIONIDSSO cookie name?

2011-07-15 Thread Mark Eggers
- Original Message -

> From: Mathan Karthik 
> To: users@tomcat.apache.org
> Cc: 
> Sent: Friday, July 15, 2011 5:08 AM
> Subject: How can i change JSESSIONIDSSO cookie name?
> 
> Hi Guys, 
> 
> I have JSESSIONIDSSO cookie related problem. 
> 
> Currently I'm running two web applications in the same machine, but using 
> two different tomcat servers. Both the applications has the same context 
> path, 
> but port numbers are different. 
> 
> I've enabled single sign on feature in in one of the tomcat's 
> application. It is using JSESSIONIDSSO cookie for this feature. 
> 
> 
> If i logged into one of the application, another one get logged out. It 
> happens 
> due to same JSESSIONIDSSO cookie name. To avoid this issue, i want to change 
> JSESSIONIDSSO cookie name in one of the application. So i can avoid this name 
> conflict. 
> 
> 
> I know, i can change JSESSIONID name. Is it possible to change JSESSIONIDSSO 
> name? Any other way to solve this problem? 
> 
> 
> Note: If i change context path of the both the application, It will work. But 
> unfortunately, i can't change. Both the applications are running in same 
> context path but in different ports.
> 
> 
> Regards, 
> Mathan Karthik R 
>

Better, but we still have no idea what version, system, etc.

However, a quick search in the documentation shows:

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

http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html#Sessions

http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html#Sessions



/mde/

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 12:26 PM, Alexandra Stylianidou
 wrote:
> You mean the logs(folder) from tomcat folder or the logs from console?

I mean wherever your running Tomcat is writing its logging messages.

You said you reconfigured the connector port and started it. Where
are those startup messages?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Alexandra Stylianidou
You mean the logs(folder) from tomcat folder or the logs from console?I also
saw that port 8080 is used by http-alt.

2011/7/15 Hassan Schroeder 

> On Fri, Jul 15, 2011 at 10:42 AM, Alexandra Stylianidou
>  wrote:
> > I tried to change the port from 8080 to another port (e.g.9000) and type
> > localhost:9000 but still nothing.What went wrong?
>
> I don't know. What do your logs say?   << hint
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: RedHat and mod_jk

2011-07-15 Thread Rainer Jung
On 15.07.2011 20:54, Mark Eggers wrote:
> I find it a bit odd as well. It appears that mod_jk was never really a part 
> of Fedora. jpackage.org maintained an RPM for Apache 2.0 and RedHat platforms 
> until about Fedora 3 or Fedora 4, and then it was dropped. I don't find a 
> package in Fedora 14, RHELS 4, or RHELS5.
> 
> I guess this could be asked on the Fedora developers' mailing list or IRC 
> (which feeds into Fedora, which feeds into RHELS).
> 
> I wonder if there's a problem building mod_jk with OpenJDK. I have Oracle's 
> JDK installed here, so I don't know.

You don't need Java to build mod_jk. Only Apache and APR including dev
packets.

Regards,

Rainer


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



Re: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

2011-07-15 Thread Rainer Jung
On 15.07.2011 18:19, Lataxes, Karl wrote:
> We do not send cookies.
> 
> Our clients are not web pages but applications embedded in proprietary 
> hardware, which connect to our network via landline telephone or cell modem 
> and access our servlet via HTTP connection.  The servlet responds by sending 
> a message containing several parameters in name-value pair format, including 
> a session id that appears as:  "session-id= 
> -".  The client will 
> respond to the servlet with a message that contains the same session id 
> name-value pair.  After initial connection, all client-server communications 
> will contain this unique session id name-value pair.
> 
> Apache will forward the requests/responses as expected when a single Tomcat 
> node is running.  However, for multiple nodes, the requests are forwarded 
> round robin to all nodes.  Our system environment prevents us from using 
> session replication between nodes, so we have to use sticky sessions.
> 
> I do not believe the problem is with Tomcat, but rather how mod_jk routes the 
> requests.  Is there any way to configure mod_jk so that it will recognize the 
> session id name-value pair?  

I did understand your question, but you still did not give the
information hntains the session id.

The protocol spoken is HTTP and Apache is an HTTP server. So you need to
get used to the appropriate language in order to allow us to understand
and give a correct answer. That's why I suggested words as query
parameters, path info, request headers etc.

If the session id is send by the client as part of the request body,
then it will become complex and I currently see no solution without a
bit of coding. If the id is in headers or somewhere in the URL, you
could likely design a solution using mod_proxy_balancer.

Regards,

Rainer


> -Original Message-
> From: Rainer Jung [mailto:rainer.j...@kippdata.de] 
> Sent: Friday, July 15, 2011 9:44 AM
> To: users@tomcat.apache.org
> Subject: Re: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8
> 
> On 15.07.2011 12:48, Lataxes, Karl wrote:
>> Our servlet assigns a session id to a client when it initially contacts the 
>> server.  The session id consists of "session-id", a unique client 
>> identifier, and the current time in milliseconds, which is used as session 
>> identification for subsequent requests.  There are numerous message 
>> exchanges between the servlet and client during a typical session, all of 
>> which contain the session id.  Once the session has successfully ended, the 
>> session id is removed from the servlet.  
>>
>> Is there any way we can configure mod_jk to recognize the session id in 
>> order to route subsequent messages to the original Tomcat node it initially 
>> contacted?
> 
> How does the client present the session id as part of the requests?
> Query parameter, path info, request header, cookie, ...?
> 
> Can you five a complete example?
> 
> Regards,
> 
> Rainer

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



Re: Why we have duplicate JSESSIONIDSSO cookies ?

2011-07-15 Thread Mark Eggers
- Original Message -

> From: Mathan Karthik 
> To: users 
> Cc: 
> Sent: Friday, July 15, 2011 11:51 AM
> Subject: Why we have duplicate JSESSIONIDSSO cookies ?
> 
> Why tomcat maintaining duplicate JSESSIONIDSSO cookies for the same hostname 
> and 
> context path? Is it a bug?
> 
> Due to this, i have problem in single sign on. 
> 
> Regards,
> Mathan Karthik R
>

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


/mde/

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 10:42 AM, Alexandra Stylianidou
 wrote:
> I tried to change the port from 8080 to another port (e.g.9000) and type
> localhost:9000 but still nothing.What went wrong?

I don't know. What do your logs say?   << hint

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: mod_jk under RedHat ?

2011-07-15 Thread Mladen Turk

On 07/15/2011 07:58 PM, Mark Eggers wrote:


The pages could then reference distribution channels (Debian/Ubuntu/OpenSuse), 
commercial channels (RedHat), requirements for compiling from source (RedHat, 
CentOS, Fedora).



Beside that list, there is a difference between httpd versions
although we try to make mod_jk buildable from 2.0 trough 2.3.

This is just one point why we won't ship mod_jk binaries
for posix platforms any more.
First we don't have an infrastructure with all that platforms/version/cpu
flavors. If you see earlier release you will find two things.
1. Inconsistency
2. Incompleteness

So it might be you've just been lucky and one of the
core developers build the version that (might) work
on your infrastructure.

At the end, building is simple as:
./configure --with-apxs=/path/to/the/apxs(2)
make
sudo make install

Can it be simpler?


Just some random thoughts . . . .



I'd rather see the real FAQ instead thoughts ;)


Regards
--
^TM

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



Re: RedHat and mod_jk

2011-07-15 Thread Mark Eggers
I find it a bit odd as well. It appears that mod_jk was never really a part of 
Fedora. jpackage.org maintained an RPM for Apache 2.0 and RedHat platforms 
until about Fedora 3 or Fedora 4, and then it was dropped. I don't find a 
package in Fedora 14, RHELS 4, or RHELS5.

I guess this could be asked on the Fedora developers' mailing list or IRC 
(which feeds into Fedora, which feeds into RHELS).

I wonder if there's a problem building mod_jk with OpenJDK. I have Oracle's JDK 
installed here, so I don't know.

. . . . just my two cents.

/mde/

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



Why we have duplicate JSESSIONIDSSO cookies ?

2011-07-15 Thread Mathan Karthik
Why tomcat maintaining duplicate JSESSIONIDSSO cookies for the same hostname 
and context path? Is it a bug?

Due to this, i have problem in single sign on. 

Regards,
Mathan Karthik R



Re: mod_jk under RedHat ?

2011-07-15 Thread Mark Eggers
- Original Message -

> From: Christopher Schultz 
> To: Tomcat Users List 
> Cc: 
> Sent: Friday, July 15, 2011 7:53 AM
> Subject: Re: mod_jk under RedHat ?
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> André,
> 
> On 7/15/2011 3:37 AM, André Warnier wrote:
>>  For both threads : Binary of mod_jk.so for Apache 2.2.x and mod_jk
>>  under RedHat ?
>> 
>>  Here is apparently the deal with mod_jk and Redhat (quoted from my 
>>  competent sysadmin) :
> 
> This is probably worth putting in the wiki somewhere. We could have a
> section where we direct people to get binaries for various platforms if
> we know about them.
> 
> Maybe instead of the wiki, it could go directly into the "binaries"
> folder's README, so they are linked-to from the place people would end
> up if they were trying to download a binary.
> 
> I know that Debian/Ubuntu has a package for mod_jk called
> "libapache2-mod-jk" so you can just do "apt-get install
> libapache2-mod-jk" and it will get all the deps (libc6 (>= 2.7-1),
> apache2.2-common, apache2), etc.
> 
> So we have two data points (RHEL and Debian). Maybe others can also
> contribute.
> 
> - -chris


Andre, it doesn't surprise me that this channel is a paid for support channel. 
Did anyone troll through the JBoss community pages to see if there is a mod_jk 
package? I don't know how sensitive your customer is to using 
community-supported software from JBoss / RedHat (if it exists).

Chris, maybe a pointer on the following pages:

http://tomcat.apache.org/connectors-doc/
http://tomcat.apache.org/download-connectors.cgi 


to a Wiki page detailing third party compiled binaries? Have a disclaimer on 
the above two pages stating that binaries for the connectors are not normally 
supplied, and the Wiki page contains information on binaries for various 
platforms.

There are a lot of potential problems with this, including implied endorsement 
by ASF for third party binaries (would a disclaimer be sufficient?), spam, and 
infected binaries.

Another approach would be to have Wiki pages with detailed build or 
installation instructions for each platform. The pages could then reference 
distribution channels (Debian/Ubuntu/OpenSuse), commercial channels (RedHat), 
requirements for compiling from source (RedHat, CentOS, Fedora).

Just some random thoughts . . . .

/mde/

And yes, I'll try to write up a Fedora compilation one (which should work for 
RedHat, CentOS, Scientific Linux). It may take me a bit, since I'm a software 
pack rat, and this system pretty much has everything under the -hat- installed.

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Alexandra Stylianidou
I tried to change the port from 8080 to another port (e.g.9000) and type
localhost:9000 but still nothing.What went wrong?

2011/7/15 Hassan Schroeder 

> On Fri, Jul 15, 2011 at 9:56 AM, Alexandra Stylianidou
>  wrote:
> > Thank you for your tips.So, i have to change the tomcat port from 8080
> into
> > another port?Is it easy to do it?
>
> Yes. Reading the documentation is also a good habit to get into :-)
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: How to send binary data in a form field via Java

2011-07-15 Thread Thad Humphries
If you are sending binary data--say because you user is downloading a file,
or your servlet is writing a image--you need to open a
javax.servlet.ServletOutputStream (
http://download.oracle.com/javaee/6/api/javax/servlet/ServletOutputStream.html
).

On Fri, Jul 15, 2011 at 11:23 AM, Paritosh Patel  wrote:

> I apologize in advance if this is not the correct mail list for such a
> question, but this is the closest one I could find.
>
> (I am using Tomcat 6.0.26 but my question is generic in nature)
>
> I have a Java client that talks to a servlet using several text fields. I
> now wanted to add a field that includes binary data (in this case a protocol
> buffer byte array). The data gets to the servlet, but the bytes are changed.
> Specifically, it appears that the encoding/decoding of bytes > 127 are not
> the same as the original bytes.
>
> The client specified content-type to be "application/x-www-form-urlencoded"
> right now, but I have tried several others. Then, for encoding, I have tried
> encoding the bytes using URLEncoder
>
>ByteArrayOutputStream osBytes = new ByteArrayOutputStream();
>byte[] val = "..."  // My binary data
>String valStr = new String((byte[]) val);
>osBytes.write(URLEncoder.encode(valStr, "UTF-8").getBytes());
>
>DataOutputStream  os = new
> DataOutputStream(urlConn.getOutputStream());
>os.write(osBytes.toByteArray());
>
> Now, on the servlet side, I do a request.getParameter() to get the field.
> It is already decoded (I assume URL decoding) by the servlet container. Do I
> have control over the decoding?
>
> A portion of the byte array at the client is as follows...
> 31 12  e  8 ac e2 cb 8c 90 26 10 90
>
> There are several variables, that I need to get right at the same time.
> 1) content-type... what is the correct content type
> 2) encoder... is URLEncoder the correct encoder?
> 3) encode string... UTF-8 and US-ASCII do not work.
> 4) do I have control over the decoding on the servlet side?
> 5) anything else I need to worry about?
>
> Any help would be greatly appreciated.
>
> - Tosh
>
>


-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v, 121-24)


Re: Binary of mod_jk.so for Apache 2.2.x

2011-07-15 Thread Mark Eggers
- Original Message -

> From: "Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2" 
> 
> To: Tomcat Users List ; Mark Eggers 
> 
> Cc: 
> Sent: Friday, July 15, 2011 7:53 AM
> Subject: RE: Binary of mod_jk.so for Apache 2.2.x
> 
> There is no "apxs" on the Linux server.  The S.A. confirmed this.  
> That file and nothing closely resembling it are found anywhere on the whole 
> box.  Is it needed to compile mod_jk?

Yes, and you will need a collection of other include files and libraries that 
are probably not installed on your system.

Building mod_jk on a RedHat system is slightly complicated by the fact that 
RedHat breaks up packages.

For example, if you install the apr and apr-util packages, you might expect to 
have all the tools required to build software with Apache's portable runtime 
libraries.

You don't. You will need to install apr-devel and apr-util-devel in order to 
build other software using these libraries. The apr and apr-util packages 
contain only what is required to run software built with these packages.

Building mod_jk on RedHat (at least Fedora), requires a collection of 
development tools and packages. At the top of the requirements chain, these are:

1. httpd-devel
This package provides /usr/sbin/apxs among other things.

2. apr-devel
The include files for building software with the apache portable runtime 
libraries.

3. apr-util-devel
The include files for the utilities library of the apache portable runtime 
libraries

4. Java JDK
Note, the JRE will NOT work. You should download and install this from Oracle, 
although there are ways to get this installed using the RedHat package manager. 
There are include files in $JAVA_HOME/include and $JAVA_HOME/include/linux that 
you will need.

If yum is set up properly (at least on Fedora), the dependencies for the first 
three packages will be pulled in when you request the following (as root):

yum install httpd-devel apr-devel apr-util-devel

In part, you should see the following get installed.

perl (if not installed already - can't imagine why it wouldn't be)
pkgconfig
db4-devel (which requires db4 and db4-cxx)
expat-devel (which requires expat)
openldap-devel (which requires openldap,cyrus-sasl-devel)

cyrus-sasl-devel requires a set of packages as well.
cyrus-sasl
cyrus-sasl-lib

Hopefully everything else should be in place on your system.

Again, in a sane world yum will pull in the required dependencies if you just 
do the following as root:

yum install httpd-devel apr-devel apr-util-devel

Yum will come back with a list of additional packages it needs to install in 
order to meet the requirements.

This is how it works on a Fedora system, which is basically the beta testing 
environment for RedHat EL releases.

For mod_ssl, you shouldn't have to build it. At least on a Fedora system, 
mod_ssl is provided by the mod_ssl package.

Installing that as root with:

yum install mod_ssl

will bring in the openssl package. You will need the openssl package and the 
openssl-devel package in order to build the Tomcat native libraries packaged in 
$CATALINA_HOME/bin/tomcat-native.tar.gz.

Hopefully between you and your system admin, you can decipher the above mail 
message.

. . . . just my two cents.

/mde/

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 9:56 AM, Alexandra Stylianidou
 wrote:
> Thank you for your tips.So, i have to change the tomcat port from 8080 into
> another port?Is it easy to do it?

Yes. Reading the documentation is also a good habit to get into :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Alexandra Stylianidou
Thank you for your tips.So, i have to change the tomcat port from 8080 into
another port?Is it easy to do it?

2011/7/15 Hassan Schroeder 

> On Fri, Jul 15, 2011 at 9:14 AM, Alexandra Stylianidou
>  wrote:
> > When i type "Alexandras-MacBook-Pro:bin alekastyl$ cd /Library/Tomcat
> > Alexandras-MacBook-Pro:Tomcat alekastyl$ export CATALINA_HOME=`pwd`
> > Alexandras-MacBook-Pro:Tomcat alekastyl$ ./bin/catalina.sh run" in
> terminal
> > the output is:
>
> > SEVERE: Failed to initialize end point associated with ProtocolHandler
> > ["http-bio-8080"]
> > java.net.BindException: Address already in use :8080
>
> Exactly. Something else is using that port, so of course Tomcat can't.
>
> That same message has been there *every time* you tried to start
> Tomcat "for the last few days". You'll save yourself a lot of time by
> paying attention to logging output.  :-)
>
> Good luck,
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 9:14 AM, Alexandra Stylianidou
 wrote:
> When i type "Alexandras-MacBook-Pro:bin alekastyl$ cd /Library/Tomcat
> Alexandras-MacBook-Pro:Tomcat alekastyl$ export CATALINA_HOME=`pwd`
> Alexandras-MacBook-Pro:Tomcat alekastyl$ ./bin/catalina.sh run" in terminal
> the output is:

> SEVERE: Failed to initialize end point associated with ProtocolHandler
> ["http-bio-8080"]
> java.net.BindException: Address already in use :8080

Exactly. Something else is using that port, so of course Tomcat can't.

That same message has been there *every time* you tried to start
Tomcat "for the last few days". You'll save yourself a lot of time by
paying attention to logging output.  :-)

Good luck,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



RE: How to send binary data in a form field via Java

2011-07-15 Thread eurotrans-Verlag
Hi,

> -Original Message-
> From: Paritosh Patel [mailto:xygnu...@gmail.com]
> Sent: Friday, July 15, 2011 5:24 PM
> To: users@tomcat.apache.org
> Subject: How to send binary data in a form field via Java
> 
> I apologize in advance if this is not the correct mail list for such a
> question, but this is the closest one I could find.
> 
> (I am using Tomcat 6.0.26 but my question is generic in nature)
> 
> I have a Java client that talks to a servlet using several text fields.
> I now wanted to add a field that includes binary data (in this case a
> protocol buffer byte array). The data gets to the servlet, but the
> bytes are changed. Specifically, it appears that the encoding/decoding
> of bytes > 127 are not the same as the original bytes.

That's expected, because ASCII is only defined to byte 127. From byte 128,
the related characters differ by the used Encoding (UTF-8, ISO-8859-1,...)


> 
> The client specified content-type to be "application/x-www-form-
> urlencoded" right now, but I have tried several others. Then, for
> encoding, I have tried encoding the bytes using URLEncoder
> 
>   ByteArrayOutputStream osBytes = new ByteArrayOutputStream();
>   byte[] val = "..."  // My binary data
>   String valStr = new String((byte[]) val);
>   osBytes.write(URLEncoder.encode(valStr, "UTF-8").getBytes());

That is unreliable, because the bytes are converted to chars using the
platform's default charset. If that differs from the server's one, the bytes
will be decoded to other characters.


Have you tried to just Hex-encode the bytes when sending it to the server,
and decoding it on the server side? For example, if your byte[] array is {1,
99, 0, 255}, you could encode it to the hex string "016300FF", and then on
the server side, decode it to bytes.

However, a more efficient form would be to encode the bytes via Base64,
which will mean a increase in size of only 33% instead 100% (when
hex-encoding it).


Regards,
Konstantin Preißer


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



RE: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

2011-07-15 Thread Lataxes, Karl
We do not send cookies.

Our clients are not web pages but applications embedded in proprietary 
hardware, which connect to our network via landline telephone or cell modem and 
access our servlet via HTTP connection.  The servlet responds by sending a 
message containing several parameters in name-value pair format, including a 
session id that appears as:  "session-id= 
-".  The client will 
respond to the servlet with a message that contains the same session id 
name-value pair.  After initial connection, all client-server communications 
will contain this unique session id name-value pair.

Apache will forward the requests/responses as expected when a single Tomcat 
node is running.  However, for multiple nodes, the requests are forwarded round 
robin to all nodes.  Our system environment prevents us from using session 
replication between nodes, so we have to use sticky sessions.

I do not believe the problem is with Tomcat, but rather how mod_jk routes the 
requests.  Is there any way to configure mod_jk so that it will recognize the 
session id name-value pair?  

-Original Message-
From: Rainer Jung [mailto:rainer.j...@kippdata.de] 
Sent: Friday, July 15, 2011 9:44 AM
To: users@tomcat.apache.org
Subject: Re: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

On 15.07.2011 12:48, Lataxes, Karl wrote:
> Our servlet assigns a session id to a client when it initially contacts the 
> server.  The session id consists of "session-id", a unique client identifier, 
> and the current time in milliseconds, which is used as session identification 
> for subsequent requests.  There are numerous message exchanges between the 
> servlet and client during a typical session, all of which contain the session 
> id.  Once the session has successfully ended, the session id is removed from 
> the servlet.  
> 
> Is there any way we can configure mod_jk to recognize the session id in order 
> to route subsequent messages to the original Tomcat node it initially 
> contacted?

How does the client present the session id as part of the requests?
Query parameter, path info, request header, cookie, ...?

Can you five a complete example?

Regards,

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: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Alexandra Stylianidou
When i type "Alexandras-MacBook-Pro:bin alekastyl$ cd /Library/Tomcat
Alexandras-MacBook-Pro:Tomcat alekastyl$ export CATALINA_HOME=`pwd`
Alexandras-MacBook-Pro:Tomcat alekastyl$ ./bin/catalina.sh run" in terminal
the output is:
"Using CATALINA_BASE:   /Library/Tomcat
Using CATALINA_HOME:   /Library/Tomcat
Using CATALINA_TMPDIR: /Library/Tomcat/temp
Using JRE_HOME:/Library/Java/Home
Using CLASSPATH:
/Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar
Jul 15, 2011 7:12:38 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Jul 15, 2011 7:12:39 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jul 15, 2011 7:12:39 PM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler
["http-bio-8080"]
java.net.BindException: Address already in use :8080
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:391)
at
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:490)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:364)
at
org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:910)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
at
org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
at
org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:781)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
at org.apache.catalina.startup.Catalina.load(Catalina.java:572)
at org.apache.catalina.startup.Catalina.load(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:262)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:430)
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
at java.net.ServerSocket.bind(ServerSocket.java:328)
at java.net.ServerSocket.(ServerSocket.java:194)
at java.net.ServerSocket.(ServerSocket.java:150)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:48)
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:378)
... 17 more
Jul 15, 2011 7:12:39 PM org.apache.catalina.core.StandardService
initInternal
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8080]]
org.apache.catalina.LifecycleException: Protocol handler initialization
failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:912)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
at
org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
at
org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:781)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
at org.apache.catalina.startup.Catalina.load(Catalina.java:572)
at org.apache.catalina.startup.Catalina.load(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:262)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:430)
Caused by: java.net.BindException: Address already in use :8080
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:391)
at
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:490)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:364)
at
org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:910)
... 13 more
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
at java.net.ServerSocket.bind(ServerSocket.java:328)
at java.net.ServerSocket.(ServerSocket.java:194)
at java.net.ServerSocket.(ServerSocket.java:150)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.createSoc

Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 8:57 AM, Alexandra Stylianidou
 wrote:
> The console doesn't show anything about tomcat.

Are you saying when you type `bin/catalina.sh run` in a console
window that absolutely nothing happens?? There is *no* output
whatsoever? I find that very hard to believe.

> So,what can i do if another server runs on port 8080?Maybe
> the postgresql runs on that port.

That's not what the message is telling you. Does it say anything
about PostgreSQL? It's telling you it's Apache httpd. Find where
that's installed and stop it. Or configure Tomcat to use a different
port. Either will do.

Assuming Tomcat is actually starting up, which hasn't yet been
demonstrated.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Alexandra Stylianidou
The console doesn't show anything about tomcat.I put in the browser "
http://localhost:8080/"; and it shows me the previous message.So,what can i
do if another server runs on port 8080?Maybe the postgresql runs on that
port.Thanks for your help am not an expert,i want to setup the SWiM wiki and
i am trying it for the last few days but i can't.

2011/7/15 Hassan Schroeder 

> On Fri, Jul 15, 2011 at 8:35 AM, Alexandra Stylianidou
>  wrote:
> > It shows the message:
>
> Again, what does the *console* show when you try to start Tomcat?
>
> If you already have another server running on port 8080 as the lines
> below seem to indicate, you can't expect to see anything from Tomcat
> in your browser.
>
> > "Enterprice DB
> > *Apache - version 2.2.16
> > PHP - version 5.3.3
> > *Server is up and running
> > The default Apache context is *www* in the Apache installation folder"
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 8:35 AM, Alexandra Stylianidou
 wrote:
> It shows the message:

Again, what does the *console* show when you try to start Tomcat?

If you already have another server running on port 8080 as the lines
below seem to indicate, you can't expect to see anything from Tomcat
in your browser.

> "Enterprice DB
> *Apache - version 2.2.16
> PHP - version 5.3.3
> *Server is up and running
> The default Apache context is *www* in the Apache installation folder"

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Alexandra Stylianidou
It shows the message:
"Enterprice DB
*Apache - version 2.2.16
PHP - version 5.3.3
*Server is up and running
The default Apache context is *www* in the Apache installation folder"

2011/7/15 Hassan Schroeder 

> On Fri, Jul 15, 2011 at 8:20 AM, Alexandra Stylianidou
>  wrote:
> > Exactly.But the problem still exists.
>
> What "problem"? What does the startup logging show?
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 8:20 AM, Alexandra Stylianidou
 wrote:
> Exactly.But the problem still exists.

What "problem"? What does the startup logging show?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



How to send binary data in a form field via Java

2011-07-15 Thread Paritosh Patel
I apologize in advance if this is not the correct mail list for such a 
question, but this is the closest one I could find. 

(I am using Tomcat 6.0.26 but my question is generic in nature)

I have a Java client that talks to a servlet using several text fields. I now 
wanted to add a field that includes binary data (in this case a protocol buffer 
byte array). The data gets to the servlet, but the bytes are changed. 
Specifically, it appears that the encoding/decoding of bytes > 127 are not the 
same as the original bytes.

The client specified content-type to be "application/x-www-form-urlencoded" 
right now, but I have tried several others. Then, for encoding, I have tried 
encoding the bytes using URLEncoder

ByteArrayOutputStream osBytes = new ByteArrayOutputStream();
byte[] val = "..."  // My binary data
String valStr = new String((byte[]) val);
osBytes.write(URLEncoder.encode(valStr, "UTF-8").getBytes());

DataOutputStream  os = new DataOutputStream(urlConn.getOutputStream());
os.write(osBytes.toByteArray());

Now, on the servlet side, I do a request.getParameter() to get the field. It is 
already decoded (I assume URL decoding) by the servlet container. Do I have 
control over the decoding?

A portion of the byte array at the client is as follows...
31 12  e  8 ac e2 cb 8c 90 26 10 90

There are several variables, that I need to get right at the same time.
1) content-type... what is the correct content type
2) encoder... is URLEncoder the correct encoder?
3) encode string... UTF-8 and US-ASCII do not work. 
4) do I have control over the decoding on the servlet side?
5) anything else I need to worry about?

Any help would be greatly appreciated.

- Tosh



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Alexandra Stylianidou
Exactly.But the problem still exists.

2011/7/15 Hassan Schroeder 

> On Fri, Jul 15, 2011 at 7:45 AM, Alexandra Stylianidou
>  wrote:
> > I put "Library/Tomcat/bin/catalina.sh run" and says that:"Cannot find
> > /Library/Tomcat/Home/bin/setclasspath.sh
> > This file is needed to run this program" but this file exists.
>
> OK, so you say you have everything installed under /Library/Tomcat,
> right? So try
>
> % cd /Library/Tomcat
> % export CATALINA_HOME=`pwd`
> % ./bin/catalina.sh run
>
> You should see something like this:
>
> 07:42 ~/Downloads/apache-tomcat-7.0.16 $ export CATALINA_HOME=`pwd`
> 07:43 ~/Downloads/apache-tomcat-7.0.16 $ ./bin/catalina.sh run
> Using CATALINA_BASE:   /Users/hassan/Downloads/apache-tomcat-7.0.16
> Using CATALINA_HOME:   /Users/hassan/Downloads/apache-tomcat-7.0.16
> Using CATALINA_TMPDIR: /Users/hassan/Downloads/apache-tomcat-7.0.16/temp
> Using JRE_HOME:
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
> Using CLASSPATH:
>
> /Users/hassan/Downloads/apache-tomcat-7.0.16/bin/bootstrap.jar:/Users/hassan/Downloads/apache-tomcat-7.0.16/bin/tomcat-juli.jar
> 
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 7:45 AM, Alexandra Stylianidou
 wrote:
> I put "Library/Tomcat/bin/catalina.sh run" and says that:"Cannot find
> /Library/Tomcat/Home/bin/setclasspath.sh
> This file is needed to run this program" but this file exists.

OK, so you say you have everything installed under /Library/Tomcat,
right? So try

% cd /Library/Tomcat
% export CATALINA_HOME=`pwd`
% ./bin/catalina.sh run

You should see something like this:

07:42 ~/Downloads/apache-tomcat-7.0.16 $ export CATALINA_HOME=`pwd`
07:43 ~/Downloads/apache-tomcat-7.0.16 $ ./bin/catalina.sh run
Using CATALINA_BASE:   /Users/hassan/Downloads/apache-tomcat-7.0.16
Using CATALINA_HOME:   /Users/hassan/Downloads/apache-tomcat-7.0.16
Using CATALINA_TMPDIR: /Users/hassan/Downloads/apache-tomcat-7.0.16/temp
Using JRE_HOME:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Using CLASSPATH:
/Users/hassan/Downloads/apache-tomcat-7.0.16/bin/bootstrap.jar:/Users/hassan/Downloads/apache-tomcat-7.0.16/bin/tomcat-juli.jar


-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



RE: Binary of mod_jk.so for Apache 2.2.x

2011-07-15 Thread Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2
There is no "apxs" on the Linux server.  The S.A. confirmed this.  That file 
and nothing closely resembling it are found anywhere on the whole box.  Is it 
needed to compile mod_jk?



-Original Message-
From: Mark Eggers [mailto:its_toas...@yahoo.com] 
Sent: Thursday, July 14, 2011 1:22 PM
To: Tomcat Users List
Subject: Re: Binary of mod_jk.so for Apache 2.2.x

- Original Message -

> From: "Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2" 
> 
> To: Tomcat Users List 
> Cc: 
> Sent: Thursday, July 14, 2011 10:08 AM
> Subject: RE: Binary of mod_jk.so for Apache 2.2.x
> 
> Chris, something DID just dawn on me...
> 
> I have my own account on that Linux server, though not with root access or 
> anything.  Would it be possible for me to compile mod_jk.so into my own space 
> and then tell him where the mod_jk.so is?  If so, would the following steps 
> be 
> how I would generate mod_jk.so (and forgive the "newbie"ness of the 
> question, please)?
> 
> tar -xvzf tomcat-connectors-1.2.30-src.tar.gz
> 
> cd tomcat-connectors-1.2.30-src/native/ # which apxs 
> 
> ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility 
> 
> make 
> 
> make install
> 
> 
> At this point, I think all I want to do is produce a functioning mod_jk.so 
> and 
> let him put it into the modules directory.  Would this do it?
> 
> Thanks again!
> 
> JL
> 
> 
> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Sent: Thursday, July 14, 2011 12:34 PM
> To: Tomcat Users List
> Subject: Re: Binary of mod_jk.so for Apache 2.2.x
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Leon,
> 
> On 7/12/2011 7:42 PM, Leon Kolchinsky wrote:
>>  Go to http://tomcat.apache.org/download-connectors.cgi and download
>>  the source code:
>> 
>>  # tar -xvzf tomcat-connectors-1.2.30-src.tar.gz
>> 
>>  Read docs/webserver_howto/apache.html or native/BUILDING.txt for
>>  options.
>> 
>>  # cd tomcat-connectors-1.2.30-src/native/ # which apxs # ./configure
>>  --with-apxs=/usr/sbin/apxs --enable-api-compatibility # make # make
>>  install
> 
> All that as root? Hmm.
> 
> Also, not everyone has a C compiler, especially on a production machine.
> (The answer, of course, is to build somewhere else and upload.)
> 
> Jonathan, I understand that you want convenience, but there are several
> factors to consider, here:
> 
> 1. Unless you download a binary from a trusted source (i.e. not anyone
>    on this list, but something like something.apache.org, or from your
>    distro's package manager), you should consider yourself compromised.
> 
> 2. If you build your own mod_jk, you know it will work with your exact
>    environment. No weird problems with slight version mismatches between
>    httpd version or other libraries. No questions about which
>    architecture's files you need to download, etc.
> 
> 3. Building mod_jk from source is relatively trivial. See above. Most
>    Linux distros some with a C compiler by default, and all of them
>    can trivially install gcc.
> 
> Consider trying it.
> 
> Recently, the Tomcat team decided to stop providing binaries for *NIX
> platforms because of the above (maybe that was just for tcnative, but I
> wouldn't be surprised if the policy is now to avoid rolling binaries for
> any non-Java components).
> 
> Why? Because if we wanted to provide binaries for, say, mod_jk, we need
> to support (at least) two architectures: x86 and x86_64. Also, there are
> 4 major versions of Apache httpd: 1.3, 2.0, 2.2, and 2.4. Sometimes,
> even httpd patch level can affect compatibility (though it really
> shouldn't) or maybe it was built against 2.2.11 but the user has 2.2.13
> and wants to know "why no binary?".
> 
> We cannot possibly provide enough binaries to make everyone happy. Since
> it's so easy to build mod_jk, we ask users in *NIX environments to just
> do it.
> 
> We do provide binaries for both 32- and 64-bit Microsoft Windows
> environments for Apache httpd, Microsoft IIS and (wtf?) Netscape,
> because those folks rarely have compilers handy.
> 
> If you have any trouble building mod_jk, please don't hesitate to come
> back for help.
> 
> - -chris


If all the tools are available on the production system (compiler, libraries), 
then you do this as a normal user:

myuser$ tar -xvzf tomcat-connectors-1.2.32-src.tar.gz
myuser$ cd tomcat-connectors-1.2.32-src/native/
myuser$ which apxs  
myuser$ ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility 
myuser$ make 


(where myuser$ is whatever prompt you have for your user id).

Then you tell the system admin where the location is (probably now in 
/home/myuser/tomcat-connectors-1.2.32-src/native/), and have him do as root:

# cd /home/myuser/tomcat-connectors-1.2.32-src/native/
# make install

That should get the mod_jk.so installed. The administrator will then have to 
configure it (see tomcat-connectors-1.2.32-src/conf for examples), and finally 
restart the Apache HTPPD server.

Hopefully the a

Re: mod_jk under RedHat ?

2011-07-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 7/15/2011 3:37 AM, André Warnier wrote:
> For both threads : Binary of mod_jk.so for Apache 2.2.x and mod_jk
> under RedHat ?
> 
> Here is apparently the deal with mod_jk and Redhat (quoted from my 
> competent sysadmin) :

This is probably worth putting in the wiki somewhere. We could have a
section where we direct people to get binaries for various platforms if
we know about them.

Maybe instead of the wiki, it could go directly into the "binaries"
folder's README, so they are linked-to from the place people would end
up if they were trying to download a binary.

I know that Debian/Ubuntu has a package for mod_jk called
"libapache2-mod-jk" so you can just do "apt-get install
libapache2-mod-jk" and it will get all the deps (libc6 (>= 2.7-1),
apache2.2-common, apache2), etc.

So we have two data points (RHEL and Debian). Maybe others can also
contribute.

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

iEYEARECAAYFAk4gVHAACgkQ9CaO5/Lv0PAsHwCeJ0EybgSy/pGeXJ1+nkH+Pmqy
q8IAnis5zlKu1VS2tdUsVFOQcTN4+8Ew
=voCb
-END PGP SIGNATURE-

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



Re: Session cookie max age

2011-07-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 7/14/2011 10:53 AM, Christopher Schultz wrote:
> On 7/14/2011 10:40 AM, Konstantin Kolinko wrote:
>> 
>> I cannot say without reading the letter of the spec.
> 
> I'll take a look.

Servlet 3.0 section 14.4.10 is the only place I can see that
cookie-config is mentioned at all. Unfortunately, it's shown in an image
and therefore not findable using text search. :( It doesn't show that
cookie-config has any sub-elements, either (just that they exist, it
just doesn't show them).

So, we have to turn to the XML Schema documentation for the element.

The parent schema, http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd,
says nothing because the definitions come from
http://java.sun.com/xml/ns/javaee/web-common_3_0.xsd, where
cookie-config is defined along with it's sub elements, including :

  

  

The lifetime (in seconds) that will be assigned to any
session tracking cookies created by this web application.
Default is -1

  

  

That's pretty much all we have to go on.

Since it's a cookie property, the server has no control over it after
the initial Set-Cookie response header. That is, the client controls the
actual expiration of the cookie as it sees fit.

java/org/apache/catalina/connector/Request.doGetSession (and, later,
java/org/apache/catalina/connector/Request.changeSessionId) are
responsible for actually creating the session cookies and then adding
them to the response.

I don't see any logic in there for checking the max-age and re-sending
the cookie to update the client.

The question, though, is what is the intent of the setting? There are
two ways to interpret :

1. The value is used to set an absolute maximum age of the cookie,
   relative to the creation of the session. The cookie expires after
   that, and the session is effectively lost after that. The semantics
   here are of a server session with a client-enforced expiration
   some fixed time in the future, regardless of how recently the
   user visited the server.

2. The value is used to set a sliding maximum age of the cookie,
   essentially mirroring the server-side behavior with a client-enforced
   session expiration (by proxy via the cookie).

#1 seems like it could be useful if you wanted a hard-maximum on the
length of the session, like "in 10 hours, you're done no matter what".

#2 seems like it solves a historically spec-ignored situation: allowing
cookie-based sessions to survive a browser restart. When using URL
rewriting, the session only expires if the server says it does, and this
allows cookie-based session tracking to enjoy the same benefits.

If #2 is the intended behavior, then this is a bug in Tomcat.

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

iEYEARECAAYFAk4gU5MACgkQ9CaO5/Lv0PAoAACfW3jw8bcuaUze4b2+EtEUP6eV
PU0An0tSpjNAz2zKnTwY56vFHj16AE2x
=ZpJv
-END PGP SIGNATURE-

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Alexandra Stylianidou
I put "Library/Tomcat/bin/catalina.sh run" and says that:"Cannot find
/Library/Tomcat/Home/bin/setclasspath.sh
This file is needed to run this program" but this file exists.



2011/7/15 Hassan Schroeder 

> On Fri, Jul 15, 2011 at 7:38 AM, Alexandra Stylianidou
>  wrote:
> > What do you mean?Logs folder is empty.
>
> That sounds pretty suspicious.
>
> Try starting using `bin/catalina.sh run` -- you should see the startup
> messages in the console.
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 7:38 AM, Alexandra Stylianidou
 wrote:
> What do you mean?Logs folder is empty.

That sounds pretty suspicious.

Try starting using `bin/catalina.sh run` -- you should see the startup
messages in the console.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Alexandra Stylianidou
What do you mean?Logs folder is empty.

2011/7/15 Hassan Schroeder 

> On Fri, Jul 15, 2011 at 7:31 AM, Alexandra Stylianidou
>  wrote:
> > I am trying to run tomcat 7.0.16 on my mac os x 10.6.8 in order to set up
> > the SWiM and i have problem to show the tomcat welcome screen.First,i
> create
> > a folder /Library/Tomcat and put the apache file.Then i edit the
> > /Library/Tomcat/conf/tomcat-users.xml file ,i run the startup.sh file ,i
> go
> > to http://127.0.0.1:8080/ but no tomcat welcome screen.What am i doing
> > wrong?
>
> Look at the logs to see what's happening.
>
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Problem-Tomcat 7.0.16 on mac os 10.6.8

2011-07-15 Thread Hassan Schroeder
On Fri, Jul 15, 2011 at 7:31 AM, Alexandra Stylianidou
 wrote:
> I am trying to run tomcat 7.0.16 on my mac os x 10.6.8 in order to set up
> the SWiM and i have problem to show the tomcat welcome screen.First,i create
> a folder /Library/Tomcat and put the apache file.Then i edit the
> /Library/Tomcat/conf/tomcat-users.xml file ,i run the startup.sh file ,i go
> to http://127.0.0.1:8080/ but no tomcat welcome screen.What am i doing
> wrong?

Look at the logs to see what's happening.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: Binary of mod_jk.so for Apache 2.2.x

2011-07-15 Thread Rainer Jung
On 15.07.2011 14:20, Jeff Allison wrote:
> Isn't mod_jk deprecated in favour of mod_ajp.

No

Rainer

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



Re: mod_jk question about lingering close_waits

2011-07-15 Thread Rainer Jung
On 15.07.2011 12:09, Edward Quick wrote:
> Thanks for your replies. I found the solution was to set JkWatchdogInterval 
> (by default this is not on). I set it to 30, and observed the FIN_WAIT 
> disappears after 60 seconds (this could be the worker.maintain setting?) and 
> the CLOSE_WAIT thread disappeared when it reached the connection_pool_timeout.
> 
> Does this mean connection_pool_timeout only works if JkWatchdogInterval is 
> swithed on?

No, it would also be checked, if a process gets a rquest to handle. So
if there is traffic it usually works fine without the watchdog thread.
But since pools are per process and we can't assume that each of the
processes with idle connections will get new requests soon, t is usually
better to switch on the watchdog.

Regards,

Rainer


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



Re: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

2011-07-15 Thread Rainer Jung
On 15.07.2011 12:48, Lataxes, Karl wrote:
> Our servlet assigns a session id to a client when it initially contacts the 
> server.  The session id consists of "session-id", a unique client identifier, 
> and the current time in milliseconds, which is used as session identification 
> for subsequent requests.  There are numerous message exchanges between the 
> servlet and client during a typical session, all of which contain the session 
> id.  Once the session has successfully ended, the session id is removed from 
> the servlet.  
> 
> Is there any way we can configure mod_jk to recognize the session id in order 
> to route subsequent messages to the original Tomcat node it initially 
> contacted?

How does the client present the session id as part of the requests?
Query parameter, path info, request header, cookie, ...?

Can you five a complete example?

Regards,

Rainer


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



RE: Binary of mod_jk.so for Apache 2.2.x

2011-07-15 Thread Jeff Allison
Isn't mod_jk deprecated in favour of mod_ajp.
On Jul 15, 2011 10:15 PM, "Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2" <
jonathan.leffingwell@navy.mil> wrote:
> Big thanks to Chris, Andre, and everyone else for all of the guidance! I
think I'm going to do this:
>
> 1. Compile Apache 2.2.19 in /myuser/ space (since I don't have root or
admin privileges).
>
> 2. Ask the admin to do his part in taking the compiling code and
installing it.
>
> I have a question about doing this with mod_ssl, but I think it would be
best for me to start a different thread with this. Thanks again!
>
> Jonathan
>
>
> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Thursday, July 14, 2011 2:37 PM
> To: Tomcat Users List
> Subject: Re: Binary of mod_jk.so for Apache 2.2.x
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jonathan,
>
> On 7/14/2011 1:08 PM, Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2 wrote:
>> Chris, something DID just dawn on me...
>>
>> I have my own account on that Linux server, though not with root
>> access or anything. Would it be possible for me to compile mod_jk.so
>> into my own space and then tell him where the mod_jk.so is?
>
> Yes.
>
>> If so, would the following steps be how I would generate mod_jk.so
>> (and forgive the "newbie"ness of the question, please)?
>>
>> tar -xvzf tomcat-connectors-1.2.30-src.tar.gz
>>
>> cd tomcat-connectors-1.2.30-src/native/ # which apxs
>
> The "# which apxs" was intended to be a command to determine the
> location of Apache httpd's "apxs" program, which is a
> configuration-dumping utility to help with building Apache httpd
> modules. apxs if often found in /usr/sbin/apxs so Leon's post was using
> that as an example:
>
>> ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility
>
> Replace /usr/sbin/apxs with whatever the result of "which apxs" is. If
> that doesn't return anything, you may have to have your SA install the
> Apache httpd development package or something. It might also be called
> "apxs2" (that's the case in my Debian Lenny environment).
>
> Good luck,
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk4fN0kACgkQ9CaO5/Lv0PD2ZwCfcQuD5WScbq+HJgCKTHZtY3JY
> Ii0AoK8WtgF4SmXAemVGRmMde4f0K8P1
> =HFWz
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


RE: Binary of mod_jk.so for Apache 2.2.x

2011-07-15 Thread Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2
Big thanks to Chris, Andre, and everyone else for all of the guidance!  I think 
I'm going to do this:

1.  Compile Apache 2.2.19 in /myuser/ space (since I don't have root or admin 
privileges).

2.  Ask the admin to do his part in taking the compiling code and installing it.

I have a question about doing this with mod_ssl, but I think it would be best 
for me to start a different thread with this.  Thanks again!

Jonathan


-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, July 14, 2011 2:37 PM
To: Tomcat Users List
Subject: Re: Binary of mod_jk.so for Apache 2.2.x

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan,

On 7/14/2011 1:08 PM, Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2 wrote:
> Chris, something DID just dawn on me...
> 
> I have my own account on that Linux server, though not with root 
> access or anything. Would it be possible for me to compile mod_jk.so 
> into my own space and then tell him where the mod_jk.so is?

Yes.

> If so, would the following steps be how I would generate mod_jk.so 
> (and forgive the "newbie"ness of the question, please)?
> 
> tar -xvzf tomcat-connectors-1.2.30-src.tar.gz
> 
> cd tomcat-connectors-1.2.30-src/native/ # which apxs

The "# which apxs" was intended to be a command to determine the
location of Apache httpd's "apxs" program, which is a
configuration-dumping utility to help with building Apache httpd
modules. apxs if often found in /usr/sbin/apxs so Leon's post was using
that as an example:

> ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility

Replace /usr/sbin/apxs with whatever the result of "which apxs" is. If
that doesn't return anything, you may have to have your SA install the
Apache httpd development package or something. It might also be called
"apxs2" (that's the case in my Debian Lenny environment).

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

iEYEARECAAYFAk4fN0kACgkQ9CaO5/Lv0PD2ZwCfcQuD5WScbq+HJgCKTHZtY3JY
Ii0AoK8WtgF4SmXAemVGRmMde4f0K8P1
=HFWz
-END PGP SIGNATURE-

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



smime.p7s
Description: S/MIME cryptographic signature


How can i change JSESSIONIDSSO cookie name?

2011-07-15 Thread Mathan Karthik
Hi Guys, 
 
I have JSESSIONIDSSO cookie related problem. 
 
Currently I'm running two web applications in the same machine, but using two 
different tomcat servers. Both the applications has the same context path, but 
port numbers are different. 
 
I've enabled single sign on feature in in one of the tomcat's application. It 
is using JSESSIONIDSSO cookie for this feature. 
 
 
If i logged into one of the application, another one get logged out. It happens 
due to same JSESSIONIDSSO cookie name. To avoid this issue, i want to change 
JSESSIONIDSSO cookie name in one of the application. So i can avoid this name 
conflict. 
 

I know, i can change JSESSIONID name. Is it possible to change JSESSIONIDSSO 
name? Any other way to solve this problem? 
 

Note: If i change context path of the both the application, It will work. But 
unfortunately, i can't change. Both the applications are running in same 
context path but in different ports.

 
Regards, 
Mathan Karthik R 





RE: RedHat and mod_jk

2011-07-15 Thread Martin Gainty

not having (publicly available) apt/rpm package for at least one of the mod_jk 
distros will cause RH to lose market-share 

Martin --
__ 
Note de déni et de confidentialité
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> Date: Fri, 15 Jul 2011 10:23:27 +0200
> From: a...@ice-sa.com
> To: users@tomcat.apache.org
> Subject: RedHat and mod_jk
> 
> Hi.
> 
> Recently, other people and myself were looking for a pre-packaged mod_jk 
> binary for a 
> RedHat RHELS system.
> 
> As a result of some investigation (by Mark Eggers on one side, and an 
> independent sysadmin 
> of my customer on the other side), things seem to boil down to (largely 
> quoted) :
> 
> "
> In the RedHat product "Red Hat Enterprise Linux Server" (RHELS), there is no 
> repository 
> containing a pre-packaged mod_jk module.
> 
> To obtain such a package, the client has to purchase the separate RedHat 
> package "JBoss 
> Enterprise Web Server", which contains mod_jk.
> "
> 
> I would suppose that RedHat has good lawyers, and that they are "allowed" to 
> do such a 
> thing.  Personally, I find this a bit "cheeky", specially from a company that 
> presents 
> itself as a champion of Open Source.
> It is not an unmitigated feeling, because on the other hand I also recognise 
> that mod_jk 
> is a complex piece of software, and that supporting it for customers 
> certainly has a cost.
> 
> But whatever the real merits of my personal feelings in the matter,
> there are people (even sysadmins) who are comfortable with the idea of 
> installing a 
> software package from sources; but there are also many people who simply do 
> not have the 
> time to go through the hassle, and people who are uncomfortable with the 
> installation of 
> such packages (because of maintenance reasons, patches etc.), and people who 
> are just not 
> allowed to install anything that is not part of the standard corporate 
> repository.
> 
> In the practice thus, it probably means that a number of people will no 
> longer use mod_jk 
> on RHEL systems in the future, and I find this a pity, because even from a 
> purely 
> technical point of view, it is always better to have some alternatives.  And 
> there are 
> things which you can do with mod_jk, which you cannot with mod_proxy_ajp 
> and/or 
> mod_proxy_http (and probably vice-versa).
> 
> Anyway, I wonder if anyone here has another opinion on the matter.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
  

RE: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

2011-07-15 Thread Lataxes, Karl
Our servlet assigns a session id to a client when it initially contacts the 
server.  The session id consists of "session-id", a unique client identifier, 
and the current time in milliseconds, which is used as session identification 
for subsequent requests.  There are numerous message exchanges between the 
servlet and client during a typical session, all of which contain the session 
id.  Once the session has successfully ended, the session id is removed from 
the servlet.  

Is there any way we can configure mod_jk to recognize the session id in order 
to route subsequent messages to the original Tomcat node it initially contacted?

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Wednesday, July 13, 2011 3:12 PM
To: Tomcat Users List
Subject: Re: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

On 13/07/2011 19:39, Lataxes, Karl wrote:
> We're not using cookies.
> 
> Our application is not web based, but accepts HTTP PUTS via client requests 
> that enter our network from external sources.  We are not URL encoding, as 
> our clients are not configured to accept it.  If we have to include URL 
> encoding, both our client and server applications will have to be modified 
> accordingly, which may be an option.

No cookies and no url encoding. OK. So how are requests associated with a 
session?

Mark



-
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: mod_jk question about lingering close_waits

2011-07-15 Thread Edward Quick
Thanks for your replies. I found the solution was to set JkWatchdogInterval (by 
default this is not on). I set it to 30, and observed the FIN_WAIT disappears 
after 60 seconds (this could be the worker.maintain setting?) and the 
CLOSE_WAIT thread disappeared when it reached the connection_pool_timeout.

Does this mean connection_pool_timeout only works if JkWatchdogInterval is 
swithed on?

Ed.


-Original Message-
From: Rainer Jung [mailto:rainer.j...@kippdata.de]
Sent: 13 July 2011 23:23
To: users@tomcat.apache.org
Subject: Re: mod_jk question about lingering close_waits

On 13.07.2011 23:16, André Warnier wrote:
> Hi.
>
> I am not the one who can really answer your question, but
>
> 1) this is the right list for Apache/Tomcat connectors (mod_jk among them)
>
> 2) a question : do these CLOSE_WAIT sockets bother you for some specific
> reason ?
> In a totally different context, I have had problems with Linux systems
> when hundreds of such sockets accumulated over time (entire TCP stack
> becoming unresponsive at some point), but they do not seem to have an
> impact when the number remains "reasonable" (below one hundred or so).
> In this case, as I understand things, there will be a maximum of N such
> sockets, where N is the maximum number of threads which Tomcat may have,
> at some point, running simultaneously from this AJP Connector. (And it
> is also the number of connections which mod_jk will automatically
> configure in its pool).
> On many of the sites which I take care of, I regularly see 25-50 such
> mod_jk sockets in CLOSE_WAIT state for extended periods of time, and
> they do not seem to have any negative consequences on the system.  They
> just clutter the netstat displays, but you can always "grep -v" them out.

3) Look at the extensive sample configuration provided by the mod_jk
1.2.32 source download. There are many interesting worker properties,
for example idle timeouts, which should reduce the CLOSE_WAIT counts.

Regards,

Rainer


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


The information contained in this email is strictly confidential and for the 
use of the addressee only, unless otherwise indicated. If you are not the 
intended recipient, please do not read, copy, use or disclose to others this 
message or any attachment. Please also notify the sender by replying to this 
email or by telephone (+44 (0)20 7896 0011) and then delete the email and any 
copies of it. Opinions, conclusions (etc) that do not relate to the official 
business of this company shall be understood as neither given nor endorsed by 
it. IG Group Holdings plc is a company registered in England and Wales under 
number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon 
Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the 
Financial Services Authority. FSA Register number 114059.

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



Webserver HowTo

2011-07-15 Thread Stephan Hofmann
Dear all,

I currently ran into a problem while configuring apache2 with
apache-tomcat6. I followed the steps explained on the page
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

Under "Installation"->"Using Tomcat auto-configure" A part is missing
to get this running using a standard configuration in tomcat6: an ajp
1.3 connector has to be enabled as well. As this was not obvious to
me, it took me some time to get it running.

Maybe you can change the following part and add the information
enclosed in square brackets or something similar.

> Then restart Tomcat and mod_jk.conf should be generated [ Please be aware 
> that an ajp 1.3 connector has to be defined as well. ] For more information 
> on this topic, please refer to the API documentation at the Tomcat docs 
> website.

Kind Regards

Stephan

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



RedHat and mod_jk

2011-07-15 Thread André Warnier

Hi.

Recently, other people and myself were looking for a pre-packaged mod_jk binary for a 
RedHat RHELS system.


As a result of some investigation (by Mark Eggers on one side, and an independent sysadmin 
of my customer on the other side), things seem to boil down to (largely quoted) :


"
In the RedHat product "Red Hat Enterprise Linux Server" (RHELS), there is no repository 
containing a pre-packaged mod_jk module.


To obtain such a package, the client has to purchase the separate RedHat package "JBoss 
Enterprise Web Server", which contains mod_jk.

"

I would suppose that RedHat has good lawyers, and that they are "allowed" to do such a 
thing.  Personally, I find this a bit "cheeky", specially from a company that presents 
itself as a champion of Open Source.
It is not an unmitigated feeling, because on the other hand I also recognise that mod_jk 
is a complex piece of software, and that supporting it for customers certainly has a cost.


But whatever the real merits of my personal feelings in the matter,
there are people (even sysadmins) who are comfortable with the idea of installing a 
software package from sources; but there are also many people who simply do not have the 
time to go through the hassle, and people who are uncomfortable with the installation of 
such packages (because of maintenance reasons, patches etc.), and people who are just not 
allowed to install anything that is not part of the standard corporate repository.


In the practice thus, it probably means that a number of people will no longer use mod_jk 
on RHEL systems in the future, and I find this a pity, because even from a purely 
technical point of view, it is always better to have some alternatives.  And there are 
things which you can do with mod_jk, which you cannot with mod_proxy_ajp and/or 
mod_proxy_http (and probably vice-versa).


Anyway, I wonder if anyone here has another opinion on the matter.


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



Re: Terminating Timer Thread Gracefully

2011-07-15 Thread Mark Thomas
On 14/07/2011 23:59, Terence M. Bandoian wrote:
>  On 1:59 PM, Mark Thomas wrote:
>> On 14/07/2011 06:11, Terence M. Bandoian wrote:
>>> I can live with this.  It's just one of those "it would be nice not to
>>> have to explain" things and if Thread.sleep does the trick, I'm happy.
>>> As I mentioned in my original post, I wanted to find out if there was a
>>> another way to accomplish the same thing that I'd missed.
>> Daft question, why not set clearReferencesStopTimerThreads="true" on the
>> Context and get Tomcat to do the clean-up for you?
>>
>> Mark
> 
> With that set, I get a similar SEVERE error message that says the web
> application has started but "failed to stop" a TimerThread and that it
> was "forcibly canceled" to "prevent a memory leak".

So what is to prevent you from using the same code Tomcat does to stop
the thread properly?

Mark



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



Re: mod_jk under RedHat ?

2011-07-15 Thread André Warnier

For both threads :
Binary of mod_jk.so for Apache 2.2.x
and
mod_jk under RedHat ?

Here is apparently the deal with mod_jk and Redhat (quoted from my competent 
sysadmin) :

In the RedHat product "Red Hat Enterprise Linux Server" (RHELS), there is no repository 
containing a pre-packaged mod_jk module.


To obtain such a package, the client has to purchase the separate RedHat package "JBoss 
Enterprise Web Server", which contains mod_jk.


He adds (and I do not understand what that means, but someone else might):

'"JBoss Enterprise Web Server" is not a "Channel" that can be added to RHELS.'

I may comment on this later on, but for now, it seems that the alternatives for someone 
who for whatever reason wants/needs to stick with RHELS and the pre-packaged software that 
it contains, the alternatives to connect Apache and Tomcat are :

- use mod_proxy and mod_proxy_ajp
or
- use mod_proxy and mod_proxy_http
(which are part of Apache 2.x, which is available in RHELS)

or

purchase the additional RedHat product "JBoss Enterprise Web Server", in which case you 
can also use the included mod_jk package.



For someone who wants to stick with RHELS, does not want to buy the additional "JBoss 
Enterprise Web Server", but can/is allowed to install other packages, an additional 
possibility is to use mod_jk, after compiling it from source.



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



Re: Binary of mod_jk.so for Apache 2.2.x

2011-07-15 Thread André Warnier

For both threads :
Binary of mod_jk.so for Apache 2.2.x
and
mod_jk under RedHat ?

Here is apparently the deal with mod_jk and Redhat (quoted from my competent 
sysadmin) :

In the RedHat product "Red Hat Enterprise Linux Server" (RHELS), there is no repository 
containing a pre-packaged mod_jk module.


To obtain such a package, the client has to purchase the separate RedHat package "JBoss 
Enterprise Web Server", which contains mod_jk.


He adds (and I do not understand what that means, but someone else might):

'"JBoss Enterprise Web Server" is not a "Channel" that can be added to RHELS.'

I may comment on this later on, but for now, it seems that the alternatives for someone 
who for whatever reason wants/needs to stick with RHELS and the pre-packaged software that 
it contains, the alternatives to connect Apache and Tomcat are :

- use mod_proxy and mod_proxy_ajp
or
- use mod_proxy and mod_proxy_http
(which are part of Apache 2.x, which is available in RHELS)

or

purchase the additional RedHat product "JBoss Enterprise Web Server", in which case you 
can also use the included mod_jk package.



For someone who wants to stick with RHELS, does not want to buy the additional "JBoss 
Enterprise Web Server", but can/is allowed to install other packages, an additional 
possibility is to use mod_jk, after compiling it from source.



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