Jsf and facelets

Hi all,
I have to include some html-file from the file system in a facelet. The html-file contains java-script and is not a valid xhtml-file . Is there a chance to do this with faclets?
Thanks in advance
Rainer

I can´t influence the javascript in the file. It´s a birt report, which is dynamically generated at runtime.. So, any other ideas?

Similar Messages

  • JSF and Facelets on OC4J 10.1.2 / 10.1.3_dp4

    Hi,
    I am developing a web application using JSF and it works properly on OPC4J (JSF RI and myFaces). But I cannot find a way to get Facelets running.
    When I simply deploy the sample application from exadel here I get strange errors:
    1) Using JSP 2.4
    java.io.IOException: code-source:/D:/dev/Server/oc4j_10.1.3_dp4/j2ee/home/applications/JSF/JSF63622/WEB-INF/lib/xhtml-lat1.ent has no "!<path>" suffix so does not name a path within the code-source.
         at oracle.oc4j.loader.SharedCodeSourceSet.getResourceStream(SharedCodeSourceSet.java:396)
         at oracle.oc4j.loader.SharedCodeSourceURL$Connection.getInputStream(SharedCodeSourceURL.java:93)
         at java.net.URL.openStream(URL.java:1007)
         at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2367)
         at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:280)
         at oracle.xml.parser.v2.XMLReader.pushEntityRef(XMLReader.java:2240)
         at oracle.xml.parser.v2.XMLReader.pushEntityRef(XMLReader.java:2168)
         at oracle.xml.parser.v2.XMLExternalReader.pushEntityRef(XMLExternalReader.java:157)
         at oracle.xml.parser.v2.XMLExternalReader.checkEntityStart(XMLExternalReader.java:167)
         at oracle.xml.parser.v2.XMLExternalReader.setMarkupDepth(XMLExternalReader.java:285)
         at oracle.xml.parser.v2.NonValidatingParser.parseMarkupDecl(NonValidatingParser.java:617)
         at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:484)
         at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:310)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:289)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:199)
         at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
         at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:230)
         at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:219)
         at com.sun.facelets.compiler.Compiler.compile(Compiler.java:99)
         at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:187)
         at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:137)
         at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:88)
         at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:396)
         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:434)
         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 com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:382)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:701)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:397)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:291)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:48)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:225)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:173)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:230)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:305)
         at index2e_jsp._jspService(_index_2e_jsp.java:46)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:408)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:525)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:447)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:382)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:701)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:397)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:833)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:430)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:215)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    2) Using JSP 2.4:
    java.lang.NullPointerException
         at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
         at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:76)
         at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:398)
         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:432)
         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 com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:382)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:701)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:397)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:291)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:48)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:225)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:173)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:230)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:305)
         at index2e_jsp._jspService(_index_2e_jsp.java:46)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:644)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:364)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:525)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:447)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:382)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:701)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:397)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:833)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:430)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:215)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Has anyone some tips for me why Facelets does not work or how i can get it to work?
    Thanks, Daniel

    Copy the META-INF folder of the
    jsf-facelets.jar to a folder called "config" in the WEB-INF folder of your web and add
    <context-param>
    <param-name>facelets.LIBRARIES</param-name>
    <param-value>/WEB-INF/config/jsf-core.taglib.xml;/WEB-INF/config/jsf-html.taglib.xml;/WEB-INF/config/jsf-ui.taglib.xml;/WEB-INF/config/jstl-core.taglib.xml;/WEB-INF/config/jstl-fn.taglib.xml</param-value>
    </context-param>
    to the web.xml.
    This helped for me.

  • JSF 1.2 RI and facelets

    Hello, we have some component library that builds on JSF 1.2 RI and facelets. Usually JSF 1.2 cannot run on WLS 9.2 because it requires JSP 2.1 (thus weblogic 10). However,
    since we use facelets and thus no JSP, in this case JSF 1.2 can run on WLS 9.2 (and it does work).
    However to run as portlet, we need to use some JSF portlet bridge.
    Does anyone have experience with this? We would like to try two ways:
    1. Bridge to JSR 168 as local portlet, then run this afterwards as a WSRP remote portlet (once you have a local portlet running this should cause no issues).
    We already have it running (with some issues, using the sun jsf portlet bridge which is tuned towards JSF 1.2) inside pluto, no I'll try out WLS portal and I would expect no extra issues since we already have a JSR-168 compliant portlet. What do you think?
    2. Bridge directly to WSRP bypassing JSR 168. I read that BEA provides a bridge (which then can even run as a simple producer not requiring a portal domain but may run in a normal WLS domain) that does this. I do suspect that this bridge is specifically tuned to JSF 1.1 and JSP (maybe even to weblogic provided JSF tags) and it might be quite hopeless to get JSF 1.2 RI + facelets to run in this way.
    Before wasting my time I would be grateful if someone could shed some light on this.
    Regards,
    Peter Mutsaers
    Edited by mutsaers at 03/21/2007 5:49 AM

    I'm having issues with JSR 168 portlet with JSF v1.1 (Sun RI) on BEA Portal 9.2. See http://forums.bea.com/bea/thread.jspa?threadID=400002399. I've not had any luck with BEA support so far. It'll be great if you can share your thoughts/experiences with JSF and JSR 168.
    Thanks.

  • Authorization with JAAS in JSF with facelets

    hi,
    can u please hint me where i did mistake.. i clearly mention what i did and what i getting ..i did this in jsf1.2,tomcat6.x
    i did JAAS authentication in jsf with facelets.but i am unable to do the authorization with JAAS in jsf
    after getting authentication i put the subject in session. if i print the values in suject i got the following out put
    Subject:
    Principal: TypedPrincipal: hari [USER] // user name
    Principal: TypedPrincipal: admin [GROUP] // user role.
    now i want to authorization based on the role.
    for this i wrote policy file --principal.policy like this
    grant Principal com.alw.reports.jaas.TypedPrincipal "admin" {
        permission com.alw.reports.jaas.ViewIdPermission "*";
    grant Principal com.alw.reports.jaas.TypedPrincipal "hari" {
        permission com.alw.reports.jaas.ViewIdPermission "*";
    grant Principal com.alw.reports.jaas.TypedPrincipal "user" {
        permission com.alw.reports.jaas.ViewIdPermission "/contents.jsp";
    };and i set the path for this policy file like
                  System.setProperty("java.security.policy", "policy file location" );when i run my application i am getting login page after that i gave username and passwed. it is getting authentication .. but not able to displaying next page that is /pages/welcome.xhtml but directly it is showin /pages/error.xhtml
    i am getting following error
    java.security.AccessControlException: access denied (com.alw.reports.jaas.ViewIdPermission /pages/welcome.xhtml)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at com.alw.reports.jaas.JAASHelper$1.run(JAASHelper.java:87)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
         at com.alw.reports.jaas.JAASHelper.permitionToAccessViewId(JAASHelper.java:83)
         at com.alw.reports.jaas.JAASActionListener.processAction(JAASActionListener.java:65)
         at javax.faces.component.UICommand.broadcast(UICommand.java:106)
         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
         at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
         at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
         at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)
    my faces-config.xml
    <navigation-rule>
              <display-name>pages/login</display-name>
              <from-view-id>/pages/login.xhtml</from-view-id>
              <navigation-case>
                   <from-outcome>loginSuccess</from-outcome>
                   <to-view-id>/pages/welcome.xhtml</to-view-id>
              </navigation-case>
         </navigation-rule>
    <navigation-case>
                   <from-outcome>errorpage</from-outcome>
                   <to-view-id>
                        /pages/error.xhtml
                   </to-view-id>
              </navigation-case>my command button in login.xhtml
                             <td align="center" colspan="2">
                                  <h:commandButton value="Reset" type="reset"/>
                                  <h:commandButton   action="loginSuccess"
                                       id="login" value="Login" />
                             </td>my actionlister
    package com.alw.reports.jaas;
    import javax.faces.component.UIOutput;
    import javax.faces.context.FacesContext;
    import javax.faces.event.AbortProcessingException;
    import javax.faces.event.ActionEvent;
    import javax.faces.event.ActionListener;
    import javax.security.auth.Subject;
    public class JAASActionListener implements ActionListener   {
         private ActionListener parent = null;
         public JAASActionListener(javax.faces.event.ActionListener parent) {
              System.out.println("-------------- in JAASActionListener ;");
           this.parent = parent;
         public void processAction(ActionEvent event)
           throws AbortProcessingException {
              System.out.println("-------------- in processAction ;");
           FacesContext context = FacesContext.getCurrentInstance();
           UIOutput comp = null;
           String userid = null, password = null;
           JAASHelper jaasHelper = new JAASHelper();
           // Check to see if they are on the login page.
           boolean onLoginPage = (-1 != context.getViewRoot().getViewId().lastIndexOf("login")) ? true : false;
           if (onLoginPage) {
             if (null != (comp = (UIOutput)
               context.getViewRoot().findComponent("helloForm:username"))) {
               userid = (String) comp.getValue();
             if (null != (comp = (UIOutput)
               context.getViewRoot().findComponent("helloForm:password"))) {
               password = (String) comp.getValue();
             // If JAAS authentication failed
             if (!jaasHelper.authenticate(userid, password)) {
               context.getApplication().getNavigationHandler().handleNavigation(context, null, "login");
               return;
             else {
               // Subject must not be null, since authentication succeeded
                  System.out.println("----------- setting the subjects in context in  ActionListner ");
               assert(null != jaasHelper.getSubject());
               // Put the authenticated subject in the session.
               System.out.println("---- putting the authenicated subject in the seesion ");
               context.getExternalContext().getSessionMap().put("JAASSubject",jaasHelper.getSubject());
           parent.processAction(event);
           Subject subject=(Subject)context.getExternalContext().getSessionMap().get("JAASSubject");
          System.out.println("subject after parent process action>>>>>>>>>>>>>>>>>>>>>"+subject);
          assert(null != subject);
          if(!jaasHelper.permitionToAccessViewId(subject,context,context.getViewRoot().getViewId())){
              context.getApplication().getNavigationHandler().handleNavigation(context, null, "errorpage");
    }can u please hint me where i did mistake
    thanks in advance

    gbabu wrote:
    My doubt is based on that subject , how to write policy file and how to call doAsPrivileged() mehod on that Subject in order to navigate web pages.how to provide web pages permission for particular role in policy file..
    For example i have three pages login.xhtml,user.xhtml,admin.xhtml.
    1> if the logged in person is admin, then we want to display admin.xhtml
    2> if the loggend is person is user , then we want to display user.xhtml
    untill now i did and found who is logged in and what are his type( admin or user) .now i want configure the web.xml and faces-config.xml based on policy fileTo the best of my knowledge, there is nothing in the standard NavigationHandler which accounts for JAAS security. If you wanted, you could create a custom NavigationHandler to do this. If you think the idea is worthy enough, you could issue an enhancement request to the specification ([https://javaserverfaces-spec-public.dev.java.net/]).

  • JAAS AUthorization in JSF with facelets

    hello hi JSF and JAAS experts,
    I have web application implementing with jsf facelets and tomcat .Now i want to provide security in my application that is some web pages allow for admin and some web pages for user and..... that means based on role of user i want to give the access for web pages. so for that i am using JAAS for authentication and authorization . I am successfully implemented JAAS authentication for who is logged in. And i am getting subject and putting that subject in context session using following snippet.And also i am able to getting subject and its principals in that subject.
          context.getExternalContext().getSessionMap().put("JAASSubject",jaasHelper.getSubject());
           System.out.println("---------------- "+context.getExternalContext().getSessionMap().get("JAASSubject"));finally my doubt is how to navigate the pages(.xhtml) based on this principlas ,, with JAAS authorization. For that what is configuration snippet in web.xml and faces-config.xml.
    for this i gone through documents , but i didt get solution..
    can any body please hint me how to solve my requirement
    thanks in adv ans

    gbabu wrote:
    My doubt is based on that subject , how to write policy file and how to call doAsPrivileged() mehod on that Subject in order to navigate web pages.how to provide web pages permission for particular role in policy file..
    For example i have three pages login.xhtml,user.xhtml,admin.xhtml.
    1> if the logged in person is admin, then we want to display admin.xhtml
    2> if the loggend is person is user , then we want to display user.xhtml
    untill now i did and found who is logged in and what are his type( admin or user) .now i want configure the web.xml and faces-config.xml based on policy fileTo the best of my knowledge, there is nothing in the standard NavigationHandler which accounts for JAAS security. If you wanted, you could create a custom NavigationHandler to do this. If you think the idea is worthy enough, you could issue an enhancement request to the specification ([https://javaserverfaces-spec-public.dev.java.net/]).

  • Jsf and richfaces version compatibility issue

    Hi,
    I am using JRE 1.5 , jsf 1.2 , richfaces 3.3.3 and deployed in Tomcat 6.0.18. I am getting following error.
    javax.servlet.ServletException: /allocator.xhtml @30,163 <rich:tree> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: tree
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:321)
    root cause
    javax.faces.view.facelets.TagException: /allocator.xhtml @30,163 <rich:tree> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: tree
         com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:289)
         com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:228)
         com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
         com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
         com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
         com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         com.sun.org.apache.xerces.internal.parsers.XML11Configuration
    Thanks,
    BPradhan

    In my development box , I can use any version of jre, tomcat.
    But, we have our department dev and prod server configured with jre 1.5 and tomcat 6.0.18
    Some other applications are running in those environment with jre 1.5 and tomcat 6.0.18. I cannot upgrade just for new application.
    when tomcat6 was downloaded in our department dev and prod server , they are installed with jre5. Subsequently servers are upgraded with jre6 but it seems like tomcat recognises jre5 not jre6. Let me know if i am wrong about jre version tomcat is trying to use.
    Also, can you help me with the environment I have and problems i am encountering with jsf and richfaces.
    Thanks,
    BPradhan
    Edited by: user618018 on Feb 1, 2013 5:03 PM

  • Difference between jsf and jspx

    Hi
    We can develop a adf page in either jsf or jspx. What is the difference between jsf and jspx?
    which is more compatible in adf and why?

    Hi.
    The main difference in the version of JSF you are running on. In JSF 1.2 and lower, you built JSP pages. The JSPX extension means it was a JSP page using XML markup. This was (and still is) the default option in JDeveloper 11gR1.
    JSF pages, introduced in JSF 2.0, use another view declation language called « Facelets ». They are the default in JDeveloper 11gR2 and will be in 12c as well.
    Both standards are compatible with ADF. If you are building a new application, JSF is the way to go as it will offer you more flexibility and represents the best option going forward.
    Best Regards,
    Frédéric Desbiens.

  • Building a Simple JSF and Web Services App in JDeveloper 10.1.3 Preview

    Hi
    I was trying out this example of JSF and webservices at:
    http://www.oracle.com/technology/products/jdev/101/howtos/jsfws/index.html
    Has anyone tried it before? I'm getting the following error:
    calling http://216.200.21.157:9090/soap
    WARNING: Unable to connect to URL: http://216.200.21.157:9090/soap due to java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html
    java.rmi.RemoteException: ; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html
         at com.minc.ws.stockquery.proxy.runtime.NetXmethodsServicesStockquoteStockQuoteBinding_Stub.getQuote(NetXmethodsServicesStockquoteStockQuoteBinding_Stub.java:96)
         at com.minc.ws.stockquery.proxy.NetXmethodsServicesStockquoteStockQuotePortClient.getQuote(NetXmethodsServicesStockquoteStockQuotePortClient.java:40)
         at com.minc.ws.stockquery.proxy.NetXmethodsServicesStockquoteStockQuotePortClient.main(NetXmethodsServicesStockquoteStockQuotePortClient.java:29)
    Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html
         at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:142)
         at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:118)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:175)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
         at com.minc.ws.stockquery.proxy.runtime.NetXmethodsServicesStockquoteStockQuoteBinding_Stub.getQuote(NetXmethodsServicesStockquoteStockQuoteBinding_Stub.java:79)
         ... 2 more
    Any ideas?
    Thanks
    Alex

    I'm not using 10.1.3 preview. I was using 10.1.3.1 production. I just copied the title of the tutorial as my subject. sorry for the confusion!! :)
    I used the HTTP analyzer and this is what I got in the header:
    <HTML><HEAD><TITLE>TCP Packet Monitor Error</TITLE></HEAD><BODY>JDeveloper TCP Packet Monitor encountered an error retrieving<P><pre>POST http://216.200.21.157:9090/soap HTTP/1.1
    Host: 216.200.21.157:9090
    Proxy-Connection: Keep-Alive
    Connection: TE
    TE: trailers, deflate, gzip, compress
    User-Agent: Oracle HTTPClient Version 10h
    SOAPAction: "urn:xmethods-delayed-quotes#getQuote"
    Accept-Encoding: gzip, x-gzip, compress, x-compress
    Content-type: text/xml; charset=UTF-8
    Content-length: 680
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="urn:xmethods-delayed-quotes"><env:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" env:mustUnderstand="1"/></env:Header><env:Body><ns0:getQuote env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><symbol xsi:type="xsd:string">orcl</symbol></ns0:getQuote></env:Body></env:Envelope></pre><P>The error was :<P><pre>IOException retrieving the response: java.net.ConnectException: Connection refused: connect</pre><P></HTML>
    It looks like I'm getting connection refused error... Hmmm.. wonder why?
    I'll download 10.1.3.2 and see if that helps..
    Thanks for looking into this!
    Alex

  • Jsf and tiles

    hi all.
    i'm developing an application using jsf and tiles.
    i've some problem in the general layout page.
    how can I refer to images and files,if I don't know where the page will be used?
    with struts i've used <html:rewrite page=" ... " /> but it doesn't work with jsf.
    I only use the TilesServlet.
    any suggestion?
    i've also try to define the url like "/css/mycss.css" but in local dosn't work.
    thank a lot for any reply!

    hi all.
    i'm developing an application using jsf and tiles.
    i've some problem in the general layout page.
    how can I refer to images and files,if I don't know where the page will be used?
    with struts i've used <html:rewrite page=" ... " /> but it doesn't work with jsf.
    I only use the TilesServlet.
    any suggestion?
    i've also try to define the url like "/css/mycss.css" but in local dosn't work.
    thank a lot for any reply!

  • Jsf and tiles via myfaces

    Greetings:
    Please either confirm and/or correct following proposed solution for Myfaces tiles.
    Issue: isert a tile definition and attribute in a pure jsf page.
    First passed solution: A hybrid of Jsp programming and Jsf. I was able to create a tile page layout in pure jsf except in the portal columns i used old fashion jsp programming to insert a list of portletDefinitions which is extracted from jsf ValueBinding of its managed beans.
    The problem with the above approach is that it works well only with html portlet fragments. When a portlet fragment has some jsf elements, the page rendering has conflict of simultaneous rendering between jsf and jsp. The portlet fragments are rendered in a woring place.
    Proposed solution: use <h:dataTable ...> to render the portletList and extract the item portletDefinition as following:
    <h:dataTable var="portlet"
    value="#{portalTabbedBean.selectedPane.serviceListL}" >
    <f:verbatim>
    <h:outputText
    value="<tiles:insert name=#{portlet.portletDefinition} flush='false' /> " />
    </f:verbatim>
    </h:dataTable>
    Note on the name of tiles:insert element, which i just extracted the definition as a jsp variable to make it work in the first hybrid solution:
    <tiles:insert name="<%=portletDefinition%>" flush="false" />
    Thanks
    BaTien
    DBGROUPS

    I reply this myself. Jsf and Jsp programming either via Jstl or while loop do not go together under current version.
    I solve the problem by using Jsp programming and insert the portlet tile fragment directly rather than though a portlet template with different tile content attribute. The portlet tile is created as <h:panelGrid ...> and observe the set rules to make Jsf and jsp working together. Hopefully Jsf and Jsp will be able to work together nicely in their next specifications.

  • JSF And Struts Integration

    Can any body give some info on integration of JSF to existing struts application

    I describe the main differences between JSF and Struts in this sample Chapter from my JSF book:
    http://www.oreilly.com/catalog/jsvrfaces/chapter/ch01.pdf
    Hope that helps.

  • Using JSF and JavaMail to send Automated Email

    Hi All,
    Can any one please suggest I can use JSF and JavaMail to send automated email messages i.e after a person has successfully completed a form , a message is sent to his/her email address confirming that he has succesfully registered or completed a form. I have succesfull implemeted the use of javamail for sending email meassages in a JSF web application but cant seem to figure out how i can achieve automated sending of emails in JSF. Please any ideas, tutorials or source code would be very much appreciated.
    Thanks.

    I don't understand your problem:
    You have already been able to send e-mails from a JSF webapplication, but you are not capable of sending e-mails from a JSF webapplication?!
    Automated sending of e-mails will be exactly the same as non-automated.

  • Using JSF and tiles

    Hi Friends,
    I'm trying to combine JSF and tiles as follows:
    Template file:
    <f:subview id="content">
    <tiles:insert attribute="content" flush="false"/>
    </f:subview>
    content file:
    <tiles:insert definition="userSpecific">
    <tiles:put name="content" type="string" >
    <h:outputText value="aaaa"/>
    </tiles:put>
    </tiles:insert>
    I get the following error when loading the content file:
    2007-06-20 10:14:10,578 [http-8080-Processor23] ERROR org.apache.myfaces.shared_impl.taglib.UIComponentTagUtils - Component javax.faces.component.UIViewRoot is no ValueHolder, cannot set value.
    I tried putting the template content in a verbatim tag and then it works
    but the content page is not displayed in correct place in the template...
    Thanks a lot in advance!

    Are you dead set on using tiles? I can see tiles including JSF but JSF including tiles? Not sure if that will work.
    My suggestion is to use Trinidad. It has the concept of Regions which is very "tiles" like and you will be far more successful.

  • JSF and Struts - differences and integration goal.

    I am a newbie J2EE developer and I am not clear about main differences between JSF and Struts also I saw couple of articles describing integration between JSF and Struts. Could someone give me an explanation, what the main conceptual differences between those technologies and what's the goal of integration both of them?

    I describe the main differences between JSF and Struts in this sample Chapter from my JSF book:
    http://www.oreilly.com/catalog/jsvrfaces/chapter/ch01.pdf
    Hope that helps.

  • JSP, JSF, and ADF

    I've just started playing around with this and was looking for samples/tutorials to help. Of the tutorials/samples I've seen, they appear to fall short of explaining an end-end example and stick mostly to JSF and the backing bean - usually displaying static data within a JSP and navigation. I'm a bit confused on how to call custom methods in my business services (application modules) and in turn use the view objects to fetch data from my database and display the results within a JSP using the JSF components.
    I realize the latest preview JDeveloper is without ADF but while I had time I was hoping to play around with ADF Faces to hit my development database. Guess I'm trying to make sense of how JSP, JSF, Business components, and my db connection all play together in order to set up a decent starting point for an app.

    You could use Jdeveloper 10G and play around with ADF Faces, look at the demos, and the sources behind them.
    There are a couple of papers on OTN like...
    Working with ADF Faces in JDev 10g:
    http://www.oracle.com/technology/products/jdev/howtos/10g/adfjsf/how-to-adf-faces-10gjdev.htm
    Roadmap for ADF Faces:
    http://www.oracle.com/technology/products/jdev/collateral/papers/9.0.5.0/adfuix_roadmap/adfuix_roadmap.html
    And many more... as I could find upon search...
    http://www.oracle.com/ultrasearch/wwws_otn/searchotn.jsp?p_Action=Search&p_Query=adf+faces
    The visual editing support for 'The ADF Model access through ADF Faces bindings' is under development (hence no tutorials), and will be available in future release (could be post 10G release).
    -Udupa

Maybe you are looking for