How to include jsp page in jsf ???
Hi,
I use JDeveloper 11g and the framework ADF. I want to include a jsp page in another page ( jsf page).
In fact, I do this :
<f:view>
*<jsp:include page="/Menu/MenuGlobalDynamique.jsp"/>*
</f:view>
when i run my jsf page nothing is displayed and i have this error :
javax.servlet.ServletException: Erreur OracleJSP :
oracle.jsp.parse.JavaCodeException: Ligne n° 19, oracle.jsp.parse.JspParseTagDeclaration@cf767d <br>Erreur : Java code in jsp source files is not allowed in ojsp.next mode.
at oracle.jsp.runtimev2.JspReportUtil.reportException(JspReportUtil.java:180)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:692)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:722)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:646)
Have you an idea to help me and resolve my problem.
Thank you.
Hi,
Can you post the source of the MenuGlobalDynamique.jsp page?
if MenuGlobalDynamique.jsp is a JSF page and you want to include it into other JSF page you must mark out (or delete) this parts from the MenuGlobalDynamique.jsp like here:
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces"
xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
<jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<!--
<f:view>
<afh:html>
<afh:head title="impForm">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</afh:head>
<afh:body>
<af:messages/>
<af:form>
-->
<!--
</af:form>
</afh:body>
</afh:html>
</f:view>
-->
</jsp:root>regards,
Branislav
Similar Messages
-
How to Develop Static page using JSF/Creator
Hi,
I am a newbie trying to understand how one develops static pages in JSF. I fear I am going to require a hybrid development environment; that is, I will need two IDE's. For example, Dreamweaver AND Creator.
I'd like to just use one as it is more convenient, and the static pages will be configured as necessary as fully integrated pages. But I'm not sure how to use JSF/Creator to develop "plain vanilla" HTML/JSP pages.
I appreciate any feedback and "education". :-)
SamI dont use it much, but im pretty sure there is a tabbed pane allowing you to swith between a HTML/JSF code view and a visual view, a little like dreamweaver. I currently hand code my JSF pages in a standard IDE, its not too tricky once you understand the tags, and it gives you flexible control which I like. Maybe this approach will work for you
-
How to run JSP pages in weblogic 8.1 sp2
hi frnzs,
plese give me some idea about how to run JSP pages in weblogic server.enen i dont know hw to fly palne otherwise i can definitely give u sm guides abt that......
-
How to include html page or html code in adobeflex 4 web application please give me a solution.
Thank you
Chandra Sekharhi,
go thru this link, may be of some help for you
About IFrames
http://www.deitte.com/archives/2006/08/finally_updated.htm
IFrame Src
http://code.google.com/p/flex-iframe/
About the IFrame Approach
http://www.deitte.com/archives/2008/07/dont_use_iframe.htm -
How to include HTML page on a screen
Hi,
How to include HTML page on a module-pool screen. i want to handle hyperlinks on that page. how ca n i do that?....plz send me reply vvvery fastHi Amarnath,
1. RSDEMO_HTML_VIEWER
Check the above program.
Regards,
Amit M. -
Can we include a JSP page in an already included JSP Page
Hi guys,
I have a doubt with JSP include tag. The problem is ..
Can we include a JSP page in an already included JSP Page
AS shown below
I have one JSP page
Index.jsp
-in this I am including "include.jsp"
-Again within the "include.jsp" I am including "include1.jsp"
It is neither giving an error nor displaying the content which is there in the "include1.jsp" but it is displaying the content of "include.jsp"
first of all let me know whether it is possible or no.. If so then why is it not coming and what is required to do this..
fast...
Thanks
Sreenadha Reddy KHi guys,
I have a doubt with JSP include tag. The
g. The problem is ..
Can we include a JSP page in an already included JSP
Page
AS shown below
I have one JSP page
Index.jsp
-in this I am including "include.jsp"
-Again within the "include.jsp" I
he "include.jsp" I am including "include1.jsp"
It is neither giving an error nor displaying the
content which is there in the "include1.jsp" but it is
displaying the content of "include.jsp"
first of all let me know whether it is possible or
no.. If so then why is it not coming and what is
required to do this..
fast...
Thanks
Sreenadha Reddy KIt is possible , u just have to change all the files and save them all again, clear the temp dirs where all the jsp's as compiled. Now after all this try , it should work . -
Repeater fails using {container.item} context within included JSP pages
Greetings,
I'm using Bea Workshop 8.1.2 and netui's based framework.
I'm experiencing a problem relating to the use of jsp:insert tags as a way of templating the code as to make it more maintainable and cost effective.
The problem arises when using repeaters and then binding a <netui> tag with a "container.item" context inside the included jsp page.
Example:
On a PageController we define on its scope a rather simple data structure:
public String[] array={"Item1","Item2","Item3"}
The associated index is as follows:
index.jsp
<netui:html>
<netui-data:repeater dataSource="{pageFlow.array}">
<netui-data:repeaterHeader></netui-data:repeaterHeader>
<netui-data:repeaterItem>
<netui:label value="{container.item}"/><br>
</netui-data:repeaterItem>
<netui-data:repeaterFooter></netui-data:repeaterFooter>
</netui-data:repeater>
</netui:html>
This works as expected, it prints the data in the array list. Fine.
Now, with the <jsp:insert> tag usage, we get two files index.jsp and body.jsp:
index.html
<netui:html>
<netui-data:repeater dataSource="{pageFlow.array}">
<netui-data:repeaterHeader></netui-data:repeaterHeader>
<netui-data:repeaterItem>
<jsp:include page="body.jsp" flush="true"/>
</netui-data:repeaterItem>
<netui-data:repeaterFooter></netui-data:repeaterFooter>
</netui-data:repeater>
</netui:html>
body.jsp
<netui:html>
<netui:label value="{container.item}"/>
<netui:label value="{pageFlow.array[0]}"/>
</netui:html>
With this example the {container.item} tag fails with this exception:
"Caught exception when evaluating expression "{container.item}" with available binding contexts [actionForm, pageFlow, globalApp, request, session, appication, pageContext, bundle, container, url, pageInput]. Root cause: com.bea.wlw.netui.script.xscript.IllegalContextStateException: The Tag "com.bea.wlw.netui.tags.html.Label@cb5dce" does not have a valid parent of type DataAccessProvider. The expression "container["item"]" requires a parent of this type."
BUT - and here is my problem with this - the label tag with {pageFlow.array[0]} PRINTS THE DESIRED ELEMENT.
Also, on an extended example with a <form> tag around the main index html and the array structure inside a FormData class, {actionForm.array[0]} ALSO PRINTS THE DESIRED ELEMENT.
Only {container.item} gloriously fails with an exception complaining about IllegalContextStateException.
This is a total nonorthogonal behaviour, the features do not work as expected and indeed, with the importance of repeaters for netui's development, this preclude us from the minimum standard for structured web application design.
Does anyone have any clue about this behaviour? If not a fix, at least an explanation...
Thanks in advance.I am trying to insert multiple rows I when submited I am get ting only 1 row in the DatabaseForm.
my netui.log file shows this error:
29 Oct 2004 17:25:48,941 WARN NetUIReadVariableResolver []: Could not create a ContextFactory for type "com.bea.netuix.servlets.script.PortalVariableResolver$PortalContextFactory" because the ContextFactory implementation class could not be found.
29 Oct 2004 17:26:35,288 ERROR SortFilterColumn []: Unable to load /com/bea/wlw/netui/databinding/grid/filter/filter-window.properties. Using com.bea.wlw.netui.tags.databinding.grid.util.grid
Throwable: java.util.MissingResourceException: Can't find bundle for base name /com/bea/wlw/netui/databinding/grid/filter/filter-window.properties, locale en_US
Stack Trace:
java.util.MissingResourceException: Can't find bundle for base name /com/bea/wlw/netui/databinding/grid/filter/filter-window.properties, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:511)
at com.bea.wlw.netui.tags.databinding.grid.column.SortFilterColumn.<clinit>(SortFilterColumn.java:143)
at jsp_servlet._activitychange.__grid._jspService(grid.jsp:21)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter(PageFlowJspFilter.java:208) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:316)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(PageFlowRequestProcessor.java:1301)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedirector.forward(PageFlowRequestProcessor.java:1317)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlowRequestProcessor.java:1199)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.processForwardConfig(PageFlowRequestProcessor.java:1093)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:650)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6456)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
29 Oct 2004 17:27:31,164 WARN FlowController []: Could not find exception handler method exceptionHandler for java.lang.ArrayIndexOutOfBoundsException.
29 Oct 2004 17:27:31,165 WARN FlowController []: Could not find exception handler method exceptionHandler for java.lang.IndexOutOfBoundsException.
29 Oct 2004 17:27:31,165 WARN FlowController []: Could not find exception handler method exceptionHandler for java.lang.RuntimeException.
The actionForm uses a FormData which has a Array of all the fields that need to be populated.
Any idea why only 1 row shows up ?.
Thanks
Raghav -
How to access a variable from a dynamically included JSP page
I have a jsp (say main.jsp) using the following in its code :
<jsp:include page="menu.jsp" flush="true" />
I have a variable in menu.jsp which I would like to use in my main.jsp.
How do I get the value of the variable defined in menu.jsp ?
I called this variable in menu.jsp, Public, but this didnot help me use the value of that variable in main.jsp
Any help is highly appreciated.. thnks a lotI do notice the variable var1 has the value populated - in menu.jsp - (from View -->
Source in the browser) but for some reason not able to use it in main.jspI'm not quite sure of the way your jsps are structured from your code snippet but I think there is something to be aware of here that may be part of your problem, namely the difference between the include directive and the include action.
You are currently using the include action, this treats the included resource as a dynamic object - i.e. a request is sent to that resource and the resulting response is included in your page. So when you think of what there is no java variable actually included - you'll just get the resulting HTML that is generated by menu.jsp
The include directive, as in <%@include file=�menu.jsp � %>, on the other hand treats the resource as a static object. This means the actual bytes in the included resource are inserted into the including jsp and then the result of that is compiled and processed, effectively you are cutting and pasting the menu.jsp into your calling jsp. In this case the variable would be available to the calling jsp.
However this approach does bring other difficulties that may break your current code, you'll just have to try it and see what happens.
Hope that's relevant to your problem,
Matt -
How to include the page dynamically in JSF
Hi all
Below is static include
<jsp:include page="../inc/sideMenu.inc"/>
How to include the file dynamically
ThanksHi,
Though I have not tried it I think making use of a variable to hold the page name to be included should work. Could you try this and see if it works?
Cheers
Giri :-) -
How to include the pages dynamically in JSF
Hi all
Below is static include
<jsp:include page="../inc/sideMenu.inc"/>How to include the file dynamically
Thanks
SudhakarHi,
Though I have not tried it I think making use of a variable to hold the page name to be included should work. Could you try this and see if it works?
Cheers
Giri :-) -
How i will dynamically include jsp pages in a dynamic richfaces tab?
Hello experts,
I am unable to include jsp in dynamically created richfaces tab
i am able to create the tabs sucessfully,but could not include the jsps in these tabs
Please help???
following is the code
HtmlTab t;
t = new HtmlTab();
t.setId(id);
t.setName(id);
IncludeTag in=new IncludeTag();
t.setData(in);
tabpanel.getChildren().add(t);Another approach is to parse the blog's RSS feed into your HTML page with a PHP script.
This is your wife's RSS feed:
http://ninjabaker1.blogspot.com/feeds/posts/default?alt=rss
Feed for All has a free script. I just tested it and it seems to work ok with Blogger's RSS.
http://www.feedforall.com/free-php-script.htm
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
Passing parameters to included JSP files using JSF
I have included JSP, which I use in many other JSP files. I want to display message in this included JSP which depends on the information in JSP files which include this JSP. How can I do this without using scriptlets?
Message was edited by:
cheltsovI have one included page in one jsp page(mother page). I have included it by jsp:include tag. The included page consists of two inputText. I need to pass the parameters of the mother page together with the parameters in the included page in the backingBean of the mother page. Hope this one is clearer.
The code snippet in the mother page looks like this
<jsp:include page="/pages/ps/sample_rep2.jsp"/>.
In the sample_rep2.jsp, I have two inputText. How can I pass this in the backingBean of the motherpage.
The sample_rep2.jsp is the included page here. The sample_rep2.jsp looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
<af:panelBox>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
<af:panelBox>
<af:inputText label="User ID" id="userid" value="CDOUGLAS"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
<af:panelBox>
<af:inputText label="User ID" id="userid" />
<af:inputText label="Age" id="age"/>
</af:panelBox> -
How to include a page conditionally ?
Hi all !
I have a web page made of different sections. Every section is included in a separate page.
<f:view>
<h:form>
<%@ include file="filters.jsp" %>
<%@ include file="dataTableAdmin.jsp" %>
<%@ include file="modalPanel.jsp" %>
</h:form>
</f:view>Now I have the requirement that some sections should be visible only to the admin users.
The roles are referenced in a Bean registered in faces-config.xml.
How can I include a page depending on the value of the Bean ? I'd need something like the "rendered"
attribute on the "include" tag, but I'm afraid it doesn't exist......
Do you have any suggestion ?
Thanks alot
FrancescoPut the include into a panelgroup and use the rendered attribute...
-
Hi,
How an external jsp or html page can be included within a servlet.
like, One servlet is including different pages within it's body based
different condition and arggument passed to it.
Hope for your help.
Thank you.Thanks KP for your reply.
I dont want to jump to different page but wanted the same servlet
that could include different page on conditions.
Ex. if your logged in it will show your company details with the middle
of page with all the 'page-side' contents(menu , banners etc) around it.
Now this same servet will include the login page in the same middle of page, when you need to login.
Hope this could explain what i want not how i may make a login system.
Hope to hear you again.
~_~ -
Include jsp page within servlet
Hi,
How an external jsp or html page can be included within a servlet.
like, One servlet is including different pages within it's body based
different condition and arggument passed to it.
Hope for your help.
Thank you.Thank You for your help.
I have sucessfully slove the problem. I am awarding you full 10 duke
dollors for it. I have anthoer problem about applets is listed in
Applet devlopment under 'Applet to access html controll' title.Please
visit that if you like to participate.
For ee8prt, i had same problem as i was using jsdk2.0 which dont have the despatcher class. user higher jsdk.
Happy coding.
Maybe you are looking for
-
Install Error on Weblogic 10.3.2 - Generic
Here's the error that we're receiving. Any help would be great. Thanks, Bob Larsen java -d64 -Xmx1024m -jar installer.jar -mode=console -log=log.out Staging directory (where wls1032_generic.zip has been unzipped) is $MW_HOME/weblogic_stage $MW_HOME/w
-
How to Retrieve a Crystal Report's Unmanaged Destination Filename
Hi all, I have looked very closely at Robert Twigg's response to the post "[Destination Path and name of a scheduled Report|http://forums.sdn.sap.com/thread.jspa?messageID=9588160#9588160]" dated 9/1/10 and while it does retrieve the unmanaged destin
-
Lloydstsb Internet banking doesn't work on iPod touch safari
have just set up and tested my iPod touch with my favourite sites, and all was well until I tried my Internet banking. If you try and log into www.lloydstsb.com Internet banking, you are just constantly redirected to the original signin page with no
-
Problem linking to MobileMe album created in Aperture
I use multiple computers and I'm trying to sort out synchronising photo albums between them. On my main iMac I use Aperture and have created and published a number of photo albums to the gallery. I can view the albums from any machine via the Safari
-
How do I make the menu title a different color when it is the active menu in Spry horizontal menu? Dreamweaver CS5.5 Apple OS X.6.8 View site at: http://dorsay-easton-indian-law.com/staging/index.html Steps: 1. Click link to land on Home page 2. View