- This topic has 3 replies, 3 voices, and was last updated 19 years, 11 months ago by Riyad Kalla.
-
AuthorPosts
-
esweargMemberHi!
Iam new to struts,iam learing struts using myeclips.i was going through the Hibernate demo recording and made a BasicDB project.
so far everything is fine.when i run the project iam getting a message like <vipdatas no bean found>.can any one plz tell me how do i can sort it out.
where do i can set <vipdatas>.
–>in AddUserData.jsp[AddVipData.jsp].
code is:[%@ page language="java"%] [%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %] [%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %] [%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %] [%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %] [%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %] [%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %] [%@ page import="com.planters.hibernate.UsersService"%] [%@ page import="java.util.List"%] [html:html locale="true"] [head] [html:base /] [title]Users Example[/title] [meta http-equiv="pragma" content="no-cache"] [meta http-equiv="cache-control" content="no-cache"] [meta http-equiv="expires" content="0"] [meta http-equiv="keywords" content="keyword1,keyword2,keyword3"] [meta http-equiv="description" content="This is my page"] [/head] [body] [h3]Users Example[/h3] [html:errors/] [% // This code will Generate a list of objects from the // database and place a reference to this list in the // request object List usersList= UsersService.getInstance().getUsersList(); request.setAttribute("vipdatas",usersList); %] [p]List of Users In Users table of database User Info .[/p] [table border="1"] [logic:iterate id="element" name="vipdatas" scope="request" type="com.planters.hibernate.Users"] [tr] [td][bean:write name="element" property="UName"/][/td] [td][bean:write name="element" property="PWord"/][/td] [td][bean:write name="element" property="Permitions"/][/td] [/tr] [/logic:iterate] [/table] [p]Submit to Add a User:[/p] [!-- This form will post the submitted data to the AddUsersData action Mapping --] [html:form action="AddUsersData.do" method="post"] [table border="1"] [tr][td]User Name:[/td][td][html:text property="UName" /][/td] [td]Password:[/td][td][html:text property="PWrod" /][/td][/tr] [td]Permitions:[/td][td][html:text property="Permitions" /][/td][/tr] [/table][br/] [html:submit/] [/html:form] [/body] [/html:html]
Error Message..
javax.servlet.ServletException: Cannot find bean vipdatas in scope request
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:673)
org.apache.jsp.AddUserData_jsp._jspService(AddUserData_jsp.java:205)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)root cause
javax.servlet.jsp.JspException: Cannot find bean vipdatas in scope request
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
org.apache.jsp.AddUserData_jsp._jspService(AddUserData_jsp.java:142)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)note The full stack trace of the root cause is available in the Tomcat logs.
——————————————————————————–
Apache Tomcat/5.0.12
Riyad KallaMemberAnswered in another thread.
tarantulaParticipant
Riyad KallaMembertarantula,
What I meant is that I answered eswearg question in another thread but the problem was not uncovered as eswearg never posted back to my questions.You can start a new thread or add to this one if you are hvaing a similar problem, I would ask that you post all pertinant system and code snippet information though when you ask.
-
AuthorPosts