Re: getting desperate here :)

2004-12-02 Thread Peter Mengell
Hi,

Are you invalidating the session from TomcatA before you redirect to TomcatB?, 
even a redirect should be able to clear the session cookie if you've 
invalidated the session.

We do much the same thing sometimes and don't have this problem, the 
session.invalidate seems to be the only thing we seem to be doing 
differently.

Pete

On Thursday 02 December 2004 15:05, Alex Korneyev wrote:
> Hello all,
>
>   i have sent this one before, but i am hoping someone else has
>   had this particular problem.
>   __
>
>
>  i am hoping someone has seen the following behavior.
>
>
>  TomcatA sends a redirect to TomcatB
>
>  on the backend, I can see that TomcatB receives a JSESSIONID that was
>  originally assigned to it by TomcatA;
>
>  i.e. cookie = JSESSIONID=6EF95FA9AA98E608C555E28875F57054;
>
>
>  I rewrite reset the jsession id ( see the code bellow ), but
>
>
>  on the next request i see this:
>
>  cookie = JSESSIONID=6EF95FA9AA98E608C555E28875F57054;
> JSESSIONID=2251830F6F64DEFC974C19C79F1EABAB
>
>  for some reason using Mozilla works, but I.E. is the one that passes
>  2 JSESSIONID variables. Thoughts?
>
> if (cookies != null && cookies.length > 0)
> {
> int len = cookies.length;
> for (int i = 0; i < len; i++)
> {
> if
> (cookies[i].getName().equalsIgnoreCase("jsessionid")) {
> cookies[i].setMaxAge(-1);
> cookies[i].setPath("/");
> _LOGGER.debug("COOKIE VALUE " +
> cookies[i].getValue() ); _LOGGER.debug("session id:  " + 
> request.getSession().getId() ); _LOGGER.debug(" comp" + (
> request.getSession().getId().equals(cookies[i].getValue(;
> if (
> request.getSession().getId().equals(cookies[i].getValue())) {
> _LOGGER.debug("equal");
>
> response.addCookie(cookies[i]); }
> else
> {
> _LOGGER.debug("not equal");
> Cookie sessionCookie = new
> Cookie("JSESSIONID", request.getSession().getId());
>
> response.addCookie(sessionCookie); }
> foundCookie = true;
> _LOGGER.debug("updated session
> cookie");
>
> }
> }
> }
>
>
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Which webframework to use?

2004-11-29 Thread Peter Mengell
Hi,

We've been using Struts exclusively for the last few years and have found it 
to be very good, I can recommend it.  

In most cases we have modified the struts controller to allow transparent 
skinning of the web-apps and extra security to be implemented in the 
controller, thats the only niggle we have.

Pete

On Monday 29 November 2004 09:44, Trond G. Ziarkowski wrote:
> Hi all!
>
> Obviously I'm way off topic here, but I'm posting this anyway.
>
> I started developing JSP/Servlets using Tomcat 6 months ago. At the time
> I started developing my app I wasn't much aware of MVC and frameworks to
> help me with that, so I have developed everything from scratch.
>
> Lately I have been reading up on Spring, WebWork, Struts and JSF. It
> seems to me that the question is to Struts or not to Struts. People
> using Struts are convinced that they have the right solution, but some
> of them are "scared" that JSF is going to take over. And Spring seems to
> go on about how easy it is to use and also mix with other frameworks.
>
> My webapp is somewhat close to the MVC pattern, not bad for not knowing
> about it when design started :), and I think that it should be quite
> easy for me to implement one of these frameworks.
>
> In my understanding the biggest competitors are Struts and JSF, and in
> the 2.x release of Struts they will rely on JSF as supporting technology
> so one of these seems to be a good choice.
>
> Any good tips on the matter would be greatly appreciated.
>
> Trond
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: EJB in tomcat

2004-11-29 Thread Peter Mengell
RTFM

On Monday 29 November 2004 09:30, [EMAIL PROTECTED] wrote:
> Can EJB's be  deployed in tomcat ??
>
>
> Birendar Singh Waldiya
>
>
> DISCLAIMER: The information contained in this message is intended only and
> solely for the addressed individual or entity indicated in this message and
> for the exclusive use of the said addressed individual or entity indicated
> in this message (or responsible for delivery of the message to such person)
> and may contain legally privileged and confidential information belonging
> to Tata Consultancy Services Limited. It must not be printed, read, copied,
> disclosed, forwarded, distributed or used (in whatsoever manner) by any
> person other than the addressee. Unauthorized use, disclosure or copying is
> strictly prohibited and may constitute unlawful act and can possibly
> attract legal action, civil and/or criminal. The contents of this message
> need not necessarily reflect or endorse the views of Tata Consultancy
> Services limited on any subject matter. Any action taken or omitted to be
> taken based on this message is entirely at your risk and neither the
> originator of this message nor Tata Consultancy Services Limited takes any
> responsibility or liability towards the same. Opinions, conclusions and any
> other information contained in this message that do not relate to the
> official business of Tata Consultancy Services limited shall be understood
> as neither given nor endorsed by Tata Consultancy Services Limited or any
> affiliate of Tata Consultancy Services Limited. If you have received this
> message in error,  you should destroy this message and may please notify
> the sender by e-mail. Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Huge tomcat memory footprint

2004-11-02 Thread Peter Mengell
Hi,

your problem is Java 1.4.1_02, it has a memory leak in StringBuffer which is 
used a lot for XML parsing.  Upgrade to 1.4.2 and it will be fine.

Pete

On Monday 01 November 2004 22:25, Anand Narasimhan wrote:
> Hi,
>
> I am not able to determine if the problem is related to tomcat, solaris or
> the application itself. Any help/pointers to debug the problem will be
> greatly appreciated.
>
> The application runs on Solaris 2.8 using Sun's Java version 1.4.1_02. The
> tomcat version is 4.1.27. The GUI is written using HTML/JSP/Struts 1.0.2.
> The database is Oracle version 8.x (I think). The application also has API
> interface written using Java/XML/Soap etc. The application is memory/CPU
> intensive.  The problem I am having is,  after running under a large load,
> tomcat process's memory footprint (reported by top command) increases
> rapidly to more that 2G. The heap size (max configured to 1G), increases to
> about 500 - 600M. I have tried running tomcat with optimizeit to see if
> there are any memory leaks. optimizeit as wells as the output from GC
> (running with -verbose:gc, -XX+PrintGCDetails) shows frequent garbage
> collection activity and the heap size does not grow too much.
>
> I am not able to figure out why the process memory grows. If the heap is
> not growing too much, what is consuming the memory?
>
> Thanks
> Anand
>
> _
>
> Anand Narasimhan
> [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]