session.setAttribute() don't work sometimes

2001-09-09 Thread Gao, Gang
Title: session.setAttribute() don't work sometimes





Hi,
I have a struts problem which make me crazy! I use session.setAttribute(user) in the first action and in the second JSP page, I use session.getAttribute(user) and I can get this value. But when I use session.setAttribute(id) in the second Action and action forward to third jsp, in the third jsp page I try to use session.getAttribute(id) to get this value and populate it in the jsp.But I cannot get this value. I check the session id and it's same in the second action file as third JSP page. I really don't know why? It looks like session.setAttribute(id) don't work suddenly. Please help me out. I'm using WLserver6.0 sp.

Thanks


Gang





Re: session.setAttribute() don't work sometimes

2001-09-09 Thread Ted Husted

I'm not sure if this is really a Struts problem, since Struts doesn't
manage the session ;-)

You might check the behavior in another container. 

The best place to post these types of questions generally, is the User
list.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/


 Gao, Gang wrote:
 
 Hi,
 I have a struts problem which make me crazy! I use
 session.setAttribute(user) in the first action and in the second JSP
 page, I use session.getAttribute(user) and I can get this value. But
 when I use session.setAttribute(id) in the second Action and action
 forward to third jsp,  in the third jsp page I try to use
 session.getAttribute(id) to get this value and populate it in the
 jsp.But I cannot get this value. I check the session id and it's same
 in the second action file as third JSP page. I really don't know why?
 It looks like session.setAttribute(id) don't work suddenly. Please
 help me out. I'm using WLserver6.0 sp.
 
 Thanks
 
 Gang



RE: Niall's if/then/else tags and switch/case/default?

2001-09-09 Thread Niall Pemberton

I dont know how good JSPTL is because its dependant on Tomcat 4 (and/or JSP
1.2) and thats where the problem lies - we are using Tomcat 3 so I haven't
looked at it. When Nivarna comes and JSPTL is part of the JSP spec (1.3
perhaps?) and everyones using servlet containers that support it then this
stuff is redundant.

The question is, when is that going to be and whats the best thing to do in
the meantime for a) people using JSP 1.1 and b) people using JSP 1.2?

My tags also included a switch/case/default which is equivalent to the
choose/when/otherwise pattern in JSPTL and the if/else also supports
and/or/elseif tags.

I could re-engineer the if/else/elseif to not need a then and I believe
this would make them as elegant as they could be. However its not worth it
if theres no enthusiasm for the tags and everyones either switching to JSPTL
or happy to go with whats already there (scriptlet or the current logics
tags) until they switch to JSPTL.

Niall


 -Original Message-
 From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
 R. McClanahan
 Sent: 07 September 2001 07:17
 To: [EMAIL PROTECTED]
 Subject: Re: Niall's if/then/else tags?




 On Thu, 6 Sep 2001 [EMAIL PROTECTED] wrote:

  Date: Thu, 6 Sep 2001 20:49:36 -0700
  From: [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: Niall's if/then/else tags?
 
  I agree with this. In particular, I'd like to see tags of this type
  incorporated in JSPTL. They currently have if, and
  choose/when/otherwise, but no explicit then or else
 (although I
  believe those can be constructed from the others).
 

 The if/then/else pattern can indeed be constructed from
 choose/when/otherwise tags in JSPTL.

 The reason that Struts never had an else tag in the first place is that
 the syntax choices were all incredibly ugly, IMHO, given the restrictions
 on the way you need to nest things to make it work.  The
 choose/when/otherwise pattern in JSPTL is the least objectionable, and has
 the additional advantage of gracefully implementing if ... else if ...
 else if ... type patterns as well.

 Given that choose/when/otherwise does this (and more), I would be somewhat
 surprised if the JSPTL expert group was willing to consider adding
 explicit if/then/else tags as well (because they would be redundant).  But
 the best way to find that out would be to provide feedback on the JSPTL
 early access release (available via http://jakarta.apache.org/taglibs)
 to the email address included in the docs.

  --
  Martin Cooper
 

 Craig


 
  - Original Message -
  From: Ted Husted [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, September 06, 2001 12:57 PM
  Subject: Re: Niall's if/then/else tags?
 
 
   My take on this is here
  
   
  
 http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14158.html
   
  
   I'm personally not in favor of distributing tags with Struts
 that do not
   depend on Struts application resoures (mappings, messages). General
   purpose tags can be hosted at Jakarta Taglibs. At some point,
 the Struts
   bean and logic tags will end up over there too.
  
   If someone wanted to re-package the Struts logic tags for Jarkarta
   Taglibs, and included Nial's extensions, I'm sure they would be well
   received. Ditto for the bean tags. They already have i18n and
 form tags
   that are similar to the Struts versions.
  
   -Ted.
  
   [EMAIL PROTECTED] wrote:
   
Hi.  Just wondering what the status is on Niall's IF/THEN/ELSE tags
  being added
to the nightly build?
   
Cheers,
   
Dave
 
 
 





Re: [PATCH] FormTag - call reset after instantiation

2001-09-09 Thread martin . cooper

Erik,

You're right, it appears that it was not committed. I'll try to get to it
soon.

--
Martin Cooper


- Original Message -
From: Erik Hatcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 08, 2001 8:44 PM
Subject: Re: [PATCH] FormTag - call reset after instantiation


 Followup: I just checked Bugzilla at:
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2108

 It says its been applied and the issue closed, but I don't see it CVS.
It
 seems that the patch slipped through the cracks somehow.

 Could a committer look into this?

 Thanks again,
 Erik


 - Original Message -
 From: Erik Hatcher [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, September 08, 2001 8:38 PM
 Subject: [PATCH] FormTag - call reset after instantiation


  I'd like to lobby for this previously submitted patch to be applied:
  http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg02556.html
 
  Thanks,
  Erik