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

Similar Messages

  • 500 error while trying to access a jsp which makes use of tiles tags

    Hi all,
    when im trying to access a jsp which makes use of tiles tags, im getting the following error.
    status 500:
    org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-tiles cannot be resolved in either web.xml or the jar files deployed with this application
    what might be the problem?
    Thanks in advance.

    Hi all,
    sorry...got the reason for the above error..missed to include the tld file in WEB-INF.

  • Error when run a simple sample using jsp tag

    When i run a jsp using jsp tag, the tomcat gave me the following information:
    Resolve entity failed-//Sun Microsystems,Inc.//DTD JSP Tag Library 1.2//EN http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
    My tld file is:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>sample</short-name>
    <uri>WEB-INF/sampleTag</uri>
    <display-name>SampleTag</display-name>
    <description>Sample TLD</description>
    <tag>
    <name>time</name>
    <tag-class>com.sample.taglib.TimeTag</tag-class>
    <body-content>empty</body-content>
    </tag>
    </taglib>
    Anybody can tell me why?
    Thanks!!!

    It's strange bacause DTD is available under given address.
    Which JSP version are you using?
    Do you have any other tld file, which uses the same DTD version? Do tags define in it work properly?
    Maby try to use 1.1 version of DTD?
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">But remember than version 1.1 has another node names (see http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd).

  • Unable to run reports from forms using run_report_object

    Hi All,
    I am unable to run a report(9i) from forms(9i) in client side.
    I used the following code
    Declare
         repid REPORT_OBJECT;
         v_rep varchar2(100);
         rep_status varchar2(20);
    Begin     
         repid := FIND_REPORT_OBJECT('report4');
         v_rep := RUN_REPORT_OBJECT(repid);
    End;
    I get the following error
    FRM-41219 : Cannot find report:invalid ID.
    Any help will be highly appreciated.
    Thanks,
    Sanjay

    Hi All,
    I am unable to run a report(9i) from forms(9i) in client side.
    I used the following code
    Declare
         repid REPORT_OBJECT;
         v_rep varchar2(100);
         rep_status varchar2(20);
    Begin     
         repid := FIND_REPORT_OBJECT('report4');
         v_rep := RUN_REPORT_OBJECT(repid);
    End;
    I get the following error
    FRM-41219 : Cannot find report:invalid ID.
    Any help will be highly appreciated.
    Thanks,
    Sanjay Hi
    You have to create a report object within the form.
    If you look at the Object NAvigator in the Form Builder right below Record Group
    tou would see an option for Report. Create a new report object.
    Set the following properties for that object
    Filename - This should be the name of your RDF file you created from Report Builder along with the full path.
    Set the Execution Mode, Communication Mode and Report Destination Type as per your requirements.
    In the parameter for find_report_object() pass the name of the report object you created.
    eg.
    if the name of the report object you created is Report2 then
    your call should be rep_id := find_report_object('Report2') .
    You are calling the report object which has been created in your form builder and through that call you are running the report file specified in the Filename property of that report object.
    Regards
    Poorvi

  • Include using jsp:include for a file from the docroot directory.

    Hello,
    I try to include one file from the doocroot but only can import files from the context (War deployed).
    when I put
    <jsp:include page="/foo.htm">
    to include this file: http://www.mydomain.com/foo.html
    it try to show this file: http://www.mydomain.com/mycontext/foo.html
    it puts ever the context before the name of my file.
    How can I include this file.
    Thanks
    PD: obviously 'foo.html' is in the doocroot.

    From within a JSP you have a reference to a PageContext called pageContext. This has a method getServletContext(). From the ServletContext you can find the real path the servlet lives in. So...
    File basePath = new File(pageContext.getServletContext().getRealPath("/"));Now basePath contains your path $Catalina/webapps/webservices. Then it's just a matter of working relative to that, e.g.:
    File usersFile = new File(basePath, "users.txt");

  • Otally unable to save a download. Unable to run a download and used up all the faq suggestions

    I am unable to save or run a download. The reason being ' unable to read source code' Contact server administrator. I have used up all the suggestions in faq's and am able to download using explorer

    I'm a designer not a code-geek and people like me need an easy way to grab screenshots. Codelines in developer tool is not an option! And the F1-option mentioned above does not work...
    Please, please give us the screen grab add-ons back!!!
    Or you have to implement a "right-click" feature within FF for screengrabbing...
    If not I'll have to downgrade my FF.
    (By the way - I've deselected the automatic upgrade option! Never again will I accept an auto upgrade!)

  • Unable to run the maven project using TFS 2013

    Hi All,
    This is Raghu, I am new to TFS.
    I am running Maven project (selenium+java) using TFS. I configured TFS in my local box and installed TFS plugins for Eclipse. I have committed all of my code to TFS and created a new build in TFS using Eclipse TEAM Explore.
    When I executed the build, it displaying the below message not executing my test scripts.
    when I am executing maven from command prompt, it's working fine. 
    I am using Eclipse Luna, TFS2013, java 1.7, Maven 3.1.1
    Debug | Any CPU
    0 error(s), 0 warning(s)
    $/Testselenium/ArrowSOP/pom.xml compiled
    $/Testselenium/ArrowSOP/pom.xml ('install' target(s)) - 0 error(s), 0 warning(s),
    View log file
    No test results
    No code coverage results
    It could be grate, if anybody provide a solution for this issue.
    Thanks
    Raghu

    Hello again,
    It’s just in one of my TFS project I have this problem and it didn’t help to use older versions of the build process templates.
    /Magnus
    Magnus Timner

  • How to run Applet using jsp in netbeans 5.5

    hi,
    I want to run an applet program using jsp and tomcat. I have created an applet class in NetBeans 5.5 and also a Jsp. In that jsp I have given the <jsp:plugin type="" code="" ......> tag. But its not warking. Can any one please tell me the correct steps to run that applet?
    Thanks

    no clue???????????

  • Include a JSP inside another JSP

    Hi SDN,
    I am stuck with a problem. There is a JSP file available. In this JSP I have to add some more fields. But when I try to ad new fields I am getting a Portal Runtime Error stating that "Code Too Large". So now I thought of putting the new code in another JSP and include that JSP inside my main JSP. Here I cannot use <@include file="..."> because this finally compiles both the JSPs as one.
    So I tried to use <JSP:include>. Some one please help me with how to include a JSP inside another using <JSP:include>. Here both the JSPs are having HBJ content inside.
    I know that <jsp:include page="relPathOfChild.jsp"/> will include the child.jsp into my main jsp. Problem is both the JSPs are having HBJ content, so If I dont declare <hbj:content> tag inside the child jsp, it is throwing an error. But If I declare a <hbj:content> tag inside my child jsp, only child content is coming and main jsp content is not coming.
    Please help me..
    Regards,
    SrinivaS

    Hi,
    This Problem is solved. Now I am able to include a child JSP inside the parent JSP. But now the problem is,
    This Parent JSP will have 8 tabs. Now my chils JSP should come inside 7th tab.  but it is coming above the parent JSP.
    Below is how I am including my child JSP.
    <% try{ if(isCAR){
         %>
                   <tr>
    <jsp:include page="/pagelet/CAREligibility.txt" />
                   </tr>
                <%} } catch(Exception e) {}%>
    Please help.
    Regards,
    SrinivaS

  • Problem when using jsp:include.. / in JSP when run on OC4J903

    I have a very unusual JSP question when run in OC4J903(EM or standalone) version (previous OC4J version was ok). Here is the description
    1. run P1.jsp and a parameter(text1) will pass to P2.jsp
    2. In P2.jsp, include "includePage.jsp" before show the parameter.
    question:
    1. The P1.jsp parameter will be null if using "POST" method, but "GET" is work.
    anyone have a indea ? or is that a bug in OC4J903 version
    P1.jsp
    <html>
    <head>
    <title>Test</title>
    </head>
    <body>
    <form method=POST action='P2.jsp'>
    <input type=text name='text1' size=30>
    <input type=submit value='OK'>
    </form>
    </body>
    </html>
    P2.jsp
    <html>
    <head>
    <title>Test</title>
    </head>
    <jsp:include page="includePage.jsp" flush="true">
    <jsp:param name="importParam" value="P2 Export" />
    </jsp:include>
    <body>
    <%
    out.print("Here shows the param from P1: " + request.getParameter("text1")+"<br>");     
    %>
    </body>
    </html>
    includePage.jsp
    <%@ page import="java.io.*"%>
    <%
    out.print("Here runs the include page. The param from P2 is: " + request.getParameter("importParam")+"<br>");
    %>

    I have a very unusual JSP question when run in OC4J903(EM or standalone) version (previous OC4J version was ok). Here is the description
    1. run P1.jsp and a parameter(text1) will pass to P2.jsp
    2. In P2.jsp, include "includePage.jsp" before show the parameter.
    question:
    1. The P1.jsp parameter will be null if using "POST" method, but "GET" is work.
    anyone have a indea ? or is that a bug in OC4J903 version
    P1.jsp
    <html>
    <head>
    <title>Test</title>
    </head>
    <body>
    <form method=POST action='P2.jsp'>
    <input type=text name='text1' size=30>
    <input type=submit value='OK'>
    </form>
    </body>
    </html>
    P2.jsp
    <html>
    <head>
    <title>Test</title>
    </head>
    <jsp:include page="includePage.jsp" flush="true">
    <jsp:param name="importParam" value="P2 Export" />
    </jsp:include>
    <body>
    <%
    out.print("Here shows the param from P1: " + request.getParameter("text1")+"<br>");     
    %>
    </body>
    </html>
    includePage.jsp
    <%@ page import="java.io.*"%>
    <%
    out.print("Here runs the include page. The param from P2 is: " + request.getParameter("importParam")+"<br>");
    %>

  • Unable to run beans  with jsp using myeclipse

    I have create jsp application with in myeclipse using following process
    From the menu i create a J2EE ->WebProject
    The default folder name is src which is create automatically in editor
    when we create a package it will create under src folder
    as i create dbconnection in src folder
    The index.jsp file is in WebRoot folder .
    I have use the bean dbconnection in index.jsp as described below
              <jsp:useBean id="con" scope="session" class="dbconnection.ConnectionManager"></jsp:useBean>
         <jsp:useBean id="app" scope="sesion" class="dbconnection.JspApp"></jsp:useBean>
         <jsp:setProperty name="con" property="driverClass"
              value="com.mysql.jdbc.Driver" />
         <jsp:setProperty name="con" property="connectionURL"
              value="jdbc:mysql://localhost:3306/guestbook" />
    But it generate error and do not show any output There is no errors or warnings in dbconnection folder but i am unable to use it in my index.jsp page
    Please help me
    Thanks in advance

    use cactus jar files

  • 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

  • Applet in JSP Unable to run.. help!

    Hello all... am running Lomboz Eclipse on WinXP .. all current versions and runtimes of relative java and tomcat updated and my web apps are all working as expected with no real problems... EXCEPT that I am unable to get a simple applet to display in a jsp page. I am using the <jsp:plugin > tag and the cosole gives me that dreaded bloody class not found error. I can run the applet
    in appletviewer (from inside the ide) no problem. I have tried placing the applet in a html page then using <jsp:include> but alas that seems to lock up my whole system. I remember several years there was a tool called the sun applet plug in converter... not sure to be honest.. I am no expert in web apps by any means...so my plight may just be class file in the wrong dir.. or some other arcane issue with classpath.... and help would be appreciated!
    regards David

    Hi,
    Kindly refer the below document,
    Recommended Browsers for Oracle E-Business Suite Release 12 (Doc ID 389422.1)
    Regards
    Sham

  • Unable to connect to mysql using JSP servlet

    Respected Sir/Madam
    I have made a jsp application and use tomcat 4 and mysql .Whenever there is a db connection the application tries to connect.but then it throws exception
    java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection timed out: connect
    This error started occuring all of a sudden and i am not getting its root cause...Can anybody help me out of this...?
    I am having intranet. And one thing that amazed me was when I send request for that JSP page from different machine then it connected to db without any error..Only when I request that JSP page from my machine it is giving me this error.
    Please help..
    Waiting for your reply.
    Thanks and Regards

    Microsoft Telnet> open Oracleserver
    Connecting To Oracleserver...Could not open a
    connection to host: Connect failedYou need to run the exact command i gave you from the command line. There may not be a telnet server running on OracleServer, you are trying to connect to port 23 with the command above.
    run 'telnet Oracleserver 3306'
    If this does not work, try the same thing with the IP address instead of 'Oracleserver', you may have a name resolution issue.
    I didnt understood this .I also tried running this
    command from other machines where my application is
    running fine. But there also the same error.
    I gave proper URL and user name and password for mysql
    String dsnString="jdbc:mysql://Oracleserver/test";FYI - this will use the default port, I usually explicitly provide it (OracleServer:3306). Why don't you try the URL in the format I gave you above, including the user id and password?
    -Scott

  • Using a real file path to include a JSP using RequestDispatcher

    Hi,
    I am trying to figure out how to use RequestDispatcher inside a servlet to include a jsp page using a real file path instead of a context path. So for example I would want to do something like...
    RequestDispatcher rd = this.getServletContext().getRequestDispatcher("c:/tomcat/conf/think.jsp");
    Is this possible? tomcat is complaining that the path does not start with a "/"
    From a higher level I am trying to setup a solution where all of my web applications can share a set of global jsp pages and other resources. I know the easiest solution would be to put everything into one web application but this does not make sense in my situation because I have differnet web applications for different companies on the same server. Any help would be greatly appreciated. - krebsnet

    First of all...
    My test environment is Tomcat 4.1.24 and it runs on port 80 as my webserver as well.
    I can place the .jsp (or .html) in the shared folder. Not in the lib or class folders but right in the shared folder. I can then call it from multiple contexts without using the context path. Just tested it a minute ago. For example I have test.jsp in the shared folder and loaded it from two separate contexts (one named /demo and one named /inetapps) by calling Load test. It loaded in both of them and neither contain a test.jsp file.

Maybe you are looking for