This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes java bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "java bean" Watch "java bean" New topic
Author

java bean

sojan chandy
Greenhorn

Joined: Mar 18, 2007
Posts: 24
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

Joined: Jan 10, 2002
Posts: 61307
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9394
    
    2

Sojan,

If you are using only type attribute, the bean should already exist. Try adding class attribute to it and compile.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
 
GeeCON Prague 2014
 
subject: java bean