JSF and HTML?

Hi,
I'm too new to all this to have a valued opinion, but I would appreciate yours.
Page design in JSF is made more difficult by the fact that the use of HTML is limited and can cause problems with the ui components.
This chap ( http://jsftutorials.net/htmLib/ ) seems to have a solution and we've tried it in limited scenarios with (so far) no problems, not only with JSF but also ADF components.
Have we missed something or is this really good?
Any comments welcome
Thanks
Mark

I'm not familiar with this specific project so I can't comment on it.
The only thing I wanted to make sure is that you are aware of the various layout components that ADF Faces supplies to help you arrange your page layout.
See this table in the ADF Developer Guide:
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtAnchor.CHDFBHJD/vtTopicFile.adfdevguide%7Cweb_getstarted%7Ehtm/

Similar Messages

  • Javascript and html menu to be used with ADF/JSF using JDeveloper

    I have a menu for a webpage that was originally built using html and javascript. I need to convert it to be used with JSF and ADF. In the html, the menu items used an unordered list inside of a div tag.
    It looks something like this:
    <!--<div id="shademenu" class="shadetabs">
    <ul>
    <li>Item1</li>
    <li>Item2</li>
    <li>Item3</li>
    <li>Item4</li>
    <li>Item5</li>
    <li>Item 6</li>
    </ul>
    </div> -->
    AND
    the submenu(s) have links that look something like:
    <!--<div id="dropmenu0" class="dropmenudiv">
    Data
    Data
    Data
    </div>-->
    It is unclear to me how to work with my javascript menu to get the same look and feel with JSF or ADF as I did with html. Any insights would be great. Thanks.
    Daniel
    Message was edited by:
    dannyc

    Hello,
    If you do not find any existing JSF component (in ADF Faces/Trinidad, or any other JSF library) you can for sure extend/create your own component with specific renderer that will be the HTML/Javscript that you want.
    So here some interesting pointers about the subject:
    - Buildin Custom JSF component (Chris Schalk)
    - Build Custom JSF Components) (Jonas Jacobi
    - Extending Default Render (and lot of other JavaEE blueprints)
    These links will give you a starting point.
    Regards
    Tugdual Grall

  • JSF with TILES and HTML-Code

    Hello!
    I have a pure JSP-project using tiles. Now I want to migrate to JSF and find some problems.
    When I use my existing layout and include the different JSPs I have no problem as long I have a single f:view in every jsp file is used. When I try to define f:view and a h:form including different files and in each file JSF componets where used I got a very bad result. Additiotal I have to say, that I try to keep my formatting with HTML tags existing.
    The effect is, that all JSF componets were rendered at the beginning of the jsp file and than be included into the layout.
    Have I use a special order of f:view, f:subview, h:form, ....
    Alternative I could make a complete reprogramming of the JSP's, not my favourit, but than I need the possibility to set single formats for each <td> in a table and this seems not to be possible with h:panelGrid.
    Havy anyone an idea?
    Thanks for your help!

    Read about facelets as a replacement for tiles in jsf.

  • 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 with popup window jsf and .xhtml?

    hi,
    HI,
    I am using example at http://www.jsftutorials.net/interface/jsf-popup.html
    for popup with jsf using javascript.
    In main form when click on button or link, i am opening popup window , and getting values
    from popup window to parent window.
    Here I need to pass some parameter or value to popup window without refresh the parent.
    I know with how to do jsp. but i am looking sample
    how to send parameters when we use parent and popup jsf forms with .xhtml.
    Thanks
    siva

    Hi Mainak,
    have a look to Thread:
    Popup Sizing
    As you can see there is not yet a way to set the Popup size.
    You have to find the good combination of fields and length in order to get a nice UI.
    The WDA engine try to set the best size, help it...
    Sergio

  • 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.

  • 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

  • JSF and Character Sets (UTF-8)

    Hi all,
    This question might have been asked before, but I'm going to ask it anyway because I'm completely puzzled by how this works in JSF.
    Let's begin with the basics, I have an application running on an OC4J servlet container, and am using JSF 1.1 (MyFaces). The problems I am having with this setup, is that it seems that the character encodings I want the server/client to use are not coming across correctly. I'm trying to enforce the application to be UTF-8, but after the response is rendered to my client, I've magically been reverted to ISO-8859-1, which is the main character set for the netherlands. However, I'm building the application to support proper internationalization; which means I NEED to use UTF-8.
    I've executed the following steps to reach this goal:
    - All JSP files contain page directives, noting the character set:
    <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>I've checked the generated source that comes from the JSP's, it looks as expected.
    - I've created a servlet filter to set the character set directly on the request and response objects:
        public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
            // Set the characterencoding for the request and response streams.
            req.setCharacterEncoding("UTF-8");
            res.setContentType("text/html; charset=UTF-8");       
            // Complete (continue) the processing chain.
            chain.doFilter(req, res); 
        }I've debugged the code, and this works fine, except for where JSF comes in. If I use the above situation, without going through JSF, my pages come back UTF-8. When I go through JSF, my pages come back as ISO-8859-1. I'm baffled as to what is causing this. On several forums, writing a filter was proposed as the solution, however this doesn't do it for me.
    It looks like somewhere internally in JSF the character set is changed to ISO. I've been through the sources, and I've found several pieces of code that support that theory. I've seen portions of code where the character set for the response is set to that of the request. Which in my case coming from a dutch system, will be ISO.
    How can this be prevented? Can anyone give some good insight on the inner workings of JSF with regards to character sets in specific? Could this be a servlet container problem?
    Many thanks in advance for your assistance,
    Jarno

    Jarno,
    I've been investigating JSF and character encodings a bit this weekend. And I have to say it's more than a little confusing. But I may have a little insight as to what's going on here.
    I have a post here:
    http://forum.java.sun.com/thread.jspa?threadID=725929&tstart=45
    where I have a number of open questions regarding JSF 1.2's intended handling of character encodings. Please feel free to comment, as you're clearly struggling with some of the same questions I have.
    In MyFaces JSF 1.1 and JSF-RI 1.2 the handling appears to be dependent on the raw Content-Type header. Looking at the MyFaces implementation here -
    http://svn.apache.org/repos/asf/myfaces/legacy/tags/JSF_1_1_started/src/myfaces/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java
    (which I'm not sure is the correct code, but it's the best I've found) it looks like the raw header Content-Type header is being parsed in handleCharacterEncoding. The resulting value (if not null) is used to set the request character encoding.
    The JSF-RI 1.2 code is similar - calculateCharacterEncoding(FacesContext) in ViewHandler appears to parse the raw header, as opposed to using the CharacterEncoding getter on ServletRequest. This is understandable, as this code should be able to handle PortletRequests as well as ServletRequests. And PortletRequests don't have set/getCharacterEncoding methods.
    My first thought is that calling setCharacterEncoding on the request in the filter may not update the raw Content-Type header. (I haven't checked if this is the case) If it doesn't, then the raw header may be getting reparsed and the request encoding getting reset in the ViewHandler. I'd suggest that you check the state of the Content-Type header before and after your call to req.setCharacterEncoding('UTF-8"). If the header charset value is unset or unchanged after this call, you may want to update it manually in your Filter.
    If that doesn't work, I'd suggest writing a simple ViewHandler which prints out the request's character encoding and the value of the Content-Type header to your logs before and after the calls to the underlying ViewHandler for each major method (i.e. renderView, etc.)
    Not sure if that's helpful, but it's my best advice based on the understanding I've reached to date. And I definitely agree - documentation on this point appears to be lacking. Good luck
    Regards,
    Peter

  • Problems previewing all my sites using Dreamweaver 8 both CF and html.

    I have restored my hard drive (from a previous Ghost image)
    and now encounter problems previewing all my sites using
    Dreamweaver 8 both CF and html.
    If I preview (using localhost:8500) I get the message "Unable
    to connect, Firefox can't establish a connection to the server at
    localhost:8500." IE has similar message.
    If I preview (using 127.0.0.1 instead of localhost:8500) I
    get the page but no images or CSS loads.
    An address such as:
    http://127.0.0.1/CFIDE/gettingstarted/experience/index_content.cfm
    loads just fine - seems CF is working okay.
    All the sites used for testing locally have been used for
    some time (years) and work on my unrestored drive.
    My thoughts: after I restored my hard drive image I installed
    both Norton Antivirus 2007 and resintalled ZoneAlarm. I uninstalled
    both of the programs but the problem remains.
    Any help is much appreciated. I have spent the last two days
    trying to get this to work and as many of you can identify with...I
    am supposed to be working....!

    Hi,
    JSF 1.1 doesn't coexist nicely with HTML components.
    So if your goal is to build layouts in HTML then this
    will not produce the result you want
    Skins in 10.1.3 are slightly different than in 11
    (selectors may have changed their names). If you need
    to specify the class property to make skins work then
    this indicates that the skin selectors you use are
    not the correct ones.
    FrankHi Frank,
    thank you for your help, I'm replacing every html component with adf one, panelGroup, panelHorizontal, panelBorder, objectImage etc... etc... but I have a problem...
    I need to put an object component about Macromedia Flash and I cannot find any adf component to replace it. Any idea please?
    Thank you again.
    Ciao.
    Ricky

  • Jsf and Seam

    Hi,
    I have a JSF project and would like to add a Captcha on the new user page.
    I see several examples with Seam.
    http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/captcha-with-seam-in-three-minutes.html
    http://thelabdude.blogspot.com/2009/05/user-registration-solution-using-jboss.html
    1) What do I need to add Seam to my app? Is it worth it from Captcha?
    http://livedemo.exadel.com/richfaces-demo/richfaces/paint2D.jsf?s=glassX
    I copied this into my app to test and get several errors. I did not see the problem?
    I see a NullPointer error..but dont know where to set it.
    SEVERE: Servlet.service() for servlet Faces Servlet threw exception
    javax.faces.FacesException: Error send image
            at org.richfaces.renderkit.html.Paint2DResource.send(Paint2DResource.java:192)
            at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:221)
            at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:146)
            at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:225)
            at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
            at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:496)
            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:286)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Unknown Source)
    Caused by: javax.faces.el.EvaluationException: org.apache.jasper.el.JspELException: /loginTest.jsp(62,2) '#{paintBean.paint}' java.lang.NullPointerException
            at org.richfaces.webapp.taglib.MethodBindingMethodExpressionAdaptor.invoke(MethodBindingMethodExpressionAdaptor.java:56)
            at org.richfaces.renderkit.html.Paint2DResource.send(Paint2DResource.java:182)
            ... 17 more
    Caused by: org.apache.jasper.el.JspELException: /loginTest.jsp(62,2) '#{paintBean.paint}' java.lang.NullPointerException
            at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:77)
            at org.richfaces.webapp.taglib.MethodBindingMethodExpressionAdaptor.invoke(MethodBindingMethodExpressionAdaptor.java:52)
            ... 18 more
    Caused by: java.lang.NullPointerException
            at com.netfixup.java.PaintBean.paint(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)Anyone out there have and easy quick way to do Captcha with just JSF ? or should I go with Seam?
    Thanks
    Phil
    Edited by: nohacks on Aug 20, 2009 4:08 AM

    Going to seam might not be the answer to your problems. For one seam is not easy to get running on anything but a JBoss server (it is possible, but not easy). Secondly Seam is aimed at bringing JSF and EJBs closer together, among other things. Since you are running on Tomcat, I don't think you are using EJBs and therefore the use of Seam degrades greatly.
    The root of the problem is easy enough to spot:
    /loginTest.jsp(62,2) '#{paintBean.paint}'So what is this paintBean doing? If you have access to the code, you could check out the method that gives the error:
    com.netfixup.java.PaintBean.paintto try and figure out what is null. SOMETHING is apparently not initialized properly, but unless the server logs can give you a hint what that something is, it is hard to help you further.

  • How can a component generate both stylesheet and HTML code?

    Hi All,
    I've the following problem. My team is working on several "complex" components which provide a rich client-side behavior (via javascript and css). The components are in charge of generating the following:
    + Stylesheet (linked or inline)
    + Javascript via external libraries
    + HTML code
    The problem comes from the fact that the CSS must be generated between the <HEAD> and </HEAD> tags (according to the HTML spec). Obviously, the rest of the code (javascript and HTML) is generated somewhere else on the page, and this is the problem.
    Any ideas on how to solve this?
    I've been thinking about a pre-process phase that would call every components to render the Css, but it requires substancial changes to JSF... Any help is greatly appreciated
    Thanks in advance,
    Stephane
    http://www.otrix.com

    Thanks for the reply but in my case I absolutely need to generate an addhoc css such as:
    <style type="css/....>
    .name 1 {position: absolute; visibility: hidden... }
    .name 1 {padding: 0 0 0 0;}
    </style>
    What I do is that I spit-out the css first and then generate the HTML. It works fine in IE but I really wanted to be conform to the HTML spec which says that a STYLE tag should be located in the <HEAD> tag. I guess it's probably too much work just to be compliant with the spec....
    Thanks again,
    Stephane

  • JSF and JDBC

    Hi, I am new to JSF, can anybody direct me to a good tutorial on JSF and JDBC (Oracle)?
    Thanks

    Try
    http://java.sun.com/developer/onlineTraining/index.html
    From here you will find links for JDBC (via Distributed computing) & the Web Services Tutorial (JSF is included)
    If you specifically want Oracle then you can sign up to OTN - try
    http://www.oracle.com/technologies/

  • Problems with JSF and included subviews

    Hi everybody,
    I' ve got a problem with JSF and included subviews which makes me going
    crazy. I've got no clue why my web-pages are represent wrongly. The only
    tip I've got is that it must be connected with the kind I do include my JSF-pages.
    When I use <%@file="sub.jsp"%> my pages are are represent right. When I use <jsp:include page="Sub.jsp" /> or <c:import url="Sub.jsp" /> ( mark: the usage of flush="true" or flush="false" doesn't matter )
    my pages are represent wrongly.
    The usage of tags like f:facet or f:verbatim were also included but didn't point to an solution.
    I searched the whole Sun Developer Forum and some other web-sites for any solution for my problem but the given hints and clues didn't help. Now I'm trying to post my problem directly in Sun's Forum in hope to get help.
    My environment is the following:
    JAVA JDK 1.5 Update 4
    Tomcat 5.5.9
    JSLT 1.1
    Sun JSF 1.1
    Win 2K
    Here's my code:
    Main.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%
              String path = request.getContextPath();
              String basePath = request.getScheme() + "://" + request.getServerName()
                        + ":" + request.getServerPort() + path + "/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="<%=basePath%>">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <f:view>
              <h:form>
                   <div class="table">
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 1"/>
                             <h:outputText styleClass="tdinfo" value="value 2"/>
                        </div>
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 3"/>
                             <h:outputText styleClass="tdinfo" value="value 4"/>
                        </div>
                   </div>
              </h:form>     
              <jsp:include page="Sub.jsp" />
         </f:view>
    </body>
    </html>Sub.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <f:subview id="subview">
         <h:form>
              <div class="table">
                   <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 11"/>
                             <h:outputText styleClass="tdinfo" value="value 22"/>
                   </div>
                   <div class="tr">
                        <h:outputText styleClass="tdleft" value="value 33"/>
                        <h:outputText styleClass="tdinfo" value="value 44"/>
                   </div>
              </div>
         </h:form>
    </f:subview>stil.jsp
    <%@page contentType="text/css"%>
    <%
        String  schwarz     = "#000000",
                grau1       = "#707070",
                grau2       = "#c0c0c0",
                grau3       = "#e0e0e0",
                grau4       = "#e8e8e8",
                grau5       = "#fdfdfd",
                blau        = "#0000dd",
                tuerkis     = "#00cfff";
        String  liniendicke = "1px",
                linienart   = "solid";
        String allgemeineTextFarbe           = schwarz;
        String allgemeineHintergrundFarbe    = grau3;
        String infoTextFarbe                 = blau;
        String fieldsetRandFarbe             = blau;
        String fieldsetRandDicke             = liniendicke;
        String fieldsetRandArt               = linienart;
        String hrLinienFarbe                 = blau;
        String hrLinienDicke                 = liniendicke;
        String hrLinienArt                   = linienart;
        String inputAktivHintergrundFarbe    = grau5;
        String inputReadonlyHintergrundFarbe = grau4;
        String inputPassivHintergrundFarbe   = grau4;
        String inputPassivFarbe              = schwarz;
        String inputRandFarbe1               = grau1;
        String inputRandFarbe2               = grau5;
        String inputRandDicke                = liniendicke;
        String inputRandArt                  = linienart;
        String inputButtonHintergrundFarbe   = grau3;
        String legendenFarbe                 = blau;
        String linkFarbe                     = blau;
        String linkAktivFarbe                = tuerkis;
        String linkBesuchtFarbe              = blau;
        String linkFocusFarbe                = tuerkis;
        String objectGitterFarbe             = grau5;
        String objectGitterDicke             = liniendicke;
        String objectGitterArt               = linienart;
        String tabellenGitterFarbe           = grau5;
        String tabellenGitterDicke           = liniendicke;
        String tabellenGitterArt             = linienart;
    %>
    <%-- ----------------------------------------------- --%>
    <%-- Textdarstellung mittels der Display-Eigenschaft --%>
    <%-- in den Tags div und span                        --%>
    <%-- ----------------------------------------------- --%>
    *.table {
        display:table;
        border-collapse:collapse;
    *.tbody {
        display:table-row-group;
    *.tr {
        display:table-row;
    *.td,*.tdright,*.tdleft,*.tdinfo,*.th {
        display:table-cell;
        padding:3px;
        vertical-align:middle;
    *.td,*.th {
        text-align:center;
    *.tdright {
        text-align:right;
    *.tdleft {
        text-align:left;
    *.tdinfo {
        color:<%=infoTextFarbe%>;
        text-align:right;
    *.th {
        color:<%=infoTextFarbe%>;
        font-weight:bold;
    }thanks in advance
    benjamin

    Hello Zhong Li,
    many thanks for your post, but it didn't work.
    My problem is that the JSF-Components im my included or imported
    JSP-Pages does not accept any kind of style or styleClass for
    designing. The components take over the informations for colors
    but not for alignment.
    When I take a look at the generated JAVA-Source in $TOMCAT/WORK/WEBAPP for my sub.jsp ( sub.java )
    it seems that the resulting HTML-page would be presented correctly.
    But later when I start the application via Firefox or Mozilla the html-sourcecode is totally wrong.
    In my example I create a simple grid with 2 rows and 2 columns.
    Both columns contains JSF-Outtext-Components and are included with div-tags.
    The generated Sub.java shows that the text would be setted in the div-tags. Unfortunately the html-sourcecode represented by my browser shows that jsf-text is not setted in the tags but in the <h:form> tags. The div-tags are neither rounded by <h:form> nor containing the JSF-OutText-Components.
    Any clue?
    Many thanks Benjamin
    Here is the html-code from Firefox:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="http://polaris21:8080/webtest/">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <form id="_id0" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
              <div class="table">
                   <div class="tr">
                        <span class="tdleft">value 1</span>
                        <span class="tdinfo">value 2</span>
                   </div>
                   <div class="tr">
                        <span class="tdleft">value 3</span>
                        <span class="tdinfo">value 4</span>
                   </div>
              </div>
              <input type="hidden" name="_id0" value="_id0" />
         </form>     
          <form id="SUB:_id5" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
               <span class="tdleft">value 11</span>
              <span class="tdinfo">value 22</span>
              <span class="tdleft">value 33</span>
              <span class="tdinfo">value 44</span>
              <input type="hidden" name="SUB:_id5" value="SUB:_id5" />
         </form>
         <div class="table">
              <div class="tr">
              </div>
              <div class="tr">
              </div>
         </div>
    </body>
    </html>

  • 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.

Maybe you are looking for

  • I cannot delete an iCal event on my Iphone.

    I cannot delete an iCal event on my Iphone. It does not have the edit button at the top of the screen. The event does not show up in iCal on my Mac or on my iCloud. One of these is a reoccuring event.

  • Problem with Serial numbers after upgrade

    Hello, I updated an existing installation from BO2007 SP01 PL05 to BO2007 SP01 PL09 After the update in the form Serial Number Selection it's impossible to find any serial number, the cursor move to the right row but I get the message "Serial Number

  • Can't open Safari, it immediately crashes

    After the most recent security update to Tiger my Safari stopped working. As soon as I launch Safari, it crashes. A lot of people seem to have crashing Safari problems. So, I already checked that it does crash for other users. The disk needed repairi

  • LCM Export of non-english-named artifacts

    Hello all, Is there a possibility to tell LCM not to use file names as artifact names when exporting to file system (unix server) ? For example, I have business rules, with non-english names, and after migrating them on file system, they looks like "

  • AirPlay and surround sound

    Hi, set up my apple tv . I have managed to get everything working ok but when I use the AirPlay option I cannot get my surround sound to work, it only comes thought the speakers on my tv. My current scary lead goes from my sky tv box to the DVD playe