JSP Fragments (JSP 1.x) or JSP Segments (JSP 2.0)

I currently build a web project from a WAR file which includes JSP fragments (<root-context>/includes/*.jsp). When I compile the project JDeveloper 9.0.3.1035 will try and compile the fragments which will fail.
Sun recommends an alternate extension of '.JSPF'. When I rename the JSP fragments using this extension, JDeveloper will correctly exclude them from compilation. However no code insight, code highlighting, tag completion etc that JDeveloper does so well is available. Is there a way around this issue ?

The following solution solves most of this issue;
From the menu select tools/preferences,
Select File Types,
Select JSP Source,
Click Add button and enter the .jspf extension.
Restarting JDeveloper allocates the correct association with new .jspf files inserted to the project but those inserted prior to adding the .jspf extension have an incorrect association. Even selecting 'remove from project' then 'add to project' will not set up the correct association.
Can these files be correctly associated via some other means ?

Similar Messages

  • TDMS Extract Segments

    So I'm learning a lot about the TDMS file structure using this document.
    http://www.ni.com/white-paper/5696/en/
    My goal is to be able to break up a TDMS file into its segments, or rather break up a file that has 2000 segments, into 100 files with 20 segments in them each.  Opening a TDMS file into a hex editor I can see all the segments, and I can save the first 20 Segment on its own into a new file and it opens just fine in the Excel import.  But if I try to take the second 20 Segment (without the first 20) and save it away the Excel Import craps out with a code 6.  I tried just taking segment 21 and it also dies in a similar way.  Attached is the original fragmented file which should have 40 segments, the file split into the first 20, the second 20 and a file with just the 21st.
    So my question is this.  What am I doing wrong in the split process?  Why does segment 21 on its own create an invalid TDMS file?
    EDIT: I also tried deleting the index files forcing them to be recreated.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
    Attachments:
    Segment Extract Test.zip ‏4 KB

    Hi, 
    It's not quite common for splitting a TDMS file by segment numbers. I just try to explain your two questions. 
    1."What am I doing wrong in the split process? "
    As your description, I think when you create the TDMS file containing the second 20 segments or only the 21 segment, you simply copied the binary from the original file. The binary for the second 20 segments(and the 21 segment) is relative with the binary in previous. The binary you copied for latter segments is lack of some parts(details explained in question 2), so can not compose a valid TDMS file format. But the binary for the first 20 segments is intergrated for a valid TDMS file format. That's why you can just successfully open the TDMS file containing the first 20 segments.
    2."Why does segment 21 on its own create an invalid TDMS file?" 
    As a conclusion, the binary of "21st Segment.tdms" is lack of the parts below in Meta Data:
      1) The root object and group object ;
           From the binary snapshot of "21st Segment.tdms", we can see there is no binary for root object and group object in Meta Data part(Address 0x1c ~ 0x3d).
      2) Details of raw data index for the channel object.
           The snapshot shows Raw Data Index part in Meta Data is 0x 00 00 00 00(Address 0x36~0x39), that means the raw data index of the object in this segment exactly matches the index the same object had in the previous segment. But for an independent TDMS file, this part can not be omitted. The missing part is identical with the part of Address 0x6b ~ 0x7e in the snapshot of the 1st segment.
    If the above parts are added in Meta Data, the next segment offset and raw data offset in Lead In(Address 0x0c~0x13 and 0x14~0x1b in the binary of "21st Segment.tdms") should also be updated.
    The binary of "21st Segment.tdms":
    The binary of the 1st segment(within the red frame):

  • Another JSP Fragment bug (or JSF flaw?)

    My application has a search box and go button in a JSPF fragment. But data content is rendered in a JSP. To demonstrate the problem I am going to slightly modify the Person/Trip tutorial sample:
    1. Create a new project
    2. Add Trip rowset to page1
    3. Set criteria perseonid = ?
    4. Add data table and bind it to trip rowset
    5. Add Integer PersonID property to the session bean
    6. Add PersonID initialization code:
    personID = new Integer(1);
    5. Add Page1 initialization:
    try {
    dataTable1Model.setObject(1, getSessionBean1().getPersonID());
    dataTable1Model.execute();
    } catch (Exception e) {
    throw new FacesException(e);
    5. Add a new JSP Fragment above the table and name it Test.jspf
    6. Place an edit field (Search) and a button to submit the search
    7. Add process value change event to the edit box:
    getSessionBean1().setPersonID(new Integer((String)vce.getNewValue()));
    8. Add action handler to the button but keep it empty for now since we do not have inter-page navigation here really
    Now start project and enter 2 into search field click on the button and see the table did not update. Enter 3 and see that the table now shows the records for the person id 2.
    So why do tutorial samples work and this JSPF does not? The problem is that JSPF fragment does not have any knowledge about the table data model on the Page1.jsp so it cannot synchronize it in the value change event!!! However, tutorial samples do update data model because value change event is in the same Java class. In this case JSPF is a completely different class.
    Now please tell me what am I supposed to do? Don't suggest me to access Page1.tableDataModel from the Test.jspf since my JSPF can be included in different pages.
    My current workaround again is using this call in the button action event:
    try { getExternalContext().redirect("Page1.jsp"); } catch (Exception e) {};
    Now, you have to pay me something for all that hard QA work I have to do for your entire QA department. ;-)
    Here is the codes: (just in case)
    Page1.java:
    * Page1.java
    * Created on December 19, 2004, 10:59 AM
    * Copyright ybaykshtis
    package test9;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.sql.rowset.*;
    import com.sun.jsfcl.data.*;
    import javax.faces.component.*;
    public class Page1 extends AbstractPageBean {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
    private int __placeholder;
    private HtmlForm form1 = new HtmlForm();
    public HtmlForm getForm1() {
    return form1;
    public void setForm1(HtmlForm hf) {
    this.form1 = hf;
    private JdbcRowSetXImpl tripRowSet = new JdbcRowSetXImpl();
    public JdbcRowSetXImpl getTripRowSet() {
    return tripRowSet;
    public void setTripRowSet(JdbcRowSetXImpl jrsxi) {
    this.tripRowSet = jrsxi;
    private HtmlDataTable dataTable1 = new HtmlDataTable();
    public HtmlDataTable getDataTable1() {
    return dataTable1;
    public void setDataTable1(HtmlDataTable hdt) {
    this.dataTable1 = hdt;
    private UIColumn column1 = new UIColumn();
    public UIColumn getColumn1() {
    return column1;
    public void setColumn1(UIColumn uic) {
    this.column1 = uic;
    private HtmlOutputText outputText1 = new HtmlOutputText();
    public HtmlOutputText getOutputText1() {
    return outputText1;
    public void setOutputText1(HtmlOutputText hot) {
    this.outputText1 = hot;
    private HtmlOutputText outputText2 = new HtmlOutputText();
    public HtmlOutputText getOutputText2() {
    return outputText2;
    public void setOutputText2(HtmlOutputText hot) {
    this.outputText2 = hot;
    private UIColumn column2 = new UIColumn();
    public UIColumn getColumn2() {
    return column2;
    public void setColumn2(UIColumn uic) {
    this.column2 = uic;
    private HtmlOutputText outputText3 = new HtmlOutputText();
    public HtmlOutputText getOutputText3() {
    return outputText3;
    public void setOutputText3(HtmlOutputText hot) {
    this.outputText3 = hot;
    private HtmlOutputText outputText4 = new HtmlOutputText();
    public HtmlOutputText getOutputText4() {
    return outputText4;
    public void setOutputText4(HtmlOutputText hot) {
    this.outputText4 = hot;
    private UIColumn column3 = new UIColumn();
    public UIColumn getColumn3() {
    return column3;
    public void setColumn3(UIColumn uic) {
    this.column3 = uic;
    private HtmlOutputText outputText5 = new HtmlOutputText();
    public HtmlOutputText getOutputText5() {
    return outputText5;
    public void setOutputText5(HtmlOutputText hot) {
    this.outputText5 = hot;
    private HtmlOutputText outputText6 = new HtmlOutputText();
    public HtmlOutputText getOutputText6() {
    return outputText6;
    public void setOutputText6(HtmlOutputText hot) {
    this.outputText6 = hot;
    private UIColumn column4 = new UIColumn();
    public UIColumn getColumn4() {
    return column4;
    public void setColumn4(UIColumn uic) {
    this.column4 = uic;
    private HtmlOutputText outputText7 = new HtmlOutputText();
    public HtmlOutputText getOutputText7() {
    return outputText7;
    public void setOutputText7(HtmlOutputText hot) {
    this.outputText7 = hot;
    private HtmlOutputText outputText8 = new HtmlOutputText();
    public HtmlOutputText getOutputText8() {
    return outputText8;
    public void setOutputText8(HtmlOutputText hot) {
    this.outputText8 = hot;
    private UIColumn column5 = new UIColumn();
    public UIColumn getColumn5() {
    return column5;
    public void setColumn5(UIColumn uic) {
    this.column5 = uic;
    private HtmlOutputText outputText9 = new HtmlOutputText();
    public HtmlOutputText getOutputText9() {
    return outputText9;
    public void setOutputText9(HtmlOutputText hot) {
    this.outputText9 = hot;
    private HtmlOutputText outputText10 = new HtmlOutputText();
    public HtmlOutputText getOutputText10() {
    return outputText10;
    public void setOutputText10(HtmlOutputText hot) {
    this.outputText10 = hot;
    private UIColumn column6 = new UIColumn();
    public UIColumn getColumn6() {
    return column6;
    public void setColumn6(UIColumn uic) {
    this.column6 = uic;
    private HtmlOutputText outputText11 = new HtmlOutputText();
    public HtmlOutputText getOutputText11() {
    return outputText11;
    public void setOutputText11(HtmlOutputText hot) {
    this.outputText11 = hot;
    private HtmlOutputText outputText12 = new HtmlOutputText();
    public HtmlOutputText getOutputText12() {
    return outputText12;
    public void setOutputText12(HtmlOutputText hot) {
    this.outputText12 = hot;
    private RowSetDataModel dataTable1Model = new RowSetDataModel();
    public RowSetDataModel getDataTable1Model() {
    return dataTable1Model;
    public void setDataTable1Model(RowSetDataModel rsdm) {
    this.dataTable1Model = rsdm;
    // </editor-fold>
    public Page1() {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
    try {
    tripRowSet.setDataSourceName("java:comp/env/jdbc/Travel");
    tripRowSet.setCommand("SELECT ALL TRAVEL.TRIP.TRIPID, TRAVEL.TRIP.PERSONID, TRAVEL.TRIP.DEPDATE, TRAVEL.TRIP.DEPCITY, TRAVEL.TRIP.DESTCITY, TRAVEL.TRIP.TRIPTYPEID FROM TRAVEL.TRIP WHERE TRAVEL.TRIP.PERSONID=?");
    dataTable1Model.setDataCacheKey("com.sun.datacache.Page1.tripRowSet");
    dataTable1Model.setRowSet(tripRowSet);
    dataTable1Model.setSchemaName("TRAVEL");
    dataTable1Model.setTableName("TRIP");
    } catch (Exception e) {
    log("Page1 Initialization Failure", e);
    throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
    // </editor-fold>
    // Additional user provided initialization code
    try {
    dataTable1Model.setObject(1, getSessionBean1().getPersonID());
    dataTable1Model.execute();
    } catch (Exception e) {
    throw new FacesException(e);
    protected test9.ApplicationBean1 getApplicationBean1() {
    return (test9.ApplicationBean1)getBean("ApplicationBean1");
    protected test9.SessionBean1 getSessionBean1() {
    return (test9.SessionBean1)getBean("SessionBean1");
    * Bean cleanup.
    protected void afterRenderResponse() {
    tripRowSet.close();
    Page1.jsp
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view><![CDATA[
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]><html
    lang="en-US" xml:lang="en-US">
    <head>
    <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <title>Page1 Title</title>
    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
    </head>
    <body style="-rave-layout: grid">
    <h:form binding="#{Page1.form1}" id="form1">
    <h:dataTable binding="#{Page1.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd"
    style="left: 24px; top: 168px; position: absolute" value="#{Page1.dataTable1Model}" var="currentRow">
    <h:column binding="#{Page1.column1}" id="column1">
    <h:outputText binding="#{Page1.outputText1}" id="outputText1" value="#{currentRow['TRIPID']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText2}" id="outputText2" value="TRIPID"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column2}" id="column2">
    <h:outputText binding="#{Page1.outputText3}" id="outputText3" value="#{currentRow['PERSONID']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText4}" id="outputText4" value="PERSONID"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column3}" id="column3">
    <h:outputText binding="#{Page1.outputText5}" id="outputText5" value="#{currentRow['DEPDATE']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText6}" id="outputText6" value="DEPDATE"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column4}" id="column4">
    <h:outputText binding="#{Page1.outputText7}" id="outputText7" value="#{currentRow['DEPCITY']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText8}" id="outputText8" value="DEPCITY"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column5}" id="column5">
    <h:outputText binding="#{Page1.outputText9}" id="outputText9" value="#{currentRow['DESTCITY']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText10}" id="outputText10" value="DESTCITY"/>
    </f:facet>
    </h:column>
    <h:column binding="#{Page1.column6}" id="column6">
    <h:outputText binding="#{Page1.outputText11}" id="outputText11" value="#{currentRow['TRIPTYPEID']}"/>
    <f:facet name="header">
    <h:outputText binding="#{Page1.outputText12}" id="outputText12" value="TRIPTYPEID"/>
    </f:facet>
    </h:column>
    </h:dataTable>
    <div style="left: 48px; top: 72px; position: absolute">
    <jsp:directive.include file="Test.jspf"/>
    </div>
    </h:form>
    </body>
    </html>
    </f:view>
    </jsp:root>
    Test.java
    * Test.java
    * Created on December 19, 2004, 11:01 AM
    * Copyright ybaykshtis
    package test9;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.jsfcl.data.*;
    import javax.faces.component.*;
    import com.sun.sql.rowset.*;
    import javax.faces.convert.*;
    import javax.faces.event.*;
    public class Test extends AbstractPageBean {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
    private int __placeholder;
    private JdbcRowSetXImpl personRowSet = new JdbcRowSetXImpl();
    public JdbcRowSetXImpl getPersonRowSet() {
    return personRowSet;
    public void setPersonRowSet(JdbcRowSetXImpl jrsxi) {
    this.personRowSet = jrsxi;
    private HtmlInputText textField1 = new HtmlInputText();
    public HtmlInputText getTextField1() {
    return textField1;
    public void setTextField1(HtmlInputText hit) {
    this.textField1 = hit;
    private HtmlCommandButton button1 = new HtmlCommandButton();
    public HtmlCommandButton getButton1() {
    return button1;
    public void setButton1(HtmlCommandButton hcb) {
    this.button1 = hcb;
    // </editor-fold>
    public Test() {
    // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
    try {
    personRowSet.setDataSourceName("java:comp/env/jdbc/Travel");
    personRowSet.setCommand("SELECT * FROM TRAVEL.PERSON");
    } catch (Exception e) {
    log("Test Initialization Failure", e);
    throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
    // </editor-fold>
    // Additional user provided initialization code
    protected test9.ApplicationBean1 getApplicationBean1() {
    return (test9.ApplicationBean1)getBean("ApplicationBean1");
    protected test9.SessionBean1 getSessionBean1() {
    return (test9.SessionBean1)getBean("SessionBean1");
    * Bean cleanup.
    protected void afterRenderResponse() {
    personRowSet.close();
    public String button1_action() {
    // User event code here...
    //try { getExternalContext().redirect("Page1.jsp"); } catch (Exception e) {};
    return null;
    public void textField1_processValueChange(ValueChangeEvent vce) {
    // User event code here...
    getSessionBean1().setPersonID(new Integer((String)vce.getNewValue()));
    Test.jspf
    <?xml version="1.0" encoding="UTF-8"?>
    <div style="-rave-layout: grid" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
    <p>Included Content Here</p>
    <h:inputText binding="#{Test.textField1}" id="textField1" style="left: 48px; top: 48px; position: absolute" valueChangeListener="#{Test.textField1_processValueChange}"/>
    <h:commandButton action="#{Test.button1_action}" binding="#{Test.button1}" id="button1" style="left: 240px; top: 48px; position: absolute" value="Submit"/>
    </div>

    Hi ,
    Thanks for your valuable observations and feedback. I could observe that the workaround seems to be working fine. Thanks for providing the workaround.
    The problem you are facing without the workaround is a known issue and our engineers are currently working on it.
    Regards.
    Creator Team.

  • How to skip validation for tag file, or jsp fragment?

    hi
    I have some jsp fragment and tag file in a workshop 10 project
    workshop blame me about the jsp fragment (no start/end tag)
    and unable to publish to server
    is there a way to skip validation on some files?
    I do found an check box call "validate JSP fragments" and I have un-ticked it. It does nothing.
    please help

    Yes, you can turn off validation either on project/folder/individual file.
    Project:
    Project > Properties - Validation AppXRay - un-check "Validate Workshop managed documents" (this is not recommended, you may loose entire AppXRay validation).Folder:
    Project > Properties - Validation AppXRay - Exclude Folders tab, if all the JSP fragments are present in a particular folder (under WebAppRoot), you can pick that folder to be excluded from AppXRay validationFile:
    Help > Help Contents - BEA Workshop User's Guide > Common IDE Tasks > "Using AppXRay" - Live Synchronization of artifacts with AppXRay - On this page scroll to the bottom you will find a table with list of comments that can be included in a JSP file to exclude file level validation.Ex:
    <%--<nitrox:set-property property="validation" value="true"/> --%>
    Controls all validation in the IDE. The default value of true enables validation.

  • JSTL X JSP fragment

    Hi there...
    I put a right JSTL code in a JSP fragment and it didn't work? What am I supposed to do to run a JSTL code in a JSP fragment. Is there any configuration in special?
    Thanks

    There is a fundamental difference between the include directive [url http://java.sun.com/products/jsp/syntax/1.2/syntaxref129.html#997991]<%@ include %>  and [url http://java.sun.com/products/jsp/syntax/1.2/syntaxref1214.html#8828] <jsp:include >
    The <%@ include %> tag includes the file at translation/compile time. It is like copying and pasting the contents of the "fragment" into the main JSP. It is then translated, compiled and run.
    The <jsp:include> tag includes the result of running that page at execution time. ie it is as if you made a web request to that URL, and pasted the response you got back into the response of the including page.
    What does this mean in your case?
    1 - a .jspf file will not be evaluated by <jsp:include>. If you make a request for the jspf file directly, it will send you the source, because it doesn't invoke the JSP servlet on jspf files.
    Solution: change the file to meujstl.jsp, and it should include ok.
    2 - The file needs to be standalone with regards to importing
    - tag libraries
    - packages (if any)
    etc etc.
    so you will need to import the core jstl taglib at the top of the page to use it with <jsp:include>
    Cheers,
    evnafets

  • Problem redering h:outputText tag on a jsp fragment

    Hello to all... I'm trying to understand and use this new technology and I have encountered a problem that I cannot find any documentation as how to solve it. First I have my welcome.jsp page that I am using to call my fragment:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <f:view>
                <h1><h:outputText value="Java Server Faces" /></h1>
                <f:subview id="banner">
                    <c:import url="/banner.jsp"/>
                </f:subview>
            </f:view>
        </body>
    </html>then I have my jsp fragment, banner.jsp:
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
        <f:loadBundle basename="com.gm.gsip.messages" var="msgs"/>
        <table border="1">
            <tr>
                <td> <h:outputText value="#{msgs.hour}"/> � </td>
                <td> <h:outputText value="#{msgs.hour1}"/> �</td>
                <td> <h:outputText value="#{msgs.hour2}"/>� </td>
                <td> <h:outputText value="#{msgs.hour3}"/> �</td>
                <td> <h:outputText value="#{msgs.hour4}"/>� </td>
                <td> <h:outputText value="#{msgs.hour5}"/> �</td>
                <td> <h:outputText value="#{msgs.hour6}" /> �</td>
                <td> <h:outputText value="#{msgs.hour7}" /> �</td>
                <td> <h:outputText value="#{msgs.total}" />� </td>
            </tr>
        </table>My problem is that the <h:outputText> tag is rendering the values outside the table. This is what gets displayed:
    Java Server Faces
    Hour1234567TOTAL
    If I copy/paste the table tags (including the <h:outputText> tags) on the main jip, it renders without any problem:
    Java Server Faces
    Hour 1 2 3 4 5 6 7 TOTAL
    I'm guessing that I might be missing some other jsf tag inside the jsp fragment. Any help will be greatly appreciated.
    -thanks
    Rolando

    I can suggest you with the following solutions
    1. try having <%out.flush();%> before and after c:import
    2. try with jsp:include with flush=true
    Can you reply back with which one works? I didnt try out both of them
    Thanks

  • Using JSF in jsp segment page..

    Hello
    Is it possible to use JSF components in a JSP segment page(.jspf) ? I couldn't achive that..Let me explain:
    I created a .jspf file and inserted these lines into it:
    <f:view>
        <h:form id="loginform">
            <h:panelGrid columns="2">
                <h:outputLabel value="User:"/><h:inputText id="username_email"/>
                <h:outputLabel value="Password:"/><h:inputText id="password"/>
            </h:panelGrid>
        </h:form>
    </f:view>after that i included this .jspf file to a jsp file. When I run the application,I get this error:
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    javax.servlet.ServletException: Cannot find FacesContext
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:181)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    javax.servlet.jsp.JspException: Cannot find FacesContext
         javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
         com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
         org.apache.jsp.index_jsp._jspx_meth_f_view_0(index_jsp.java:196)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:113)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.

    I have tried both:
    logincontrol.jspf (1)
    <f:subview id="sv">
        <h:form id="loginform">
            <h:panelGrid columns="2">
                <h:outputLabel value="User:"/><h:inputText id="username_email"/>
                <h:outputLabel value="Pass:"/><h:inputText id="password"/>
            </h:panelGrid>
        </h:form>
    </f:subview>
    logincontrol.jspf (2)
    <f:view>
        <h:form id="loginform">
            <h:panelGrid columns="2">
                <h:outputLabel value="User:"/><h:inputText id="username_email"/>
                <h:outputLabel value="Pass:"/><h:inputText id="password"/>
            </h:panelGrid>
        </h:form>
    </f:view>but nothing changes... i added this line, in the .jsp file:
    <%@ include file="WEB-INF/jspf/logincontrol.jspf" %>   by the way, is it good to write a .jspf file for login process and include it to the pages?

  • Evaluating actions in jsp:import Fragments

    Greetings,
    I'm using JSP fragments for the first time and encountered some surprises where the fragment did not evaluate as expected. The fragment evaluates fine when it is a block of JSP code, but if I put the same code into a separate JSP file and include it, the block does not get processed in the same way. For example:
    <my:tagFoo foo="bar">
    <jsp:attribute name="content">
    <jsp:include page="MyPage.jsp" flush="false"/>
    </jsp:attribute>
    </my:tagFoo>
    Some strings get substituted as expected, but control statements like <c:forEach ...> remain literal text and are never processed. I've tried the "MyPage.jsp" in a non-fragment context and verified that it works fine. Is there a way to get the tag with the jsp:invoke part to fully process the included page?
    If I put the same fragment block into a separate tag (my preferred approach), other errors get thrown at control statements during the jsp:invoke.
    Any help appreciated!
    -Daniel

    Thanks, for the response! I kept reducing the code in the "my:tagFoo" tag that called the invoker until it was minimalistic -having the essential headers and just the jsp:invoke line with an echo of the content generated. I did try changing the "body-content" to the other valid values but it didn't help, perhaps a line is missing?
    <%@ tag body-content="empty" %>
    <%@ attribute name="content" fragment="true" required="true" %>
    <%@ attribute name="foo" required="true" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
    <%@ taglib tagdir="/WEB-INF/tags" prefix="my" %>
    <jsp:invoke fragment="content" var="output"/>
    <xmp>
    ${output}
    </xmp>

  • Enhancement request: stylesheets for JSP fragments

    empty

    Thank you for the feedback. Some other great enhancements are not too far
    down the road, including visual layout for Tiles applications and management
    of your Tiles definitions. Definitely stay tuned and continue to let us
    know what you would like to see in the product.
    M7 Support
    "Clark Archer" <[email protected]> wrote in message
    news:41127e8f$[email protected]..
    Would it be possible to have a method of specifying a default stylesheetfor JSP fragments in NitroX's JSP design view? I'm using Tiles for most
    of my new presentation layer development and one problem is that, since
    the stylesheet is typically specified in the layout rather than the
    final JSP, NitroX does not display styled JSP in the design view.

  • Including JSP fragment file in a JSP

    Hi, there,
    I'm trying to include a fragment JSP file (with an extension .jspf as suggested by JSP1.2 spec) in a JSP file as follows:
    <jsp:include page="/header.jspf"/>
    But it looks like OC4J thinks it is a static file and thus all JSP tags are ignored. I have to change the file extension from "jspf" to "jsp" to make it work.
    Same thing happens with the RequestDispatcher.include method.
    Is there a way to handle this in OC4J such as adding a servlet mapping?
    Thanks.
    Li

    You might consider using an include directive instead of an include action. The "jsp:include" element is the include action. This executes at "run time" as an internal forward from the servlet container. However, an include directive executes at servlet generation time (compile time).
    So, instead of doing "jsp:include", you would do the following:
    <%@ include file="/stuff.jspf" %>
    This should allow your JSP fragment to be compiled into the servlet it is being included from.

  • How to set TabIndex in jsp fragments embeded in jsp

    After googling a little bit I can find a way to set the tabIndex in my jsp fragments which are embeded in a jsp. I'm working with JSF and project woodstock.
    I have embeded the fragment like this:
    <div style="border-bottom: solid rgb(5, 5, 158) 1px; top: 1289px; position: absolute">
        <jsp:directive.include file="myFragment.jspf"/>
    </div>I'll be really gratefull for your help.

    try this:
    your.jsp
    <html>
    <SCRIPT>function buttonClick()
    {document.compform.submit();}
    </SCRIPT>
    <body>
    <form name=compform method=post action='your.jsp'>
    <%
    //write your code which you want to execute once the button is submitted
    String submit;
    submit=request.getParameter("mysubmit");
    if ((submit != null) && (! submit.equals("")))
    %>
    <input type=hidden name=mysubmit value="submit">
    <input type=button value=add onclick='buttonClick()'>
    </form></body></html>

  • Jsp plugin in page fragment

    Would like to include an applet in a page fragment, however JSC is not happy.
    Create a page fragment, add a
    jsp: plugin tag and jsc complains with the error:
    The prefix "jsp" for element "jsp: plugin" is not bound.
    Have tried setting this plugin inside a panel grid and also within the div itself.
    So - how do I include a jsp : plugin in a page fragement?
    Thanks

    Hi,
    This forum thread may help you:
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=46800
    Thanks,
    Runa.

  • Confused about jsp fragment call

    I am trying to do some basic validation from a jsp page and then call a page fragment. I have entered this code:
    <% //Validate the entered data
              if(!validateBean.validate()) { %>
              <%@ include file="addDataError.jsf" %>
         <% } else { %>
                   accessBean.addData();
                   if(accessBean.success()) { %>
                   <%@ include file="addData1a.jsf" %>
                   <% } else { %>
              <%@ include file="addData1b.jsf" %>
    <% } %>
    <% } %>
    I suspect my problem is a basic one with something to do with the else statements. The intention is to call the validation then display a form to resubmit the info if the validation fails or add the info to the database if it passes.

    Not sure, but I believe the @ include tag has its limitations, including not being able to be put into conditional blocks. You might want to try the <jsp:include> tag instead.
    See http://java.sun.com/webservices/docs/ea2/tutorial/doc/JSPIntro8.html

  • Adding a fragment file (*.jspf) to a *.jsp file

    Adding a fragment file (*.jspf) to a *.jsp file
    What I did:
    1. Mkdir Web Pages\pages\common
    2. Create a *.jspf in directory
    3. Mkdir Web Pages\pages\common
    4. Create a *.jsp in directory
    5. Select page fragment
    Outcome:
    My *.jspf file is not shown in the combo list box of the "Select Page Fragment" dialig box, unless I create the *.jspf in the Web Pages directory.
    Question:
    Why?

    Since you're talking about "mkdir" etc. it sounds like you're trying to do this outside of the IDE. If so, you should note that a fragment is NOT just a .jspf file! All web forms in Creator have two files: a markup file (.jsp or .jspf) and a backing bean (.java). You must create both, by the same name, in the correct location, for the form to be considered a valid fragment. It's best to do this through the IDE.
    In case you did use the IDE and it's still not working, perhaps there's an issue with creating page fragments in subfolders. I know we had some bugs with creating regular forms in subfolders and most of those bugs were fixed but perhaps there are some additional issues for fragments.
    -- Tor

  • Access denied when trying to show table in jsp fragment?

    I've had one page which has been groving obese over time.
    Now I've started to split out parts into jsp fragments using f:subview
                      <f:subview id="frontStoreSupport">
                        <jsp:include page="/frontStoreSupport.jsff"/>
                      </f:subview> The new jsp fragment (frontStoreSupport.jsff in this case) has it's own frontStoreSupportPageDef.xml which contains the binding entries I use in the page.
    My problem is that ADF Read Only table's on this page get an "Access denied." where the content is supposed to go, despite the fact that they worked fine
    in the original page.
    I've been into the Application > Security > Resource grants and added view to my application role, exactly like it was set up in the first page..
    Any hints here would be greatly apprichiated
    Regards
    Baue

    Ok, realized what the problem was - apparently, when using ADF components in a fragment, you need to add the datacontrol to the fragments page-definition file AND to the parent jsp:s page-definition file!

Maybe you are looking for

  • Display Month as 07-Jan instead of 07-01

    A generated report displays a month as 07-01,But the user wants it to be displayed as 07-Jan. Could anybody guide in this regard? THANKS, Points would definitely be awarded.

  • Using M-Audio Firewire 410 on MacBook Pro in addition to external FW drive

    I'm a little hesitant to use the FW 410 on the same (and only) FW bus on my MacBook Pro as the external FW drive that I'm using to host sample files that stream in to use in various Native Instruments apps (Kontakt 3, Akoustik Piano, etc.). Anyone ou

  • Slow Loading Folders

    I have created 3 folders in mail.app to store my mail. We will call them Folder1, Folder2, and Folder3. When i first launch mail Folder3 shows up right away but Folder1, and Folder2 take about 15 seconds to show up. All of the folders are empty. Does

  • How do yo highlight highest and lowest values

    I Excel you can use conditional formatting to highlight the lowest or highest number in a row or column. As a new user of iWorks I was wondering if this can be done with the conditional formatting feature within Numbers?

  • Create another system disk for Legion/SAM-T1

    Hello, I am creating a new disk using the following command: Code:  dd if=/dev/zero of=/export/home/ramdisk/0 bs=512 count=4096k after creating the disk, i tool a ufsdump of a solaris 10 filesytem (disk size 512MB) Code: ufsdump -cvf /export/home/ufs