• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java bean

 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my page is:


<%@ page import="petshoppe.test.domain.Pet" %>
<%@ page import="java.util.*" %>

<bean:define id="pets" type="petshoppe.test.domain.Pet"/>

<dt:table defaultorder="ascending" name="<%=pets%>" id="obj" export="false" cellspacing="0" cellpadding="4" requestURI="" sort="list" defaultsort="1" pagesize="20">
<%final Pet pet = (Pet)obj;%>
<dt:column title="Pet" property="pettype" sortable="true" >cat</dt:column >
<dt:column title="Pet" sortable="true" >sojan</dt:column >
<dt:column title="Pet" sortable="true" >Buy</dt:column >
</dt:table>





org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 7 in the jsp file: /WEB-INF/jsp/petdetail.jsp
Generated servlet error:
pets cannot be resolved

An error occurred at line: 8 in the jsp file: /WEB-INF/jsp/petdetail.jsp
Generated servlet error:
obj cannot be resolved


org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:994)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:553)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:211)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those all look like Struts tags to me. Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
Joe Harry
Ranch Hand
Posts: 10080
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sojan,

If you are using only type attribute, the bean should already exist. Try adding class attribute to it and compile.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic