Running JSP on TOMCAT 7.0.50 cannot Oracle 12c on Windows 8.1 returns ORA-12505

I have installed and configured and using JSP, Tomcat 7.0.50 , Oracle 12c running Windows 8.1
Oracle driver - ojdbc7.jar
I am running a basic JSP test which is failing with
Basic Test SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
This is weird because I can connect using sqlplus
SQL> conn dreamhome/dreamhome@pdborcl
Connected.
I can also connect using system to ORCL (as system). Howver PDBORCL is still  failing through TOMCAT
JSP Connection call
<%@ page import="java.sql.*" %>
Basic Test
<%
    Connection conn = null;
    try
        Class.forName("oracle.jdbc.driver.OracleDriver");
        conn = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:pdborcl", "dreamhome", "dreamhome");
        Statement stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery("SELECT * FROM dreamhome_users");
        //Print start of table and column headers out.println("");
        out.println("");
        out.println(" "); //Loop through results of query.
        while(rs.next())
            out.println("");
            out.println("LOGIN_ID USERNAME            PASSWORD" + rs.getString("LOGIN_ID") + "    " + rs.getString("USERNAME") + "    " + rs.getString("PASSWORD") + "");           
TNSPING
..\product\12.1.0\dbhome_1\NETWORK\ADMIN>tnsping pdborcl
TNS Ping Utility for 64-bit Windows: Version 12.1.0.1.0 - Production on 16-JAN-2
014 05:41:15
Copyright (c) 1997, 2013, Oracle.  All rights reserved.
Used parameter files:
..\product\12.1.0\dbhome_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdborcl)))
OK (10 msec)
..\product\12.1.0\dbhome_1\NETWORK\ADMIN>
TNSNAMES.ORA (extract)
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
PDBORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdborcl)
Database queries
SQL> select PDB from v$services;
PDB
PDBORCL
CDB$ROOT
CDB$ROOT
CDB$ROOT
CDB$ROOT
SQLPLUS example
SQL> conn dreamhome/dreamhome@pdborcl
Connected.
A working example
<%
    Connection conn = null;
    try
        Class.forName("oracle.jdbc.driver.OracleDriver");
        conn = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:orcl", "system", "password");
        Statement stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery("SELECT * FROM dreamhome_users");
        //Print start of table and column headers out.println("");
        out.println("");
        out.println(" "); //Loop through results of query.
        while(rs.next())
Basic Test SQLException: ORA-00942: table or view does not exist
Failing example
<%
    Connection conn = null;
    try
        Class.forName("oracle.jdbc.driver.OracleDriver");
        conn = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:pdborcl", "system", "password");
        Statement stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery("SELECT * FROM dreamhome_users");
        //Print start of table and column headers out.println("");
        out.println("");
        out.println(" "); //Loop through results of query.
        while(rs.next())
            out.println("");
            out.println("LOGIN_ID USERNAME            PASSWORD" + rs.getString("LOGIN_ID") + "    " + rs.getString("USERNAME") + "    " + rs.getString("PASSWORD") + "");           
Basic Test SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
TOMCAT config files
server.xml extract
<Resource name="jdbc/Oracle12C"
auth="Container"
type="oracle.jdbc.pool.OracleDataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
url="jdbc:oracle:thin:@localhost:1521:pdborcl"
user="dreamhome"
password="dreamhome"
maxActive="20"
maxIdle="10"
maxWait="-1" />
Any suggestions?

I have installed and configured and using JSP, Tomcat 7.0.50 , Oracle 12c running Windows 8.1
Oracle driver - ojdbc7.jar
I am running a basic JSP test which is failing with
Basic Test SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
This is weird because I can connect using sqlplus
SQL> conn dreamhome/dreamhome@pdborcl
Connected.
I can also connect using system to ORCL (as system). Howver PDBORCL is still  failing through TOMCAT
JSP Connection call
<%@ page import="java.sql.*" %>
Basic Test
<%
    Connection conn = null;
    try
        Class.forName("oracle.jdbc.driver.OracleDriver");
        conn = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:pdborcl", "dreamhome", "dreamhome");
        Statement stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery("SELECT * FROM dreamhome_users");
        //Print start of table and column headers out.println("");
        out.println("");
        out.println(" "); //Loop through results of query.
        while(rs.next())
            out.println("");
            out.println("LOGIN_ID USERNAME            PASSWORD" + rs.getString("LOGIN_ID") + "    " + rs.getString("USERNAME") + "    " + rs.getString("PASSWORD") + "");           
TNSPING
..\product\12.1.0\dbhome_1\NETWORK\ADMIN>tnsping pdborcl
TNS Ping Utility for 64-bit Windows: Version 12.1.0.1.0 - Production on 16-JAN-2
014 05:41:15
Copyright (c) 1997, 2013, Oracle.  All rights reserved.
Used parameter files:
..\product\12.1.0\dbhome_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdborcl)))
OK (10 msec)
..\product\12.1.0\dbhome_1\NETWORK\ADMIN>
TNSNAMES.ORA (extract)
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
PDBORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdborcl)
Database queries
SQL> select PDB from v$services;
PDB
PDBORCL
CDB$ROOT
CDB$ROOT
CDB$ROOT
CDB$ROOT
SQLPLUS example
SQL> conn dreamhome/dreamhome@pdborcl
Connected.
A working example
<%
    Connection conn = null;
    try
        Class.forName("oracle.jdbc.driver.OracleDriver");
        conn = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:orcl", "system", "password");
        Statement stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery("SELECT * FROM dreamhome_users");
        //Print start of table and column headers out.println("");
        out.println("");
        out.println(" "); //Loop through results of query.
        while(rs.next())
Basic Test SQLException: ORA-00942: table or view does not exist
Failing example
<%
    Connection conn = null;
    try
        Class.forName("oracle.jdbc.driver.OracleDriver");
        conn = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:pdborcl", "system", "password");
        Statement stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery("SELECT * FROM dreamhome_users");
        //Print start of table and column headers out.println("");
        out.println("");
        out.println(" "); //Loop through results of query.
        while(rs.next())
            out.println("");
            out.println("LOGIN_ID USERNAME            PASSWORD" + rs.getString("LOGIN_ID") + "    " + rs.getString("USERNAME") + "    " + rs.getString("PASSWORD") + "");           
Basic Test SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
TOMCAT config files
server.xml extract
<Resource name="jdbc/Oracle12C"
auth="Container"
type="oracle.jdbc.pool.OracleDataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
url="jdbc:oracle:thin:@localhost:1521:pdborcl"
user="dreamhome"
password="dreamhome"
maxActive="20"
maxIdle="10"
maxWait="-1" />
Any suggestions?

Similar Messages

  • How to run jsp in tomcat server

    hi this is satish1529,
    i am new to jsp technology,i have written small jsp file and html file,i don't know where to place jsp and html files in tomcat server and where i have to do setting in the server and how to run jsp file. pls give me step by step describing how to run jsp in tomcat server.
    i am showing u files
    this is jsp file
    <html>
    <body>
    <center> data recieved from client <center>
    <%
    String s= request.getParameter("t1");
    String a= request.getParameter("t2");
    %>
    username :<%=s%><br>
    address :<%=a%>
    </body>
    </html>
    this is html file
    <html>
    <body>
    <form action="http://localhost:8080/form.jsp">
    enter name <input type="text" name="t1"> <br>
    enter address <textarea name="t2"> </textarea> <br>
    <input type="submit" vaule="login">
    </form>
    </body>
    </html>

    Thanx a lot for ur promt reply.
    we r succful in running simple jsp in tomcat6.0.
    bt one more problem occured as following when we r trying to run jsp file in tomcat.
    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: /main1.jsp(1,1) The value for the useBean class attribute webCounter is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1200)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1155)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3374)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:210)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.

  • How to Run JSP in Tomcat Server 3.3.2

    Hi all,
    i have just installed tomcat server 3.3.2 in my system which as windows xp home edition as a operating system and no problem i can able to start the tomcat server.But the problem is that i dont no how to run jsp in tomcat i listed some of my problems below..
    How to put my jsp file in the virtual directory(default and also i want to create ) then tell me how use IE to run the JSP file.
    Thanks in advance..
    With Regards
    Vijay

    Hi all,
    i have just installed tomcat server 4.1 in my
    system which as windows NT 4.0 home edition as a
    operating system and no problem i can able to start
    the tomcat server.But the problem is that i dont no
    how to run jsp in tomcat i listed some of my problems
    below..
    How to put my jsp file in the virtual
    directory(default and also i want to create ) then
    tell me how use IE to run the JSP file.
    Thanks in advance..
    With Regards
    Baliram

  • Unable to run jsp in tomcat 5.0

    hi ,
    iam unable to run jsps in tomcat 5.0.
    i get an error saying ,unable to compile java compiler
    iam able to compile servlets & execute them.
    i have already set the paths for JAVA_HOME & CATALINA_HOME
    please guide me accordingly
    regards ,
    shailesh

    the same code gets executed in other system in which there is only one jdk.
    the system which iam using has got many jre s due to
    1) netbeans IDE
    2)Weblogic server
    3) jdk 1.4 was previously installed
    4) jdk 1.5 was also installed
    but i have set JAVA_HOME   =jdk1.6
    I doubt the compiler is trying to compile itself or another compiler
    regards ,
    shaileshkumar

  • How to run JSP in Tomcat

    Hi i am new to java web application, i am running JSP(edited in notepad) in tomcat
    <html>
    <head>
    <title>first jsp page</title>
    </head>
    <body>
    <%! String st = "shyam your JSP Code" %>
    Welcome ::<%= st %>
    </body>
    </html>
    i saved this jsp as first.jsp and D:\shyam\Apache Software Foundation\Tomcat 5.0\webapps\ROOT putting jsp in this folder.
    then started tomcat webserver
    then opeand browser giving URL: http://localhost:8080/first.jsp
    the error coming like--> HTTP status 500
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    root cause:
    unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK
    Error coming like this, plz tell how to rectify this, I want to set any thing in web.xml, tell where i did mistake.

    hi,
    your problem is you didn't set java home in your path..
    before running your application create a ".bat" file like,
    set JAVA_HOME="path where you installed jdk eg: c:\jdk1.5";

  • Running .jsp with TOMCAT 5.5.9

    I am new to Tomcat and Java, I was task to make this application run on Tomcat, it currently works fine on Webshpere.
    org.apache.jasper.JasperException: /header.jsp(90,0) The value for the useBean class attribute training.rules.TrainingSession 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.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2237)
         org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:597)
         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:3270)
         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:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    MY JAVA FILE:
    package training.rules;
    import training.Training; // Database utilities
    import java.io.*; // File utilities
    import java.sql.*; // More database utilities
    import java.util.*; // Data structure classes
    import java.util.Date;
    import tools.pages.AbstractPage;
    import tools.persistence.*; // Database utilities
    import tools.persistence.LibraryFactory; // Database library manager
    import tools.persistence.LibraryManager; // Application library manager
    import tools.rules.*; // Business rules utilities
    import tools.utilities.*; // Misc. utility classes
    import tools.utilities.Log; // Log file for application
    import tools.utilities.EmailException;
    import tools.utilities.EmailLookup;
    import tools.utilities.print.*; // Print utility classes
    * Provides the utilities necessary to create and maintain a
    Training DB user session.
    * @author Mary S. Powers ([email protected])
    * @version 1.000 2003.02.26 Initial
    public class TrainingSession extends Session {
    The list of valid agency codes.
    public static MultiValue agencyCodes = null;
    The code for a page not requiring a log-in at all.
    public static final String AGENCY_NONE = "4";
    The code for the agency of OTH.
    public static final String AGENCY_OTHER = "2";
    The code for the agency of PDG.
    public static final String AGENCY_PDG = "1";
    The code for the agency of Supervisor.
    public static final String AGENCY_SUPERVISOR = "3";
    List of archived Employees in the database.
    public static MultiValue archivedEmployees = null;
    The list of email addresses for the contacts for the application.
    public static MultiValue contactEmailAddresses = null;
    The list of contact names for the application.
    public static MultiValue contactNames = null;
    The list of valid course type IDs.
    public static MultiValue courseTypeIds = null;
    The list of valid course types.
    public static MultiValue courseTypeNames = null;
    The list of manager delegates.
    public static KeyedList delegates = null;
    List of Employees in the database.
    public static MultiValue employees = null;
    The list of options on the course evaluation form.
    public static MultiValue evaluationCodes = null;
    The list of IDs for the options on the course evaluation form.
    public static MultiValue evaluationCodeIds = null;
    The list of job title IDs.
    public static MultiValue jobTitleIds = null;
    The list of valid job titles.
    public static MultiValue jobTitleNames = null;
    The list of course location IDs.
    public static MultiValue locationIds = null;
    The list of valid course location names.
    public static MultiValue locationNames = null;
    The list of valid training proficiency codes.
    public static MultiValue proficiencyCodes = null;
    The list of training proficiency IDs.
    public static MultiValue proficiencyIds = null;
    The list of course provider IDs.
    public static MultiValue providerIds = null;
    The list of valid course providers ordered by provider name.
    public static MultiValue providerNames = new MultiValue();
    The list of valid training request status codes.
    public static MultiValue requestStatusCodes = new MultiValue();
    The list of keys for the training request status codes.
    public static MultiValue requestStatusCodeIds = new MultiValue();
    The list of abbreviations for the states.
    public static MultiValue stateAbbrs = null;
    The list of IDs for the state codes.
    public static MultiValue stateIds = null;
    The list of valid states.
    public static MultiValue stateNames = null;
    The list of course subject area IDs.
    public static MultiValue subjectAreaIds = null;
    The list of course subject areas.
    public static MultiValue subjectAreaNames = null;
    The list of training level codes.
    public static MultiValue trainingLevelCodes = null;
    The list of training level IDs.
    public static MultiValue trainingLevelIds = null;
    The list of valid training method codes.
    public static MultiValue trainingMethodCodes = null;
    The list of training method IDs.
    public static MultiValue trainingMethodIds = null;
    Create a connection to the specified database as the specified user
    with the specified password.
    * @exception IOException if JDBC cannot connect.
    public TrainingSession() throws IOException {
    super(SessionManager.getApplication("TrainingDB"));
    init("TrainingDB");
    setLockedTables(new MultiValue());
    logFile = Training.getLog();
    } /* end of constructor */
    This method retrieves the access level given the command the
    user is attempting to execute.
    * @param command the command the user wishes to execute
    * @return the access level
    public String getAccess(String command) {
    String access = "";
    if (command == null)
    return(access);
    try {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validAccessLevels = ((KeyedList )validityTables.get("Access"));
    if (!validAccessLevels.isValid()) {
    getValidAccessLevels();
    validityTables = SessionManager.get(getApplication()).getValidityTables();
    validAccessLevels = ((KeyedList )validityTables.get("Access"));
    } // end of if
    Enumeration keys = validAccessLevels.keys();
    while (keys.hasMoreElements()) {
    String oneKey = ((String )keys.nextElement());
    if (oneKey.trim().equalsIgnoreCase(command.trim()))
    return(((String )((MultiValue )validAccessLevels.get(oneKey)).elementAt(0)));
    } // end of while loop
    catch (Exception e) {}
    return(access);
    } // end of method 'getAccess'
    This method returns the agency the current user is logged in
    under. OTH is the default.
    * @return the agency the current user is logged in under
    public String getAgency() {
    return(this.getAgencyCode(agencyKey));
    } // end of method 'getAgency'
    This method retrieves the agency, given the agency key.
    * @param agencyId the agency key
    * @return the name of the agency
    public String getAgencyCode(String agencyId) {
    String agency = "";
    if (agencyId == null)
    return(agency);
    try {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
    if (!validAgencies.isValid()) {
    getValidAgencies();
    validityTables = SessionManager.get(getApplication()).getValidityTables();
    validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
    } // end of if
    Enumeration keys = validAgencies.keys();
    while (keys.hasMoreElements()) {
    String oneKey = ((String )keys.nextElement());
    if (oneKey.trim().equals(agencyId))
    return(((String )((MultiValue )validAgencies.get(oneKey)).elementAt(0)));
    } // end of while loop
    catch (Exception e) {}
    return(agency);
    } // end of method 'getAgencyCode'
    This method retrieves the list of valid agency codes.
    * @return the list of valid agency codes
    public MultiValue getAgencyCodes() {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
    if (!validAgencies.isValid()) {
    try {
    getValidAgencies();
    catch (IOException e) {} // We did the best we could to repopulate the cache.
    } // end of if
    return(agencyCodes);
    } // end of method 'getAgencyCodes'
    This method retrieves the agency key, given the name of the
    agency.
    * @param agency the name of the agency code
    * @return the agency key
    public String getAgencyId(String agency) {
    String agencyId = "";
    if (agency == null)
    return(agencyId);
    try {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
    if (!validAgencies.isValid()) {
    getValidAgencies();
    validityTables = SessionManager.get(getApplication()).getValidityTables();
    validAgencies = ((KeyedList )validityTables.get("Valid_Agency"));
    } // end of if statement
    Enumeration keys = validAgencies.keys();
    while (keys.hasMoreElements()) {
    String oneKey = ((String )keys.nextElement());
    MultiValue agencies = ((MultiValue )validAgencies.get(oneKey));
    for (int i=0; i<agencies.size(); i++) {
    String oneAgency = ((String )agencies.elementAt(i));
    if (agency.trim().equalsIgnoreCase(oneAgency.trim()))
    return(oneKey);
    } // end of for loop
    } // end of while loop
    catch (Exception e) {}
    return(agencyId);
    } // end of method 'getLocationId'
    This method retrieves the list of archived employees.
    * @return reference to the list of archived employees
    public MultiValue getArchivedEmployees() {
    return(archivedEmployees);
    } // end of method 'getArchivedEmployees'
    This method retrieves the list of email addresses for the contacts
    for the application.
    * @return the list of email addresses
    public MultiValue getContactEmailAddresses() {
    return(contactEmailAddresses);
    } // end of method 'getContactEmailAddresses'
    This method retrieves the list of contact names for the
    application.
    * @return the list of contact names
    public MultiValue getContactNames() {
    return(contactNames);
    } // end of method 'getContactNames'
    This method retrieves the reference to a Course object, given the
    key for the course.
    * @param courseId the key for the course
    * @return reference to the Course object
    public ICourse getCourse(String courseId) {
    ICourse theCourse = null;
    if (courseId == null)
    return(theCourse);
    try {
    ICourse courseTemplate = this.getNewCourseInstance();
    ((Course )courseTemplate).getKey().setValue(courseId.trim());
    IIterator results = this.query(courseTemplate);
    theCourse = ((ICourse )results.next());
    catch (Exception e) {}
    return(theCourse);
    } // end of method 'getCourse'
    This method retrieves the reference to a CourseInstance object, given the
    key for the course.
    * @param courseId the key for the course instance
    * @return reference to the CourseInstance object
    public ICourseInstance getCourseInstance(String courseId) {
    ICourseInstance theCourseInstance = null;
    if (courseId == null)
    return(theCourseInstance);
    try {
    ICourseInstance courseInstanceTemplate = this.getNewClassInstance();
    ((CourseInstance )courseInstanceTemplate).getKey().setValue(courseId.trim());
    IIterator results = this.query(courseInstanceTemplate);
    theCourseInstance = ((ICourseInstance )results.next());
    catch (Exception e) {}
    return(theCourseInstance);
    } // end of method 'getCourseInstance'
    This method retrieves the course type, given the course type key
    * @param courseTypeId the course type key
    * @return the name of the course type
    public String getCourseType(String courseTypeId) {
    String courseType = "";
    if (courseTypeId == null)
    return(courseType);
    try {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validCourseTypes = ((KeyedList )validityTables.get("Course_Types"));
    if (!validCourseTypes.isValid()) {
    getValidCourseTypes();
    validityTables = SessionManager.get(getApplication()).getValidityTables();
    validCourseTypes = ((KeyedList )validityTables.get("Course_Types"));
    } // end of if statement
    Enumeration keys = validCourseTypes.keys();
    while (keys.hasMoreElements()) {
    String oneKey = ((String )keys.nextElement());
    if (oneKey.trim().equalsIgnoreCase(courseTypeId))
    return(((String )((MultiValue )validCourseTypes.get(oneKey)).elementAt(0)));
    catch (Exception e) {}
    return(courseType);
    } // end of method 'getCourseType'
    This method retrieves the list of valid course type IDs.
    * @return the list of course type IDs
    public MultiValue getCourseTypeIds() {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validCourseTypes = ((KeyedList )validityTables.get("Course_Types"));
    if (!validCourseTypes.isValid()) {
    try {
    getValidCourseTypes();
    catch (IOException e) {} // We did the best we could to repopulate the cache.
    } // end of if
    return(courseTypeIds);
    } // end of method 'getCourseTypeIds'
    This method retrieves the list of valid course types.
    * @return the list of course type names
    public MultiValue getCourseTypes() {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validCourseTypes = ((KeyedList )validityTables.get("Course_Types"));
    if (!validCourseTypes.isValid()) {
    try {
    getValidCourseTypes();
    catch (IOException e) {} // We did the best we could to repopulate the cache.
    } // end of if
    return(courseTypeNames);
    } // end of method 'getCourseTypes'
    This method returns a list of IDs for the delegates (if any) of the
    person logged in, if he/she is a section manager.
    * @return the list of employee IDs of the delegates
    public MultiValue getDelegates() {
    MultiValue theDelegates = new MultiValue();
    if (this.isSectionManager()) {
    IEmployee employeeRecord = this.getEmployeeRecord();
    String employeeId = ((String )((AbstractDataObject )((Employee )employeeRecord).getKey()).get()).trim();
    KeyedList delegateTable = this.delegates;
    Enumeration keys = delegateTable.keys();
    while (keys.hasMoreElements()) {
    String oneKey = ((String )keys.nextElement()).trim();
    if (oneKey.equals(employeeId)) {
    theDelegates = ((MultiValue )delegateTable.get(oneKey));
    break;
    } // end of if statement
    } // end of while loop
    } // end of outer if statement
    return (theDelegates);
    } // end of method 'getDelegates'
    This method retrieves the name of the domain used to validate
    logins.
    * @return the name of the domain
    public String getDomain() {
    return(domain);
    } // end of method 'getDomain'
    This method retrieves the Employee record, given the employee ID.
    * @param employeeId the employee ID
    * @return the employee record;
    'null', if no such employee ID
    public IEmployee getEmployee(String employeeId) {
    IEmployee employee = null;
    for (int i=0; i<employees.size(); i++) {
    IEmployee oneEmployee = ((IEmployee )employees.elementAt(i));
    String oneEmployeeId = ((String )((AbstractDataObject )((Employee )oneEmployee).getKey()).get());
    if (oneEmployeeId.trim().equalsIgnoreCase(employeeId.trim())) {
    employee = oneEmployee;
    break;
    } // end of if
    } // end of for loop
    // If the employee is not found, then search the list of archived
    // employees.
    if (employee == null) {
    for (int i=0; i<archivedEmployees.size(); i++) {
    IEmployee oneEmployee = ((IEmployee )archivedEmployees.elementAt(i));
    String oneEmployeeId = ((String )((AbstractDataObject )((Employee )oneEmployee).getKey()).get());
    if (oneEmployeeId.trim().equalsIgnoreCase(employeeId.trim())) {
    employee = oneEmployee;
    break;
    } // end of if
    } // end of for loop
    } // end of outer if statement
    return(employee);
    } // end of method 'getEmployee'
    This method retrieves an employee name (last name, comma, first name),
    given the employee's user ID.
    * @param userId the employee's user ID
    * @return the employee's name;
    'null', if no such employee
    public String getEmployeeName(String userId) {
    String employeeName = null;
    for (int i=0; i<employees.size(); i++) {
    IEmployee oneEmployee = ((IEmployee )employees.elementAt(i));
    String oneUserId = ((String )((AbstractDataObject )((Employee )oneEmployee).getUserName()).get());
    String middleName = ((String )((AbstractDataObject )oneEmployee.getMiddleInitial()).get());
    if (middleName == null)
    middleName = "";
    if (oneUserId.trim().equalsIgnoreCase(userId.trim())) {
    employeeName = ((String )((AbstractDataObject )oneEmployee.getLastName()).get()) + ", " +
    ((String )((AbstractDataObject )oneEmployee.getFirstName()).get()) + " " +
    middleName;
    break;
    } // end of if
    } // end of for loop
    return(employeeName);
    } // end of method 'getEmployeeName'
    This method retrieves the employee record of the current user.
    * @return reference to the employee record;
    'null', if no employee record exists for the user
    public IEmployee getEmployeeRecord() {
    try {
    MultiValue theEmployees = getEmployees();
    for (int i=0; i<theEmployees.size(); i++) {
    IEmployee oneEmployee = ((IEmployee )theEmployees.elementAt(i));
    String userName = ((String )((AbstractDataObject )oneEmployee.getUserName()).get());
    if (userName.equalsIgnoreCase(getUserId())) {
    employeeRecord = oneEmployee;
    break;
    } // end of if
    } // end of for loop
    catch (IOException e) {}
    return(employeeRecord);
    } // end of method 'getEmployeeRecord'
    This method retrieves the list of Employees.
    * @exception IOException thrown if there was an occur attempting
    to retrieve the Employee list
    public synchronized MultiValue getEmployees() throws IOException {
    if (isNew) {
    IEmployee employeeTemplate = getNewEmployeeInstance();
    employeeTemplate.setEmployeeStatus("ACTIVE");
    employeeTemplate.getLastName().setOrder(0);
    employees = this.query(employeeTemplate).getAll();
    // Now, get the listing of archived employees.
    employeeTemplate.setEmployeeStatus("TERMINATED");
    archivedEmployees = this.query(employeeTemplate).getAll();
    isNew = false;
    } // end of if
    return(employees);
    } // end of method 'getEmployees'
    This method retrieves the evaluation option, given the evaluation option key.
    * @param evaluationCodeId the evaluation option key
    * @return the name of the course evaluation option
    public String getEvaluationCode(String evaluationCodeId) {
    String evaluationCode = "";
    if (evaluationCodeId == null)
    return(evaluationCode);
    try {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validEvaluationCodes = ((KeyedList )validityTables.get("Valid_Evaluation_Options"));
    if (!validEvaluationCodes.isValid()) {
    getValidEvaluationOptions();
    validityTables = SessionManager.get(getApplication()).getValidityTables();
    validEvaluationCodes = ((KeyedList )validityTables.get("Valid_Evaluation_Options"));
    } // end of if statement
    Enumeration keys = validEvaluationCodes.keys();
    while (keys.hasMoreElements()) {
    String oneKey = ((String )keys.nextElement());
    if (oneKey.trim().equalsIgnoreCase(evaluationCodeId))
    return(((String )((MultiValue )validEvaluationCodes.get(oneKey)).elementAt(0)));
    catch (Exception e) {}
    return(evaluationCode);
    } // end of method 'getEvaluationCode'
    This method retrieves the list of valid course evaluation option IDs.
    * @return the list of course evaluation form option IDs
    public MultiValue getEvaluationCodeIds() {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validEvaluationOptions = ((KeyedList )validityTables.get("Valid_Evaluation_Options"));
    if (!validEvaluationOptions.isValid()) {
    try {
    getValidEvaluationOptions();
    catch (IOException e) {} // We did the best we could to repopulate the cache.
    } // end of if
    return(evaluationCodeIds);
    } // end of method 'getEvaluationCodeIds'
    This method retrieves the list of valid course evaluation codes.
    * @return the list of course evaluation codes
    public MultiValue getEvaluationCodes() {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validEvaluationOptions = ((KeyedList )validityTables.get("Valid_Evaluation_Options"));
    if (!validEvaluationOptions.isValid()) {
    try {
    getValidEvaluationOptions();
    catch (IOException e) {} // We did the best we could to repopulate the cache.
    } // end of if
    return(evaluationCodes);
    } // end of method 'getEvaluationCodes'
    This method retrieves the highest access that the current user has.
    * @return the highest access that the current user has.
    public String getHighestAccess() {
    String highestAccess = AGENCY_OTHER;
    if (isPDG())
    highestAccess = AGENCY_PDG;
    else if (isSupervisor())
    highestAccess = AGENCY_SUPERVISOR;
    String highestAgency = "";
    highestAgency = this.getAgencyCode(highestAccess);
    setAgency(highestAgency);
    return(highestAgency);
    } // end of method 'getHighestAccess'
    This method returns the section manager highest up in the chain
    that the current user is a delegate for.
    * @return reference to the section manager highest up in the
    chain that the current user is a delegate for;
    'null', if the current user is a delegate for no one
    public IEmployee getHighestDelegate() {
    if (highestDelegate != null)
    return(highestDelegate);
    String employeeId = ((String )((AbstractDataObject )((Employee )this.employeeRecord).getKey()).get());
    try {
    String sql = "select Manager_Emp_Id from Delegates where Delegate_Emp_Id=" +
    employeeId;
    MultiValue results = this.textQuery(sql);
    String employeeDB = ((String )((Session )this).getApplication().getProperty("EMPLOYEE_DB")).trim();
    String highestDelegateId = "";
    int maxEmployeeList = -1;
    for (int i=0; i<results.size(); i++) {
    Vector oneRow = ((Vector )results.elementAt(i));
    String oneManagerId = oneRow.elementAt(0).toString();
    sql = "exec " + employeeDB + ".dbo.usp_chain_down " + oneManagerId;
    MultiValue queryResults = this.textQuery(sql);
    if (queryResults.size() > maxEmployeeList) {
    maxEmployeeList = queryResults.size();
    highestDelegateId = oneManagerId;
    } // end of if statement
    } // end of for loop
    highestDelegate = this.getEmployee(highestDelegateId);
    catch (Exception e) {}
    return(highestDelegate);
    } // end of method 'getHighestDelegate'
    This method retrieves the job title, given the job title key
    * @param jobTitleId the job title key
    * @return the name of the job title
    public String getJobTitle(String jobTitleId) {
    String jobTitle = "";
    if (jobTitleId == null)
    return(jobTitle);
    try {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedList validJobTitles = ((KeyedList )validityTables.get("Job_Table"));
    if (!validJobTitles.isValid()) {
    getValidJobTitles();
    validityTables = SessionManager.get(getApplication()).getValidityTables();
    validJobTitles = ((KeyedList )validityTables.get("Job_Table"));
    } // end of if statement
    Enumeration keys = validJobTitles.keys();
    while (keys.hasMoreElements()) {
    String oneKey = ((String )keys.nextElement());
    if (oneKey.trim().equalsIgnoreCase(jobTitleId))
    return(((String )((MultiValue )validJobTitles.get(oneKey)).elementAt(0)));
    catch (Exception e) {}
    return(jobTitle);
    } // end of method 'getJobTitle'
    This method retrieves the list of job title IDs.
    * @return the list of job title IDs
    public MultiValue getJobTitleIds() {
    Hashtable validityTables = SessionManager.get(getApplication()).getValidityTables();
    KeyedLis

    Thanks that help a bunch. I also the code was a bit much.
    I am currenty getting the error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. training.Training resolves to a package
    An error occurred at line: 112 in the jsp file: /header.jsp
    Generated servlet error:
    The method getLog() is undefined for the type Training
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         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:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Thanks,

  • Error 500 when I'm running JSP with tomcat on Linux

    I'm using Tomcat on linux and when I'm running any JSP file I got this Error:
    Error: 500
    Location: /examples/jsp/snp/snoop.jsp
    Internal Servlet Error:
    javax.servlet.ServletException: sun/tools/javac/Main
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:484)
    Root cause:
    java.lang.NoClassDefFoundError: sun/tools/javac/Main
    at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
    at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
    at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
    at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:484)
    What I'm doing wrong?
    thank you for help, Snir

    I've got the same problem but on a Win98 platform also in Solaris OS
    By copying the file JAVA_HOME/lib/tools.jar to the following path :
    JAVA_HOME/jre/lib/ext/
    another alternative is to set your classpath so that it point to the .jar files in your environnement variaoble
    ex under Win98:
    include this line in your autoexec.bat file
    SET CLASSPATH=.;c:\jdk1.3\lib\tools.jar;c:\jdk1.3\lib\dt.jar
    under Linux:
    edit your .source that include environnment variables and add :"anOldPath:/jdk1.3/lib/tools.jar"
    run the source in your terminal window then you can run ./startup under solaris or startup.sh
    JAVA_HOME : c:\jdk1.3 or c:\jdk1.2.2 under win98
    /home/user/auser/jdk1.2.2/ on linux
    I hope that you encounter this problem.
    Hichem Hassainia.

  • How to run jsp using  tomcat server?

    hai friends,
    i'm using jsp for my application and for that i'm using tomcat server.
    i was runing my jsp files like this
    http://localhost:8080/examples/jsp/myapp/index.jsp but instead of this
    i need to run my jsp files like this
    http://localhost:8080/myapp/index.jsp
    what r the changes that i should do in tomcat installation to run myapplication in such a way.
    thanks in advance

    you need to redefine the server root...
    for that do the following...
    copy all the directory tree rooted at
    JAKARTA-HOME/webapps/ROOT/examples/jsp/myapp/ to
    JAKARTA-HOME/webapps/ROOT/myapp/
    -OR-
    in the server.xml, search for "Tomcat Root Context" and un-comment the code defining Root Context...
    change the docBase value from "ROOT" to "ROOT/examples/jsp"
    that shud help...
    -Pranav
    hai friends,
    i'm using jsp for my application and for that i'm
    using tomcat server.
    i was runing my jsp files like this
    http://localhost:8080/examples/jsp/myapp/index.jsp but
    instead of this
    i need to run my jsp files like this
    http://localhost:8080/myapp/index.jsp
    what r the changes that i should do in tomcat
    installation to run myapplication in such a way.
    thanks in advance

  • Issues running JSP using Tomcat

    Hello,
    I have installed Eclipse 3.0, Tomcat 5.0 with JDK 1.4.2 . I can view HTML pages but not JSP pages. I am able to run java code and servlets on Eclipse/Tomcat. When I point to a JSP page the page gives the following error
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:434)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:492)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:471)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:459)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK
    org.apache.tools.ant.taskdefs.compilers.Compile
    Any help is much appreciated.

    Like the message says, you haven't set the JAVA_HOME variable correctly.
    Have you set it?
    It should point to the ROOT of your java install
    eg
    JAVA_HOME = c:\j2sdk1.4.2_04
    Are you running Tomcat through Eclipse, or on its own?

  • Exception when running JSP on Tomcat!Pls help me!

    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: /JspTestBean3.jsp(3,4) Invalid directive
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:417)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
    at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:383)
    at org.apache.jasper.compiler.Parser.parseElements(Parser.java:799)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:219)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
    at java.lang.Thread.run(Thread.java:536)
    ********How to resolve this exception, i need your help. Thanks a lot.;)********

    I think the tag <@page > contains some invalid directive, just check it out, if didn't get any, then if possible copy and paste the jsp file content in reply

  • JasperExceptionError  while running JSP on Tomcat server

    I am using a html page to get the values of Employee No , Name and set the values in the bean and display them using JSP.
    JSP PAGE
    <%@ page import="java.util.*" %>
    <%@ page import="java.beans.*" %>
    <%@ page import="Servlets.*" %>
    <%@ page language="java" %>
    <jsp:useBean id="em" class="EmpBean" />
    <jsp:setproperty name="em" property="eno" />
    <jsp:setproperty name="em" property="ename" />
    <html>
    <head>
    <title> Employee details </title>
    </head>
    <body>
    <center>
    <% String eno=em.getEno();
    String ename=em.getEname();
    %>
    Employee No:<%= eno %>
    Employee Name:<%= ename %>
    </center>
    </body>
    </html>
    error is
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /employee.jsp(5,5) jsp.error.badaction
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:49)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:383)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:81)
         at org.apache.jasper.compiler.Parser.parseAction(Parser.java:626)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:758)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:77)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:157)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:111)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:183)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
         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:534)

    Hi ram,
    i wonder if you could help me. i have same error but my class is fully defined and useBean syntax is also case correct.
    i get the following relvant output from tomcat:-
    2005-11-04 23:28:20 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /results.jsp(61,6) jsp.error.badaction
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
         at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671)i think i know where the problem is ---please see below code.
    i dont know how to create a unique variable name to be populated with several data rows and then pass this collection on to jsp and use this collection using <taglib>.
    code below this comment (in code below) i think is throwing the error
    // this is the problem part - dont know if this would work ie i need a unique object to be crated eg -      varabridgment1, varabridgment2, varabridgment3...... and then be able to get attributes of each object in jsp page using a <iterator taglib>
    eg code is below for servlet where data is being stored.
    //create Results - a collection object for storing individaual Abridgment objects
    Results abridgeresults = new Results();
         abridgeresults.setName("NaeemColl");
         Abridgment varabridgment = null;
          int nRows = 0;
          while(resultSet.next()){
            nRows++;
    // this is the problem part - dont know if this would work ie i need a unique object to be crated eg -       varabridgment1, varabridgment2, varabridgment3...... and then be able to get attributes of each object in jsp page using a <iterator taglib>
          // varabridgment = varabridgment +nRows;
          varabridgment = new Abridgment();
           varabridgment.seta_county(county);
          varabridgment.seta_year_date(Integer.parseInt(year));
        //  varabridgment.a_sub_year_volume        = Long.parseLong(c_phone);
            varabridgment.seta_sub_year_volume(resultSet.getInt("a_sub_year_volume"));
            varabridgment.seta_page_id(resultSet.getString("a_page_id"));
            varabridgment.seta_image_id(resultSet.getLong("a_image_id"));
              abridgeresults.addAbridgment(varabridgment);
              //trying to use vector construct
              //AbridgeResults.add(abridgment);
            //session.setAttribute("isNewAbridgment", new Boolean(false));
          req.setAttribute("results",abridgeresults);the jsp code ....
    <jsp:useBean id="results" scope="request" type="com.fut.mes.Results"/>
    <jsp:useBean id="abridgment" class="com.fut.mes.Abridgment" scope="session">
    </jsp:useBean>
    <mt:iterate name="abridgment" collection="<%= results.getAbridgments()%>" type="com.fut.mes.Abridgment">
         <p><input type="checkbox" name="list" value="ON"><span style="font-size:12pt"><jsp:getProperty name="abridgment" property="a_sub_year_volume"/></span><span style="font-size:12pt">,
         <a href="abridgment_link.htm"><jsp:getProperty name="abridgment" property="a_volume_id"/></a>, </span><jsp:getProperty name="abridgment" property="a_batch_id"/>,<p:onmouseclick
    hyperlinktype="url"
    href="file://nc-fileshare-01/land%20and%20property/ROS%20Partnership/Management/Change%20Control/Active%20CCNs/CR%20003%20-%20Registers%20Archive%20Scanning/Technical/Design%20Workshops/Design%20Workshop/00000007.tif"/><span style="font-size:12pt;mso-color-index:6"><jsp:getProperty name="abridgment" property="a_image_id"/></span><span style="font-size:16pt;mso-color-index:6"> </span><br>please can some one help me with this - first can anyone tell me how i can create a unique varaible name of an object typr that i can store into Results type collection object - that might sort it all out.
    thanks

  • Problems compiling jsp on Tomcat

    I am getting an error message when I try to run jsp files on the Tomcat server. It runs the txt files fine. Using the 8080 port. Any suggestions about what is going wrong? This is my first time to run jsp or Tomcat on this computer. Thank you. Sorry for the long error message.
    Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    error: Invalid class file format in C:\Program Files\Java\jre1.5.0_04\lib\rt.jar(java/lang/Object.class).
    The major.minor version '49.0' is too recent for this tool to understand.
    C:\Program Files\Apache Tomcat 4.0\work\localhost\myapp\project3a$jsp.java:0: Class java.lang.
    Object not found in class javax.servlet.GenericServlet.
    package org.apache.jsp;
    ^
    2 errors, 1 warning
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Unknown Source)

    It looks like it is running multiple versions of Java.
    It looks like you are trying to run with java 1.5
    Check what your JAVA_HOME variable is set to
    Do you have any other versions of java installed on the machine?

  • TO Run JSP in eclipse

    Can anyone please help me to run jsp using tomcat in eclipse IDE.
    I have installed tomcat 4.0 but i dont have idea to set path in eclipse

    First drop Tomcat 4.0 and install at least 5.5 or preferably 6.0. Then you're up to date.
    I recommend you to use Eclipse WTP [1][2] to develop JSP/Servlets and run it [3].
    [1] http://www.eclipse.org/webtools/
    [2] http://ftp.osuosl.org/pub/eclipse/technology/phoenix/demos/install-wtp/install-wtp.html
    [3] http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html

  • Running JSP 2.0 pages on Tomcat 4.1

    I have web-application written in JSP 2.0. I use custom tags in tag-files and EL.
    How can I run this application on hoster's Tomcat 4.1 server.

    But hoster do not have Tomcat 5 :( only Tomcat 4.1
    May I run JSP 2.0 app on Tomcat 4.1 with some tricks

  • Problems running jsp files with tags on tomcat 4.0

    hi,
    i had some jsp1.1 stuff running on tomcat3.3.
    last week i moved to tomcat 4.0 , changed the tags to fit jsp1.2 and... everything is wrong now. while trying to run jsp with tags i get an error message (same for all files):
    ---->
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: (class: org/apache/jsp/djsp$jsp, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse; )V) Incompatible object argument for function call
    <-------
    the jsp files with no tags and servlets are running ok.
    I NEED YOUR HELP!!!

    cyclid,
    i have the same environment setup and the same troubles. after searching the forums, it seems that there are others with the same, if not similar issues, yet no solutions. if you find the solution to this one, could you please post it. i would really appreciate it since i have been on this one for several days with no success. i even tried the helloworld jsp/custom tag examples from a jsp profession book that i have and that won't work.
    Anyone out there,
    if you have any idea why this problem exists, any solutions, ideas would be appreciated.
    thank you,
    navesink

Maybe you are looking for

  • MSI GS60 Ghost Pro Golden Edition - A Combination of Stylish and High Performance.

     I have no idea who can say no to this shining and charming beauty.... The BackStory     When I studied at graduate school, I bought my first laptop, Asus F3J, of my life and brought it to school everyday. Actually it was a 2.9kg around laptop for ga

  • My ipod 3rd generation is not recognized by windows/itunes,please help

    My ipod 3rd generation is not recognized by windows/itunes,please help. Have tried restoring a number of times but did not work, any suggestions?thanks

  • Unlocked Australian iPhone 3GS

    Hi I just bought my first iPhone last week in Apple store Chermside (QLD, Australia). I'm going to Indonesia in the next few weeks and would like to get some advise how to use the iPhone in Indonesia (i.e. which SIM card carrier should I buy?) Anothe

  • Hide the title bar of a movie window like QuickTime X

    Love the feature of QuickTime X of not showing the title bar/the control bar of a movie window (still waiting for Pro version, though. Is it coming out at all?) I'm wondering if anyone has figured out a way/tweak to hide the title bar of a iTunes mov

  • HT5624 I forgot the answer question and resquse e-mail

    I want to purchase something but I can't not. i have to answer the question. I didn't forget the password. I just forgot answer security questions and they said It can Send reset security info email to my e-mail. but I didn't use that e-mail anymore