Include jsf file in a jsp page

Hi Everyone,
I have a plain jsp page with no JSF Components, but it has a jsp:include tag which is another jsp file which contains jsf components.
When i try to run the plain jsp file ... i get the following error...
java.lang.IllegalStateException: Cannot forward after response has been committed
     at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:324)
     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
     at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
     at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
     at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
     at org.apache.jsp.DynamicWebpart_jsp._jspService(DynamicWebpart_jsp.java:278)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
     at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
     at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
     at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
     at org.apache.jsp.Webpart_jsp._jspService(Webpart_jsp.java:302)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
     at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
     at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
     at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
     .......... so.....on........
I saw the source code for the plain jsp file and the error is because of including the jsp file with jsf components.
The contents of both the jsp file is given below
Plain jsp file
DWStaticJSP.jsp
<%@ page import="java.util.*" %>
<%@ page import="com.mirus.bi.jsp.*" %>
<%@ page import="com.mirus.bi.util.Log" %>
<% Log.logDbg("*******before calling the faces file from DWStatic :"+rSetting.getStaticJSPFileName()); %>
// name of the file name : /faces/report_palm.jsp
<jsp:include page="<%=rSetting.getStaticJSPFileName()%>" flush="false" >     
               <jsp:param name="DMode" value="DBoard" />
</jsp:include>
Jsp file with JSF component
it is stored in faces folder
/faces/report_palm.jsp
<%@ page contentType="text/html" %>
<%@ page import="com.mirus.bi.util.Log" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://mirus.com/jsftaglib" prefix="my" %>
<f:view>
          <h:outputText value="Store Name:" />
          <h:outputText value="#{palmReportUIHandler.currentStoreDisplay}" />
          <h:outputText value="Year:" />
          <h:outputText value="#{palmReportUIHandler.currentYear}" />
          <h:outputText value="Month:" />
          <h:outputText value="#{palmReportUIHandler.currentMonth}" />
</f:view>
The Configuration in the web.xml for faces Servlet is given below
<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
Does anybody know the solution to this problem
Any kind of help will be highly appreciated.
Pinkesh

Hi Adam Winer,
I want to try your solution.
just wanted some more clarification .....
So, let's say you have:
DWStaticJSP.jsp: plain JSP
report_palm.jsp: JSF JSP included by DWStaticJSP.jsp
What you should do is use an URL of:
/faces/DWStatic.jsp
to access the outer plain JSP (yes, even though it's not really a faces page), and then have
/faces/DWStatic.jsp include just plain /report_palm.jsp.
In essence, the critical thing is that the FacesServlet wraps the entire request - FacesServlet cannot run
for just a piece of the request.My question is where should i store the DWStatic.jsp file ... As u said i should acces it using /faces/DWStatic.jsp do i need to save it in the faces folder or just in the web app root.
I cant save the DWStatic.jsp in the faces folder as this file is used for lot of different purpose in my company application.
So can u give me a solution where in i can keep the DWStatic.jsp in the web-root folder and still try your solution
Also is this the right setting for facesServlet in the web.xml.
<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
Whatever follows below this line is the describtion of the web appp structure which i have in my company.
We have an application where in all the jsp files are stored in the web-app root folder.....
I will be using alphabets like a.jsp ... b.jsp .... to keep the explanation small...
I have an a.jsp file which includes a b.jsp file which in turn includes a c.jsp......
Now we have started using JSF.....
Now as a developer .... i want the c.jsp to include a d.jsp file which contains JSF components...
The thing is i cant change the location of a.jsp, b.jsp and c.jsp......
Can u tell me how i should call " a.jsp" ... imean the url so that the "d.jsp" file gets processed properly.
Also where should i save all the jsp files and what config is requiered in the web.xml for your solution
I thank you for your help
Pinkesh

Similar Messages

  • How to include a .class file in a jsp page

    hi everyone,
    i know the syntax as:
    <%@ include file = "filename.class" %>
    then at run time the server could not find the class file
    if i use,
    <%@ page import = "FileName.class" %>
    then also the same problem persists
    & if i use
    <jsp:include page = "Relative address"/>
    the problem still remains as it is...
    please help me out...i am working on developing an EJB application in which client interacts with server's Stateful session bean through a jsp page...it is necessary for me to include the home interface class file in my jsp page.
    P.S. do not suggest me to include the class file in a package & then use
    <%@ page import = "packageName.ClassFileName" %>
    i
    Edited by: Ankit_JIITU on 6 Jul, 2008 1:55 AM

    Ankit_JIITU wrote:
    i have already included the remote interface class file by <%@ page import = "University.RemoteInterfaceName" %>in my jsp page ...
    if i try to make a new package called test & then include my home interface in that package...i need to import University.*to generate the class file of my home interface ; but the class file generation is not taking place as i am getting the error..
    "package University does not exist".How can i overcome this problem. The package University, which you are trying to import, must be in the classpath. If you removed it then you will have to add it back.
    i have tried my best..but tell me if there's any possible way of including a class file in the jsp page without involving a package.No, there isn't.
    If not,then pls help me to generate the class file of my home interface within a package called test.Read the New To Java Tutorial and understand how packages work.
    >
    i am assuming that u have a deep knowledge of developing EJB applications.

  • How can i include a file in my JSP

    hello i have one jst who need to use an instance of a class called Part I need to include that file in my JSP but How do i do that
    How do i import my Part.java class in my JSP ???

    At the top of your JSP:
    <%@ import="package.*, package.Class" %>or you could do this:
    <%jsp:useBean class="package.Class" id="CLASS" scope="page" />or you can use a servlet as an include and have it write HTML back to the JSP:
    <jsp:include page="MyServlet">
         <jsp:param name="PARAM1" value="data1"/>
         <jsp:param name="PARAM2" value="data2"/>
    </jsp:include>

  • Is it possible to use JSF file as as error page.

    I am using jsf file as an error page.It is working in fine in websphere. But if i am using that only the exception is raised it is not going to error page.
    In Web.XML file,
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <error-page>
    <error-code>403</error-code>          <location>/faces/unauthorized.jsp</location>
    </error-page>
    jsf codings are placed under *.jsp files. In the time submitting form data to server a method throws NumberFormatException. This exception information is displayed in console. but blankpage is coming . It is not redirected to error.jsp fle which is under faces/error.jsp.
    If i am directly giving /error.jsp then it is giving Faces context is not created error.
    So i tried use simple jsp(pure jsp) file wihtin the folder and i set path like /pages/foo.jsp. It is working.
    Tell me is it possible to use jsf as error page.

    What would you hope to do with the reference?  The Mathscript node doesn't have a file reading capability.  You need to read the file and pass the data into the Mathscript node.
    EDIT: I stand corrected.  You need to use the fopen and fclose functions inside of the MathScript node to be able to read a file inside of it.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to Generate a Java file for a JSP Page

    Hi ,
    I am using weblogic11 .
    I am working on a JSP page which nearly consists of 4000 lines of code.
    I need to debug the file , but weblogic server is not generating the java file for the JSP pages .
    Please let me know how can i genertae Java file for the jsp pages ??

    JSPs are compiled into servlets automatically and those classes are stored in WEB-INF/classes folder. Servlet engine handles servlets.

  • Uploading a file in a jsp page

    Hii Javaites
    I am developing an application in which i need to upload file from a jsp page, right now i am using tomcat can anyone tell me the code for uploading a file.
    Thanking in Advance

    Hi,
    For uploading file from jsp:
    1) Goto javazoom.com, then download latest version for upload the files.
    2) Extract the zip & thay giving four jar files
    they are:
    i)uploadbean.jar
    ii)struts.jar
    iii)fileupload.jar
    iv)cos.jar
    put all this jar in lib of u r web application
    ex:
    C:\jakarta-tomcat-5.0.25\webapps\URWEBAPP\WEB-INF\lib\
    3) Set it in class path
    4) create one jsp with file option<input type='file' name = 'somename'>
    5) In action page(next page)
    <%@ page language="java" import="javazoom.upload.*,java.util.*" %>
    <%@ page errorPage="error.jsp" %>
    <jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
    <jsp:setProperty name="upBean" property="folderstore" value="c:/uploads" />
    </jsp:useBean>
    Set the folder where u want upload the particular file.
    MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
    Hashtable files = mrequest.getFiles();
         UploadFile file = (UploadFile) files.get("somename");//Give name u r given in the previous page.
         String fileName = file.getFileName();     
    upBean.store(mrequest, "userFile");
    follow this steps it works fine.
    regards
    DRA

  • I used tag to show PDF file inside my JSP page, It is working properly in IE but nothing shows in Mozilla. What should I do?

    I've used to display a PDF file inside my JSP page. It is working fine in IE. However, many of users of this application are using Mozilla and the platform is Ubuntu so it is vital that the file is shown in Mozilla as well. How can I solve this problem.
    == This happened ==
    Every time Firefox opened
    == I run my jsp page

    Such conditional code will only work in IE and not in other browsers like Firefox.
    You can ask questions and advice about web development at the mozillaZine Web Development/Standards Evangelism forum.<br />
    A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • Displaying pdf file in a jsp page...

    hi,
    I want to display a pdf document in a jsp page. i got that pdf file from a servlet class(MVC Architecture) through session. now my problem is to display that pdf file in my jsp page. can anyone give me a idea to solve this problem..

    hi,
    i used that code in scriplets. Actually my problem is I got one pdf file from session and i stored that file in a File object. the code is ..
    File pdfDocument = (File) session.getAttribute(CommonConstants.EBILL_PDF_DOCUMENT);
    now i have to display this pdf file in jsp..

  • Write an image file to a jsp page

    Hy,
    I've writen a small program, which draws a chart. The program normally creates a .png file of this chart which it stores on the file system and then read the png file and display the chart on a jsp page. Now, what I want is that, instead of writing the png file on the filesystem, i write it on a jsp page and then read the file from that jsp page. (i.e Its the jsp page which contains the image file).
    Can anyone please explain to me how to achieve this and if possible the codes also
    thanks in advance

    Hi, gulshan21
    JSP pages are intended to send text type content (though in the most of the containers this approach seems works fine). The best thing is to make a servlet, like this:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.awt.*;
    import javax.imageio.*;
    import java.awt.image.*;
    public class GraphicServlet extends HttpServlet {
      public void doGet(HttpServletRequest request,
                                       HttpServletResponse response)
                               throws ServletException, IOException {
        response.setContentType("image/jpeg");     // Or "image/png"
        OutputStream os = response.getOutputStream();
        ImageIO.write(getImage(100, 100), "PNG", os);      // Sends the image
        os.close();
      private synchronized BufferedImage getImage(int width, int height) {
        BufferedImage img = new BufferedImage(width, height,
                                                                                    BufferedImage.TYPE_INT_RGB);
        Graphics g = img.createGraphics();
        // Here you draw the image with the graphics methods
        g.dispose();
        return img;
    }Salud
    David

  • Writing XML file from a jsp page

    how can i write a xml file from my jsp and store the values and after sometime, for example when the user clicks on the submit button, i check the values from xml file and compare those values from the data base.
    it means both writing and reading xml file from a jsp page...
    urgent help needed......thanks

    You need some API like XSL or JDOM to read data from/to XML file
    you can get a best tutorial from
    http://www.javaworld.com/javaworld/jw-05-2000/jw-0518-jdom.html
    and
    http://www.javaworld.com/javaworld/jw-07-2000/jw-0728-jdom2.html
    after reading both articals you will be able to do both the tasks

  • Jsf problem go from jsp page to another jsp in new window

    I’ve two jsp pages attendReport.jsp and printAttendReport.jsp
    attendReport.jsp contains inputs for attend duration and employee id and command button “view” to view attendance data entered employee during entered duration inside the same page(this work very good)
    the problem is the same page includes another command button “print” its job is to get the same data but view them in the second page printAttendReport.jsp in another window in order to print the data in some suitable format , but the print button opens attendReport.jsp instead of printAttendReport.jsp and does not hold the inputs else if I set <managed-bean-scope> to session not request which cause caching data , please help me if you to solve this problem
    and here the related lines of code
    <faces-config >
    <managed-bean>
    <managed-bean-name>attendReportBean</managed-bean-name>
    <managed-bean-class>csc.attend.bean.AttendReportBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/attend/attendReport.jsp</from-view-id>
    <navigation-case>
    <from-action>#{AttendReportBean.attendReport}</from-action>
    <from-outcome>attendReport</from-outcome>
    <to-view-id>/attend/attendReport.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/attend/attendReport.jsp</from-view-id>
    <navigation-case>
    <from-action>#{AttendReportBean.printAttendReportAction}</from-action>
    <from-outcome>printAttendReportAction</from-outcome>
    <to-view-id>/attend/printAttendReport.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config> // here is managed bean code
    public class AttendReportBean {
    // data , getters and setters
    init();
    //Preload in initialization block.
    public void init() {
    // initialize data
    public String attendReport() {
    // code to get attend data to go to view page(same page) it is ok
    return "attendReport"; // Navigation case.
    public static String getRequestParameter(String name) {
    return (String) FacesContext.getCurrentInstance().getExternalContext()
    .getRequestParameterMap().get(name);
    public void printAttendReportListener(ActionEvent event) {
    String fromYearStr = getRequestParameter("fromYearAtt");
    System.out.println("fromYearStr = "+fromYearStr);
    // try to get inputs through ActionListener but it gives me null
    public String printAttendReportAction() {
    // code to get attend data to go to print page(another page in new //window) but inputs come in default values
    return "printAttendReportAction"; // Navigation case.
    }attendReport.jsp
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    //title . styles and validations //
    </head>
    <body>
    <h:form id="attendReportForm">/the form tag appear in running source as <form id="attendReportForm" method="post" action="/newdiwan/faces/attend/attendReport.jsp" enctype="application/x-www-form-urlencoded" >
    i.e. it always submit to attendReport.jsp page
    / some inputs and outputs /
    <h:commandButton onclick="return check();" id="view" action="#{attendReportBean.attendReport}" value="" styleClass="linksNumBlue" />//it works good/
    // some outputs to view data /
    <h:commandLink immediate="true" id="printLink" value="" action="#{attendReportBean.printAttendReportAction}" actionListener="#{attendReportBean.printAttendReportListener}" target="_blank" styleClass="linksNumBlue">
        <f:attribute  name="fromYearAtt" value="2009" />
        <f:attribute  name="fromMonth" value="01" />
       <f:attribute  name="toYear" value="2010" />
       <f:attribute  name="toMonth" value="06" />
    </h:commandLink>//this has two problems 1)submit to attendReport.jsp not printAttendReport.jsp which I want to go to.
    //2)does not get the inputs but return the default values only /
    </h:form></body></html></f:view>I use libraries { jsf-api.jar , jsf-impl.jar , jstl-1.1.0.jar and tomahawk-1.1.6.jar } and deploy on tomcat 6.0
    I’m sorry for the prolongation, please help me if you can
    Edited by: alynoor on Jul 8, 2010 1:51 AM
    Edited by: alynoor on Jul 8, 2010 1:55 AM

    my problem solved 1- i use 2 managed bean , one of request scope (used in attendReport.jsp ) and the other with session scope (used in printAttendReport.jsp)
    2 - add new jsp contains the h:commandLink of the print (attendReportPrintAction.jsp)
    3 - divide the view of attendReport.jsp to two subviews (each subview has its own form) one contains inputs and outputs of attend and the other contains include to (attendReportPrintAction.jsp)
    <%@ include file="attendReportPrintAction.jsp" %>
    4 - send and get parameters using two methods
                public static Object getSessionMapValue(String key) {
                   return FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(key);
                public static void setSessionMapValue(String key, Object value) {
                   FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(key, value);
                }faces-config.xml
       <managed-bean>
          <managed-bean-name>attendReportBean</managed-bean-name>
          <managed-bean-class>csc.attend.bean.AttendReportBean</managed-bean-class>
          <managed-bean-scope>request</managed-bean-scope>
       </managed-bean>
        <managed-bean>
          <managed-bean-name>print_attendReportBean</managed-bean-name>
          <managed-bean-class>csc.attend.bean.AttendReportBean</managed-bean-class>
          <managed-bean-scope>session</managed-bean-scope>
       </managed-bean>
    <navigation-rule>  
        <display-name>viewReport</display-name>  
        <from-view-id>/attend/attendReport.jsp</from-view-id>  
        <navigation-case>  
            <from-action>#{AttendReportBean.attendReport}</from-action>
            <from-outcome>attendReport</from-outcome>  
            <to-view-id>/attend/attendReport.jsp</to-view-id>  
        </navigation-case>  
    </navigation-rule>
    <navigation-rule>  
        <display-name>printReport</display-name>
        <from-view-id>/attend/attendReport.jsp</from-view-id>  
        <navigation-case>  
            <from-outcome>printAttendReportAction</from-outcome>  
            <to-view-id>/attend/printAttendReport.jsp</to-view-id>  
        </navigation-case>  
    </navigation-rule>attendReportPrintAction.jsp
    <f:subview id="printAttendReportSubView" >
    <h:form id="printAttendReportForm" onsubmit="return check222();" >
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td width="11%">
                                    <table width="70" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td width="7" height="28"><img src="../images/B-left.gif" width="7" height="28" /></td>
                                          <td align="center" background="../images/B-bg.gif">
                                            <!--a href="printAttendReport.jsp" class="linksNumBlue" target="_blank" >&#1591;&#1576;&#1575;&#1593;&#1577;</a-->
    <h:commandLink id="printLink" value="&#1591;&#1576;&#1575;&#1593;&#1577;" title="&#1591;&#1576;&#1575;&#1593;&#1577;"  action="#{print_attendReportBean.printAttendReportAction}"   target="_blank"  styleClass="linksNumBlue">
                                        </h:commandLink>
                                            </td>
                                          <td width="7" height="28"><img src="../images/B-right.gif" width="7" height="28" /></td>
                                        </tr>
                                      </table>
                                      </td>
                                    <td align="right"> </td>
                                  </tr>
                                </table>
    </h:form>
    </f:subview>i hope this helps someone

  • Including JSF files

    Hi,
    My customer is facing the following problem when trying to include 2 JSF files:
    page a.jsf defines a string : <% String bla = "Hello" %>
    after that definition, page a includes page b: <%@ include file="b.jsp" %>
    when page b is embedded in page a, i want page b to use the string var <%=bla%>
    technically page b does not have that variable, but when it's included in page a, it will inherit it and as long as page b is always included in page a, the code will work.
    This does not compile (not surprisingly) but in JDev 10.1.2 it did.
    Any way to make it work?
    (the catalyst for this question is the requirement to include the mvnforum package into an OC4J mid tier, if you have any feedback on this, please let me know).
    Thanks,
    Tal.

    Hi,
    you can use a session scoped managed bean to exchange information in JSF
    Frank

  • Trying to include an applet in a JSP page

    Hello,
    I have a jsp page trying to include an applet class in it.
    Both of them are part of a war file put on an apache server.
    The directories tree looks like this :
    root
    MyJSPPage.jsp
    WEB-INF
    classes
    MyDir
    MySubDir
    MyApplet.class
    In MyJSPPage.jsp, the code looks like this :
    <jsp:plugin type="applet"
    code="MyApplet.class"
    codebase="/WEB-INF/classes/MyDir/MySubDir">
    </jsp:plugin>
    When loading the page on my browser, it fails, and the java console indicates the following :
    java.lang.ClassNotFoundException: MyApplet.class
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:153)
         at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:506)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1778)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
         at sun.applet.AppletPanel.run(AppletPanel.java:293)
         at java.lang.Thread.run(Thread.java:536)
    I tried several things for codeBase :
    codebase="/WEB-INF/classes/MyDir/MySubDir"
    codebase="/MyDir/MySubDir"
    codebase="MyDir.MySubDir"
    without any success.
    Could you tell me what is wrong?
    Thanks in advance,
    Olivier

    Hello,
    I tried what you proposed.
    It continue to fail. I think I haven't give you the whole stack :
    charger : classe MyClass.class introuvable.
    java.lang.ClassNotFoundException: MyClass.class
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:153)
         at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:506)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1778)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
         at sun.applet.AppletPanel.run(AppletPanel.java:293)
         at java.lang.Thread.run(Thread.java:536)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:252)
         at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:42)
         at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:143)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:140)
    What ca this HTTP connection failed stuff be?
    Help, thanks in advance,
    Olivier

  • How include a Servlet into a JSP page?

    Hi!!
    I need make a combobox with a servlet and place its result into a jsp page.
    The servlet is in a package, but when i do: <jsp:include file="sic.view.servlet.ComboServlet" />
    tell me that "file attribute isn�t a valid attribute name"
    whow can i do to make the combobox whit the servlet and include this into the jsp page??
    Thanks!!
    PD: Sorry my pour English...

    Servlets should be mapped to a URL, then you access the servlet via that URL.
    The servlet mapping is done in the web.xml (in WEB-INF/ directory of your web application)
      <servlet>
        <servlet-name>
          Combo_S
        </servlet-name>
        <servlet-class>
          sic.view.servlet.ComboServlet
        </servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>
          Combo_S
        </servlet-name>
        <url-pattern>
          /combo
        </url-pattern>
      </servlet-mapping>Then you would use:
    <jsp:include file="combo" />
    to include it.
    Make sure the class file gets put in the right package under WEB-INF/classes/

  • How to embed a .swf file to my jsp page in eclipse

    I had a swf file which i want to include in my jsp page.
    To embed it i m using this code
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
    WIDTH="550" HEIGHT="400" id="Main">
    <PARAM NAME=movie VALUE="Main.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#FFFFFF>
    <EMBED src="images/Main.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400"
    NAME="Main" ALIGN="" TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
    </EMBED>
    </OBJECT>
    but its not working i had also checked the path of the swf.
    I am using eclipse 3.1
    Thanks,
    Leozeo
    Edited by: leozeo on Mar 27, 2008 4:22 AM

    Hi,
    Did you try Object-> insert HTML, see if that helps

Maybe you are looking for

  • Lightroom VS Camera Raw 5.5 (color correction)

    Hi, does somebody know if discarding the advantage of making layers of Photoshop, is the Adobe Lightroom color correction controls superiors to the CameraRaw PS Interface correction controls ??? I mean for color correction purposes is Adobe Lightroom

  • Error message after installing CCP

    Hi Guys, After i inatalled the CCP 2.8, i keep on having an error message  saying " CCP requires internet explorer java plug-in 1.6.0_11 or above, see attached. I installed the Java 1.7 and keep on receiving the same error. I am actually running Win

  • Can't Update Site through Iweb

    For some reason, Iweb works fine, but when I tell it to upload changes, it doesn't, and it just hogs up RAM and just stays there? Is there something Wrong that I did? Or is it a bug?

  • Keynote animation for ios

    Does anyone know of anyway to include a keynote animation in an iPad app.? The plan is to design a keynote animation and pass it over to our iOS iPad developers to include within the App build. Not sure if Keynote is the right way to go though. Anyon

  • Teamspeak3

    Just yesterday Teamspeak3 had an update. After this update, when I attempt to run the program I am receiving this error: ./ts3client_linux_amd64: error while loading shared libraries: libfmodex64.so: cannot open shared object file: No such file or di