COMPSUPP
asked on
bean not found within scope on tomcat
Hello,
My web app works fine on my localhost and when deployed as a war file to Oracle Application Server. We are now trying to switch from OAS to Tomcat 5.5.
I am seeing the error 'javax.servlet.ServletExce ption: bean BTListGridSpeciesKeySitesB ean not found within scope'.
I am putting the bean in the session in a servlet and then using the <jsp:useBean/> tag as below. Why can't it get the bean out of the session again ?
As this works on my localhost and OAS I am wondering if tomcat does not like the way the war file is packaged. The tomcat log says:
INFO: Deploying web application archive birdtrack.war
11-Feb-2009 11:27:17 org.apache.catalina.loader .WebappCla ssLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\birdtrack\WEB- INF\lib\ge ronimo-spe c-j2ee-1.4 -rc4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.clas s
Has my problem got something to do with this error, or is it completely unrelated ?
thanks
My web app works fine on my localhost and when deployed as a war file to Oracle Application Server. We are now trying to switch from OAS to Tomcat 5.5.
I am seeing the error 'javax.servlet.ServletExce
I am putting the bean in the session in a servlet and then using the <jsp:useBean/> tag as below. Why can't it get the bean out of the session again ?
As this works on my localhost and OAS I am wondering if tomcat does not like the way the war file is packaged. The tomcat log says:
INFO: Deploying web application archive birdtrack.war
11-Feb-2009 11:27:17 org.apache.catalina.loader
INFO: validateJarFile(C:\Program
Has my problem got something to do with this error, or is it completely unrelated ?
thanks
<!--servlet code putting the bean into the session-->
protected void processListGridSpeciesKeySitesForm(HttpServletRequest request,
HttpServletResponse response,
BTSessionBean session) throws
ServletException, BTException,
SQLException, IOException
{
String op = (String)this.extractString(request, Constants.FORM_OP,
null, false);
Hashtable fieldTable = this.extractFieldsForKeySites(request, response);
BTListGridSpeciesKeySitesBean listBean = new BTListGridSpeciesKeySitesBean(session, fieldTable);
session.getServletSession().setAttribute("BTListGridSpeciesKeySitesBean", listBean);
}
<!-- JSP code -->
<jsp:useBean id="BTSession" scope="session" type="Bto.BT.BTSessionBean"/>
<jsp:useBean id="BTListGridSpeciesKeySitesBean" scope="session" type="Bto.BT.DataBeans.BTListGridSpeciesKeySitesBean"/>
<!-- I then use the bean as below-->
String bufferSize = BTListGridSpeciesKeySitesBean.getBufferSize();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.