• Welcome to KonaKart Community Forum. Please login or sign up.
 

Issue Adding New Jsp

Started by Rajesh, August 05, 2010, 03:58:16 pm

Previous topic - Next topic

Rajesh

Dear All,


I'm new to Konakart and first of all I would like to appreciate the Konakart team for their wonderful work and very wonderful product they have developed.

Currently I'm running on the Konkart Enterprise Version. I'm developing a site in which, I need to add  new jsp in to the application.
I need to add an About Us page and I have configured the tiles-defs.xml and struts-config.xml and added the new jsp. But however it did not work for me. When the user navigates from Home Page(or any other page) to the About Us page, the page loads normally but the breadcrumbs does not load properly(shows only the Home Page link instead of Home > About Us). And if the user navigates directly( using the url http://localhost:8080/konakart/AboutUs.do) to the About Us page it throws the following exception.


HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "konakartKey" in any scope
   org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
   org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
   org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
   org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
   org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
   org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "konakartKey" in any scope
   org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
   org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
   org.apache.jsp.WEB_002dINF.jsp.MainLayout_jsp._jspService(MainLayout_jsp.java:267)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)


Any help from members will be highly appreciated. Thank You.




trevor

You should invoke a struts action that ensures that an instance of the engine exists before running the JSP. All of the struts actions that we provide do this automatically.

Alternatively don't define:

<bean:define id="kkEng" name="konakartKey" type="com.konakart.al.KKAppEng"/>   

in your JSP