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

javax.servlet.jsp.JspException: Cannot find bean: "konakartKey" in any scope

Started by Sony George, June 16, 2010, 06:11:29 pm

Previous topic - Next topic

Sony George

This error is not yet solved in Konakart 5.0

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)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:345)
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)


any one who hit this URL http://www.konakart.com/konakart/ForgotPassword.do
without a session id set by app server get this error
(remove all cookie, cache of your browser and hit this url)
it is becuase ForgotPassword.do do not have an Action Class, instead , tiles are used, so BaseAction.getKKAppEng() is never called, and so,
konakartKey is not set in session . it is a simple error which can be fixed by adding Action Class for ForgotPassword.do

i had already written in the forum, but i think it did not get noticed by konakart team

http://www.konakart.com/forum/index.php/topic,1172.msg5018.html#msg5018

Posting once again for getting noticed by KonaKart Team.
NB: Just before posting this message, i have created a couple of error by clicking the above url, please check the logs...
Regards

Sony George

julie

An easier fix is just to edit MainLayout.jsp.

Add this line to the top:

<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

wrap the rest in:

<logic:notEmpty name="konakartKey">
.....
</logic:notEmpty>

<%--
//
// (c) 2006 DS Data Systems UK Ltd, All rights reserved.
//
// DS Data Systems and KonaKart and their respective logos, are
// trademarks of DS Data Systems UK Ltd. All rights reserved.
//
// The information in this document is free software; you can redistribute
// it and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This software is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//

--%>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ page contentType="text/html; charset=UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<logic:notEmpty name="konakartKey">
<html>
<bean:define id="kkEng" name="konakartKey" type="com.konakart.al.KKAppEng"/>
<head>
<title id="target.title"><%=kkEng.getPageTitle()%></title>
<meta name="keywords" content="<%=kkEng.getMetaKeywords()%>" />
<meta name="description" content="<%=kkEng.getMetaDescription()%>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" rel="stylesheet" href="styles/skin_style.css" />
<!-- CSS Menu -->
<style type="text/css">@import url("styles/menuh.css");</style>
<!--[if lt IE 7]>
<style type="text/css" media="screen">
#menuh{float:none;}
body{behavior:url(styles/csshover.htc); font-size:100%;}
#menuh ul li{float:left; width: 100%;}
#menuh a{height:1%;font:bold 0.7em/1.4em arial, sans-serif;}
</style>
<![endif]-->
<!-- End CSS Menu  -->
</head>
<body>
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<tiles:insert attribute="header" />
</td>
</tr>
<tr>
<td>
<table cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td width="160" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td>
<tiles:insert attribute="leftTile1" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="leftTile2" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="leftTile3" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="leftTile4" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="leftTile5" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="leftTile6" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="leftTile7" />
</td>
</tr>
</table>
</td>
<td  valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td>
<tiles:insert attribute="body" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="body1" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="body2" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="body3" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="body4" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="body5" />
</td>
</tr>
</table>
</td>
<td width="160" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td>
<tiles:insert attribute="rightTile1" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="rightTile2" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="rightTile3" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="rightTile4" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="rightTile5" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="rightTile6" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="rightTile7" />
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="rightTile8" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<tiles:insert attribute="footer" />
</td>
</tr>
</table>

<%=kkEng.getAnalyticsCode()%>
</body>
</html>
</logic:notEmpty>



Sony George

but your solution will give a blank page only
adding action class will give the forgot password page


Quote from: julie on June 17, 2010, 10:05:55 am
An easier fix is just to edit MainLayout.jsp.

Add this line to the top:

<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

wrap the rest in:

<logic:notEmpty name="konakartKey">
.....
</logic:notEmpty>


julie

I don't think that a crawler really minds what page we give it  :)