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

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

  • 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";

  • Unable to run JSP file in TOmcat

    My Tomcat is running when i type http://localhost:8080/index.jsp , i'm able to see home page
    CLASSPATH=C:\j2sdk1.4.2_08\bin;E:\Grinder;E:\Grinder\lib\grinder.jar;C:\Program Files\Java\j2re1.4.2_08\lib\grinder.jar;
    JAVA_HOME=C:\j2sdk1.4.2_08
    I tried both pointing to JAVA_HOME C:\Program Files\Java\j2re1.4.2_08
    When i try to run the JSP file under C:\Tomcat 5.0\webapps\ROOT\add.jsp. I'm getting 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:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         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.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
         org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
         org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         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)

    I know the same.
    But problem is that whenever I am creating a new file containing single line say 'Hello world' and then try to run,
    the similar type of error msg comes.

  • 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?

  • 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.

  • Unable to run jsp as include using jsp:include tag

    I am trying to run the basic jsp:include sample provided by Oracle in OC4J 10g. When I run the code, It seems like include file is treated as text/html and not run at all. Can somebody help me in figuring out what I am missing here..
    Here is the code for main.jsp
    <jsp:include page="content.jsp">
    <jsp:param name="a" value="1"/>
    <jsp:param name="b" value="2"/>
    <jsp:param name="c" value="3"/>
    </jsp:include>
    Here is the code for content.jsp
    <p> Included Content </p>
    <p> Parameters - ${param.a}, ${param.b}, ${param.c} </p>
    When I run this code in JDeveloper10g using the embedded OC4J as well as Application Server 10g, I get the following output.
    Included Content
    Parameters - ${param.a}, ${param.b}, ${param.c}
    Note that the parameter values are not substituted properly.
    Thanks in advance
    Niraj

    javax.servlet.ServletException: com/sun/tools/javac/Main (Unsupported major.minor version 49.0)
    This is your problem either your tomcat or eclipse is pointing to a wrong jre
    here the problem is you are trying to run a code that was compiled using j2sdk1.5 in j2sdk1.4

  • 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

  • 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?

  • Unable to run Jsp in iPlanet 4.1 on Solaris

    Hi all,
    On solaris we have 2 virtual servers running on iPlanet 4.1.
    When we try to run index.jsp , it is giving the below error.
    All the mappings are fine.
    [10/Oct/2002:10:53:29] info (21932): Internal Info: loading servlet /jsp/index.jsp
    [10/Oct/2002:10:53:29] info (21932): JSP: JSP1x compiler threw exception
    java.io.FileNotFoundException: /jsp/index.jsp
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.io.IOException.<init>(Compiled Code)
         at java.io.FileNotFoundException.<init>(Compiled Code)
         at org.apache.jasper.compiler.JspReader.pushFile(Compiled Code)
         at org.apache.jasper.compiler.JspReader.pushFile(Compiled Code)
         at org.apache.jasper.compiler.JspReader.<init>(Compiled Code)
         at org.apache.jasper.compiler.JspReader.createJspReader(Compiled Code)
         at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
         at com.netscape.server.http.servlet.NSServletEntity.load(Compiled Code)
         at com.netscape.server.http.servlet.NSServletEntity.<init>(Compiled Code)
         at com.netscape.server.http.servlet.NSServletRunner.loadServlet(Compiled Code)
         at com.netscape.server.http.servlet.NSServletRunner.Service(Compiled Code)
    [10/Oct/2002:10:53:29] warning (21932): Unable to locate class:
    /home/pruser/PRAPP_HOME/PRApplication/jsp (java.lang.ClassNotFoundException:
    /home/pruser/PRAPP_HOME/PRApplication/jsp)
    [10/Oct/2002:10:53:29] warning (21932): Internal error: Failed to load servlet
    (servlet=/jsp/index.jsp)
    This is very urgent, Any help is appreciated.
    Thanx
    Shiva
    make a cc to me at
    [email protected]

    You have to set the java compile path at main level in your web server admin page
    ie in the global settings and jdk/jre configure set the path of your jdk to your java directory
    sincer
    thusi

  • Urgent: Unable to run JSP pages(using JRun Custom Tags) in Weblogic 5.1

    Hi,
    I am using JRun Custom tags to bulid JSP pages.
    Could not run the jsp page on Weblogic 5.1.
    I could run the same on JRun Server but not on Weblogic?.
    Had placed JRuntags.jar in the web_inf directory.
    What/where i need to update in properties file?.
    Please reply..
    Best Wishes.
    Satish k.Yalamaddi.

    javax.servlet.ServletException: com/sun/tools/javac/Main (Unsupported major.minor version 49.0)
    This is your problem either your tomcat or eclipse is pointing to a wrong jre
    here the problem is you are trying to run a code that was compiled using j2sdk1.5 in j2sdk1.4

  • Unable to run servlet in Tomcat

    I've installed Tomcat and ran the examples fine, Ialso created some test jsp files and placed them in C:\tomcat\Tomcat-4.1\webapps\ROOT\test and then ran them calling http://localhost:8080/test/Hello.jsp which worked fine. When I place servlets into the same folder and call it, I get a 404. Do I need to set something in the web.xml file and if so please show and example.

    I've got a problem under Tomcat 4.1.27 - 5 . I wrote a Servlet and when I call it as an action in a form I get the message:
    The requested resource (/G2Mweb/marketing/inseriscicampagnaservlet) is not available.
    My web.xml contains the correct tags that define it:
    <servlet>
    <servlet-name>inseriscicampagnaservlet</servlet-name>
    <servlet-class>servlet.InserisciCampagnaServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>inseriscicampagnaservlet</servlet-name>
    <url-pattern>/inseriscicampagnaservlet</url-pattern>
    </servlet-mapping>
    Caller line in jsp file:
    <form action="inseriscicampagnaservlet" method="POST">
    I wrote other servlets that run without problems. The only difference between this and the others is that I created this in the wrong directory and then move it in /servlet.
    Any idea of what's happening?
    Thanks in advance
    Spinotto

  • 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

Maybe you are looking for

  • % wildcard operator

    Hello all, Plz tell me how to use % wildcard operator in JDBC iam using MS-ACCESS as database. iam using code like this ("select name from tname where name=?%") but iam not getting the answer plz help me in solving this. vidya.

  • Output query and alert if there is a duplicate between 2 tables

    I have 2 tables MembTableA and MembTableB. If a MemberNumber exists on both tables I want to somehow put an alert in my coldfusion output (I have an example "CFIF" in my code below) - and only show the 1 result from MemberTableA. Below is my query an

  • How would you do a batch export of HTML ("for Dreamweaver") in inDesign CS5?

    We have a large library of indesign files that we need in a machine readable format for parsing text.  Right now HTML seems the best option for these particular files and our requirement. Anyone have a script or any other helpful tips? Thanks!

  • Mail not working properly after upgrade to  Leopard

    Hopefully this will be a common issue easily solved! After updating from 10.3.9 to Leopard 10.5.6 Mail has become unresponsive after opening - the programme opens but the message window does not appear, the address viewer and connection activity moni

  • Connect yudian controller through OPC server in Labview.

    I am trying to bind Indicator using DSTP server that gets data from Yudian controller AI706M. I want to get this data through yudian OPC server. when I do this in labview 7.1 version with windows XP OS, I get option of yudian OPC server from browse m