You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Austin Lowry <au...@fedex.com> on 2002/08/15 17:05:41 UTC
radio button with scriptlet does not render
I thought I had solved my problem with radio buttons and scriptlets, but
apparently not quite.
What is happening now is that if I include a scriptlet to populate the
value attribute of a radio tag, the scriptlet is run and prints the
proper data, but the radio button itself is not rendered and appears in
the html the same way it is in the jsp, but with the proper value statement.
JSP code:
<logic:iterate id="cer" name="cers" type="com.fedex.ess.site.entity.CER">
<html:radio property="shipper" value="<%= cer.getCerNbr() %>" />
CER: <bean:write name="cer" property="cerNbr"/>
</logic:iterate>
Everything is right in the resulting HTML, except that instead of an
HTML radio tag, I get this:
<html:radio property="shipper" value="3345043516" />
If I do not include the scriptlet and just set the value attribute to
somthing random like value="1", the radio button renders as expected.
Any ideas? Thanks in advance for your help.
~Austin Lowry
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Missing message for key index.createCategoryLink
Posted by Softwareentwicklung Hauschel <So...@Hauschel.de>.
Hey all,
i have an action class where i link to a entry of my resource File in the
same package. that works.
But the tag
<html:link page="/index.do"><bean:message
key="index.createCategoryLink"/></html:link>
creates the following error. Where are the right place for the
resourse.properties of a jsp ??
thanks Fredy
javax.servlet.ServletException: Missing message for key
index.createCategoryLink
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:471)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:128)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: radio button with scriptlet does not render
Posted by Austin Lowry <au...@fedex.com>.
Yeah, that's what is so strange. The directive is there, and I know it
is working because when I don't use the scriptlet in the code, the radio
button is rendered properly.
I'm not sure in which order the scriptlet code and the tag code is
rendered, but it's like the tag does not get rendered because it does
not like the scriptlet code, the scriptlet gets executed and the proper
string is inserted, then the HTML gets set to the browser. I've seen
several other examples around the web where this should work though.
~Austin Lowry
Cliff Rowley wrote:
>>Everything is right in the resulting HTML, except that instead of an
>>HTML radio tag, I get this:
>><html:radio property="shipper" value="3345043516" />
>>
>>
>
>Probably a daft question, but have you included the relevant directive
>in your JSP page to use the Struts HTML tag library? This is the only
>time I've seen the '<html:' appear in the generated HTML.
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: radio button with scriptlet does not render
Posted by Cliff Rowley <cl...@onsea.net>.
> Everything is right in the resulting HTML, except that instead of an
> HTML radio tag, I get this:
> <html:radio property="shipper" value="3345043516" />
Probably a daft question, but have you included the relevant directive
in your JSP page to use the Struts HTML tag library? This is the only
time I've seen the '<html:' appear in the generated HTML.
--
Regards
-------------------------------------------
Cliff Rowley | cliff@onsea.net
Software Engineer | www.doctype.co.uk
+44 (0) 1206 514263 | www.cliffrowley.com
-------------------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: radio button with scriptlet does not render
Posted by Cliff Rowley <cl...@onsea.net>.
On Thu, 2002-08-15 at 21:31, Austin Lowry wrote:
> Thanks to BEA support I finally found the answer. The tech guy said that
> tags and scriptlets seem to have a problem with double quotes. He said
> that he has seen the problem in more containers than Weblogic
Heh, he would say that .. I don't suppose he mentioned any others that
have that problem (never seen it myself).
> The
> answer is to use single quotes before and after the scriptlet, while
> using double quotes inside the scriptlet. So, where I used:
> <bean:write name="cer" property="<%= "cerNbr" %>" />
> I now use:
> <bean:write name="cer" property='<%= "cerNbr" %>' />
>
> This doesn't seem quite right since I don't think double quotes are
> valid XML syntax, but this works and gets me going.
Hmm, you're right - I dont think "''" is correct syntax (although "''"
is). But like you said - it gets you going (an argument I have quite
often with zealots!).
>
> Thanks for everyone's help
Nooooooo problem :)
> ~Austin Lowry
--
Regards
-------------------------------------------
Cliff Rowley | cliff@onsea.net
Software Engineer | www.doctype.co.uk
+44 (0) 1206 514263 | www.cliffrowley.com
-------------------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: radio button with scriptlet does not render
Posted by Austin Lowry <au...@fedex.com>.
Thanks to BEA support I finally found the answer. The tech guy said that
tags and scriptlets seem to have a problem with double quotes. He said
that he has seen the problem in more containers than Weblogic. The
answer is to use single quotes before and after the scriptlet, while
using double quotes inside the scriptlet. So, where I used:
<bean:write name="cer" property="<%= "cerNbr" %>" />
I now use:
<bean:write name="cer" property='<%= "cerNbr" %>' />
This doesn't seem quite right since I don't think double quotes are
valid XML syntax, but this works and gets me going.
Thanks for everyone's help
~Austin Lowry
Cliff Rowley wrote:
>Very odd, what application server are you using? And what version?
>Perhaps it may be an idea to crawl through the bug list (if available)
>for your server and see what comes up.
>
>On Thu, 2002-08-15 at 18:05, Austin Lowry wrote:
>
>
>>I apparently get the same problem any time I try to use a scriptlet
>>inside of a custom tag. The custom tag gets sent as HTML with the proper
>>data inserted from my scriptlet. So if I did somthing like:
>>
>><td>
>> CER Number: <bean:write name="cer" property="<%= "cerNbr" %>" />
>></td>
>>
>>the HTML would look like:
>><td>
>> CER Number: <bean:write name="cer" property="cerNbr" />
>></td>
>>
>>Any ideas how to get the scriptlet code to evaluate before the tag code??
>>
>>Thanks.
>>
>>Austin Lowry wrote:
>>
>>
>>
>>>I thought I had solved my problem with radio buttons and scriptlets,
>>>but apparently not quite.
>>>
>>>What is happening now is that if I include a scriptlet to populate the
>>>value attribute of a radio tag, the scriptlet is run and prints the
>>>proper data, but the radio button itself is not rendered and appears
>>>in the html the same way it is in the jsp, but with the proper value
>>>statement.
>>>
>>>JSP code:
>>><logic:iterate id="cer" name="cers" type="com.fedex.ess.site.entity.CER">
>>><html:radio property="shipper" value="<%= cer.getCerNbr() %>" />
>>>CER: <bean:write name="cer" property="cerNbr"/>
>>></logic:iterate>
>>>
>>>Everything is right in the resulting HTML, except that instead of an
>>>HTML radio tag, I get this:
>>><html:radio property="shipper" value="3345043516" />
>>>
>>>If I do not include the scriptlet and just set the value attribute to
>>>somthing random like value="1", the radio button renders as expected.
>>>
>>>Any ideas? Thanks in advance for your help.
>>>
>>>~Austin Lowry
>>>
>>>
>>>
>>>--
>>>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>
>>
>>
>>
>>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: radio button with scriptlet does not render
Posted by Cliff Rowley <cl...@onsea.net>.
Very odd, what application server are you using? And what version?
Perhaps it may be an idea to crawl through the bug list (if available)
for your server and see what comes up.
On Thu, 2002-08-15 at 18:05, Austin Lowry wrote:
> I apparently get the same problem any time I try to use a scriptlet
> inside of a custom tag. The custom tag gets sent as HTML with the proper
> data inserted from my scriptlet. So if I did somthing like:
>
> <td>
> CER Number: <bean:write name="cer" property="<%= "cerNbr" %>" />
> </td>
>
> the HTML would look like:
> <td>
> CER Number: <bean:write name="cer" property="cerNbr" />
> </td>
>
> Any ideas how to get the scriptlet code to evaluate before the tag code??
>
> Thanks.
>
> Austin Lowry wrote:
>
> > I thought I had solved my problem with radio buttons and scriptlets,
> > but apparently not quite.
> >
> > What is happening now is that if I include a scriptlet to populate the
> > value attribute of a radio tag, the scriptlet is run and prints the
> > proper data, but the radio button itself is not rendered and appears
> > in the html the same way it is in the jsp, but with the proper value
> > statement.
> >
> > JSP code:
> > <logic:iterate id="cer" name="cers" type="com.fedex.ess.site.entity.CER">
> > <html:radio property="shipper" value="<%= cer.getCerNbr() %>" />
> > CER: <bean:write name="cer" property="cerNbr"/>
> > </logic:iterate>
> >
> > Everything is right in the resulting HTML, except that instead of an
> > HTML radio tag, I get this:
> > <html:radio property="shipper" value="3345043516" />
> >
> > If I do not include the scriptlet and just set the value attribute to
> > somthing random like value="1", the radio button renders as expected.
> >
> > Any ideas? Thanks in advance for your help.
> >
> > ~Austin Lowry
> >
> >
> >
> > --
> > 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>
>
>
--
Regards
-------------------------------------------
Cliff Rowley | cliff@onsea.net
Software Engineer | www.doctype.co.uk
+44 (0) 1206 514263 | www.cliffrowley.com
-------------------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: radio button with scriptlet does not render
Posted by Austin Lowry <au...@fedex.com>.
I apparently get the same problem any time I try to use a scriptlet
inside of a custom tag. The custom tag gets sent as HTML with the proper
data inserted from my scriptlet. So if I did somthing like:
<td>
CER Number: <bean:write name="cer" property="<%= "cerNbr" %>" />
</td>
the HTML would look like:
<td>
CER Number: <bean:write name="cer" property="cerNbr" />
</td>
Any ideas how to get the scriptlet code to evaluate before the tag code??
Thanks.
Austin Lowry wrote:
> I thought I had solved my problem with radio buttons and scriptlets,
> but apparently not quite.
>
> What is happening now is that if I include a scriptlet to populate the
> value attribute of a radio tag, the scriptlet is run and prints the
> proper data, but the radio button itself is not rendered and appears
> in the html the same way it is in the jsp, but with the proper value
> statement.
>
> JSP code:
> <logic:iterate id="cer" name="cers" type="com.fedex.ess.site.entity.CER">
> <html:radio property="shipper" value="<%= cer.getCerNbr() %>" />
> CER: <bean:write name="cer" property="cerNbr"/>
> </logic:iterate>
>
> Everything is right in the resulting HTML, except that instead of an
> HTML radio tag, I get this:
> <html:radio property="shipper" value="3345043516" />
>
> If I do not include the scriptlet and just set the value attribute to
> somthing random like value="1", the radio button renders as expected.
>
> Any ideas? Thanks in advance for your help.
>
> ~Austin Lowry
>
>
>
> --
> 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>