struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: usage of tags inside tags
Date Tue, 11 Nov 2003 20:26:56 GMT
Why not just forget about <html:hidden>?

<rand:string id="random4"
             charset="A-Z ! @ # \\ \- + ? &amp; $"/>
<input type="hidden"
       name="security"
       value="<jsp:getProperty name="random4" property="random"/>">

BTW, I don't think <html:hidden> will use it's body content as its value.

Quoting Brice Ruth <bruth@fiskars.com>:

> Looking at the docs for the random tag library, you'll probably need 
> something like this:
> 
> <rand:string id="random1" charset="all" property="random"/>
> <html:hidden property="keycode">
> <c:out value="${random1.random}"/>
> </html:hidden>
> 
> -OR- if you're not already using the JSTL core library (prefix: c), then 
> replace the <c:out .../> tag with
> 
> <jsp:getProperty name="random1" property="random"/>
> 
> 
> Brice Ruth wrote:
> 
> > What HTML is generated?
> >
> > mohan@physics.gmu.edu wrote:
> >
> >> I used the second sytax as
> >> <html:hidden property="keycode">
> >> <rand:string id="random1" charset="all" property="random" />
> >> </html:hidden>
> >> And i cannot see this value in my "keycode". I do not want to store it
> >> anywhere but the resetPasswordForm the form bean for this
> >> jsp(resetpassword.jsp)
> >>
> >>
> >>  
> >>
> >>> Use the ${...} syntax with whatever you name the var in:
> >>>
> >>> <c:set var="rand"><rand:string ... /></c:set>
> >>>
> >>> In this example, the variable is named "rand" - so you'd use ${rand}.
> >>>
> >>> Or, don't use that syntax at all and use the
> >>>
> >>> <html:hidden ... ><rand:string ... /></html:hidden>
> >>>
> >>> syntax. Where you don't need to explicitly store the random string in a
> >>> separate variable.
> >>>
> >>> mohan@physics.gmu.edu wrote:
> >>>
> >>>   
> >>>
> >>>> Hi
> >>>> I meant should i say "${var}" or "${rand}".
> >>>>
> >>>> --mohan
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>     
> >>>>
> >>>>> within the struts tags that support EL, you need to use the ${...}
> >>>>> syntax. To my knowledge, the only (standard) tags that use "$var"
are
> >>>>> the JSTL xml tags. Make sure that you are using the struts-html-el
> >>>>> taglib.
> >>>>>
> >>>>> mohan@physics.gmu.edu wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>       
> >>>>>
> >>>>>> Hi in this construct
> >>>>>> <c:set var="rand"><rand:string ... /></c:set>
> >>>>>>
> >>>>>> <html:hidden ... value="${rand}"/>
> >>>>>> in place of value should we use value="$var" or value="${rand}".
> >>>>>> Please let me know.
> >>>>>>
> >>>>>> <html:hidden ... ><rand:string ... /></html:hidden>
> >>>>>> I have used this but somehow a random string is not constructed
but
> >>>>>> only an empty string is seen.
> >>>>>>
> >>>>>> Please let me know if anyone has any ideas about this. I am

> >>>>>> trying to
> >>>>>> create a random string and put it into the database associated
with
> >>>>>> the user.
> >>>>>>
> >>>>>> --Mohan
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>         
> >>>>>>
> >>>>>>> Whatever your fancy is :) But, no - you can't do it as you
propose,
> >>>>>>> to my knowledge.
> >>>>>>>
> >>>>>>> mohan@physics.gmu.edu wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>           
> >>>>>>>
> >>>>>>>> Hi All
> >>>>>>>> I would like to use
> >>>>>>>> <rand:string id="random4" charset="A-Z ! @ # \\ \-
+ ? &amp; $"/>
> >>>>>>>>
> >>>>>>>> as the value for a <html:hidden> tag and store
it as property
> >>>>>>>> security. How can i do that?
> >>>>>>>>
> >>>>>>>> can i do this
> >>>>>>>> <html:hidden property="security" value='<rand:string
id="random4"
> >>>>>>>> charset="A-Z ! @ # \\ \- + ? &amp; $"/>' />
> >>>>>>>>
> >>>>>>>> --mohan
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> --------------------------------------------------------------------- 
> >>>>>>>>
> >>>>>>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>>>>>> For additional commands, e-mail:
> >>>>>>>> struts-user-help@jakarta.apache.org
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>             
> >>>>>>>
> >>>>>>> -- 
> >>>>>>> Brice D. Ruth
> >>>>>>> Sr. IT Analyst
> >>>>>>> Fiskars Brands, Inc.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> ---------------------------------------------------------------------
> 
> >>>>>>>
> >>>>>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>>>>> For additional commands, e-mail: 
> >>>>>>> struts-user-help@jakarta.apache.org
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>           
> >>>>>>
> >>>>>> ---------------------------------------------------------------------
> 
> >>>>>>
> >>>>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>         
> >>>>>
> >>>>> -- 
> >>>>> Brice D. Ruth
> >>>>> Sr. IT Analyst
> >>>>> Fiskars Brands, Inc.
> >>>>>
> >>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org

> >>>>> For
> >>>>> additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>>>
> >>>>>
> >>>>>       
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
> >>>> additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>>
> >>>>
> >>>>
> >>>>     
> >>>
> >>> -- 
> >>> Brice D. Ruth
> >>> Sr. IT Analyst
> >>> Fiskars Brands, Inc.
> >>>
> >>>
> >>>
> >>> --------------------------------------------------------------------- 
> >>> To
> >>> unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
> >>> additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>>   
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>
> >>  
> >>
> >
> 
> -- 
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message