Re: Setting html:hidden property using JSTL

2004-06-24 Thread Michael Nascimento Santos
It's not possible to use a custom tag as the value of another custom tag
attribute. You should use JSP 2.0 or struts-el instead.

Regards,
Michael Nascimento Santos
JSR-207 Expert Group Member
http://www.javablogs.com.br/blogs/page/soujavamisterm
http://today.java.net/pub/au/80
Sun Certified Programmer for the Java 2 Platform 1.2 & 1.4
Sun Certified Web Component Developer for J2EE
Sun Certified Mobile Application Developer

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 23, 2004 2:31 PM
Subject: Re: Setting html:hidden property using JSTL


> James
>
> Do you include the HTML tag library within the jsp page?  It needs to go
> at the top and look like this:
>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
> Cheers
>
> Christopher Marsh-Bourdon
> Pyplia Limited
>
>
>
>
>
> klute <[EMAIL PROTECTED]>
> 23/06/2004 18:25
> Please respond to "Struts Users Mailing List"
>
>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> cc:
> Subject:Setting html:hidden property using JSTL
>
>
> Hi All,
>
> I just started experimenting with jstl and i'd like to
> set a hidden field on MyActionForm using a value
> (contentId) available as an attribute on the request.
> Basically, i'd like to do something like this:
>
> "/>
>
> Which does not work. Should i be using EL syntax
> instead? And what would the correct syntax be?
>
> I did check that  returns
> a valid value so my confusion is just passing it as a
> value to the html:hidden property.
>
> Any help is greatly appreciated.
> James
>
>
>
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
> -
> The information in this e-mail is confidential. It is intended solely for
the addressee. If you are not the intended recipient please notify the
sender immediately and delete this message. Any review, dissemination,
distribution, copying or other use of this communication or the information
in it is strictly prohibited.
>

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



RE: Setting html:hidden property using JSTL

2004-06-24 Thread Tom McCobb
Got it to work:  turns out I had jstl1.1 deployed in the 2.3 container and
it wasn't apparently screwed up until I tried to do this.

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 12:17 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Setting html:hidden property using JSTL


Assuming you are using the Struts-EL tag library:

Try:


robert

> -Original Message-
> From: Tom McCobb [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 12:05 PM
> To: Struts Users Mailing List
> Subject: RE: Setting html:hidden property using JSTL
>
>
> I am having the same nagging problem in JBoss3.2.3/Tomcat4.1.
>
>  varStatus="itemIdx" >
>
>  ---this works just fine
>
>   
>
> The last line always renders as '' both
in
> the Form property and the request parameter.
>
> I checked versions, etc. as detailed earlier in this thread.  I'm stumped.
>
> Tom McC.
>
> -Original Message-
> From: Karr, David [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 11:00 AM
> To: Struts Users Mailing List
> Subject: RE: Setting html:hidden property using JSTL
>
>
> What container are you using?  If this is Resin, this has been known to
> cause problems because of the fact that Resin has an integrated version
> of the JSTL which doesn't work the same as the Jakarta one.  If you're
> using Resin, make sure the integrated JSTL is not being used.
>
> > -Original Message-
> > From: klute [mailto:[EMAIL PROTECTED]
> >
> > Robert,
> >
> > I am using servlet spec 2.3 and i did all the steps
> > you mentioned.
> >
> > Thanks,
> > James
> >
> > --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > > I'm sorry, I've missed parts of this thread, but
> > > this
> > > last message caught my eye when you said it's
> > > printing
> > > ${contentId} to the screen instead of the value of
> > > contentId.
> > >
> > > Which servlet spec. does your container support?
> > > I've seen this
> > > type of behavior when the container supports Servlet
> > > Spec. 2.4 but
> > > the web.xml file is referring to the 2.3 dtd.
> > >
> > > If your container does support the 2.4 spec, then
> > > make sure your
> > > web.xml file has
> > >
> > >  > > xmlns="http://java.sun.com/xml/ns/j2ee";
> > >
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > >
> > > in its root element.
> > >
> > > Again, if your container does support the 2.4 spec,
> > > then you
> > > shouldn't need any .tld files or even jar files for
> > > JSTL.
> > > All you should have to do is add (or include)
> > > something like this to the
> > > top of your .jsp page.
> > >
> > > <%-- JSTL Standard Tags --%>
> > > <%@ taglib uri="http://java.sun.com/jsp/jstl/core";
> > > prefix="c" %>
> > > <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt";
> > > prefix="fmt" %>
> > >
> > > If your container does not support the 2.4 spec,
> > > then you will need
> > > to include the appropriate .tld and .jar files and
> > > update your web.xml
> > > file to reference the appropriate .tld file(s).
> > >
> > > robert
> > >
> > > > -Original Message-
> > > > From: klute [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, June 24, 2004 10:01 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Setting html:hidden property using
> > > JSTL
> > > >
> > > >
> > > > Hello All,
> > > >
> > > > I *really* appreciate your help.  Because of a
> > > > hard-pressing work deadline, i actually gave up on
> > > > getting that to work using JSTL and ended up using
> > > the
> > > >  ugly  > > > value="<%=request.getAttribute("contentId")%>"/>
> > > > instead.
> > > >
> > > > I'll definitely come back to JSTL at a later time
> > > > since i consider that to be a proper way of doing
> > > this
> > > > sort of things.
> > > >
> > > > Robert, if ${contentId} is available as an

Re: Setting html:hidden property using JSTL

2004-06-24 Thread Rick Reumann
Tom McCobb wrote:
I am having the same nagging problem in JBoss3.2.3/Tomcat4.1.

   ---this works just fine

The last line always renders as '' both in
the Form property and the request parameter.
I checked versions, etc. as detailed earlier in this thread.  I'm stumped.
I'm using JBoss3.2 and Tomcat4.1 and do not have these problems so there 
is a way to fix this:)

First off, have you tried the html-el tag and then used:
That DEFINITELY should work.
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Setting html:hidden property using JSTL

2004-06-24 Thread Kris Schneider
Setup checklist - here's what should be in WEB-INF/lib:

Struts 1.1:
---
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-fileupload.jar
commons-lang.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
struts-el.jar
struts.jar

Standard 1.0.5:
---
jaxen-full.jar
jstl.jar
saxpath.jar
standard.jar

jaxen-full.jar and saxpath.jar are only required if you want to use JSTL's
XML/XSLT tags. Remove the TLD files from your app, remove the  elements
from web.xml, and use the "well-known" URIs for the taglibs:

<%@ taglib prefix="c"
   uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="html"
   uri="http://jakarta.apache.org/struts/tags-html"; %>
<%@ taglib prefix="html-el"
   uri="http://jakarta.apache.org/struts/tags-html-el"; %>

Quoting klute <[EMAIL PROTECTED]>:

> Tom,
> 
> I have the same setup: JBoss3.2.3/Tomcat4.1.29
> 
> James
> 
> --- Tom McCobb <[EMAIL PROTECTED]> wrote:
> > I am having the same nagging problem in
> > JBoss3.2.3/Tomcat4.1.
> > 
> >  > value="${DetailForm.detail.costs}"
> > varStatus="itemIdx" >
> > 
> >---this works
> > just fine
> > 
> > 
> > 
> > The last line always renders as ' > value="${itemIdx.count}"/>' both in
> > the Form property and the request parameter.
> > 
> > I checked versions, etc. as detailed earlier in this
> > thread.  I'm stumped.
> > 
> > Tom McC.
> > 
> > -Original Message-
> > From: Karr, David [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 24, 2004 11:00 AM
> > To: Struts Users Mailing List
> > Subject: RE: Setting html:hidden property using JSTL
> > 
> > 
> > What container are you using?  If this is Resin,
> > this has been known to
> > cause problems because of the fact that Resin has an
> > integrated version
> > of the JSTL which doesn't work the same as the
> > Jakarta one.  If you're
> > using Resin, make sure the integrated JSTL is not
> > being used.
> > 
> > > -Original Message-
> > > From: klute [mailto:[EMAIL PROTECTED]
> > >
> > > Robert,
> > >
> > > I am using servlet spec 2.3 and i did all the
> > steps
> > > you mentioned.
> > >
> > > Thanks,
> > > James
> > >
> > > --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > > > I'm sorry, I've missed parts of this thread, but
> > > > this
> > > > last message caught my eye when you said it's
> > > > printing
> > > > ${contentId} to the screen instead of the value
> > of
> > > > contentId.
> > > >
> > > > Which servlet spec. does your container support?
> > > > I've seen this
> > > > type of behavior when the container supports
> > Servlet
> > > > Spec. 2.4 but
> > > > the web.xml file is referring to the 2.3 dtd.
> > > >
> > > > If your container does support the 2.4 spec,
> > then
> > > > make sure your
> > > > web.xml file has
> > > >
> > > >  > > > xmlns="http://java.sun.com/xml/ns/j2ee";
> > > >
> > >
> >
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > >
> > >
> >
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > > >
> > > > in its root element.
> > > >
> > > > Again, if your container does support the 2.4
> > spec,
> > > > then you
> > > > shouldn't need any .tld files or even jar files
> > for
> > > > JSTL.
> > > > All you should have to do is add (or include)
> > > > something like this to the
> > > > top of your .jsp page.
> > > >
> > > > <%-- JSTL Standard Tags --%>
> > > > <%@ taglib
> > uri="http://java.sun.com/jsp/jstl/core";
> > > > prefix="c" %>
> > > > <%@ taglib
> > uri="http://java.sun.com/jsp/jstl/fmt";
> > > > prefix="fmt" %>
> > > >
> > > > If your container does not support the 2.4 spec,
> > > > then you will need
> > > > to include the appropriate .tld and .jar files
> > and
> > > > update your web.xml
> > > &

RE: Setting html:hidden property using JSTL

2004-06-24 Thread klute
Tom,

I have the same setup: JBoss3.2.3/Tomcat4.1.29

James

--- Tom McCobb <[EMAIL PROTECTED]> wrote:
> I am having the same nagging problem in
> JBoss3.2.3/Tomcat4.1.
> 
>  value="${DetailForm.detail.costs}"
> varStatus="itemIdx" >
> 
>  ---this works
> just fine
> 
>   
> 
> The last line always renders as ' value="${itemIdx.count}"/>' both in
> the Form property and the request parameter.
> 
> I checked versions, etc. as detailed earlier in this
> thread.  I'm stumped.
> 
> Tom McC.
> 
> -Original Message-
> From: Karr, David [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 11:00 AM
> To: Struts Users Mailing List
> Subject: RE: Setting html:hidden property using JSTL
> 
> 
> What container are you using?  If this is Resin,
> this has been known to
> cause problems because of the fact that Resin has an
> integrated version
> of the JSTL which doesn't work the same as the
> Jakarta one.  If you're
> using Resin, make sure the integrated JSTL is not
> being used.
> 
> > -Original Message-
> > From: klute [mailto:[EMAIL PROTECTED]
> >
> > Robert,
> >
> > I am using servlet spec 2.3 and i did all the
> steps
> > you mentioned.
> >
> > Thanks,
> > James
> >
> > --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > > I'm sorry, I've missed parts of this thread, but
> > > this
> > > last message caught my eye when you said it's
> > > printing
> > > ${contentId} to the screen instead of the value
> of
> > > contentId.
> > >
> > > Which servlet spec. does your container support?
> > > I've seen this
> > > type of behavior when the container supports
> Servlet
> > > Spec. 2.4 but
> > > the web.xml file is referring to the 2.3 dtd.
> > >
> > > If your container does support the 2.4 spec,
> then
> > > make sure your
> > > web.xml file has
> > >
> > >  > > xmlns="http://java.sun.com/xml/ns/j2ee";
> > >
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >
> >
>
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > >
> > > in its root element.
> > >
> > > Again, if your container does support the 2.4
> spec,
> > > then you
> > > shouldn't need any .tld files or even jar files
> for
> > > JSTL.
> > > All you should have to do is add (or include)
> > > something like this to the
> > > top of your .jsp page.
> > >
> > > <%-- JSTL Standard Tags --%>
> > > <%@ taglib
> uri="http://java.sun.com/jsp/jstl/core";
> > > prefix="c" %>
> > > <%@ taglib
> uri="http://java.sun.com/jsp/jstl/fmt";
> > > prefix="fmt" %>
> > >
> > > If your container does not support the 2.4 spec,
> > > then you will need
> > > to include the appropriate .tld and .jar files
> and
> > > update your web.xml
> > > file to reference the appropriate .tld file(s).
> > >
> > > robert
> > >
> > > > -Original Message-
> > > > From: klute [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, June 24, 2004 10:01 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Setting html:hidden property
> using
> > > JSTL
> > > >
> > > >
> > > > Hello All,
> > > >
> > > > I *really* appreciate your help.  Because of a
> > > > hard-pressing work deadline, i actually gave
> up on
> > > > getting that to work using JSTL and ended up
> using
> > > the
> > > >  ugly  > > >
> value="<%=request.getAttribute("contentId")%>"/>
> > > > instead.
> > > >
> > > > I'll definitely come back to JSTL at a later
> time
> > > > since i consider that to be a proper way of
> doing
> > > this
> > > > sort of things.
> > > >
> > > > Robert, if ${contentId} is available as an
> > > attribute
> > > > (which it was) and not as a parameter, i would
> > > expect
> > > > it to produce null or something instead of
> > > literally
> > > > printing out ${contentId} string...
> > > >
> > > > Rick, i tried creatin

RE: Setting html:hidden property using JSTL

2004-06-24 Thread Robert Taylor
Assuming you are using the Struts-EL tag library:

Try:


robert

> -Original Message-
> From: Tom McCobb [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 12:05 PM
> To: Struts Users Mailing List
> Subject: RE: Setting html:hidden property using JSTL
> 
> 
> I am having the same nagging problem in JBoss3.2.3/Tomcat4.1.
> 
>  varStatus="itemIdx" >
> 
>  ---this works just fine
> 
>   
> 
> The last line always renders as '' both in
> the Form property and the request parameter.
> 
> I checked versions, etc. as detailed earlier in this thread.  I'm stumped.
> 
> Tom McC.
> 
> -Original Message-
> From: Karr, David [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 11:00 AM
> To: Struts Users Mailing List
> Subject: RE: Setting html:hidden property using JSTL
> 
> 
> What container are you using?  If this is Resin, this has been known to
> cause problems because of the fact that Resin has an integrated version
> of the JSTL which doesn't work the same as the Jakarta one.  If you're
> using Resin, make sure the integrated JSTL is not being used.
> 
> > -Original Message-
> > From: klute [mailto:[EMAIL PROTECTED]
> >
> > Robert,
> >
> > I am using servlet spec 2.3 and i did all the steps
> > you mentioned.
> >
> > Thanks,
> > James
> >
> > --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > > I'm sorry, I've missed parts of this thread, but
> > > this
> > > last message caught my eye when you said it's
> > > printing
> > > ${contentId} to the screen instead of the value of
> > > contentId.
> > >
> > > Which servlet spec. does your container support?
> > > I've seen this
> > > type of behavior when the container supports Servlet
> > > Spec. 2.4 but
> > > the web.xml file is referring to the 2.3 dtd.
> > >
> > > If your container does support the 2.4 spec, then
> > > make sure your
> > > web.xml file has
> > >
> > >  > > xmlns="http://java.sun.com/xml/ns/j2ee";
> > >
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > >
> > > in its root element.
> > >
> > > Again, if your container does support the 2.4 spec,
> > > then you
> > > shouldn't need any .tld files or even jar files for
> > > JSTL.
> > > All you should have to do is add (or include)
> > > something like this to the
> > > top of your .jsp page.
> > >
> > > <%-- JSTL Standard Tags --%>
> > > <%@ taglib uri="http://java.sun.com/jsp/jstl/core";
> > > prefix="c" %>
> > > <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt";
> > > prefix="fmt" %>
> > >
> > > If your container does not support the 2.4 spec,
> > > then you will need
> > > to include the appropriate .tld and .jar files and
> > > update your web.xml
> > > file to reference the appropriate .tld file(s).
> > >
> > > robert
> > >
> > > > -Original Message-
> > > > From: klute [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, June 24, 2004 10:01 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Setting html:hidden property using
> > > JSTL
> > > >
> > > >
> > > > Hello All,
> > > >
> > > > I *really* appreciate your help.  Because of a
> > > > hard-pressing work deadline, i actually gave up on
> > > > getting that to work using JSTL and ended up using
> > > the
> > > >  ugly  > > > value="<%=request.getAttribute("contentId")%>"/>
> > > > instead.
> > > >
> > > > I'll definitely come back to JSTL at a later time
> > > > since i consider that to be a proper way of doing
> > > this
> > > > sort of things.
> > > >
> > > > Robert, if ${contentId} is available as an
> > > attribute
> > > > (which it was) and not as a parameter, i would
> > > expect
> > > > it to produce null or something instead of
> > > literally
> > > > printing out ${contentId} string...
> > > >
> > > > Rick, i tried creating a var in t

RE: Setting html:hidden property using JSTL

2004-06-24 Thread klute
David,

I am using Tomcat 4.1.29 so those concerns are not
applicable here

Thanks,
James

--- "Karr, David" <[EMAIL PROTECTED]> wrote:
> What container are you using?  If this is Resin,
> this has been known to
> cause problems because of the fact that Resin has an
> integrated version
> of the JSTL which doesn't work the same as the
> Jakarta one.  If you're
> using Resin, make sure the integrated JSTL is not
> being used.
> 
> > -Original Message-
> > From: klute [mailto:[EMAIL PROTECTED] 
> > 
> > Robert,
> > 
> > I am using servlet spec 2.3 and i did all the
> steps
> > you mentioned. 
> > 
> > Thanks,
> > James
> > 
> > --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > > I'm sorry, I've missed parts of this thread, but
> > > this
> > > last message caught my eye when you said it's
> > > printing
> > > ${contentId} to the screen instead of the value
> of
> > > contentId.
> > > 
> > > Which servlet spec. does your container support?
> > > I've seen this
> > > type of behavior when the container supports
> Servlet
> > > Spec. 2.4 but
> > > the web.xml file is referring to the 2.3 dtd.
> > > 
> > > If your container does support the 2.4 spec,
> then
> > > make sure your
> > > web.xml file has
> > > 
> > >  > > xmlns="http://java.sun.com/xml/ns/j2ee";
> > >
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >
> >
>
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > > 
> > > in its root element.
> > > 
> > > Again, if your container does support the 2.4
> spec,
> > > then you
> > > shouldn't need any .tld files or even jar files
> for
> > > JSTL.
> > > All you should have to do is add (or include)
> > > something like this to the
> > > top of your .jsp page.
> > > 
> > > <%-- JSTL Standard Tags --%>
> > > <%@ taglib
> uri="http://java.sun.com/jsp/jstl/core";
> > > prefix="c" %>
> > > <%@ taglib
> uri="http://java.sun.com/jsp/jstl/fmt";
> > > prefix="fmt" %>
> > > 
> > > If your container does not support the 2.4 spec,
> > > then you will need
> > > to include the appropriate .tld and .jar files
> and
> > > update your web.xml
> > > file to reference the appropriate .tld file(s).
> > > 
> > > robert
> > > 
> > > > -Original Message-
> > > > From: klute [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, June 24, 2004 10:01 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Setting html:hidden property
> using
> > > JSTL
> > > >
> > > >
> > > > Hello All,
> > > >
> > > > I *really* appreciate your help.  Because of a
> > > > hard-pressing work deadline, i actually gave
> up on
> > > > getting that to work using JSTL and ended up
> using
> > > the
> > > >  ugly  > > >
> value="<%=request.getAttribute("contentId")%>"/>
> > > > instead.
> > > >
> > > > I'll definitely come back to JSTL at a later
> time
> > > > since i consider that to be a proper way of
> doing
> > > this
> > > > sort of things.
> > > >
> > > > Robert, if ${contentId} is available as an
> > > attribute
> > > > (which it was) and not as a parameter, i would
> > > expect
> > > > it to produce null or something instead of
> > > literally
> > > > printing out ${contentId} string...
> > > >
> > > > Rick, i tried creating a var in the jsp and
> the
> > > result
> > > > would still be the same: the value of the
> hidden
> > > > property was printed out as {$myVar}. And, if
> i do
> > > > c:out in the begging of the jsp, i do get an
> > > actual
> > > > int value printed. weird... i definitely need
> to
> > > spend
> > > > more time doing my homework to understand how
> it
> > > > works...
> > > >
> > > > All the best,
> > > > James
> > > >
> > > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > > >

RE: Setting html:hidden property using JSTL

2004-06-24 Thread Tom McCobb
I am having the same nagging problem in JBoss3.2.3/Tomcat4.1.



   ---this works just fine



The last line always renders as '' both in
the Form property and the request parameter.

I checked versions, etc. as detailed earlier in this thread.  I'm stumped.

Tom McC.

-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 11:00 AM
To: Struts Users Mailing List
Subject: RE: Setting html:hidden property using JSTL


What container are you using?  If this is Resin, this has been known to
cause problems because of the fact that Resin has an integrated version
of the JSTL which doesn't work the same as the Jakarta one.  If you're
using Resin, make sure the integrated JSTL is not being used.

> -Original Message-
> From: klute [mailto:[EMAIL PROTECTED]
>
> Robert,
>
> I am using servlet spec 2.3 and i did all the steps
> you mentioned.
>
> Thanks,
> James
>
> --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > I'm sorry, I've missed parts of this thread, but
> > this
> > last message caught my eye when you said it's
> > printing
> > ${contentId} to the screen instead of the value of
> > contentId.
> >
> > Which servlet spec. does your container support?
> > I've seen this
> > type of behavior when the container supports Servlet
> > Spec. 2.4 but
> > the web.xml file is referring to the 2.3 dtd.
> >
> > If your container does support the 2.4 spec, then
> > make sure your
> > web.xml file has
> >
> >  > xmlns="http://java.sun.com/xml/ns/j2ee";
> >
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> >
> > in its root element.
> >
> > Again, if your container does support the 2.4 spec,
> > then you
> > shouldn't need any .tld files or even jar files for
> > JSTL.
> > All you should have to do is add (or include)
> > something like this to the
> > top of your .jsp page.
> >
> > <%-- JSTL Standard Tags --%>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core";
> > prefix="c" %>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt";
> > prefix="fmt" %>
> >
> > If your container does not support the 2.4 spec,
> > then you will need
> > to include the appropriate .tld and .jar files and
> > update your web.xml
> > file to reference the appropriate .tld file(s).
> >
> > robert
> >
> > > -Original Message-
> > > From: klute [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, June 24, 2004 10:01 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: Setting html:hidden property using
> > JSTL
> > >
> > >
> > > Hello All,
> > >
> > > I *really* appreciate your help.  Because of a
> > > hard-pressing work deadline, i actually gave up on
> > > getting that to work using JSTL and ended up using
> > the
> > >  ugly  > > value="<%=request.getAttribute("contentId")%>"/>
> > > instead.
> > >
> > > I'll definitely come back to JSTL at a later time
> > > since i consider that to be a proper way of doing
> > this
> > > sort of things.
> > >
> > > Robert, if ${contentId} is available as an
> > attribute
> > > (which it was) and not as a parameter, i would
> > expect
> > > it to produce null or something instead of
> > literally
> > > printing out ${contentId} string...
> > >
> > > Rick, i tried creating a var in the jsp and the
> > result
> > > would still be the same: the value of the hidden
> > > property was printed out as {$myVar}. And, if i do
> > > c:out in the begging of the jsp, i do get an
> > actual
> > > int value printed. weird... i definitely need to
> > spend
> > > more time doing my homework to understand how it
> > > works...
> > >
> > > All the best,
> > > James
> > >
> > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > > klute wrote:
> > > >
> > > > > Yes, the struts-el.jar is in WEB-INF/lib
> > > > >
> > > > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >>klute wrote:
> > > > >>
> > > > >>
> > > > >>> &g

RE: Setting html:hidden property using JSTL

2004-06-24 Thread Karr, David
What container are you using?  If this is Resin, this has been known to
cause problems because of the fact that Resin has an integrated version
of the JSTL which doesn't work the same as the Jakarta one.  If you're
using Resin, make sure the integrated JSTL is not being used.

> -Original Message-
> From: klute [mailto:[EMAIL PROTECTED] 
> 
> Robert,
> 
> I am using servlet spec 2.3 and i did all the steps
> you mentioned. 
> 
> Thanks,
> James
> 
> --- Robert Taylor <[EMAIL PROTECTED]> wrote:
> > I'm sorry, I've missed parts of this thread, but
> > this
> > last message caught my eye when you said it's
> > printing
> > ${contentId} to the screen instead of the value of
> > contentId.
> > 
> > Which servlet spec. does your container support?
> > I've seen this
> > type of behavior when the container supports Servlet
> > Spec. 2.4 but
> > the web.xml file is referring to the 2.3 dtd.
> > 
> > If your container does support the 2.4 spec, then
> > make sure your
> > web.xml file has
> > 
> >  > xmlns="http://java.sun.com/xml/ns/j2ee";
> >
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > 
> > in its root element.
> > 
> > Again, if your container does support the 2.4 spec,
> > then you
> > shouldn't need any .tld files or even jar files for
> > JSTL.
> > All you should have to do is add (or include)
> > something like this to the
> > top of your .jsp page.
> > 
> > <%-- JSTL Standard Tags --%>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core";
> > prefix="c" %>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt";
> > prefix="fmt" %>
> > 
> > If your container does not support the 2.4 spec,
> > then you will need
> > to include the appropriate .tld and .jar files and
> > update your web.xml
> > file to reference the appropriate .tld file(s).
> > 
> > robert
> > 
> > > -Original Message-
> > > From: klute [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, June 24, 2004 10:01 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: Setting html:hidden property using
> > JSTL
> > >
> > >
> > > Hello All,
> > >
> > > I *really* appreciate your help.  Because of a
> > > hard-pressing work deadline, i actually gave up on
> > > getting that to work using JSTL and ended up using
> > the
> > >  ugly  > > value="<%=request.getAttribute("contentId")%>"/>
> > > instead.
> > >
> > > I'll definitely come back to JSTL at a later time
> > > since i consider that to be a proper way of doing
> > this
> > > sort of things.
> > >
> > > Robert, if ${contentId} is available as an
> > attribute
> > > (which it was) and not as a parameter, i would
> > expect
> > > it to produce null or something instead of
> > literally
> > > printing out ${contentId} string...
> > >
> > > Rick, i tried creating a var in the jsp and the
> > result
> > > would still be the same: the value of the hidden
> > > property was printed out as {$myVar}. And, if i do
> > > c:out in the begging of the jsp, i do get an
> > actual
> > > int value printed. weird... i definitely need to
> > spend
> > > more time doing my homework to understand how it
> > > works...
> > >
> > > All the best,
> > > James
> > >
> > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > > klute wrote:
> > > >
> > > > > Yes, the struts-el.jar is in WEB-INF/lib
> > > > >
> > > > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >>klute wrote:
> > > > >>
> > > > >>
> > > > >>> > > > >>>value="${contentId}">
> > > > >>>
> > > > >>>This are the tagligs i am importing on this
> > page:
> > > > >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> > > > >>>prefix="bean" %>
> > > > >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> > > > >>>prefix="html" %&g

RE: Setting html:hidden property using JSTL

2004-06-24 Thread klute
Robert,

I am using servlet spec 2.3 and i did all the steps
you mentioned. 

Thanks,
James

--- Robert Taylor <[EMAIL PROTECTED]> wrote:
> I'm sorry, I've missed parts of this thread, but
> this
> last message caught my eye when you said it's
> printing
> ${contentId} to the screen instead of the value of
> contentId.
> 
> Which servlet spec. does your container support?
> I've seen this
> type of behavior when the container supports Servlet
> Spec. 2.4 but
> the web.xml file is referring to the 2.3 dtd.
> 
> If your container does support the 2.4 spec, then
> make sure your
> web.xml file has
> 
>  xmlns="http://java.sun.com/xml/ns/j2ee";
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> 
> in its root element.
> 
> Again, if your container does support the 2.4 spec,
> then you
> shouldn't need any .tld files or even jar files for
> JSTL.
> All you should have to do is add (or include)
> something like this to the
> top of your .jsp page.
> 
> <%-- JSTL Standard Tags --%>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core";
> prefix="c" %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt";
> prefix="fmt" %>
> 
> If your container does not support the 2.4 spec,
> then you will need
> to include the appropriate .tld and .jar files and
> update your web.xml
> file to reference the appropriate .tld file(s).
> 
> robert
> 
> 
> 
> 
> 
> > -Original Message-
> > From: klute [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 24, 2004 10:01 AM
> > To: Struts Users Mailing List
> > Subject: Re: Setting html:hidden property using
> JSTL
> >
> >
> > Hello All,
> >
> > I *really* appreciate your help.  Because of a
> > hard-pressing work deadline, i actually gave up on
> > getting that to work using JSTL and ended up using
> the
> >  ugly  > value="<%=request.getAttribute("contentId")%>"/>
> > instead.
> >
> > I'll definitely come back to JSTL at a later time
> > since i consider that to be a proper way of doing
> this
> > sort of things.
> >
> > Robert, if ${contentId} is available as an
> attribute
> > (which it was) and not as a parameter, i would
> expect
> > it to produce null or something instead of
> literally
> > printing out ${contentId} string...
> >
> > Rick, i tried creating a var in the jsp and the
> result
> > would still be the same: the value of the hidden
> > property was printed out as {$myVar}. And, if i do
> > c:out in the begging of the jsp, i do get an
> actual
> > int value printed. weird... i definitely need to
> spend
> > more time doing my homework to understand how it
> > works...
> >
> > All the best,
> > James
> >
> > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > klute wrote:
> > >
> > > > Yes, the struts-el.jar is in WEB-INF/lib
> > > >
> > > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > >
> > > >>klute wrote:
> > > >>
> > > >>
> > > >>> > > >>>value="${contentId}">
> > > >>>
> > > >>>This are the tagligs i am importing on this
> page:
> > > >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> > > >>>prefix="bean" %>
> > > >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> > > >>>prefix="html" %>
> > > >>><%@ taglib uri="/WEB-INF/struts-html-el.tld"
> > > >>>prefix="html-el" %>
> > > >>><%@ taglib
> uri="http://java.sun.com/jstl/core";
> > > >>>prefix="c" %>
> > > >>>
> > > >>>
> > > >>>What am i doing wrong?
> > >
> > > Not sure. If you have
> > > - struts-el jar included
> > > - proper definition of the tld in web.xml
> > > - proper declaration for the tld on top of the
> page
> > >
> > > then using it as:
> > >  > > value="${contentId}"/>
> > > should be fine.
> > >
> > > The only thing I'm still concerned about and
> maybe
> > > somehow it's related
> > > is that contentId has 

RE: Setting html:hidden property using JSTL

2004-06-24 Thread Robert Taylor
Right. Thanks for the clarification, Kris. 

robert

> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 10:39 AM
> To: Struts Users Mailing List
> Subject: RE: Setting html:hidden property using JSTL
> 
> 
> Small clarification that the Servlet 2.4/JSP 2.0 specs don't include/require
> JSTL. Although a given container may include a JSTL implementation (like Resin,
> I believe), it's not a requirement. For example, Tomcat 5.0 does not include a
> JSTL implementation. For JSP 1.2, use JSTL 1.0. For JSP 2.0, use JSTL 1.1. As
> Robert illustrated, the taglib URIs are not the same for the two JSTL
> versions.
> 
> Quoting Robert Taylor <[EMAIL PROTECTED]>:
> 
> > I'm sorry, I've missed parts of this thread, but this
> > last message caught my eye when you said it's printing
> > ${contentId} to the screen instead of the value of contentId.
> > 
> > Which servlet spec. does your container support? I've seen this
> > type of behavior when the container supports Servlet Spec. 2.4 but
> > the web.xml file is referring to the 2.3 dtd.
> > 
> > If your container does support the 2.4 spec, then make sure your
> > web.xml file has
> > 
> > http://java.sun.com/xml/ns/j2ee";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > 
> > in its root element.
> > 
> > Again, if your container does support the 2.4 spec, then you
> > shouldn't need any .tld files or even jar files for JSTL.
> > All you should have to do is add (or include) something like this to the
> > top of your .jsp page.
> > 
> > <%-- JSTL Standard Tags --%>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"; prefix="fmt" %>
> > 
> > If your container does not support the 2.4 spec, then you will need
> > to include the appropriate .tld and .jar files and update your web.xml
> > file to reference the appropriate .tld file(s).
> > 
> > robert
> > 
> > 
> > 
> > 
> > 
> > > -Original Message-
> > > From: klute [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, June 24, 2004 10:01 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: Setting html:hidden property using JSTL
> > >
> > >
> > > Hello All,
> > >
> > > I *really* appreciate your help.  Because of a
> > > hard-pressing work deadline, i actually gave up on
> > > getting that to work using JSTL and ended up using the
> > >  ugly  > > value="<%=request.getAttribute("contentId")%>"/>
> > > instead.
> > >
> > > I'll definitely come back to JSTL at a later time
> > > since i consider that to be a proper way of doing this
> > > sort of things.
> > >
> > > Robert, if ${contentId} is available as an attribute
> > > (which it was) and not as a parameter, i would expect
> > > it to produce null or something instead of literally
> > > printing out ${contentId} string...
> > >
> > > Rick, i tried creating a var in the jsp and the result
> > > would still be the same: the value of the hidden
> > > property was printed out as {$myVar}. And, if i do
> > > c:out in the begging of the jsp, i do get an actual
> > > int value printed. weird... i definitely need to spend
> > > more time doing my homework to understand how it
> > > works...
> > >
> > > All the best,
> > > James
> > >
> > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > > klute wrote:
> > > >
> > > > > Yes, the struts-el.jar is in WEB-INF/lib
> > > > >
> > > > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >>klute wrote:
> > > > >>
> > > > >>
> > > > >>> > > > >>>value="${contentId}">
> > > > >>>
> > > > >>>This are the tagligs i am importing on this page:
> > > > >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> > > > >>>prefix="bean" %>
> > > > >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> > > > >>>prefix=&quo

RE: Setting html:hidden property using JSTL

2004-06-24 Thread Kris Schneider
Small clarification that the Servlet 2.4/JSP 2.0 specs don't include/require
JSTL. Although a given container may include a JSTL implementation (like Resin,
I believe), it's not a requirement. For example, Tomcat 5.0 does not include a
JSTL implementation. For JSP 1.2, use JSTL 1.0. For JSP 2.0, use JSTL 1.1. As
Robert illustrated, the taglib URIs are not the same for the two JSTL
versions.

Quoting Robert Taylor <[EMAIL PROTECTED]>:

> I'm sorry, I've missed parts of this thread, but this
> last message caught my eye when you said it's printing
> ${contentId} to the screen instead of the value of contentId.
> 
> Which servlet spec. does your container support? I've seen this
> type of behavior when the container supports Servlet Spec. 2.4 but
> the web.xml file is referring to the 2.3 dtd.
> 
> If your container does support the 2.4 spec, then make sure your
> web.xml file has
> 
> http://java.sun.com/xml/ns/j2ee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> 
> in its root element.
> 
> Again, if your container does support the 2.4 spec, then you
> shouldn't need any .tld files or even jar files for JSTL.
> All you should have to do is add (or include) something like this to the
> top of your .jsp page.
> 
> <%-- JSTL Standard Tags --%>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"; prefix="fmt" %>
> 
> If your container does not support the 2.4 spec, then you will need
> to include the appropriate .tld and .jar files and update your web.xml
> file to reference the appropriate .tld file(s).
> 
> robert
> 
> 
> 
> 
> 
> > -Original Message-
> > From: klute [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 24, 2004 10:01 AM
> > To: Struts Users Mailing List
> > Subject: Re: Setting html:hidden property using JSTL
> >
> >
> > Hello All,
> >
> > I *really* appreciate your help.  Because of a
> > hard-pressing work deadline, i actually gave up on
> > getting that to work using JSTL and ended up using the
> >  ugly  > value="<%=request.getAttribute("contentId")%>"/>
> > instead.
> >
> > I'll definitely come back to JSTL at a later time
> > since i consider that to be a proper way of doing this
> > sort of things.
> >
> > Robert, if ${contentId} is available as an attribute
> > (which it was) and not as a parameter, i would expect
> > it to produce null or something instead of literally
> > printing out ${contentId} string...
> >
> > Rick, i tried creating a var in the jsp and the result
> > would still be the same: the value of the hidden
> > property was printed out as {$myVar}. And, if i do
> > c:out in the begging of the jsp, i do get an actual
> > int value printed. weird... i definitely need to spend
> > more time doing my homework to understand how it
> > works...
> >
> > All the best,
> > James
> >
> > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > klute wrote:
> > >
> > > > Yes, the struts-el.jar is in WEB-INF/lib
> > > >
> > > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > >
> > > >>klute wrote:
> > > >>
> > > >>
> > > >>> > > >>>value="${contentId}">
> > > >>>
> > > >>>This are the tagligs i am importing on this page:
> > > >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> > > >>>prefix="bean" %>
> > > >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> > > >>>prefix="html" %>
> > > >>><%@ taglib uri="/WEB-INF/struts-html-el.tld"
> > > >>>prefix="html-el" %>
> > > >>><%@ taglib uri="http://java.sun.com/jstl/core";
> > > >>>prefix="c" %>
> > > >>>
> > > >>>
> > > >>>What am i doing wrong?
> > >
> > > Not sure. If you have
> > > - struts-el jar included
> > > - proper definition of the tld in web.xml
> > > - proper declaration for the tld on top of the page
> > >
> > > then using it as:
> > >  > > value="${contentId}"/>
> > > should be fine.
> > >
> > > The only thing I'm still concerned about and maybe
> > > somehow it's related
> > > is that contentId has to be a property of your
> > > ActionForm or else Struts
> > > would complain that it couldn't find the property
> > > 'contentId' Are you
> > > maybe creating the "contentId" var dynamically first
> > > in the JSP page and
> > > then trying to set as above? "Usually" you don't
> > > need to do like you are
> > > doing (setting the value) since that value can be
> > > set before you get to
> > > the page and thus just doing  > > property="contentId" would be
> > > fine.
> > >
> > > What does  produce on
> > > the page (or in
> > > source) when placed right before the html-el hidden
> > > tag?
> > >
> > > --
> > > Rick

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

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



RE: Setting html:hidden property using JSTL

2004-06-24 Thread Robert Taylor
I'm sorry, I've missed parts of this thread, but this
last message caught my eye when you said it's printing
${contentId} to the screen instead of the value of contentId.

Which servlet spec. does your container support? I've seen this
type of behavior when the container supports Servlet Spec. 2.4 but
the web.xml file is referring to the 2.3 dtd.

If your container does support the 2.4 spec, then make sure your
web.xml file has

http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

in its root element.

Again, if your container does support the 2.4 spec, then you
shouldn't need any .tld files or even jar files for JSTL.
All you should have to do is add (or include) something like this to the
top of your .jsp page.

<%-- JSTL Standard Tags --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"; prefix="fmt" %>

If your container does not support the 2.4 spec, then you will need
to include the appropriate .tld and .jar files and update your web.xml
file to reference the appropriate .tld file(s).

robert





> -Original Message-
> From: klute [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 24, 2004 10:01 AM
> To: Struts Users Mailing List
> Subject: Re: Setting html:hidden property using JSTL
>
>
> Hello All,
>
> I *really* appreciate your help.  Because of a
> hard-pressing work deadline, i actually gave up on
> getting that to work using JSTL and ended up using the
>  ugly  value="<%=request.getAttribute("contentId")%>"/>
> instead.
>
> I'll definitely come back to JSTL at a later time
> since i consider that to be a proper way of doing this
> sort of things.
>
> Robert, if ${contentId} is available as an attribute
> (which it was) and not as a parameter, i would expect
> it to produce null or something instead of literally
> printing out ${contentId} string...
>
> Rick, i tried creating a var in the jsp and the result
> would still be the same: the value of the hidden
> property was printed out as {$myVar}. And, if i do
> c:out in the begging of the jsp, i do get an actual
> int value printed. weird... i definitely need to spend
> more time doing my homework to understand how it
> works...
>
> All the best,
> James
>
> --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > klute wrote:
> >
> > > Yes, the struts-el.jar is in WEB-INF/lib
> > >
> > > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > >
> > >>klute wrote:
> > >>
> > >>
> > >>> > >>>value="${contentId}">
> > >>>
> > >>>This are the tagligs i am importing on this page:
> > >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> > >>>prefix="bean" %>
> > >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> > >>>prefix="html" %>
> > >>><%@ taglib uri="/WEB-INF/struts-html-el.tld"
> > >>>prefix="html-el" %>
> > >>><%@ taglib uri="http://java.sun.com/jstl/core";
> > >>>prefix="c" %>
> > >>>
> > >>>
> > >>>What am i doing wrong?
> >
> > Not sure. If you have
> > - struts-el jar included
> > - proper definition of the tld in web.xml
> > - proper declaration for the tld on top of the page
> >
> > then using it as:
> >  > value="${contentId}"/>
> > should be fine.
> >
> > The only thing I'm still concerned about and maybe
> > somehow it's related
> > is that contentId has to be a property of your
> > ActionForm or else Struts
> > would complain that it couldn't find the property
> > 'contentId' Are you
> > maybe creating the "contentId" var dynamically first
> > in the JSP page and
> > then trying to set as above? "Usually" you don't
> > need to do like you are
> > doing (setting the value) since that value can be
> > set before you get to
> > the page and thus just doing  > property="contentId" would be
> > fine.
> >
> > What does  produce on
> > the page (or in
> > source) when placed right before the html-el hidden
> > tag?
> >
> > --
> > Rick
> >
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
>
> -
> 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: Setting html:hidden property using JSTL

2004-06-24 Thread klute
Hello All,

I *really* appreciate your help.  Because of a
hard-pressing work deadline, i actually gave up on
getting that to work using JSTL and ended up using the
 ugly "/>
instead.

I'll definitely come back to JSTL at a later time
since i consider that to be a proper way of doing this
sort of things.

Robert, if ${contentId} is available as an attribute
(which it was) and not as a parameter, i would expect
it to produce null or something instead of literally
printing out ${contentId} string... 

Rick, i tried creating a var in the jsp and the result
would still be the same: the value of the hidden
property was printed out as {$myVar}. And, if i do
c:out in the begging of the jsp, i do get an actual
int value printed. weird... i definitely need to spend
more time doing my homework to understand how it
works...

All the best,
James

--- Rick Reumann <[EMAIL PROTECTED]> wrote:
> klute wrote:
> 
> > Yes, the struts-el.jar is in WEB-INF/lib
> > 
> > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > 
> >>klute wrote:
> >>
> >>
> >>> >>>value="${contentId}">
> >>>
> >>>This are the tagligs i am importing on this page:
> >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> >>>prefix="bean" %>
> >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> >>>prefix="html" %>
> >>><%@ taglib uri="/WEB-INF/struts-html-el.tld"
> >>>prefix="html-el" %>
> >>><%@ taglib uri="http://java.sun.com/jstl/core";
> >>>prefix="c" %>
> >>>
> >>>
> >>>What am i doing wrong?
> 
> Not sure. If you have
> - struts-el jar included
> - proper definition of the tld in web.xml
> - proper declaration for the tld on top of the page
> 
> then using it as:
>  value="${contentId}"/>
> should be fine.
> 
> The only thing I'm still concerned about and maybe
> somehow it's related 
> is that contentId has to be a property of your
> ActionForm or else Struts 
> would complain that it couldn't find the property
> 'contentId' Are you 
> maybe creating the "contentId" var dynamically first
> in the JSP page and 
> then trying to set as above? "Usually" you don't
> need to do like you are 
> doing (setting the value) since that value can be
> set before you get to 
> the page and thus just doing  property="contentId" would be 
> fine.
> 
> What does  produce on
> the page (or in 
> source) when placed right before the html-el hidden
> tag?
> 
> -- 
> Rick
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



RE: Setting html:hidden property using JSTL

2004-06-23 Thread Robert Taylor
I believe the reason it's not populated in the 
action form is because its in the request as an attribute
and not a parameter.


I just started experimenting with jstl and i'd like to
set a hidden field on MyActionForm using a value 
(contentId) available as an attribute on the request.


robert

> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 23, 2004 3:23 PM
> To: Struts Users Mailing List
> Subject: Re: Setting html:hidden property using JSTL
> 
> 
> klute wrote:
> 
> > Yes, the struts-el.jar is in WEB-INF/lib
> > 
> > --- Rick Reumann <[EMAIL PROTECTED]> wrote:
> > 
> >>klute wrote:
> >>
> >>
> >>> >>>value="${contentId}">
> >>>
> >>>This are the tagligs i am importing on this page:
> >>><%@ taglib uri="/WEB-INF/struts-bean.tld"
> >>>prefix="bean" %>
> >>><%@ taglib uri="/WEB-INF/struts-html.tld"
> >>>prefix="html" %>
> >>><%@ taglib uri="/WEB-INF/struts-html-el.tld"
> >>>prefix="html-el" %>
> >>><%@ taglib uri="http://java.sun.com/jstl/core";
> >>>prefix="c" %>
> >>>
> >>>
> >>>What am i doing wrong?
> 
> Not sure. If you have
> - struts-el jar included
> - proper definition of the tld in web.xml
> - proper declaration for the tld on top of the page
> 
> then using it as:
> 
> should be fine.
> 
> The only thing I'm still concerned about and maybe somehow it's related 
> is that contentId has to be a property of your ActionForm or else Struts 
> would complain that it couldn't find the property 'contentId' Are you 
> maybe creating the "contentId" var dynamically first in the JSP page and 
> then trying to set as above? "Usually" you don't need to do like you are 
> doing (setting the value) since that value can be set before you get to 
> the page and thus just doing  fine.
> 
> What does  produce on the page (or in 
> source) when placed right before the html-el hidden tag?
> 
> -- 
> Rick
> 
> -
> 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: Setting html:hidden property using JSTL

2004-06-23 Thread Rick Reumann
klute wrote:
Yes, the struts-el.jar is in WEB-INF/lib
--- Rick Reumann <[EMAIL PROTECTED]> wrote:
klute wrote:


This are the tagligs i am importing on this page:
<%@ taglib uri="/WEB-INF/struts-bean.tld"
prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld"
prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld"
prefix="html-el" %>
<%@ taglib uri="http://java.sun.com/jstl/core";
prefix="c" %>
What am i doing wrong?
Not sure. If you have
- struts-el jar included
- proper definition of the tld in web.xml
- proper declaration for the tld on top of the page
then using it as:

should be fine.
The only thing I'm still concerned about and maybe somehow it's related 
is that contentId has to be a property of your ActionForm or else Struts 
would complain that it couldn't find the property 'contentId' Are you 
maybe creating the "contentId" var dynamically first in the JSP page and 
then trying to set as above? "Usually" you don't need to do like you are 
doing (setting the value) since that value can be set before you get to 
the page and thus just doing 

What does  produce on the page (or in 
source) when placed right before the html-el hidden tag?

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


Re: Setting html:hidden property using JSTL

2004-06-23 Thread klute
Yes, the struts-el.jar is in WEB-INF/lib

--- Rick Reumann <[EMAIL PROTECTED]> wrote:
> klute wrote:
> 
> >  > value="${contentId}">
> > 
> > This are the tagligs i am importing on this page:
> > <%@ taglib uri="/WEB-INF/struts-bean.tld"
> > prefix="bean" %>
> > <%@ taglib uri="/WEB-INF/struts-html.tld"
> > prefix="html" %>
> > <%@ taglib uri="/WEB-INF/struts-html-el.tld"
> > prefix="html-el" %>
> > <%@ taglib uri="http://java.sun.com/jstl/core";
> > prefix="c" %>
> > 
> > 
> > What am i doing wrong?
> 
> 
> Are you sure you added the struts-el jar to your
> webapp lib?
> 
> -- 
> Rick
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: Setting html:hidden property using JSTL

2004-06-23 Thread Rick Reumann
klute wrote:

This are the tagligs i am importing on this page:
<%@ taglib uri="/WEB-INF/struts-bean.tld"
prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld"
prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld"
prefix="html-el" %>
<%@ taglib uri="http://java.sun.com/jstl/core";
prefix="c" %>
What am i doing wrong?

Are you sure you added the struts-el jar to your webapp lib?
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Setting html:hidden property using JSTL

2004-06-23 Thread Slattery, Tim - BLS
> I just started experimenting with jstl and i'd like to
> set a hidden field on MyActionForm using a value  
> (contentId) available as an attribute on the request. 
> Basically, i'd like to do something like this:
> 
> "/>
>  
> Which does not work.

No, it won't. You're trying to nest tags, and that will not work. Use the el
version of the Struts tags instead:




--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Setting html:hidden property using JSTL

2004-06-23 Thread klute
Thanks a lot to all who responded!

So i tried using html-el using the syntax Rick
suggested:



The resulting html contains:



This are the tagligs i am importing on this page:
<%@ taglib uri="/WEB-INF/struts-bean.tld"
prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld"
prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld"
prefix="html-el" %>
<%@ taglib uri="http://java.sun.com/jstl/core";
prefix="c" %>


What am i doing wrong?

Thanks a lot,
James


--- Rick Reumann <[EMAIL PROTECTED]> wrote:
> klute wrote:
> 
> > Hi All,
> > 
> > I just started experimenting with jstl and i'd
> like to
> > set a hidden field on MyActionForm using a value  
> > (contentId) available as an attribute on the
> request.
> > Basically, i'd like to do something like this:
> > 
> > "/>
> >  
> > Which does not work. Should i be using EL syntax
> > instead? And what would the correct syntax be?
> 
> Use the html-el tag instead of the html tag. Then
> you can do:
> 
>  value="${contentId}"/>
> 
> Much cleaner.
> 
> Although remember it might even be easier/cleaner to
> simply make sure 
> contentId is in your ActionForm .. then you can just
> do...
> 
>  and it'll set
> the value for you.
> 
> -- 
> Rick
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: Setting html:hidden property using JSTL

2004-06-23 Thread Rick Reumann
klute wrote:
Hi All,
I just started experimenting with jstl and i'd like to
set a hidden field on MyActionForm using a value  
(contentId) available as an attribute on the request.
Basically, i'd like to do something like this:

"/>
 
Which does not work. Should i be using EL syntax
instead? And what would the correct syntax be?
Use the html-el tag instead of the html tag. Then you can do:

Much cleaner.
Although remember it might even be easier/cleaner to simply make sure 
contentId is in your ActionForm .. then you can just do...

 and it'll set the value for you.
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Setting html:hidden property using JSTL

2004-06-23 Thread Christopher . Marsh-Bourdon
James

Do you include the HTML tag library within the jsp page?  It needs to go 
at the top and look like this:

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

Cheers

Christopher Marsh-Bourdon
Pyplia Limited





klute <[EMAIL PROTECTED]>
23/06/2004 18:25
Please respond to "Struts Users Mailing List"

 
To: Struts Users Mailing List <[EMAIL PROTECTED]>
cc: 
Subject:Setting html:hidden property using JSTL


Hi All,

I just started experimenting with jstl and i'd like to
set a hidden field on MyActionForm using a value 
(contentId) available as an attribute on the request.
Basically, i'd like to do something like this:

"/>
 
Which does not work. Should i be using EL syntax
instead? And what would the correct syntax be?

I did check that  returns
a valid value so my confusion is just passing it as a
value to the html:hidden property.

Any help is greatly appreciated.
James


 
__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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






-
The information in this e-mail is confidential. It is intended solely for the 
addressee. If you are not the intended recipient please notify the sender immediately 
and delete this message. Any review, dissemination, distribution, copying or other use 
of this communication or the information in it is strictly prohibited.


Re: Setting html:hidden property using JSTL

2004-06-23 Thread Christopher . Marsh-Bourdon
I've also noticed you are doubling up on double quotes, try this:



or



Cheers

Christopher Marsh-Bourdon
Pyplia Limited





klute <[EMAIL PROTECTED]>
23/06/2004 18:25
Please respond to "Struts Users Mailing List"

 
To: Struts Users Mailing List <[EMAIL PROTECTED]>
cc: 
Subject:Setting html:hidden property using JSTL


Hi All,

I just started experimenting with jstl and i'd like to
set a hidden field on MyActionForm using a value 
(contentId) available as an attribute on the request.
Basically, i'd like to do something like this:

"/>
 
Which does not work. Should i be using EL syntax
instead? And what would the correct syntax be?

I did check that  returns
a valid value so my confusion is just passing it as a
value to the html:hidden property.

Any help is greatly appreciated.
James


 
__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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






-
The information in this e-mail is confidential. It is intended solely for the 
addressee. If you are not the intended recipient please notify the sender immediately 
and delete this message. Any review, dissemination, distribution, copying or other use 
of this communication or the information in it is strictly prohibited.