• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1403
  • Last Modified:

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.ServletException: bean BTListGridSpeciesKeySitesBean 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.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\birdtrack\WEB-INF\lib\geronimo-spec-j2ee-1.4-rc4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

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();

Open in new window

0
COMPSUPP
Asked:
COMPSUPP
1 Solution
 
objectsCommented:
its unrelated to that error
you just have a jar in your lib directory that does not need to be there

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now