Mix HTML and JSF

How do I go about interspersing HTMl with the JSF components? The outputText works Ok for small bits of code but cannot be nested.
Basically, I need to go to Flow-Based layout using tables and cannot seem to get started so any ideas would help.

<%-- jsf:codeBehind language="java" location="/JavaSource/pagecode/jsp/banking/BankAccountsAndCreditCards.java" --%><%--
/jsf:codeBehind --%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
session="false"
%>
<portletAPI:init />
<f:view>
<LINK rel="stylesheet" type="text/css"
          href='<%=response.encodeURL("/theme/stylesheetx.css")%>' title="Stylex">
          <LINK rel="stylesheet" type="text/css"
          href='<%=response.encodeURL("/theme/stylesheet.css")%>' title="Style">
          <f:loadBundle basename="gov.ohio.jfs.eric.bundle.labels" var="labels" />
          <h:form id="bankAccountsAndCreditCards"\>
     <div id="contentzone">
     <div id="taskarea">
          <div id="taskareaheader" style="width:100%">
               <span class="style4" style="width:75%"><h:outputText
value="#{labels['bankAccountsAndCreditCards.title']}"/></span>
          </div>
<div id="instructions"><span class="style4"><h:outputText
value="#{labels['bankAccountsAndCreditCards.instructions.title']}"/></span><span class="style9"><h:outputText
value="#{labels['bankAccountsAndCreditCards.instructions']}"/></span> </div>
          <h:outputText value="#{labels['bankAccountsAndCreditCards.warning']}"
rendered="#{pc_BankAccountsAndCreditCards.bankAccountsAndCreditCardsFB.labelPresent}"></h:outputText>
<div id="datatable" style="padding-top:5px;MARGIN-top:15px" class="style16"><span
style="padding-left:15px"><h:outputText value="#{labels['bankAccountsAndCreditCards.bankAccounts.title']}"/></span>
               <div id="title">          
                    <table border="0" cellpadding="0" cellspacing="0">
                         <tr>
                         <td align="left" class="style16" style="width:80%"> </td>
                         <td align="right" style="width:10%" id="buttonpad"><hx:commandExButton
type="submit"
value="#{labels['bankAccountsAndCreditCards.bankAccounts.buttonName.addBankAccount']}" styleClass="commandExButton"
id="addBankAccount"
action="#{pc_BankAccountsAndCreditCards.addBankAccounts}" >
</hx:commandExButton></td>
                         <td align="right" style="width:10%" id="buttonpad"><hx:commandExButton
type="submit"
value="#{labels['bankAccountsAndCreditCards.bankAccounts.buttonName.delete']}" styleClass="commandExButton"
id="deleteBankAccount"
action="#{pc_BankAccountsAndCreditCards.deletBankAccounts}" >
</hx:commandExButton></td>
                         </tr>
                    </table>
          </div>
          <div id="datatable">          
               <h:dataTable var="varsecurityInfo" width="100%"
               rowClasses="rowon,rowoff" headerClass="tableheader"
               id="bankAccountid"
               value="#{pc_BankAccountsAndCreditCards.bankAccountsAndCreditCardsFB.bankAccountCreditCardCDB}">
               <h:column>
                    <f:facet name="header">
                         <h:selectBooleanCheckbox id="selectallaccounts1"></h:selectBooleanCheckbox>
                    </f:facet>
                    <h:selectBooleanCheckbox id="selectaccounts1"
                         value="#{varbankAccountCreditCardCDB.deleteRow}">
                    </h:selectBooleanCheckbox>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.bankAccounts.accountType']}"></h:outputText>
                    </f:facet>
                    <h:outputText
value="#{varbankAccountCreditCardCDB.paymentProfileDataBean.thePaymentInfoDataBean.accountType}"></h:outputText>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.bankAccounts.routingNumber']}"></h:outputText>
                    </f:facet>
                    <h:outputText
value="#{varbankAccountCreditCardCDB.paymentProfileDataBean.thePaymentInfoDataBean.transitNumber}"></h:outputText>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.bankAccounts.accountNumber']}"></h:outputText>
                    </f:facet>
                    <h:outputText
value="#{varbankAccountCreditCardCDB.paymentProfileDataBean.thePaymentInfoDataBean.accountNumber}"></h:outputText>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.bankAccounts.nameOnAccount']}"></h:outputText>
                    </f:facet>
                    <h:outputText
value="#{varbankAccountCreditCardCDB.paymentProfileDataBean.thePaymentInfoDataBean.bankName}"></h:outputText>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.bankAccounts.status']}"></h:outputText>
                    </f:facet>
                    <h:outputText value=""></h:outputText>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.bankAccounts.createdBy']}"></h:outputText>
                    </f:facet>
                    <h:commandLink id="actionlink" action="">
                         <h:outputText value="getLastUPDTS(use summaryofdebits like)"></h:outputText>
                    </h:commandLink>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.bankAccounts.action']}"></h:outputText>
                    </f:facet>
                    <h:commandLink>
                         <h:outputText value="#{varbankAccountCreditCardCDB.action}"></h:outputText>
                    </h:commandLink>
               </h:column>
          </h:dataTable>          
          </div>                         
          </div>
          <div id="datatable" style="padding-top:5px;MARGIN-top:15px" class="style16"><span
style="padding-left:15px"><h:outputText
value="#{labels['bankAccountsAndCreditCards.creditCardAccounts.title']}"></h:outputText></span>
               <div id="title">          
                    <table border="0" cellpadding="0" cellspacing="0">
                         <tr>
                         <td align="left" class="style16" style="width:80%"> </td>
                         <td ><hx:commandExButton type="submit"
value="#{labels['bankAccountsAndCreditCards.creditCardAccounts.buttonName.addCreditCard']}" styleClass="commandExButton"
id="addcreditAccount"
action="#{pc_BankAccountsAndCreditCards.addCreditCardAccounts}" >
</hx:commandExButton></td>
                         <!-- <td align="right" style="width:10%" id="buttonpad"><input name="button"
type="button" value="Add Bank Account" class="style16"></td> -->
                         <td><hx:commandExButton type="submit"
value="#{labels['bankAccountsAndCreditCards.creditCardAccounts.buttonName.delete']}" styleClass="commandExButton"
id="deletecreditAccount"
action="#{pc_BankAccountsAndCreditCards.deleteCreditCardAccounts}"
>
</hx:commandExButton></td>
                         <!-- <td align="right" style="width:10%" id="buttonpad"><input name="button"
type="button" value="Delete" class="style16"></td> -->
                         </tr>
                    </table>
          </div>
          <div id="datatable">          
<h:dataTable var="varbankAccountCreditCardCDB" width="100%"
               rowClasses="rowon,rowoff" headerClass="tableheader"
               value="#{pc_BankAccountsAndCreditCards.bankAccountsAndCreditCardsFB.bankAccountCreditCardCDB}">
               <h:column>
                    <f:facet name="header">
                         <h:selectBooleanCheckbox></h:selectBooleanCheckbox>
                    </f:facet>
                    <h:selectBooleanCheckbox
                         value="#{varbankAccountCreditCardCDB.deleteRow}">
                    </h:selectBooleanCheckbox>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.creditCardAccounts.cardType']}"></h:outputText>
                    </f:facet>
                    <h:outputText
value="#{varbankAccountCreditCardCDB.paymentProfileDataBean.thePaymentInfoDataBean.accountType}"></h:outputText>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.creditCardAccounts.creditCardAccountNumber']}"></h:outputText>
                    </f:facet>
                    <h:outputText
value="#{varbankAccountCreditCardCDB.paymentProfileDataBean.thePaymentInfoDataBean.transitNumber}"></h:outputText>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.creditCardAccounts.nameOnCreditCard']}"></h:outputText>
                    </f:facet>
                    <h:outputText
value="#{varbankAccountCreditCardCDB.paymentProfileDataBean.thePaymentInfoDataBean.accountNumber}"></h:outputText>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.creditCardAccounts.status']}"></h:outputText>
                    </f:facet>
                    <h:outputText
value="#{varbankAccountCreditCardCDB.paymentProfileDataBean.thePaymentInfoDataBean.accountNumber}"></h:outputText>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:outputText
value="#{labels['bankAccountsAndCreditCards.bankAccounts.action']}"></h:outputText>
                    </f:facet>
                    <h:commandLink>
                         <h:outputText value="#{varbankAccountCreditCardCDB.action}"></h:outputText>
                    </h:commandLink>
               </h:column>
          </h:dataTable>               
          </div>                         
          </div>
          <div id="taskareanav" style="width:100%">          
          <table border="0" cellpadding="0" cellspacing="0">
               <tr>
               <td align="left" class="style16" style="width:100%"><
                    Previous</td>
               </tr>
          </table>
          </div>
</div>          
</div>
     <h:outputText value="#{pc_BankAccountsAndCreditCards.bankAccountsAndCreditCardsFB.name}"
rendered="#{pc_BankAccountsAndCreditCards.bankAccountsAndCreditCardsFB.labelPresent}"></h:outputText>
     </h:form>
</f:view>

Similar Messages

  • Mixing HTML and JSF or better pure JSF Tags?

    I'm relatively new to JSF, but i can say, i work with all the Web Standards in HTML and CSS.
    So the HTML Render Results of JSF may not fit into a Web Developers Dreams of perfect HTML/CSS.
    An Option i see is to use HTML and put only the dynamic parts in there as JSF Components.
    What are the Pro's and Con's using HTML?
    some stuff i can image:
    Using pure JSF:
    - May many components have impact to the performance?
    - Mixed with HTML: What if the application should be rendered to another client pc (e.g. Mobile)?
    What are your experiences?

    The one downfall of mixing html with jsf, unless you use the f:verbatim tag, that the page is not properly represented in the component tree. Also depending on certain technologies you use (when I used ajax4jsf it worked this way) that the jsf component tree was rendered and then all the html was rendered at the end. This caused html tags and text that I had inside a jsf tag to be improperly displayed.
    This though was the case when I was originally using jsf 1.1, so it may have been improved in later editions, but since I have become accustomed to writing the entire page in jsf tags I have not really tested that limit in the current version.

  • Mixing Html and JSF

    Hi,
    I have a very simple question concerning a good jsf programming style:
    Often I get Html pages from designers in order to put the necessary
    jsf-code in it in order to get the application work.
    So do I have to replace all html-code with jsf-tags or is it ok when
    I only put jsf-tags where it is necessary (eg. where I have to output
    some data from a bean etc. ).?
    Thanks for your comments,
    Andy

    In general, if there are ways to accomplish the markup you want with JSF component tags (either standard ones, ones you write yourself, or ones written by third party component library providers), I believe that pages composed purely with JSF components will be more maintainable in the long run. In addition, you have the potential ability to use a different renderkit to output a different sort of markup, wihtout doing anything more to your pages than changing the URI of the tag libraries in use (and even that can turn out to be a one-place change if you're using something like a JSP 2.0 prelude file that is automatically included on every page).
    That being said, there will be times when you absolutely, positively, have to include some raw HTML markup along with JSF component tags. Although this works pretty well in simple cases, there are lots of scenarios where it is problematic. However, there is a standard means to deal with this problem -- just enclose your raw HTML markup in an <f:verbatim> tag, and it becomes a JSF component that plays nicely with other JSF component tags, in every scenario.
    I recommend that anyone planning on intermixing raw markup with their JSF component tags should plan on enclosing it in <f:verbatim> tags, to avoid interoperability problems.
    Craig

  • How to mix HTML and XML??

    Hi guys,
    I want to stream some xml content to the browser from a servlet by setting the content-type as 'text/xml' and let IE browser take care of the parsing & formatting. It is important for me to show the formatted (tree structure) xml content in the browser. But I also need to show a text heading in the browser...Something like this ::
    Application XML Message ---> header text
    <xml>
    <id>.....
    <InvoiceDate>.....
    </xml>
    I know that the content has to be 'text/html' for the header text , and text/xml to let IE do automatic formatting of the xml data...How can I mix the contents? I don't want to format the xml file programattically or by using XSLT..Is it possible?
    Thanks guys

    I think it's possible; just create a page containing the header you want to display and an iFrame with the URL set to the address of the service that builds the XML. In fact you'll make two requests to server: one for the page containing the fancy header + the iFrame and one for the XML itself. Main page has text/html content and the contained iFrame will have text/xml content:
    More artistically:
    The header of the message
    The iFrame pointing to the URL that
    generates the XML.
    Be sure to use appropriate HTML styles so the iFrame border will not get displayed.

  • Mixing simple HTML with JSF

    Is there any way to mix some simple HTML in the middle of my JSF code? For example, in creating a data table, I want one of the columns to contain two values with a <br> between them. I tried this:
    <h:data_table value="#{BeanColl}" var="_loopvar_TestBean" >
    <h:column>
      <f:subview id="abc">
          <h:output_text  value="#{_loopvar_TestBean.name}" /> <BR />
          <h:output_text  value="#{_loopvar_TestBean.city}" />
      </f:subview>
    </h:column>
    </h:data_table>I also tried f:verbatim, which also was no good. I tried replacing the <br> with some text, just to see what was happening with it, and it was putting the text up above the table.
    (My real problem is more complicated than just a <br>, so I am really looking for a more general answer. Eventually I will want to nest data_table tags.)
    I'd be perfectly happy with a repeat tag of some sort, that just repeats the section of the page that it surrounds (which might contain text, HTML tags, and JSF tags) and doesn't try to help in building a table of any sort. In fact, this would make me a lot happier. But I don't find such a beast anywhere in the copious documentation.
    Thanks in advance for any and all help.
    Zag

    Thanks all for advice so far. I have tried all the suggestions in here, and I still can't seem to get what I want. What I am really looking for is a simple repeat tag, without it giving me all the "help."
    I tried Sergey's example, and it does, in fact, work fine in the header. However, to get the same behavior in the column itself does not seem to work. This code:
    <h:data_table value="#{BeanColl}" var="_loopvar_TestBean" >
    <h:column>
       <!-- Header works great. -->
       <f:facet name="header">
          <f:subview id="abc">
              <h:output_text  value="HeaderText1" />
              <f:verbatim escape="false"><BR /></f:verbatim>
              <h:output_text  value="HeaderText2" />
         </f:subview>
       </f:facet>
       <!-- Same code in the column does not work -->
          <h:subview id="abd">
              <h:output_text  value="text1" />    <!-- question="This tag does NOTHING!!  Why?"  -->
              <f:verbatim escape="false"><BR /></f:verbatim>
              <h:output_text value="#{_loopvar_TestBean.id}" />
         </h:subview>
    </h:column>Here is the amazing thing: In my column data, the only tag which produces anything is the last output_text. I had thought that the problem had to do with the verbatim, but, in fact, JSF doesn't seem to want to produce any output that doesn't come directly from the loop variable! The first output_text in the column data, which should produce "text1" in each cell in the column, does not seem to do anything at all.
    I have also tried using panel_group rather than subview, with the same results.
    Is there some tag other than data_table which will repeat over data? I've looked, but maybe I'm just blind. I want something that does a lot less for me, and gives me the power to get what I actually want.
    Any and all help and advice, even if it doesn't pan out, is greatly appreciated. (Do I sound desparate enough, yet?) :-)

  • As a JSF Developer, I want to understand technically how the JSF View Components are rendered as html and how there events are binded to Server.I want to know each Java Class that is involved in flow.

    As a JSF Developer, I want to understand technically how the JSF View Components are rendered as html and how there events are binded to Server.I want to know how flows goes to the server and server understands the method which is to be called of managed bean. I know it is with annotation @ManagedBean and method name, but how Call is binded with annotation @ManagedBean.
    In short, i want to know the internal implementation of JSF Framework.

    As a JSF Developer, I want to understand technically how the JSF View Components are rendered as html and how there events are binded to Server.I want to know how flows goes to the server and server understands the method which is to be called of managed bean. I know it is with annotation @ManagedBean and method name, but how Call is binded with annotation @ManagedBean.
    In short, i want to know the internal implementation of JSF Framework.

  • How do I mix text and Html format in a java mail?

    How do I mix text and Html format in a java mail? some part I want to keep the text format, the other part I want to use Html functions(like fond, color, etc)

    You don't mix them. Pick one or the other.
    However if you want to have a text version and an HTML version, so that mail readers that don't handle HTML can see regular text instead, then you could produce a "multipart/alternative" message. There's an explanation of how to do that in this article:
    http://www-128.ibm.com/developerworks/java/library/x-xmlist2/

  • Mixing Non JSF and JSF components

    Hi All,
    I wanted to mix non jsf and jsf components and I able to do this
      <f:verbatim>
                                    <input type="radio" name="selectBidder" value="#{currentRow['BID_ID]}"/>
                                </f:verbatim>But the problem is bean value is not getting binded.
    The rendered output is containing same string i.e.
    value="#{currentRow['BID_ID]}"
    How to bind bean value to non jsf component.
    And No Javascript please
    Thanks
    Sudhakar

    Basically I am trying to implement something like below
    <h:dataTable binding="#{consumer$Select_Provider.dataTable1}" headerClass="list-header" id="dataTable1"
                            rowClasses="list-row-even,list-row-odd" style="left: 48px; top: 48px; position: absolute"
                            value="#{consumer$Select_Provider.dataTable1Model}" var="currentRow">
                            <h:column binding="#{consumer$Select_Provider.column6}" id="column6">
                                <h:outputText binding="#{consumer$Select_Provider.outputText11}" id="outputText11" value="#{currentRow['USER_LNAME']} #{currentRow['USER_FNAME']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{consumer$Select_Provider.outputText12}" id="outputText12" value="Bidder"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{consumer$Select_Provider.column1}" id="column1">
                                <h:outputText binding="#{consumer$Select_Provider.outputText1}" id="outputText1" value="#{currentRow['BID_PRICE']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{consumer$Select_Provider.outputText2}" id="outputText2" value="Bid Price"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{consumer$Select_Provider.column3}" id="column3">
                                <f:verbatim>
                                    <input name="selectBidder" type="radio" value="#{currentRow['BID_ID]}"/>
                                </f:verbatim>
                                <f:facet name="header">
                                    <h:outputText binding="#{consumer$Select_Provider.outputText6}" id="outputText6" value="Select Bidder"/>
                                </f:facet>
                            </h:column>
                        </h:dataTable>Thanks
    Sudhakar

  • Mixing Flash and html

    I am somewhat new, or I perpetually feel new to both html and flash. At any rate I am building a site for a friend where I have made a lovely simple flash movie and have dropped it into a div in dreamweaver. The movie takes up the entire page size and I have added other divs on top if it with html text.
    My question: Am I asking for trouble?
    So far all looks fine. I have had people tell me that stacking(nesting?) divs is a bad idea. I would like feedback from you pros. Thanks much
    PITN

    Use this on-line validation tool to spot unclosed <div> tags & other code errors.
    HTML Validator - http://validator.w3.org
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • Mixing static and dynamic content in a single outputText value causes NPEs

    Hi,
    I am having a problem and I'm wondering if it is a result of my error or if this is a bug.
    I am mixing dynamic and static content in the value attribute of tags (e.g., outputText). On initial page load, everything works fine. However, if the same view is reloaded (e.g., after a failed validation) I get an NPE from JSF:
    [#|2006-10-24T08:49:03.756-0500|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=12;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.NullPointerException
            at com.sun.faces.el.MixedELValueParser.getNextToken(MixedELValueParser.java:140)
            at com.sun.faces.el.MixedELValueParser.parse(MixedELValueParser.java:123)
            at com.sun.faces.el.MixedELValueBinding.getValue(MixedELValueBinding.java:60)
            at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
            at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:201)
            at com.sun.faces.renderkit.html_basic.LabelRenderer.encodeBegin(LabelRenderer.java:128)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:609)
            at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)
            at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
            at org.apache.jsp.registration_jsp._jspx_meth_h_panelGrid_0(registration_jsp.java:324)
            at org.apache.jsp.registration_jsp._jspx_meth_h_form_0(registration_jsp.java:223)
            at org.apache.jsp.registration_jsp._jspx_meth_f_view_0(registration_jsp.java:157)
            at org.apache.jsp.registration_jsp._jspService(registration_jsp.java:118)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
            at sun.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
            at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
            at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:326)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:132)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:194)
            at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)My code looks like this:
    <h:outputText escape="false"
              value='<link href="#{myBean.styleSheet}" rel="stylesheet" type="text/css"  />' />If I replace this with a much more convoluted set of tags, it works:
    <h:outputText escape="false"
              value='<link href="' /><h:outputText escape="false" value="#{myBean.styleSheet}"
              /><h:outputText escape="false" value='" rel="stylesheet" type="text/css" />' />So is the problem that I am mixing dynamic and static content with a single value? If so, why does it work on the first view, and not after?
    If it matters, I'm using the reference implementation version 1.1 (as included with NetBeans 5.5RC2) on SuSE 10.0 w/ JDK 1.5_09.
    Thanks,
    Bill

    Yes, that's how I originally had it, but then changed it to the outputText approach since a single tag could do what I wanted, as long as I was allowed to mix static and dynamic content within a single value.
    I think this is a bug in JSF 1.1, since if what I am doing is illegal, it should throw an exception on the first page view, not work on first view and throw an exception on subsequent views. I'm guessing that this has something to do with the fact that on first page view it only runs the restore view and render response JSF phases, while on subsequent requests all of the phases will be run, and it's in one of those other phases that the exception is thrown.
    For now, multiple tags is the work-around, I guess.
    Thanks,
    Bill

  • Adding a jar to the classpath of an executable jar (mixing -jar and -cp)

    Hello,
    frankly I hesitated over posting this to "New to Java"; my apologies (but also, eternal gratefulness) if there is an ultra-simple answer I have overlooked...
    I integrate a black-box app (I'm not supposed to have the source) that comes packaged as an executable jar (with a Manifest.MF that specifies the main class and a bunch of dependent jars), along with a few dependent jars and a startup script. Long story short, the application code supports adding jars in the classpath, but I can't find a painless way to add a jar in its "classpath".
    The app's "vendor" (another department of my customer company) has a slow turnaround on support requests, so while waiting for their suggestion as to how exactly to integrate custom jars, I'm trying to find a solution at the pure Java level.
    The startup script features a "just run the jar" launch line:
    java -jar startup.jarI tried tweaking this line to add a custom jar in the classpath
    java -cp mycustomclasses.jar -jar startup.jarBut that didn't seem to work ( NoClassDefFound at the point where the extension class is supposed to be loaded).
    I tried various combination of order, -cp/-classpath, using the CLASSPATH environment variable,... and eventually gave up and devised a manual launch line, which obviously worked:
    java -cp startup.jar;dependency1.jar;dependency2.jar;mycustomclasses.jar fully.qualified.name.of.StartupClassI resent this approach though, which not only makes me have to know the main class of the app, but also forces me to specify all the dependencies explicitly (the whole content of the Manifest's class-path entry).
    I'm surprised there isn't another approach: really, can't I mix -jar and -cp options?
    - [url http://download.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html]This document (apparently a bible on the CLASSPATH), pointed out by a repited forum member recently, does not document the -jar option.
    - the [url http://download.oracle.com/javase/tutorial/deployment/jar/run.html]Java tutorial describes how to use the -jar option, but does not mention how it could play along with -cp
    Thanks in advance, and best regards,
    J.
    Edited by: jduprez on Dec 7, 2010 11:35 PM
    Ahem, the "Java application launcher" page bundled with the JDK doc (http://download.oracle.com/javase/6/docs/technotes/tools/windows/java.html) specifies that +When you use [the -jar] option, the JAR file is the source of all user classes, and other user class path settings are ignored+
    So this behavior is deliberate indeed... my chances diminish to find a way around other than specifying the full classpath and main class...

    I would have thought that the main-class attribute of the JAR you name in the -jar option is the one that is executed.Then I still have the burden of copying that from the initial startup.jar's manifest. Slightly less annoying than copying the whole Class-path entry, but it's an impediment to integrating it as a "black-box".
    The 'cascading' behavior is implicit in the specification
    I know at least one regular in addition to me that would issue some irony about putting those terms together :o)
    Anyway, thank you for confirming the original issue, and merci beaucoup for your handy "wrapper" trick.
    I'll revisit the post markers once I've actually tried it.
    Best regards,
    Jérôme

  • Tomcat 6.0.9 and jsf 1.2 and jstl 1.2 using *.tag file error

    I using :tomcat 6.0.9 and jsf 1.2 and jstl 1.2
    My web.xml is at version 2.5 and I am using a custom tag (with the .tag extension). I am trying to use the http://java.sun.com/jsf/html library and values from my attribute. I'm new to this so I figure I must just me missing something.
    I am run http://192.168.1.1/test.jsf laster,view:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:212)
         org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:576)
         org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:50)
         org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:627)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:631)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:645)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:190)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:414)
         com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:455)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:139)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.9 logs.
    if go to /WEB-INF/tags/test.tag ,delete line: <h:outputText id="test" value="hello!" />
    run http://192.168.1.1/test.jsf is OK!(no error),So I guess error for "<h:outputText id="test" value="hello!" />" line ,why in test.tag file do can't use the "http://java.sun.com/jsf/html " library,please help me.......
    Here is file WEB-INF/web.xml content:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements. See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License. You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    -->
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
    version="2.5">
    <display-name>Welcome to Tomcat</display-name>
    <description>
    Welcome to Tomcat
    </description>
    <!-- Faces Servlet -->
    <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup> 1 </load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    </web-app>
    Here is file /test.jsp code:
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <f:view>
    <html>
    <head>
    <title>test</title>
    </head>
    <body>
    <!-- body start -->
    <h:outputText id="myinfo" value="test success" />
    <tags:test/>
    <!-- body end -->
    </body>
    </html>
    </f:view>
    Here is file /WEB-INF/tags/test.tag code:
    <%@tag pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <h:outputText id="test" value="hello!" />
    Thanks for any help.

    Don't know if it's important, but there is no schema avaiable at: http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd
    I found the right one at: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
    /perty
    Message was edited by:
    perajonsson

  • Struts and JSF Integration in OPDk-java based portlet

    Hi,
    thanks in advance for your help.
    I'm developing a PDK java based portlet. For some reasons I cannot use the JSF bridge but I would like to integrate Struts and Jsf in my portlet, using Struts to manage actions and navigation and JSF (with ADF Faces components) for the view. I'm using the Strus-Faces library.
    When I try to submit my portlet form, I receive the error "request URL not found on this server". I'm posting some exstracts of my code.
    It's made of three pages: the main one "Integration1ShowPage", "error" and "result". The MainAction.java displays my mainPage, where there's a form. To keep it easy, when the user submits this form, the ActionName returns "success" and the "result" page should be displayed.
    The MainAction works properly: the portlet is displayed but when I tried to submit the form I receive
    The requested URL /provaDeploy/htdocs/integration1/integration1ShowPage.do was not found on this server.Could you please suggest me something?
    Many many thanks,
    B.
    <struts-config>
    <action-mappings>
      <action path = "/mainAction" type = "strutsjsfintegration1.MainAction">
        <forward name = "success" path = "/faces/htdocs/integration1/integration1ShowPage.faces"/>
      </action>
      <action path = "/nameAction" name = "nameForm"
      input = "/faces/htdocs/integration1/integration1ShowPage.faces" scope = "request"
      type = "strutsjsfintegration1.NameAction">
        <forward name = "success" path = "/faces/htdocs/integration1/result.faces"/>
        <forward name = "failure" path = "/faces/htdocs/integration1/error.faces"/>
        <forward name = "again" path = "faces/htdocs/integration1/integration1ShowPage.faces"/>
      </action>
    </action-mappings>
    <controller>
      <set-property property = "processorClass"
       value="org.apache.struts.faces.application.FacesRequestProcessor"/>
       </controller>
    <message-resources parameter="definitiveStrutsPortlet.ApplicationResources"/>
    </struts-config>

    Hi,
    have a look at this whitepaper for how to use JavaScript in ADF.
    http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
    This link here (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html --> see sample 71) shows an integration sample between a Java Applet and ADF. Its a similar use case to yours
    Frank

  • Multiple response streams ?   HTML and binary ?

    Hello,
    Is it possible for a Servlet to create two responses or two output streams, with one as HTML and the other as binary?
    The code below only seems to send the first (HTML) section and seems to ignore the second (binary) section ?
    Thanks alot !!!
    James
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class MinimalBinaryStream extends HttpServlet
      public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        doGet(request, response);
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        /*----------Below: Send HTML Response----------*/
        response.setContentType("text/html");
        ServletOutputStream out = response.getOutputStream();
        out.print("<h3>Text message to say binary file is on its way</h3>");
        out.flush();
        out.close();
        /*----------Below: Send Binary Response----------*/
        response.reset();
        response.setContentType("application/octet-stream");
        response.setContentLength(3);
        out = response.getOutputStream();
        out.write(0x31);
        out.write(0x32);
        out.write(0x33);
        out.flush();
        out.close();
    }

    The servlet validates the serial number. If the
    serial number submitted is invalid, then the servlet
    simply sends an HTML message to the client saying
    "Invalid serial number, please try again, etc,
    etc".
    If the serial number is valid, then the server
    encrypts it into a ZIP file and sends the ZIP file to
    the client. (This part is working perfectly by the
    way.)It sounds like you're not really mixing the two types of data in a single response... You're doing one or the other depending upon the value of some data the client has sent to the server
    I wouldn't use the sendRedirect method off of the response. That causes a new get request to be issued from the client which is not necessary. I'd use the RequestDispatcher, preserving the initial request and forwarding both the request and response to another resource on the server. The client is unaware of any of it.
    if ( serial number valid ) {
         // encrypt to ZIP
         // send zip to client on response...
    } else {
         ResquestDispatcher dispatcher = request.getRequestDispatcher( "redirect.html" );
         dispatcher.forward( request, response );
    }http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/RequestDispatcher.html
    What would be really nice, is if the servlet could
    also send an HTML message saying "Thanks for your
    serial number, here is your licence.ZIP, etc,
    etc".For this, maybe you could create a jsp page with a link that pointed to the ZIP file on the server. You would define the name dynamically, and attach the name to the request via setAttribute. Then use that same value in the href value on the jsp page. via request.getAttribute The jsp page would contain the message in html and the client would obtain the zip from the link. And use the RequestDispatcher to forward to the jsp page from the servlet. Place the jsp inside /WEB-INF so that by itself it is not accessble to the client. Only the server code can get to it.

Maybe you are looking for

  • Problem in Back Ground Job

    Hi Experts, I want to execute a program in Back ground but my program has selectionscreen. I don't want to Provide Variant for this screen that's why i am passing these values Thru INITILIZATION event. But Background is not moving forward. It is wait

  • X fails to start, dell 1545

    Hi there! OK, I should start by saying I'm almost a complete noob to arch, but not to Linux. I've used Ubuntu, Debian, Fedora, Puppy, DSL... You get the picture However, I'm stumped. I followed the directions in the arch wiki to install gnome. Howeve

  • GT70 2OD downloads bios driver firmware

    i have GT70 2OD-019US i tried to update my graphic card driver from  http://www.msi.com/product/nb/GT70-2OD.html#download it didnt work it said not compatiable im using latest beta driver from nvidia webiste you guys have right stuff on the website t

  • Check deposit with smartform

    Hi experts! I have to replace a sapscript by a smartform for transaction FF68 and I don't know how I can do it. If I'm not wrong there are no user exit or enhancement planned to do that. I try to do it with Business Transaction Event but I don't know

  • Recent Software Update Problem-Graphics

    I just updated my software this afternoon and after I restarted my macbook, all drop down menus anywhere, even on web pages do not work. You can click on them but they are not completely visible. You can't read what they say. The software update was