Javabeans problem with Tomcat

Hi!
I�m using Tomcat 5.5 with jdk5.0. I�m trying to start using beans but can�t get my jsp-pages to read the beans. I have compiled the bean and keep the .class file in
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\Beans\test.class
I keep the .jsp file in
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\kise\test.jsp
It seems like the bean is not found. I�m thinking that I might need to set some paths but I don�t know which ones or how to set them.
When trying to open the .jsp file that refers to the bean I get an internal server error message:
org.apache.jasper.JasperException: /kise/test.jsp(8,6) The value for the useBean class attribute Beans.test is invalid.
     org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
     org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
     org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
     org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
     org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
     org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
     org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
     org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
     org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
     org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
     org.apache.jasper.compiler.Generator.generate(Generator.java:3268)
     org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Does anyone know what might be wrong? I would be very grateful for some help, I have been working on solving this for a day now.... /Malin

Ok, here is the code for the bean:
package Beans;
import java.io.*;
import java.beans.*;
public class test implements java.io.Serializable {
     public String name;
     public String getName() {
          return name;
     public void setName(String value) {
          name=value;
and here is the jsp-code:
<HTML>
<HEAD><TITLE>Test</TITLE>
<BODY>
<%@ page language="java" %>
<%@ page import="Beans.test" %>
<jsp:useBean id="malin" scope="session" class="Beans.test" />
<jsp.setProperty name="malin" property="name" value="korv" />
<jsp:getProperty name="malin" property="name" />
</BODY>
</HTML>
Thanks for helping. /Malin

Similar Messages

  • Problems with Tomcat & Eclipse on MacOSX

    Hi everybody. I have a problem with Tomcat and Eclipse. I must make an application with JSF for my dissertation and i even become a new Mac user so i have some problems. I have installed Eclipse 3,3 Europe on Mac OSX 10,4, also I have installed Tomcat 5,5 setting up environment variable and users of Tomcat. Well, when I try to connect them creating a new server in Eclipse and select Tomcat as server and relative folder of origin, the problems begin. When I try to run on server a JSF project(naturally I have imported all the necessary libraries) it give this error to me: Could not load the Tomcat incomplete serveur configuration at /Servers/Tomcat v5.5 serveur at localhost-config.The configurator mau be corrupt or. Reason: Could not load the Tomcat incomplete serveur configuration at /Servers/Tomcat v5.5 serveur at localhost-config.The configurator mau be corrupt or incomplete. On what it can depend? It is possible that is a JRE problem? I do not find the folder jre on my file system(are novice with the mac). Thanks to all.

    This seems like a question that would be better put to an Eclipse forum.

  • JavaBeans Problems with JSP

    I am having some serious problems with getting a JSP to access a JavaBean that I have created. I am using Tomcat and Java 1.4 by the way.
    I have set my classpath and all other code continues to work apart from the accessing of the JavaBean. I have created a JavaBean which is as follows:
    public class UserData {
    String username;
    String email;
    int age;
    public void setUsername( String value )
    username = value;
    public void setEmail( String value )
    email = value;
    public void setAge( int value )
    age = value;
    public String getUsername() { return username; }
    public String getEmail() { return email; }
    public int getAge() { return age; }
    The class compiles no problem and I have placed it in the WEB-INF/Classes directory. However when I use the JSP to call it:
    <jsp:useBean id="user" class="UserData" scope="session"/>
    <jsp:setProperty name="user" property="*"/>
    <HTML>
    <BODY>
    Continue
    </BODY>
    </HTML>
    I get the following error:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    An error occurred at line: 1 in the jsp file: /saveName.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\saveName$jsp.java:56: Class org.apache.jsp.UserData not found.
    UserData user = null;
    ^
    An error occurred at line: 1 in the jsp file: /saveName.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\saveName$jsp.java:59: Class org.apache.jsp.UserData not found.
    user= (UserData)
    ^
    An error occurred at line: 1 in the jsp file: /saveName.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\saveName$jsp.java:64: Class org.apache.jsp.UserData not found.
    user = (UserData) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "UserData");
    ^
    3 errors, 1 warning
    I cannot work out as to why it is doing this. Any help at all would be really appreciated.
    Regards
    Ian

    Hi...
    Can you try making these changes...
    public class UserData {
    String username="";
    String email="";
    int age=0;
    public void setUsername( String value )
    this.username = value;
    public void setEmail( String value )
    this.email = value;
    public void setAge( int value )
    this.age = value;
    Regds
    Vasi

  • Datasource Configuration problem with Tomcat-4.0.3

    Hi All !
    When I trying to open connection to my DB2 database in tomcat -4.0.3,
    I have put db2java.jar in /usr/local/jakartha-tomcat-4.03/common/lib directory
    when I am trying to connect Database through my servlet getting expections
    java.lang.NullPointerException: at DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    here is my dbconnection class
    package com.ebizon.util.jdbc;
    import java.sql.*;
    import java.util.*;
    import javax.naming.*;
    import javax.sql.*;
    public class DBUtil {
    /* Ebizon DB Connection for Tomcat */
    public static Connection getEbizDBConnection() throws NamingException, SQLException {
    Connection conn = null;
    try {
    InitialContext initCtx = new InitialContext();
    Context envContext = (Context)initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    conn = ds.getConnection();
    } catch (NamingException ne) {
    throw ne;
    } catch (SQLException se) {
    throw se;
    return conn;
    And my resource definition in server.xml (/usr/local/jakartha-tomcat-4.0.3/conf/server.xml)
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_DBTest_log." suffix=".txt"
    timestamp="true"/>
    <Resource name="jdbc/SmsDBDS"
    auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/SmsDBDS">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>100</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>30</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>10000</value>
    </parameter>
    <!-- DB2 dB username and password for dB connections -->
    <parameter>
    <name>username</name>
    <value>smsdb</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>smsdb</value>
    </parameter>
    <!-- Class name for mm.mysql JDBC driver -->
    <parameter>
    <name>driverClassName</name>
    <value>COM.ibm.db2.jdbc.app.DB2Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:db2:smsdb</value>
    </parameter>
    </ResourceParams>
    </Context>
    this is my Web Application descriptor /WEB-INF/web.xml
    <resource-ref>
    <description>
    Resource reference to a factory for java.sql.Connection
    instances that may be used for talking to a particular
    database that is configured in the server.xml file.
    </description>
    <res-ref-name>
    jdbc/EmployeDB
    </res-ref-name>
    <res-type>
    javax.sql.DataSource
    </res-type>
    <res-auth>
    Container
    </res-auth>
    </resource-ref>
    Please look at once above , Do i missing any thing?
    Anyhelp is greatly appreciate
    Many thanks in advance
    With Regards
    Madhu Reddy

    I don't see any problem with your files, so unfortunately I can't help. Since this forum is about the J2EE SDK, people may not have that much experience with standalone Tomcat. You may want to try the Tomcat user mailing list for a question about Tomcat: http://jakarta.apache.org/site/mail2.html

  • Problem with Tomcat 6

    Hi guys,
    I am with a very strange problem with my job here.
    We had a server working with Tomcat 5 and it didn't have problem, but wanted to changed to Tomcat 6.
    So.. we changed and it ran normal and well.
    The problem is when we stress the server with one or more big queries, execptions is showed that didn't show with Tomcat 5:
    java.lang.Exception: [Microsoft][SQLServer 2000 Driver for JDBC]Object has been closed
    Using SQL Server 2000
    java.lang.Exception: The connection is closed.
    Using SQL Server 2005
    java.lang.Exception: I/O Error: socket closed.
    Using SQL Server 2005 with jTDS driver
    It happens with Oracle too.
    Can anybody help me?
    Thanks!

    hi i'm having a similar problem launching a servlet in eclipse. I did the above changes and still nothing:
    instead i keep getting :
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class DataServlet or a class it depends on

  • Problems with tomcat 4.0.1

    hello,
    i�ve written some servlets using forte 3.0 with tomcat 3.2.
    everything works fine as long as I don�t run the servlets with tomcat 4.0.1.
    i use the request dispatcher / forward method - which dosn�t work reliable.
    it�s a list on which the user has to select one topic. the strange thing about it is that it works when you choose "back" after the error (dispatcher = null) has occured and select a different topic on that list - only the first choice makes en error.
    running on tomcat 3.2 with forte it works fine. but i get the following message in the tomcat output window:
    java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key dispatcher.forwardException
    and
    2002-01-13 11:40:05 - Ctx( /lg002234 ): Exception in: R( /lg002234 + /eingaben + null) - javax.servlet.ServletException: cannot find message associated with key : dispatcher.forwardException
    can somebody help?
    is use the dispatcher three times in that post-method - ist that a problem?

    ...sorry
    it�s not a problem with the requestdispatcher,
    problem is, that with tomcat 4.0.1 a parameter
    sometimes gets lost - but not with tomcat 3.2
    critical code is:
    String tierartAuswahl = request.getParameter("tierartAuswahl");
    is that a known bug of tomcat 4.0.1??

  • Problems with Tomcat 4.0 and jdk 1.3.1 (jsp:include) Help Gurus...

    Im running examples of the include:
    <jsp:include page="xxx.jsp" flush="true">
    and received error:
    org.apache.jasper.JasperException: No se puede compilar la clase para JSP
    An error occurred at line: 17 in the jsp file: /jsp/include/include.jsp
    Generated servlet error:
    /Programas/Tomcat4/work/localhost/examples/jsp/include/include$jsp.java:79: Method include(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, javax.servlet.jsp.JspWriter, boolean) not found in class org.apache.jasper.runtime.JspRuntimeLibrary.
    JspRuntimeLibrary.include(request, response, "/jsp/include/foo.html" + jspxqStr, out, true);
    ^
    Please Help me Im running this equal with:
    <%@ include file="xxx.jsp" %>
    and runnig fine....

    The two means of including files are different in their approach.
    Using <jsp:include .../> compilation of the included jsp is done at run -time not during compilation.
    Using <%@ include .../> compiles at compile time.
    Looking at the error it seems that the method JspRuntimeLibrary.include is not being found which suggests that you may have a classpath problem. Check that there is not a servlet.jar in the classpath that is from a earlier spec than the one provided with Tomcat.
    Dave

  • Problem with Tomcat server

    Hi,
    I'm just writing to inform you about a problem with the Oracle 9i database I found out.
    I have downloaded and installed the release 2 enterprise/standard/personal edition for Windows NT/2000/XP.
    After doing that I could not start my Tomcat server any more. Although I have tested the situation with many different releases of the Apache Tomcat server it did not work.
    Then I've deleted the Oracle database and just installed the client release. And now it works!
    I'd be grateful if one of you could tell me what's the problem and how I can solve it.
    Thanks for your help.
    Best regards,
    Steffi

    the localhost.log file shows
    02-Jun-2008 13:57:36 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    02-Jun-2008 13:57:36 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    02-Jun-2008 13:58:23 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextDestroyed()
    02-Jun-2008 13:58:23 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextDestroyed()
    and the catalina.log file shows..
    02-Jun-2008 13:58:24 org.apache.coyote.http11.Http11Protocol destroy
    INFO: Stopping Coyote HTTP/1.1 on http-8080
    i couldnot understand anything..how to rectify that..
    thanks in advance

  • Eclipse problem with Tomcat when running jsp

    when I start tomcat from CMD, it starts normally and display http://localhost:8080/ properly
    but when I start tomcat from Eclipse, it starts the server normally,
    but it can't display http://localhost:8080/ properly,
    I guess that the problem with the java classpath isn't defined correctly in Eclipse
    but but I've tried it before, and it doesn't work
    here the error msg from Eclipse console:
    [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on http-8080
    Starting service Tomcat-Standalone
    Apache Tomcat/4.1.31
    [INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
    [INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
    [INFO] PropertyMessageResources - -Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
    [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on http-8080
    [INFO] ChannelSocket - -JK2: ajp13 listening on /0.0.0.0:8009
    [INFO] JkMain - -Jk running ID=0 time=0/120 config=C:\jakarta-tomcat-4.1.31\conf\jk2.properties
    Error compiling file: C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\/index_jsp.java [javac] Compiling 1 source file
    [javac] Modern compiler not found - looking for classic compiler
    Info: Compile: javaFileName=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\/index_jsp.java
    classpath=C:/jakarta-tomcat-4.1.31/shared/classes/;C:/jakarta-tomcat-4.1.31/common/classes/;C:/jakarta-tomcat-4.1.31/common/endorsed/xercesImpl.jar;C:/jakarta-tomcat-4.1.31/common/endorsed/xmlParserAPIs.jar;C:/jakarta-tomcat-4.1.31/common/lib/activation.jar;C:/jakarta-tomcat-4.1.31/common/lib/ant-launcher.jar;C:/jakarta-tomcat-4.1.31/common/lib/ant.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-collections.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-dbcp-1.1.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-logging-api.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-pool-1.1.jar;C:/jakarta-tomcat-4.1.31/common/lib/jasper-compiler.jar;C:/jakarta-tomcat-4.1.31/common/lib/jasper-runtime.jar;C:/jakarta-tomcat-4.1.31/common/lib/jdbc2_0-stdext.jar;C:/jakarta-tomcat-4.1.31/common/lib/jndi.jar;C:/jakarta-tomcat-4.1.31/common/lib/jta.jar;C:/jakarta-tomcat-4.1.31/common/lib/mail.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-common.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-factory.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-resources.jar;C:/jakarta-tomcat-4.1.31/common/lib/servlet.jar
    cp=C:\jakarta-tomcat-4.1.31\shared\classes
    cp=C:\jakarta-tomcat-4.1.31\common\classes
    cp=C:\jakarta-tomcat-4.1.31\common\endorsed\xercesImpl.jar
    cp=C:\jakarta-tomcat-4.1.31\common\endorsed\xmlParserAPIs.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\activation.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\ant-launcher.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\ant.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-collections.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-dbcp-1.1.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-logging-api.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-pool-1.1.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jasper-compiler.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jasper-runtime.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jdbc2_0-stdext.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jndi.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jta.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\mail.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-common.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-factory.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-resources.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\servlet.jar
    work dir=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_
    srcDir=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_
    include=index_jsp.java
    Exception compiling Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
    Exception:
    Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
         at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:72)
         at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:479)
    Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
         at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:72)
         at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:479)
    Here are my system settings :
    Eclipse 2.1.3
    plugin : tomcatPluginV21, lomboz.213
    Jakarta-tomcat-4.1.31
    JAVA_HOME      : C:\jdk1.3.1_15
    CATALINA_HOME : C:\jakarta-tomcat-4.1.31
    Here are my Eclipse settings :
    http://server2.uploadit.org/files/marvelousgame-01.JPG
    http://server3.uploadit.org/files/marvelousgame-02.JPG
    http://server2.uploadit.org/files/marvelousgame-03.JPG
    http://server3.uploadit.org/files/marvelousgame-04.JPG
    http://server2.uploadit.org/files/marvelousgame-05.JPG
    http://server3.uploadit.org/files/marvelousgame-06.JPG
    thx!!!

    I would suggest updating your software to the latest versions - java 1.4.2 or higher, tomcat 5 or higher, Eclipse 3. That should fix any incompatibilities you are experiencing.
    As to your problem, it seems the tomcat you are trying to run from Eclipse wants a newer Java version (1.4.2 most likely).

  • Problem with Tomcat 5.0

    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. This .java file has a "public static void main" method that calls al the other methods in the class.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?
    Thanks!!

    NerdVix wrote:
    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. Wrong. .java files do you no good in that directory. Only .class files belong there.
    This .java file has a "public static void main" method that calls al the other methods in the class.Fine - for testing on a command line.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?What part don't you understand? Writing JSPs? Calling methods? What is a person so ignorant doing with Tomcat anyway?
    It's possible to call main, but not a good idea.
    %

  • DB2 Configuration problem with Tomcat-4.0.3

    When I trying to open connection to my DB2 database in tomcat -4.0.3,
    I have put db2java.jar in /usr/local/jakartha-tomcat-4.03/common/lib directory
    when I am trying to connect Database through my servlet getting expections
    java.lang.NullPointerException: at DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    here is my dbconnection class
    package com.ebizon.util.jdbc;
    import java.sql.*;
    import java.util.*;
    import javax.naming.*;
    import javax.sql.*;
    public class DBUtil {
    /* Ebizon DB Connection for Tomcat */
    public static Connection getEbizDBConnection() throws NamingException, SQLException {
    Connection conn = null;
    try {
    InitialContext initCtx = new InitialContext();
    Context envContext = (Context)initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    conn = ds.getConnection();
    } catch (NamingException ne) {
    throw ne;
    } catch (SQLException se) {
    throw se;
    return conn;
    And my resource definition in server.xml (/usr/local/jakartha-tomcat-4.0.3/conf/server.xml)
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_DBTest_log." suffix=".txt"
    timestamp="true"/>
    <Resource name="jdbc/SmsDBDS"
    auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/SmsDBDS">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>100</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>30</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>10000</value>
    </parameter>
    <!-- DB2 dB username and password for dB connections -->
    <parameter>
    <name>username</name>
    <value>smsdb</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>smsdb</value>
    </parameter>
    <!-- Class name for mm.mysql JDBC driver -->
    <parameter>
    <name>driverClassName</name>
    <value>COM.ibm.db2.jdbc.app.DB2Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:db2:smsdb</value>
    </parameter>
    </ResourceParams>
    </Context>
    this is my Web Application descriptor /WEB-INF/web.xml
    <resource-ref>
    <description>
    Resource reference to a factory for java.sql.Connection
    instances that may be used for talking to a particular
    database that is configured in the server.xml file.
    </description>
    <res-ref-name>
    jdbc/EmployeDB
    </res-ref-name>
    <res-type>
    javax.sql.DataSource
    </res-type>
    <res-auth>
    Container
    </res-auth>
    </resource-ref>
    Please look at once above , Do i missing any thing?
    Anyhelp is greatly appreciate
    Many thanks in advance
    With Regards
    Madhu Reddy

    Hi,
    I have same problem. But unfortunately there does not exist a solution.
    You can read the explanation of this topic at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Non%20DBCP%20Solutions
    Non DBCP Solutions. I understand Tomcat supports only MySQL, PostgreSQL, and Oracle 8i but not DB2.
    DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    Up to now everything is fine, ds is not null, but inside ds (password, url, username...) all of them are null
    So when you execute conn = ds.getConnection(); there will be exception.
    If you find any solution please inform me.
    [email protected]

  • Problem with TOMCAT again !

    I�m trying to deploy to TOMCAT 5028. with .war that has no access to database no problem it works fine.
    but whem my .war has to access a database i got:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: javax.faces.FacesException: Can't instantiate class: 'test.Page1'.. class test.Page1 : javax.faces.FacesException: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
    root cause
    javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'test.Page1'.. class test.Page1 : javax.faces.FacesException: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
         com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:308)
         com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
         com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
         com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
         com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
         com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
         com.sun.jsfcl.app.ViewHandlerImpl.setupPageBean(ViewHandlerImpl.java:271)
         com.sun.jsfcl.app.ViewHandlerImpl.createView(ViewHandlerImpl.java:126)
         com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:164)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    I deploy the .war to application server and it works just fine.
    and i configure the tomcat with:
    JNDI Name: jdbc/test
    Data Source URL: jdbc:mysql://192.168.0.2:3306/test
    JDBC Driver Class: org.gjt.mm.mysql.
    User Name: root
    Password: admin
    Max. Active Connections: 20     
    Max. Idle Connections: 20
    Max. Wait for Connection: 5000
    the only thing different in application server is the the Jdbc Driver Class.
    And I am using Creator update 7 to generate the .war
    am i missing something ????
    Regards
    Marlos Rodrigues

    I found a simple way to deploy on Tomcat.
    *** Copy standard.jar, jstl.jar and mysql-connector-xxx.jar (if you are using mysql otherwise the drivers jar for the DB you are using).
    *** Edit the Tomcat conf/context.xml config file and add a WatchedResource :
    <WatchedResource>META-INF/context.xml</WatchedResource>
    *** Add your context.xml to META-INF of your war :
    <Context path="/DBTest" docBase="DBTest"
            debug="5" reloadable="true" crossContext="true">
      <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
                   maxActive="100" maxIdle="30" maxWait="10000"
                   username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
                   url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>
    </Context>This will create a config file in conf/Catalina/localhost with the context path name, so in this case DBTest.xml
    Hope that helps! That's how I got it working...

  • Migration problems with Tomcat 4.1.10. Please help.

    Product:           Java Web Application
    Operating system:     Redhat Linux 7.3
    Web Server:          Apache 1.3.x
    Application server:     Tomcat 4.1.10
    Database server:     MySQL 3.23.x
    Java Architecture:     JSP (presentation) + Java Bean (Business logic)
    JDK version:          1.3.1_04
    Hi,
         When we tried to migrate our application from Tomcat 4.0.4 to Tomcat 4.1.10, we found that the relative path references like ../xyz/ab.jsp are not properly interpreted by Netscape and the url seen on the address bar is something like this (http://www.sww.com/../xyz/ab.jsp. Also dynamic jsp forwarding support seems to have changed. While forwarding, the dynamic parameters attached are automatically url encoded. We have tested our application on Tomcat 4.0.4, there were no such issues. Since we have used these sort of things in many places in our application it will be difficult for us to change in all those places. Can anybody tell us what we can do about it?
    thanks in advance,
    Srikanth. S.

    Hi,
    http://www.xyz.com/swiz/test.jsp:
    <%
    response.sendRedirect("../sebase/common_login.jsp");
    %>
    When I run http://www.xyz.com/swiz/test.jsp with the above code, the url is displayed http://www.xyz.com/swiz/../sebase/common_login.jsp in Netscape address bar when the application is run on tomcat 4.1.10. With Internet explorer and opera, it reads http://www.xyz.com/sebase/common_login.jsp. But on Tomcat 4.0.4, there is no problem even with Netscape. Since we are tracking the urls in many places in our application, we are having problem because of the above said type of url interpretation.
    thanks in advance,
    Srikanth. S.

  • J2SE 1.4 Logger configuration problems with Tomcat 4.0

    I'm using Tomcat 4.0 as a servlet container and I'm trying out the new J2SE 1.4 logging API.
    Its working fine with the standard settings, which sets the level to INFO on the console handler.
    I would like to set the level to FINER to show some debugging info, but can't seem to get it going.
    I have tried setting the default level in my %JAVA_HOME%\jre\lib\logging.properties file, but it doesn't want to display log records of level FINER.
    I have also change the console handler to FINER by setting java.util.logging.ConsoleHandler.level = FINER
    I have also specified the config file parameter to point to a config file explicitly using the -Djava.util.logging.config.file=%CATALINA_HOME%\conf\logging.properties parameter in the catalina.bat script.
    Anyone got this working?
    --Kim

    Solved it. Isn't that always the way, you get frustrated enough to post a message, then you solve it 5 minutes later.
    It was a simple problem of the higher level overriding the lower levels.
    --Kim

  • Problem with tomcat 5 clustering

    Hi all,
    I am having one problem while performing tomcat clustering..
    its showing one exception while starting the tomcat... i would be grateful if somebody help me out....
    Feb 13, 2006 9:44:41 AM org.apache.catalina.cluster.tcp.SimpleTcpCluster start
    INFO: Cluster is about to start
    Feb 13, 2006 9:44:41 AM org.apache.catalina.cluster.tcp.SimpleTcpCluster start
    INFO: Sleeping for 2000 secs to establish cluster membership
    Feb 13, 2006 9:44:41 AM org.apache.catalina.cluster.tcp.SimpleTcpCluster start
    SEVERE: Unable to start cluster.
    java.lang.NullPointerException
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
    sLoader.java:804)
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
    sLoader.java:756)
    at org.apache.catalina.cluster.MembershipFactory.getMembershipService(Me
    mbershipFactory.java:93)
    at org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpClust
    er.java:517)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1115)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518
    at org.apache.catalina.core.StandardService.start(StandardService.java:5
    19)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:234
    5)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
    Feb 13, 2006 9:44:41 AM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    Feb 13, 2006 9:44:41 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:D:\tomcat50\conf\Catalina\l
    ocalhost\admin.xml
    Feb 13, 2006 9:44:42 AM org.apache.struts.util.PropertyMessageResources <init>
    thanks and regards

    java.lang.NoSuchMethodError: org.apache.naming.resources.ProxyDirContext.lookupCache(Ljava/lang/String;)Lorg/apache/naming/resources/CacheEntry;     org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:663)
    Looks to me like you're running with a mix-n-match version of classes. The serveResource method is expecting that you have the correct version of the org.apache.naming.resources.ProxyDirContext class which has that lookupCache method with that signature, but it is not there. I don't know how to tell you to fix your installation, but it is goofed up.

Maybe you are looking for

  • Have Creative Cloud - Cannot get off the trial versions of InDesign and Photoshop

    Windows 8 64-bit operating system, x64-bit based processor Downloaded and installed trial version of InDesign CS6 (three days left on trial) Purchased Creative Cloud two days ago Downloaded and installed Photoshop CS6 (loads as a trial version) When

  • Firefox isn't restoring last session, holding on to old closed windows...

    I have my Firefox browser set to restore my previous session. However, when the browser crashes or my computer is turned off and then back on, it will only restore a single blank browser window. I know a fix around this, though - go to History and Re

  • EWA for non-productive Systems

    Hi all, is there a possibility to get Early Watch Alerts for Systems in a Solution, which are not marked as productive. I don't want to create many solutions. The same problem i have with the monitoring, I only see the productive in the monitoring ov

  • Object variable

    I am new to java. If I have a class Adder with two properties num1 & num2 so I do Adder A=new Adder(); A.setnum1(5); A.setnum2(3); Object obj=new Object(); obj=A; my question is how can I get the value of num1 and num2 from variable obj thanks in adv

  • Seeking a lightweight reclining stand(iMac vesa mount models)

    Hi, I purchased a 21.5 iMac with the Vesa mount adapter assuming it would not be that hard to find a suitable reclining/retractable stand instead of a wall mount that can easily allow the user to obviously adjust these iMacs into a 90' 60' 30' viewin