You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sudhir S. Shetty" <ss...@powershare.net> on 2001/12/24 11:40:25 UTC

HOW DO YOU ADD DYNAMIC CONTENT VIA SCRIPTLETS IN HTML TAGS

Hi Evrybody,
                   Id like to know how to add dynamic content retrieved via
JSP scriplets to the HTMl tags
I'll give you an example
<html:text property="companyName" value="<%=rs.getString(1);%>
When I give this tag nothing is displayed.
Can you suggest me the syntax.
Thanks in advance
regards,
Sudhir


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: HOW DO YOU ADD DYNAMIC CONTENT VIA SCRIPTLETS IN HTML TAGS

Posted by Jin Bal <ji...@hotmail.com>.
<html:text property="companyName" value="<%=rs.getString(1);%>

try removing the semi-colon from the scriptlet (;) as you are using the <%=
construct.
regards
Jin
----- Original Message -----
From: "Sudhir S. Shetty" <ss...@powershare.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, December 24, 2001 10:40 AM
Subject: HOW DO YOU ADD DYNAMIC CONTENT VIA SCRIPTLETS IN HTML TAGS


> Hi Evrybody,
>                    Id like to know how to add dynamic content retrieved
via
> JSP scriplets to the HTMl tags
> I'll give you an example
> <html:text property="companyName" value="<%=rs.getString(1);%>
> When I give this tag nothing is displayed.
> Can you suggest me the syntax.
> Thanks in advance
> regards,
> Sudhir
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: HOW DO YOU ADD DYNAMIC CONTENT VIA SCRIPTLETS IN HTML TAGS

Posted by Prateek Paliwal <pr...@yahoo.com>.
If the resultSet (rs) is unavailable in the request or the
session scope it will display nothing. Also, struts cheks the
form-bean def from your config file to find out which ActionForm
to use (for the current action-mapping) and picks this out of
request / session scope (if available) to populate the form that
is being displayed in your JSP. 

Wrap the data that you wish to display from the result set into
action form to do this. Read the users guide
(http://jakarta.apache.org/struts/userGuide/index.html) on how
to do this. 

-- Prateek


--- "Sudhir S. Shetty" <ss...@powershare.net> wrote:
> Hi Evrybody,
>                    Id like to know how to add dynamic content
> retrieved via
> JSP scriplets to the HTMl tags
> I'll give you an example
> <html:text property="companyName" value="<%=rs.getString(1);%>
> When I give this tag nothing is displayed.
> Can you suggest me the syntax.
> Thanks in advance
> regards,
> Sudhir
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>