• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

HTML:OPTIONS

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>


<head><title>PRODUCTS AVAILABLE FOR THE SHOPING</title></head>
<body>

<html:errors/>

<logic resent name="PRODUCTFORM" property="results"/>

<hr width="100%" size="1">

<bean:size id="size" name="PRODUCTFORM" property="results"/>
<logic:equal name="size" value="0">
<center><font color="red"><b>No Employees Found</b></font></center>
</logic:equal>



<table>
<logic:iterate id="mapID" name="PRODUCTFORM" property="results" >
<tr>
<td>
<html:radio property="results" value='<bean:write name="mapID" property="PRODUCTID"/>' />
<bean:write name="mapID" property="PRODUCTDESCRIPTION"/>
</td>
<tr>
</logic:iterate>
</table>


</logic resent>

<logic:greaterThan name="size" value="0"/>
<table border="1">
<tr>
<th>PRODUCTID</th>
<th>PRODUCTDESCRIPTION</th>
<th>PRICE</th>
<th>QOH</th>
<th>ROL</th>
<th>UNITS</th>
</tr>



</table>
</logic:greaterThan>
</body>
</html>




I got this error?

[Servlet Error]-[Cannot find bean under name org.apache.struts.taglib.html.BEAN]: javax.servlet.jsp.JspException: Cannot find bean under name org.apache.struts.taglib.html.BEAN


Please provde me with the answer[EMAIL][/EMAIL]
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In order to use any of the html:input fields, you need to nest them in an html:form tag.

So put an html:form tag around your code, and see if it works.

Cheers,
evnafets
 
Stefan Evans
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Taking a closer look, there are other things wrong with this code.
1 - you can't have custom tags as attributes to other custom tags - so the bean:write for the value attribute will create an error
2 - The property for your iterate tag is results. So is the property for your html:radio. What do you want "results" to be? A List or a specific item in the list?
I think you need two attributes here - one being the list, another representing the item you select.

 
I like tacos! And this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic