Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in loading index.jsp page

 
Ahmed Shaikh
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am using Struts and hibernate in my application.
Problem is that it is unable to load a index.jsp page .In this page I am calling Project bean .

here is my index.jsp:--

<%@ taglib uri="WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="WEB-INF/pms-db.tld" prefix="db" %>

<db:useBeans id="projects" type="domain.Project" order="name asc"/>
<bean:size id="projectCount" name="projects"/>

<logic:equal name="projectCount" value="0" >
<logic:redirect page="/do/security/login"/>
</logic:equal>

<logic:greaterThan name="projectCount" value="0" >
<logic:redirect page="/do/view/projects"/>
</logic:greaterThan>
__________________________________________________
Here is the exception :----

exception

javax.servlet.ServletException: Cannot find bean projects in any scope
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.index_jsp._jspService(index_jsp.java:120)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
db.hibernate.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:65)


root cause

javax.servlet.jsp.JspException: Cannot find bean projects in any scope
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
org.apache.struts.taglib.bean.SizeTag.doStartTag(SizeTag.java:192)
org.apache.jsp.index_jsp._jspService(index_jsp.java:99)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
db.hibernate.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:65)
_________________________
Please try to solve this problem ,just tell me wht me the reason of this Exception.

Thanx in Advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic