aspose file tools*
The moose likes Struts and the fly likes problem in loading index.jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in loading index.jsp page" Watch "problem in loading index.jsp page" New topic
Author

problem in loading index.jsp page

Ahmed Shaikh
Ranch Hand

Joined: Jul 25, 2005
Posts: 51
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in loading index.jsp page
 
Similar Threads
Problems in JSF running with MyEclipse
JSF not working in Jboss
problem in Struts Internationalization:Error 500:Cannot find message resources
Not able to forward to welcome page
problem in retriving the data from ArrayList using Struts bean:write tag