Jsp:include fails when referencing a struts bean:define bean

When I request the jsp listed at the bottom, I get the following error:
          cannot resolve symbol
          symbol : variable pageTemplate
          The jsp works as is in both Tomcat and Resin.
          I know the pageTemplate bean gets defined by struts, because if I remove
          (1), I get the correct output of (2).
          Does WL precompile the pages differently than Tomcat/Resin?
          We know tiles can provide similar functionality, but for various reasons,
          this is the method that seems preferred.
          <%@ page contentType="text/html;charset=UTF-8" language="java" %>
          <%@ page import = "com.stabilia.site.*" %>
          <%@ page errorPage="/error.jsp" %>
          <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
          <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
          <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
          <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
               <bean:define id="siteConfig" name="siteConfig" scope="session"
                    type="com.stabilia.site.SiteConfiguration"/>
               <bean:define id="pageTemplate" name="siteConfig"
          property="currentPageTemplate"
                    type="com.stabilia.site.PageTemplate" scope="session"/>
               (1)<jsp:include page="<%=pageTemplate.getTemplate()%>" />
               (2)template:<bean:write name="pageTemplate" property="template"/>
          

I know that in certain versions of WLS the Tag AT_END variables were not getting
          defined properly. Please contact support and ask for a patch referencing this
          with your current version.
          Sam
          Daren Desjardins wrote:
          > To be more specific, I found that I cannot use runtime expressions that
          > involve a bean defined by Struts. If the bean were declared in the
          > following way, it works.
          >
          > <%
          > SiteConfiguration siteconfig = (SiteConfiguration)
          > session.getAttribute(SiteConfiguration.SESSION_KEY);
          > PageTemplate pagetemplate = siteconfig.getCurrentPageTemplate();
          > %>
          > <jsp:include page="<%=pagetemplate.getTemplate()%>" flush="true"/>
          

Similar Messages

  • Target JSP report fails when called with a key defined in cgicmd.dat

    Hi,
    When I am calling the parameter form report as (on my local pc):
    http://rnbhatta-us:8888/reports/pf_sumsptype.jsp?gsi
    It works fine. Here 'gsi' is the KEY that has the userid/passwd@connect_string that I have defined in the cmgcgi.dat file on my local pc.
    Now the report pf_sumsptype.jsp makes a call in a similar manner to the target report with the same 'gsi' key as in the code :
    <form name="form1" method="post" action="/reports/summary_sptype.jsp?gsi">
    The call to the target report 'summary_sptype.jsp' fails. It works if I replace 'gsi' in the above line with the userid and connect info.
    Is there any other way to hide the database connect info?
    Thanks,
    Ritendra.

    I'm not sure why this should fail, but you could try changing the method above from post to get.
    -Manish

  • Try again: jsp:include fails with NPE in ValueBindingImpl

    JSF 1.1, RichFaces 3.1.3, WebLogic 9.2.2.
    I asked about this a couple of weeks ago, but I didn't get any useful responses.
    I have a simple "toy" application using a tabpanel that works fine right now. There is one tab that I will want to repeat several times, with only variations in the data in the fields (and the tab title). So, I copied the current template of that tab into an include file and I'm trying to include it with "jsp:include" from the original page, with a parameter. I've read all the suggestions about how to get jsp:include working with JSF, but it still doesn't work.
    When I display the page, I just get this:
    java.lang.NullPointerException
         at com.sun.faces.el.ValueBindingImpl.(ValueBindingImpl.java:98)
         at com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:292)
         at javax.faces.webapp.UIComponentTag.setProperties(UIComponentTag.java:890)
         at org.ajax4jsf.webapp.taglib.UIComponentTagBase.setProperties(UIComponentTagBase.java:80)
         at org.ajax4jsf.webapp.taglib.HtmlComponentTagBase.setProperties(HtmlComponentTagBase.java:78)
         at org.richfaces.taglib.TabTag.setProperties(TabTag.java:568)
         at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1017)
         at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1036)
         at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:749)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)
         at jsp_servlet.__main._jsp__tag42(__main.java:1603)
    ...more...The JSP code for the tab looks like this:
    <rich:tab id="property0"
                name="#{ratingRequest.propertyList[0].propertyID}"
                label="Property: #{ratingRequest.propertyList[0].propertyID}"
                rendered="#{ratingRequest.propertyList[0].used}">
         <f:subview id="propertysubview0">
              <jsp:include page="/faces/propertyTab.jsp">
                   <jsp:param name="propertyIndex" value="0" />
              </jsp:include>
         </f:subview>
    </rich:tab>The file this tries to include is this:
    <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
    <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:subview id="includedPropertyPage">
         <h:panelGrid id="propertyPanelGrid" columns="3">
              <h:outputText id="propertyIDOut" value="Property ID"/>
              <h:inputText id="propertyIDIn"
                              value="#{ratingRequest.propertyList[0].propertyID}">
                   <a4j:support id="propertyIDInSupport" event="onchange" reRender="propertyTable"/>
              </h:inputText>
              <rich:message for="propertyIDIn" showDetail="true"/>
              <h:outputText id="valueOut" value="Value"/>
              <h:inputText id="valueIn"
                              value="#{ratingRequest.propertyList[0].value}">
                   <a4j:support id="valueInSupport" event="onchange" reRender="propertyTable"/>
              </h:inputText>
              <rich:message for="valueIn" showDetail="true"/>
         </h:panelGrid>
    </f:subview>For more background, here's the code in the tab before I changed it to use jsp:include, and remember that this works:
    <rich:tab id="property0"
                name="#{ratingRequest.propertyList[0].propertyID}"
                label="Property: #{ratingRequest.propertyList[0].propertyID}"
                rendered="#{ratingRequest.propertyList[0].used}">
         <h:panelGrid id="property0PanelGrid" columns="3">
              <h:outputText id="propertyIDOut" value="Property ID"/>
              <h:inputText id="propertyIDIn" value="#{ratingRequest.propertyList[0].propertyID}">
                   <a4j:support id="propertyIDInSupport" event="onchange" reRender="propertyTable"/>
              </h:inputText>
              <rich:message for="propertyIDIn" showDetail="true"/>
              <h:outputText id="valueOut" value="Value"/>
              <h:inputText id="valueIn" value="#{ratingRequest.propertyList[0].value}">
                   <a4j:support id="valueInSupport" event="onchange" reRender="propertyTable"/>
              </h:inputText>
              <rich:message for="valueIn" showDetail="true"/>
         </h:panelGrid>
    </rich:tab>I don't have the source for the JSF implementation, but when I disassemble the class with the NPE, I see that the exception occurs in the ValueBindingImpl constructor that takes a Application object, and the NPE might occur because either the FacesContext or ExpressionInfoInstancePool is null (I think the former is the most likely, but I don't know why).

    Done. The results are ironically very similar to what happened with the BEA implementation, but I have a feeling this is something else, because it's failing not on the included page, but on a value binding on the main page. Perhaps I'm missing some property settings in my web.xml while using the RI.
    The entire stack trace is pretty large. I would have only included the excerpt from the root cause, but the JSF RI stack trace seems to have some interesting info up to that point. You'll see from the code at the top of the stack that either the FacesContext or the Application is null.
    org.apache.jasper.JasperException: Exception in JSP: /index.jsp:2
    1: <% session.invalidate(); %>
    2: <jsp:forward page="/faces/main.jsp"/>
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    org.apache.jasper.JasperException: Exception in JSP: /main.jsp:104
    101:                <rich:tab id="ratings" name="ratings" label="Ratings">
    102:                     <h:panelGrid id="ratingsPanelGrid" columns="3">
    103:                          <h:outputText id="field3Out" value="Field3"/>
    104:                          <h:inputText id="field3In" value="#{ratingRequest.field3}"/>
    105:                          <rich:message for="field3In" showDetail="true" passedLabel=" "/>
    106:                          <a4j:commandButton id="processRequest" value="Submit Request"
    107:                                             action="#{ratingRequest.processRequest}"
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
         org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
         org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
         org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
         org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:45)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspException: null
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:837)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
         org.apache.jsp.main_jsp._jspService(main_jsp.java:134)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
         org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
         org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
         org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
         org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:45)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    java.lang.NullPointerException
         com.sun.faces.util.Util.getValueBinding(Util.java:987)
         com.sun.faces.taglib.html_basic.InputTextTag.setProperties(InputTextTag.java:265)
         javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1027)
         javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1046)
         javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:761)
         javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:451)
         com.sun.faces.taglib.html_basic.InputTextTag.doStartTag(InputTextTag.java:506)
         org.apache.jsp.main_jsp._jspx_meth_h_005finputText_005f3(main_jsp.java:1375)
         org.apache.jsp.main_jsp._jspx_meth_h_005fpanelGrid_005f3(main_jsp.java:1309)
         org.apache.jsp.main_jsp._jspx_meth_rich_005ftab_005f3(main_jsp.java:1278)
         org.apache.jsp.main_jsp._jspx_meth_rich_005ftabPanel_005f0(main_jsp.java:950)
         org.apache.jsp.main_jsp._jspx_meth_a4j_005fform_005f0(main_jsp.java:208)
         org.apache.jsp.main_jsp._jspx_meth_f_005fview_005f0(main_jsp.java:162)
         org.apache.jsp.main_jsp._jspService(main_jsp.java:124)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
         org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
         org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
         org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
         org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:45)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • jsp:directive-include fails when deployed to 10gAS (10.1.2)

    I am working on an ADF-Faces application (EA17) but am struggling with some issues that only appear when we deploy the application. One is an IllegalStateException that I mention in an earlier posting and an other is that the < jsp: directive-include > tag is supported in our JDeveloper release but when we deploy it the pages will not display and we see from our error log that the < jsp: directive-include > is not supported.
    I did a find . -name "jsp*jar" in the $ORACLE_HOME folder of the deployment system and my local JDeveloper and my local $ORACLE_HOME and in all cases came up with the same jsp-el-api.jar and jsp-api-2.0.jar files (3086 and 49510 bytes respectively) Not being a J2EE expert I'm a little confused as to what is going on. If the same JSP jars are in both cases why does it work on my local JDeveloper but not on the server?
    Thanks, Mark

    OC4J 10.1.2 is a J2EE 1.3 server, so it is not JSP 2.0 - it's JSP 1.2. You don't deploy jsp-api-2.0 JARs into a J2EE server - it already has its own version of JSP.
    OC4J 10.1.3 is a J2EE 1.4 server, which includes JSP 2.0. Is your local JDev 10.1.3 or 10.1.2?

  • Repeating parameter names in jsp:include

    Hi,
    I have this jsp code fragment:
    <div>
    <jsp:include page="fragment_1.jsp">
    <jsp:param name="param" value="hello world!"/>
    </jsp:include>
    <jsp:include page="fragment_2.jsp">
    <jsp:param name="param" value="good morning!"/>
    </jsp:include>
    </div>
    When this code executes, the value for param, as the fragment_2 is included, is "hello world!" and not "good morning!".
    How can I use the same name for a param in fragment_2 ?
    Pietro

    The problem is that nothing in the servlet specifications prohibits a requests from having more that one parameter with the same name. It looks that when you set a parameter with the jsp:param tag that it is appending another parameter with that name.

  • Metadata for namespace '/WEB-INF/tld/struts-bean.tld' is not loaded.

    What does this : "Metadata for namespace '/WEB-INF/tld/struts-bean.tld' is not loaded." mean? The message comes from a jsp and is displayed in the structure window.
    Anyone know how to restore the default layout to JDeveloper? Applications window has gone full screen width and I can not seem to get it bak to default Any ideas?
    Thanks
    Richard

    Metadata for namespace '/WEB-INF/tld/struts-bean.tld' is not loaded
    1. Add the struts.jar to the WEB-INF/lib directory.
    2. Add the struts-bean.tld to the WEB-INF directory.
    3. In the web.xml add
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    4. To the JSP add
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

  • Iisproxy.dll causes "DLL initialization routine has failed" when serving JSPs

              Hi,
              We are experiencing problems with the Weblogic ISAPI plug-in. Often the webservers
              are giving the following error:
              "A dynamic link library (DLL) initialization routine has failed"
              when trying to serve JSP requests (the only ones that are using this plug-in),
              without crashing the IIS service. Which causes our load-balancers to hit the affected
              webservers as the IIS service is running, but the clients (browsers) only seen
              this error.
              Our configuration is the following:
              - 2 WLS 4.5.1 SP11 on Solaris 2.5.7 boxes running in a cluster
              - 3 IIS4 using the iisproxy.dll from WLS 4.5.1 SP14 on NT4 SP6a boxes.
              Our iisproxy.ini is the following:
              WebLogicCluster=10.194.34.32:7005,10.194.34.34:7005
              ErrorPage=http://212.0.161.16/media/site_down.htm
              ConnectTimeoutSecs=15
              ConnectRetrySecs=2
              DebugConfigInfo=ON
              Debug=ON
              The plug-in is registered to only serve JSP requests and the "Run in separate
              memory space" is checked. Does anyone knows what's the problem? I'm also attaching
              the plug-in log from one of the affected webservers.
              Thanks in advance.
              [Wlproxy.zip]
              

    Thanks, JLS.
    We figured it out. There's an entry in the registry that lvanyls.dll points to specifying the location of the LV shared directory (and therefore the MKL directory). If it's not found in that exact location, the dll load aborts.
    We're trying to not include the runtime installer in our application installer because of the size, so we're figuring out our own workaround (and trying to CYA in the meantime ).
    -Scott

  • virtual-directory-mapping fails when loading JSPs in 8.1

    I'm using portal 8.1 sp3 and trying to get my JSP includes to include JSPs from a virtual directory.
              I can load HTML files from the working directory perfectly:
              <jsp:include page="/myprods/myProd1.html" />
              But whenever I try to load JSPs it fails:
              <jsp:include page="/myprods/myProd1.jsp" />
              Is this a known (bug) and expected behavior?
              My weblogic.xml setting:
              <virtual-directory-mapping>
              <local-path>c:/wls-domains/portal_servers/testcontent</local-path>
              <url-pattern>/myprods/*</url-pattern>
              </virtual-directory-mapping>
              And I have C:\wls-domains\portal_servers\testcontent\myprods which contains both myProd1.html and myProd1.jsp
              Note I cannot put my JSP's pre-compiled class in the applications classpath, I'm expecting the jsp:include to resolve all this itself.
              The error I get when trying to include the JSP is as follows:
              Error opening /SamplePortlet/index2.jsp.
              The source of this error is javax.servlet.ServletException: [HTTP:101249][ServletContext(id=3477358,name=myProject,context-path=/myProject)]: Servlet class jsp_servlet._myprods.__myprod1 for servlet /myprods/myProd1.jsp could not be loaded because the requested class was not found in the classpath C:\wls-domains\portal_servers\user_projects\applications\myApplication\.workshop\output\myProject\WEB-INF\classes;C:\wls-domains\portal_servers\user_projects\applications\myApplication\myProject\WEB-INF\classes;
              [followed by loads more classpath values]
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:824) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:254) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:188) at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:535) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:373) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
              [followed by loads more stack trace]
              Thanks in advance for any assistance
              Martin

    Have you received any feedback to your question ??
    We have recently upgraded from WLS 7.0 to WLS 9.1 and are experiencing the same unexpected behaviour.

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

  • Relatiive Path problem when using JSP:include in web portlet

    Hi
    I am using Oracle Portal 9.0.2, and thus OC4J as the J2EE platform.
    I have created a JSP web portlet that is supposed to inlude a specific static html file, which name is passed to it using a portlet parameter. It works, but I had to create a symbolic link from the applicable J2EE applications's htdocs directory in order to access the content:
    /j2ee/OC4J_Portal/applications/<application>/htdocs/<portlet>/content/
    where /content/ is a symbolic link to another directory altogether.
    I can then access the content from within the portlet with a JSP include tag that looks like :
    docPath = "/htdocs/<portlet>/html/"+doc_path;
    %>
    <br>Include:
    <jsp:include page="<%=docPath%>" flush="true"/>
    I would like to access the content using the JSP include without having to use the symbolic link. Is there a way to do this. I tried using an Apache alias, but that did not work.
    Regards
    Harry

    Hi
    Thanx
    In the end we build up a static URL to the document to be included using:
    String contentLocation="content/";
    docPath = contentLocation+getAdditionalDocPath();;
    out.println("docPath="+docPath);
    String docPathAndName = portletRequest.getParameter("doc_path");
    %>
    <!--
    This java script function calls the display content page with the
    page parameter doc_path (which is in return passes it to the display
    content portlet) in order to retrieve and display specific document
    with a JSP:include tag
    -->
    <script language="JavaScript">
    function generateSectionPath(docName) {
    this.location="http://<%=portletRequest.getServerName()%>:<%=portletRequest.getServerPort()%>/pls/portal/url/page/<%=getPageGroup()%>/content?doc_path="+"<%=docPath%>"+docName;
    <script language="JavaScript">
    function generateRelativePath(docName) {
    this.location="http://<%=portletRequest.getServerName()%>:<%=portletRequest.getServerPort()%>/pls/portal/url/page/<%=getPageGroup()%>/content?doc_path="+docName;
    </script>
    <br>Include:
    <%
    if (portletRequest.getParameter("doc_path") == null) {
    out.println("Error - no doc path specified");
    } else { 
    try { %>
    <jsp:include page="<%=docPathAndName%>" flush="true"/>
    <% } catch (Exception e) {
    out.println("Error retrieving document:"+e.toString());
    } // end if
    %>
    Each link from one included HTML file to another becomes a JS function that points the browser to the portal page that includes the portlet that includes thwe JSP that has the include tag to include the html document that is to be displayed.
    The current relative path the the html document (from a predefined root in the file system that is symbolically linked to the same directory as where the including JSP lives) is stored in a session variable, and appended to the document name that is passed to the page.
    If a full document path, as opposed to just the name, is stored, that no appending is done. However, the path is stripped out and stored in a session variable.
    Ths thing is, sometimes a document name, and sometimes a path is passed to the page. Therefore the requirement to know the path when it is not available. A name only will always be passed subsequent to a request for a document with the full path specified, therefore the session variable mechanism works.
    Thanx for the input
    Harry

  • WebLogic 12.1.2 fails when injecting extension in jar into bean in same jar

    WebLogic 12.1.2 fails when deploying a web application that contains a jar in which an extension is injected into a bean that resides within that same jar. The following exception is thrown:
    "weblogic.management.DeploymentException: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [SampleExtension] with qualifiers [@Default] at injection point [[field] @Inject private test.ApplicationBean.extension]"
    weblogic.management.DeploymentException: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [SampleExtension] with qualifiers [@Default] at injection point [[field] @Inject private test.ApplicationBean.extension]
      at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:123)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:260)
      at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:48)
      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
      Truncated. see log file for complete stacktrace
    Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [SampleExtension] with qualifiers [@Default] at injection point [[field] @Inject private test.ApplicationBean.extension]
      at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:311)
      at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
      at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:143)
      at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)
      at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)
    The problem can be easily reproduced by a minimal case with the following structure:
    war-root
         WEB-INF
             beans.xml
             lib
                somejar.jar
    And with somejar.jar having the following structure:
    test
        ApplicationBean.java
        SampleExtension.java
    META-INF
        services
            javax.enterprise.inject.spi.Extension
        beans.xml
    ApplicationBean can looks as follows:
    @Named
    @ApplicationScoped
    public class ApplicationBean {
        @Inject
        private SampleExtension extension;
        @Inject
        private BeanManager manager;
        public void myMethod() {
            System.out.println("Extension:" + extension + " Manager:" + manager);
    And SampleExtension can be:
    public class SampleExtension implements Extension {
        public void onBeanDiscovery(@Observes AfterBeanDiscovery beanDiscovery, BeanManager beanManager) {
            out.println("Extension called");
    I published a minimal web application (as Maven multi-module project) that reproduces the case here: https://github.com/arjantijms/inject-extension
    This application runs fine on basically every other Java EE server (tried specifically JBoss EAP 6.1, GlassFish 4.0 and TomEE 1.5.2), but not on WebLogic 12.1.2.
    Note that I'm not really a WebLogic user. I'm an open source library writer who's trying to make our library (OmniFaces) to run on all Java EE implementations. This case is part of a functionality in our upcoming release.

    Hi,
    If it is war then try to apply following  Patch 13893259.
    Regards,
    Kal

  • WebLogic 12.1.2 fails when deploying ear with injecting extension and bean with injection of this extension in ejb

    WebLogic 12.1.2 fails when deploying an enterprise application(ear) that contains a ejb in which injected 1) an extension 2)bean with injection of this extension.
    The following exception is thrown:
    Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [CdiExtension] with qualifiers [@Default] at injection point [[field] @Inject private test.extension.Bean1.extension].
    Possible dependencies [
    [Extension [class test.extension.CdiExtension] with qualifiers [@Default]; zip:/domain1/servers/AdminServer/tmp/_WL_user/test/7x6roh/lib/test-extension-0.0.1-SNAPSHOT.jar!/META-INF/services/javax.enterprise.inject.spi.Extension@1[test.extension.CdiExtension@1115deb],
    Extension [class test.extension.CdiExtension] with qualifiers [@Default]; zip:/domain1/servers/AdminServer/tmp/_WL_user/test/7x6roh/lib/test-extension-0.0.1-SNAPSHOT.jar!/META-INF/services/javax.enterprise.inject.spi.Extension@1[test.extension.CdiExtension@ed791f]]]
        at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:314)
        at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
        at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:143)
        at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)
        at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)
        at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:367)
        at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)
        at com.oracle.injection.provider.weld.WeldInjectionContainer.start(WeldInjectionContainer.java:106)
        at com.oracle.injection.integration.CDIAppDeploymentExtension.initCdi(CDIAppDeploymentExtension.java:70)
        at com.oracle.injection.integration.CDIAppDeploymentExtension.activate(CDIAppDeploymentExtension.java:47)
        at weblogic.application.internal.flow.AppDeploymentExtensionFlow.activate(AppDeploymentExtensionFlow.java:37)
        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
        at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
    Problem can be easily reproduced by a minimal case:
    test.ear:
    \lib\test-extension-0.0.1-SNAPSHOT.jar
    test-ejb-0.0.1-SNAPSHOT.jar
    where
    test-extension-0.0.1-SNAPSHOT.jar contains:
    CdiExtension.java:
    package test.extension;
    import javax.enterprise.inject.spi.Extension;
    public class CdiExtension implements Extension {
        private String someString = "Some String";
        public String getSomeString() {
            return someString;
    Bean1.java:
    package test.extension;
    import javax.enterprise.context.ApplicationScoped;
    import javax.inject.Inject;
    @ApplicationScoped
    public class Bean1 {
        @Inject
        private CdiExtension extension;
        public String get() {
            return extension.getSomeString();
    test-ejb-0.0.1-SNAPSHOT.jar contains:
    EjbBean.java:
    package test;
    import test.extension.Bean1;
    import test.extension.CdiExtension;
    import javax.ejb.Stateless;
    import javax.inject.Inject;
    @Stateless
    public class EjbBean {
        @Inject
        private CdiExtension extension;
        @Inject
        private Bean1 bean1;
        public String getSomeString() {
            return extension.getSomeString() + "\n" + bean1.get();
    p.s. i seen same problem in community.oracle.com/thread/2577403 , but it happen in "war", not "ear", and seems successfully patched with patch №17424706

    Hi,
    It looks like there is patch exists for this issue.
    Patch 17198187
    Please try to download from the MOS or try to open a ticket with support.
    Regards,
    Kal

  • Struts version of JSP include?

    JSP has a really straightforward way of including files:
    <%@ include file = "../footers.html" %>
    The downside is that if your directory structure changes, you need to go back and change all the links.
    I believe with Struts, you can use some kind of variable like
    <tiles:insert page="myfooter">
    But I've been looking at tutorials, and I don't know how exactly to define this. It doesn't seem straightforward at all. All the tiles:insert that I've seen contain actual file references which is precisely what I do **NOT** want--I want a variable that I can reuse in all my pages, like
    footer, then define this in a single location. To add to the confusion, the tiles insert seems to contain several put tags within it--but all I want is to just have that "myfooter" for example defined as pointing to say "../footer.html" in some config file, so that the same variable name can be reused.
    Is this possible with Struts?
    Thanks.

    hmm..actually i think i was thinking of it the wrong way.
    With tiles, you apparently can't insert pages. Instead there's a default frame, where you can specify a body, and other pages can decide what exactly goes in that body tag.
    It seems like that has a disadvantage over jsp's ability to pull in outside pages. Say for example there are 5 pages that all include the same file. The layout may be slightly different, but each one can use the same jsp:include tag, that maybe looks up the filename from a props file. With tiles, it may be a bit more complicated than a simple include.

  • Adobe changes my numeric field to include commas when validation fails

    Adobe changes my numeric field to include commas when validation fails. My numeric validation setting is num{zzzzzzz9.99}. I want my numeric field to display as 99999999.00, no commas and only to have 2 decimals places. I added this validation to the Display, Edit, Validation and Data tabs under the validation pattern dialog box.
    When validation fails, adobe changes the display of the field to include commas and drops the decimal places:
    999,999,999
    How can I prevent this from happening? Any feedback is greatly appreciated.
    I've also added a change event to the field as well:
    \\only allows numbers and period.
    if (xfa.event.newText.match(/[^0-9.]/))
    xfa.event.change = "";
    \\only allows 11 characters to be entered.
    var maxLength = 11;
    if(xfa.event.newText.length >maxLength)xfa.event.change = "";

    I want it to display only numbers followed by 2 decimal places.
    999999999.00
    If I type all numbers in my field like 999999999999 and I go over the character limit of 11. My validation fails and then my numeric field is displayed with commas, 999,999,999 without the 2 decimal places. Is there a way to prevent adobe from automatically changing my fields?

  • How to use bean:write inside jsp:include ?

    I got a problem about JSP's syntax. The following is my code:
    <%@ include file="<bean:write name="HelloForm" property="target" />"%>
    The double quotes inside bean:write is my problem. Could you please teach me how to use bean:write within JSP's include? Thank you!

    http://java.sun.com/products/jsp/syntax/1.2/syntaxref12.html
    Include Directive vs <jsp:include>
    The include directive <%@include %> is done at page translation/compile time.
    It effectively pastes in a static file, and then compiles the JSP as if it was all one file.
    As such, you cannot provide a runtime expression to it.
    To do runtime inclusion, you need to use the <jsp:include> tag which does except runtime parameters.
    <%String test = request.getParameter("pageInfo");%>
    <%String link = test + ".jsp"; %>
    <jsp:include page="<%= link %>" %>Unfortunately you can't use the tag with a bean:write tag as well, you can only use runtime expressions, not tag. So you have to do the include with
    <jsp:include page="<%= HelloForm.getTarget() %>" />
    Cheers,
    evnafets

Maybe you are looking for

  • IPod Nano Problem with Turning On

    Right I've got a bit of a problem with turning on the nano. I know it works because when its on it's fine, but if its off for a while (i.e. 30 mins or more) and I go to press play or whatever, nothing happens. But if I press any of the buttons about

  • Importing Tiffs - FCP unexpectedly quits

    I have been importing tiffs at 100 dpi and 1000 pixels (either landscape or portrait depending on orientation). Every time I load into the Viewer, FCP either unexpectedly quits or I get the gray screen of death. I have tried different formats (png, j

  • Load Balancing Statistics

    We have a CSS 11050. We mostly use it for load balancing accross multiple web servers. What is the command to see some statistics on how much traffic is sent to each one of the web servers? (Number of bytes, connections...)

  • ANN: PHP Object-Oriented Solutions

    This is not directly related to Dreamweaver, but I know a lot of people here use PHP. My latest book, "PHP Object-Oriented Solutions" has just been published and is already in stock at Amazon.com and www.compman.co.uk. It's aimed at intermediate PHP

  • Iphone 5 camera, litle spots

    HI, i bought a new iphon5 16 GB 3 weeks ago, everything was ok with the camera, 2 days ago the rear camera start showing little purple spots, always at the same location, when taking snaps. the front camera is ok. Please find attache a sample of the