Problem in running a jsp page on tomcat 5.0

hi....
i made a java class abc.java and then compiled it to get a java class file named abc.class in a package named pkg.
Then i copied this package in the classes folder of the WEB-INF folder in tomcat 5.0.
After that i created a jsp page in which i imported this class file. Now when i run the jsp page on tomcat 5.0 i get an error saying this:
javax.servlet.ServletException: pkg/abc (Unsupported major.minor version 49.0)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.UnsupportedClassVersionError: pkg/abc (Unsupported major.minor version 49.0)
     java.lang.ClassLoader.defineClass0(Native Method)
     java.lang.ClassLoader.defineClass(ClassLoader.java:502)
     java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
     org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
     org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
     org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1214)
     org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
     org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
     org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
     org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
     org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
     org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
     org.apache.jasper.compiler.Generator.generate(Generator.java:3272)
     org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
     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)
Can anyone please tell me the solution to this problem?
thanks

This post:
http://mail-archives.apache.org/mod_mbox/jakarta-tomcat-user/200408.mbox/%[email protected]ys.com%3E
Leads me to believe that you're compiling and targeting a java version that your tomcat installation doesn't support. What version of the JDK are you using?
Good Luck
Lee

Similar Messages

  • Error when run a jsp page in tomcat

    I carefully follow all instruction to install and config j2sdk1.4.2 and Apache Tomcat/5.0.28. After completing, I can run all sample applications about JSP and Servlet in Tomcat manager. I also test my own servlet application and it also works.
    But I fail to run a very simple jsp page. Although I already set environment variables such as CATALINA_HOME, JAVA_HOME, CLASSPATH as directed but it seem to not be able to compile jsp page.
    ( I can compile other java classes in command line. )
    Below is the error i receive . This error takes me lots of time to consider.
    I look for your help ( please describe as clear as goog ). Thanks a lot.
    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)

    If you are sure you've installed the JDK (as opposed to just a JRE, which doesn't come with the compilation tools that are required to compile JSPs), then your JAVA_HOME is probably set incorrectly. Ensure JAVA_HOME is pointing to the JDK directory, and not to the JRE directory.

  • Problem in running any jsp or servelt in eclipse

    Hi all,
    my J2ee app was working good. & today when i tried to run any jsp page or servlet the following error appears to me "the selection did not contain any resources that can run on a server" , i use Apache tomcat 6.0.18 & eclipse j2ee.
    can any one help me in solving this problem?

    That should have been a different error message. You said you got the same, which is impossible. Don't rephrase errors.
    If you get a "Requested resource not available" error message from the application server in your webbrowser, then this simply means that either the URL is wrong or that the resource is actually not there where you think it is. It's actually exactly the same as a HTTP 404 error, if you know what it is.
    Check the URL. Most common mistake by starters is that they didn't know that the URL is case sensitive. If your contextroot is for example called 'Playground', then you should call it by http://localhost:8080/Playground, not http://localhost:8080/playground.

  • Error while running a jsp page : "jasper run time error"

    hii
    I'm facing trouble while running some jsp page . the error is as follows:
    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: 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)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    Apache Tomcat/5.0.28
    The set up in my system (path set up is as follows):
    Catalina home: C:\ apache software foundation\Tomcat 5.0
    Classpath: %java_home%;C:\j2sdk1.4.2_03\bin;
    Javahome: C:\ j2sdk1.4.2_03\jre;
    path: C:\ j2sdk1.4.2_03\bin
    <there are other variables available in path, along with that I have added the j2sdk1.4.2_03\bin in path".
    So if u have any way out for it please let me know.

    I think you only need to add: c:\j2sdk1.4.2_01
    you have specified jre on the end of your path, it is not the jre that is required, but the jdk.
    If you are using startup.bat and shutdown.bat (or .sh on Linux) you can amend the files with a text editor (open the startup.bat in notepad), like so:
    @echo off
    set JAVA_HOME=c:\j2sdk1.4.2_01
    if "%OS%" == "Windows_NT" setlocal
    I this will start Tomcat with the correct settings, regardless of your environment settings.

  • Please help.  Got TopLink working, but now I can't run a JSP page

    I am using JDeveloper 9.0.3.
    I got TopLink working successfully. Meaning I can access the DB using my mapped TopLink classes from my java code in JDeveloper.
    However, now I can't even run the default .jsp page.
    I am getting the error:
    Error instantiating application at file:/C:/LBIT/LBIT-oc4j-app.xml: Error parsing data-sources config at file:/C:/LBIT/LBIT-data-sources.xml: Fatal error at line 0 offset 0 in file:/C:/LBIT/LBIT-data-sources.xml: The encoding "windows-1252" is not supported.
    If I go change the "LBIT-data-sources.xml" file to "ISO-8859-1," as soon as I run the .jsp page (from JDeveloper) the "LBIT-data-sources.xml" file gets overwritten with a new one that contains the "windows-1252" encoding line again.
    What can I do to fix this???
    I know someone else has run into this problem!!!
    Please help. Thanks so much.
    Andy

    You could change the encoding by doing the following.
    Stop Embedded OC4J Server (Run | Terminate | Embedded OC4J Server)
    Tools | Preferences
    Select Environment
    Change the Encoding to ISO-xxxxx
    Click OK
    Run your JSP now.
    Atleast this should fix encoding generated into data-sources.xml
    raghu
    JDev Team

  • Running my jsp page

    When I try to run my jsp page I get the following exception. Why is this. My code for the jsp file is below this error. Thanks.
    A Servlet Exception Has Occurred
    org.apache.jasper.JasperException: Unable to compile class for JSPC:\Tomcat\jakarta-tomcat-4.0-b5\.\work\localhost\examples\jsp\dbaccess\dbaccess3_jsp.java:14: Type expected.
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    ^
    1 error
    ----------------- CODE ------------------
    <%! Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); %>
    <%@ page errorPage="error.jsp" language="java" import="java.sql.*" %>
    <html>
    <body bgcolor=#000000 text=#87CEFA>
    <center>JSP Page that accesses a database and prints the results</center>
    Test!!!
    <% Connection con = DriverManager.getConnection("jdbc:odbc://url:port/oracle", "username", "passwd"); %>
    <% Statement statement = con.createStatement();
    ResultSet resultSet = statement.executeQuery("SELECT * FROM oracle"); %>
    <P> The results are:
    </P>
    <UL>
    <% while (resultSet.next()) { %>
    <LI><% String myData = resultSet.getString(); %></LI>
         <% System.out.println(myData); %>
    <% } %>
    </UL>
    </body>
    </html>

    in case connecting to oracle database u have to have the drivers or the classes12.zip file in u'r classpath.
    in case of any other database try specifying the class path correctly.
    hopw this helps.

  • How to run a jsp page

    hello to all of u
    i m bit comfortable with SERVLET and please tell me that how to run a JSP page.i m using TOMCAT.
    someplace it is written that " write the program ,save under the root of tomcat i.e in my system it is tomcat 4.1 and to store in tomcat4.1\helloworld.jsp ,,, and then after start the server write in the url --:
    http://localhost:8080/hello.jsp.
    but it is giving error while running.please tell me the procedure.
    thank you
    bye

    Why oh WHY do you want to fiddle with the server.xml file?
    You don't need to.
    Under tomcat is a directory called "Webapps"
    This is where you put your web applications.
    You will see there is an existing one there called ROOT - which funnily enough is the root one used for Tomcat.
    If you put your hello.jsp in the ROOT directory, http://localhost:8080/hello.jsp will work.
    However it is not recommended to use the ROOT directory. Make your own one.
    Create a new directory in the "Webapps" directory eg "test"
    Put your jsps in here.
    under test create a directory called "WEB-INF"
    Copy the web.xml file from [TOMCAT_HOME]/webapps/ROOT/web-inf into the new web-inf directory.
    Now go to http://localhost:8080/test/hello.jsp
    Cheers,
    evnafets

  • I'm trying to run a .jsp page and all I get is the following error. Thoughts?

    Running Coldfusion 8 / JRun 4 updater 7 / Coldfusion 8 hotfix
    2.
    I'm trying to run a .jsp page and all I get is the following
    error. Thoughts?
    Could not invoke Java compiler, please make sure jikesw is in
    I:\JRun4/bin or put a JDK bin directory in your path.
    jrunx.compiler.JavaCompiler$NoCompilerFoundException: Could
    not invoke Java compiler, please make sure jikesw is in
    I:\JRun4/bin or put a JDK bin directory in your path.
    at
    jrunx.compiler.JavaCompiler.outProcessCompile(JavaCompiler.java:474)
    at
    jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:132)
    at
    jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:100)
    at jrun.jsp.Translator.compilePage(Translator.java:176)
    at jrun.jsp.Translator.translate(Translator.java:254)
    at jrun.jsp.Translator.translate(Translator.java:101)
    at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:707)
    at jrun.jsp.JSPServlet.translate(JSPServlet.java:125)
    at jrun.jsp.JSPServlet.service(JSPServlet.java:113)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    You're right, that ws another fix I tried. There is no fix fo
    rthe issue described, but it still seems like an old issue. My
    class paths are short. Here is my jvm.config (pretty standard):
    # VM configuration
    # Where to find JVM, if {java.home}/jre exists then that JVM
    is used
    # if not then it must be the path to the JRE itself
    java.home=I:/JRun4/jre
    # If no java.home is specified a VM is located by looking in
    these places in this
    # order:
    # 1) bin directory for java.dll (windows) or
    lib/<ARCH>/libjava.so (unix)
    # 2) ../jre
    # 3) registry (windows only)
    # 4) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)
    # Arguments to VM
    java.args=-server -Xmx1000m -Dsun.io.useCanonCaches=false
    -XX:MaxPermSize=256m -XX:+UseParallelGC
    -Dcoldfusion.rootDir={application.home}/
    # commas will be converted to platform specific separator and
    the result will be passed
    # as -Djava.ext.dirs= to the VM
    java.ext.dirs={jre.home}/lib/ext
    # where to find shared libraries
    java.library.path={application.home}/lib,{application.home}/servers/cfusion/cfusion-ear/cf usion-war/WEB-INF/cfusion/lib,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/W EB-INF/cfusion/jintegra/bin,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB -INF/cfusion/jintegra/bin/international
    system.path.first=false
    # set the current working directory - useful for Windows to
    control
    # the default search path used when loading DLLs since it
    comes
    # before system directory, windows directory and PATH
    java.user.dir={application.home}/../lib
    # JVM classpath
    java.class.path={application.home}/servers/lib,{application.home}/lib

  • How to run a jsp page or html page through DOS-PROMPT in java

    Hi,
    I want to run a jsp page directly from my console.
    and I want to pass some parameters to jsp page from console i.e. through args.
    thanks in advance,
    vjoy

    start file:///myjsp.jsp?boo=hoo
    should work

  • Designing run time jsp page

    hello all,
    I want to design a run time jsp page.
    how should i do it? using servlet or jsp has this capablity.
    please give me advice to achieve it effectivly.
    Can yo give me a example also of making runtime controls let say a button or label or textbox on jsp page also.
    Thanks in advance.

    Your terminology and English is really messed up in this message, so sorry if my answer is wrong. Especially the part "design a run time jsp page" makes really no sense.
    If you want to add DOM elements "on the fly", use an ajaxical library like jQuery or adopt an ajaxical JSF component library like RichFaces/Ajax4jsf.

  • Cannot compile JSP pages in Tomcat 5.0.28

    Hi,
    I'm new to Tomcat and this has been bothering me for days now.
    I have (seemingly) correctly installed Tomcat v5.0.28 and am currently in the process of testing my environment with simple html/jsp pages.
    My server starts up fine with no error messages.
    Testing the server I can access the .html file fine, however I get a HTTP 404 error for the .jsp: The requested resource (/hello/hello.jsp) is not availableI have done the following since installation:
    1. Installed Tomcat to C:\Program Files\jakarta-tomcat-5.0.282. Set the environment variable JAVA_HOME to the value C:\Program Files\Java\jdk1.5.0 (base directory of my java installation)
    3. Even added ;C:\Program Files\Java\jdk1.5.0\bin to the environment variable Path (just in case, for javac)
    4. Enabled the invoker sevlet by uncommenting:
        <servlet>
            <servlet-name>invoker</servlet-name>
            <servlet-class>
              org.apache.catalina.servlets.InvokerServlet
            </servlet-class>
        </servlet>and
        <servlet-mapping>
            <servlet-name>invoker</servlet-name>
            <url-pattern>/servlet/*</url-pattern>
        </servlet-mapping>in conf/web.xml
    5. Added an access log valve to locahost
    6. Set ant fork compiles to seperate JVMs:
        <servlet>
            <servlet-name>jsp</servlet-name>
            <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
            <init-param>
                <param-name>fork</param-name>
                <param-value>true</param-value>
            </init-param>
            <init-param>
                <param-name>xpoweredBy</param-name>
                <param-value>false</param-value>
            </init-param>
            <load-on-startup>3</load-on-startup>
        </servlet>6. Installed the .html and .jsp pages to folder %CATALINA_HOME%/webapps/ROOT/helloNow when I bin/startup.bat Tomcat starts without anu error messges. In a browser I can now access http://localhost:8080 and http://localhost:8080/hello/hello.html but not http://localhost:8080/hello/hello.jspHere are my logfiles (in debug mode) for performing the above actions and then shutting down:
    catalina_log.txt
    2006-04-29 18:29:02 EngineConfig: EngineConfig: Processing START
    2006-04-29 18:29:24 EngineConfig: EngineConfig: Processing STOPlocalhost_log.txt
    2006-04-29 18:29:01 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2006-04-29 18:29:01 StandardContext[/jsp-examples]ContextListener: contextInitialized()
    2006-04-29 18:29:01 StandardContext[/jsp-examples]SessionListener: contextInitialized()
    2006-04-29 18:29:02 StandardContext[/servlets-examples]ContextListener: contextInitialized()
    2006-04-29 18:29:02 StandardContext[/servlets-examples]SessionListener: contextInitialized()
    2006-04-29 18:29:24 StandardContext[/servlets-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@14eaec9')
    2006-04-29 18:29:24 StandardContext[/servlets-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@b533b8')
    2006-04-29 18:29:24 StandardContext[/servlets-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@569c60')
    2006-04-29 18:29:24 StandardContext[/servlets-examples]SessionListener: contextDestroyed()
    2006-04-29 18:29:24 StandardContext[/servlets-examples]ContextListener: contextDestroyed()
    2006-04-29 18:29:24 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@d67067')
    2006-04-29 18:29:24 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@6db724')
    2006-04-29 18:29:24 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@112da40')
    2006-04-29 18:29:24 StandardContext[/jsp-examples]SessionListener: contextDestroyed()
    2006-04-29 18:29:24 StandardContext[/jsp-examples]ContextListener: contextDestroyed()localhost_access_log.txt
    127.0.0.1 - - [29/Apr/2006:18:29:13 +0930] "GET /hello/hello.html HTTP/1.1" 304 -
    127.0.0.1 - - [29/Apr/2006:18:29:19 +0930] "GET /hello/hello.jsp HTTP/1.1" 404 1000Also, my sourced test .html and .jsp files:
    hello.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!--
    Simple HTML file to test server setup and configuration.
    Taken from Core Servlets and JavaServer Pages 2nd Edition
    from Prentice Hall and Sun Microsystems Press,
    http://www.coreservlets.com/.
    (C) 2003 Marty Hall; may be freely used or adapted.
    -->
    <HTML>
    <HEAD><TITLE>HTML Test</TITLE></HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <H1>HTML Test</H1>
    Hello.
    </BODY></HTML>hello.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!--
    Simple JSP file to test server setup and configuration.
    Taken from Core Servlets and JavaServer Pages 2nd Edition
    from Prentice Hall and Sun Microsystems Press,
    http://www.coreservlets.com/.
    (C) 2003 Marty Hall; may be freely used or adapted.
    -->
    <HTML>
    <HEAD><TITLE>JSP Test</TITLE></HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <H1>JSP Test</H1>
    Time: <%= new java.util.Date() %>
    </BODY></HTML>I am getting so frustrated I feel like I have tried everything...

    Thanks for your feedback, I tried all suggestions but still no luck.
    One thing I didn't mention previously was I have also tried the following (note: I have omitted the prefix "%CATALINA_HOME%/webapps"
    to all directory references below):
    1. installed my .jsp directly into /ROOT
    2. installed my .jsp into subdirectory /ROOT/hello
    3. installed my .jsp into /root_copy (identified as a running application by Tomcat manager)
    I think there must a problem in my deployment because the JSP examples (http://localhost:8080/jsp-examples/) compile fine...
    This indicates that JAVA_HOME is set correctly.
    Since my first post I tried installing tomcat from a windows installer into c:\apache\tomcat5.0.28\ and set logging to debug.
    Here's a small dump of 5 logs in localhost_log.2006-05-01.txt:
    2006-05-01 20:08:31 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter]...
    2006-05-01 20:08:32 StandardContext[/jsp-examples]ContextListener: contextInitialized()
    2006-05-01 20:08:32 StandardContext[/jsp-examples]SessionListener: contextInitialized()
    2006-05-01 20:08:32 StandardContext[/servlets-examples]ContextListener: contextInitialized()
    2006-05-01 20:08:32 StandardContext[/servlets-examples]SessionListener: contextInitialized()Note there was no initialization of the context root_copy, but I'm unsure if there's any relevance here or not.

  • My servlet cuts off the rest of my jsp page on Tomcat !

    I'm using the Oracle Jdevloper 9i to create a web application. I will then deploy the application to a Tomcat server. Now here is the problem. When developing and running on the Oracle OC4J server the application works fine but after deploying to the Tomcat, my included servlet cuts off the rest of my jsp page. The page runs fine and the first servlet gets executed. After the servlet there should be more jsp code, but after the execution the servlet the remaining jsp code simply disapears. Any Idea anyone ?

    A jsp page ending abruptly looks like a runtime error happening in the included servlet.
    Try commenting the line including the servlet.
    You may also want to check for errors in the servlet by invoking the servlet alone frm the browser.

  • Problem with onload in jsp page

    Hi all,
    I had two jsp pages, a search and a results page. I need to enter some search criteria in the first page and based on that criteria i will be getting the results in the results jsp. Now, when i click the back button in the results page, i need to go to the search page and the values which i entered in the search page needs to be present there. But the problem is i had a javascript function which runs on loading of the search page. This function will set all the values in this search page to empty whenever we go to the search page. I am calling this javascript function as follows in my search jsp page.
    <body onload="setdefaultvalues('<%=name%>');">
    I am having the code for the back button in the results page as follows.
    <INPUT TYPE="button" VALUE='Back' onClick="javascript:history.go(-1);resetvalue(name);" class="button">
    The problem i am facing is whenever i go to the search page by clicking on the back button, the values in the search page are getting empty because of the onload method. There is no way that i can remove this onload method as i require it for setting the values in the search page evrytime i get to that from other modules as it is the main page for my module. So, is there anyway that i can stop this function from executing when i come from the results page or is there any other way that i can store the values in the search page when going from the results page.

    i think you really should have the result page include your search page contents rather than having the user need to click back as you'll end up with all sorts of nightmares in caching & session object management to be honest. if the search page is complex use javascript to hide contents and let the users expand them when they want to re-search.
    however, if you feel you must i would suggest the following:
    in your result page:
    session.setAttribute("userQuery","true"); (you probably actually want to put a container object with the query information in here)
    in your search page you could have something like:
    <body <% session.getAttribute("userQuery")==null { %>onload="setdefaultvalues('<%=name%>');"<% } %>>
    -or-
    <body onload="setdefaultvalues('<%=name%>',<%=session.getAttribute("userQuery")==null?"true":"false"%>);">
    function setdefaultvalues(name,run) { if ( !run ) return;....}
    you'll have to decide when to remove the object though cause once its set its there until the session expires or you remove it.
    hope that helps, good luck!

  • Problems while Running a JSP report

    Hello
    I am Running a JSP report and got NullPointerException at oracle.reports.jsp.ReportTag.doStartTag(..). I even tested the sample report provided in the Application server and even that gave the same exception as follows:
    Reports Error Page
    Thu Mar 02 13:56:49 IST 2006
    javax.servlet.jsp.JspException: REP-52266: The in-process Reports Server rep_ultra1_oracleas6 failed to start.java.lang.InterruptedException
    javax.servlet.jsp.JspException: REP-52266: The in-process Reports Server rep_ultra1_oracleas6 failed to start.java.lang.InterruptedException
         at oracle.reports.jsp.ReportTag.doStartTag(ReportTag.java:464)
         at examples.tools._test._jspService(_test.java:52)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Kindly provide a solution for this problem. Its quite urgent to solve this issue.
    With regards

    Hi,
    I posted this message in jdeveloper forum yesterday, but there was no response. So I thought of posting it in this forum to check my luck.
    Thanks
    Siva...

  • Taglib repeating in jsp page in TOMCAT. (Can this be Tag pool issue? )

    Hi,
    We have an application and it is running fine on one servlet container "ServletExec". We are migrating our application to Tomcat and some weird things happenned.
    In one of my JSP pages say page " A ", I have included another small JSP say " B "which just created a table with one row and various columns.
    Now the columns are created in a taglib. And I am using that taglib inside that page " B".
    Now this is working fine in ServletExec.
    But in tomcat when I refersh page A or come to this page dfrom some other page, there are multiple instance of tables from page B are rendered.
    SO every time I refresh a new entry added to already existing table.
    Can any one please help?
    I looked in some documents and found that this may be because of some Tag pooling in Tomcat newer versions. Is that right?
    If yes how can I remove this tag pooling in my taglib java class?
    Any help is highly appreciated.
    Thanks

    Hi
    try disabling the tag pooling and check the page.
    To disable the tag pooling in Tomcat
    make enablePooling = false for the jsp servlet declaration in
    $TOMCAT_HOME/conf/web.xml
    Regards

Maybe you are looking for