JSF 1.2 ValueExpressions error.

Hello guys,
I have written a small JSF 1.2 component and I am running into all sorts of problems when using the expression langauge
here is my simple component with two properties text and icon. I am running this on glassfish and i made sure i am using the correct jars.
help anyone????
//component code
public class MyComponent extends UIComponentBase  {
//tag code
public class MyComponentTag extends UIComponentELTag{
  private ValueExpression text;
  private ValueExpression icon;
  //getters and setters
  //set properties method
  protected void setProperties(UIComponent component) {
    super.setProperties(component);
    MyComponent myComponent = (MyComponent)component
    if (null != text) {
      if (!text.isLiteralText()) {
        myComponent.setValueExpression("text", text);
      else {
        myComponent.setText(text.getExpressionString());
    if (null != icon) {
      if (!icon.isLiteralText()) {
        myComponent.setValueExpression("icon", icon);
      else {
        myComponent.setIcon(icon.getExpressionString());
}the JSP page
This is working no problem, if i want to use read only values
<w:mycomponent text="${myBean.text}" icon="${myBean.icon}" />this is not working i am getting the following error
<w:mycomponent text="My Component Text"  />trimmed error stack
org.apache.jasper.JasperException: jsp.error.beans.property.conversion
  org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:890)but this is the work around, its working but it looks very very odd, i looked at the blue prints they are not using this kind of syntax.
<w:mycomponent text="${'My Component Text'}"  />this isn't working as well.
<w:mycomponent text="#{myBean.text}"  />

I'm not sure what tag class is being extended: UIComponentELTag? My component tag classes all extend UIComponentTag.
Furthermore, all of my tag attributes are defined as String. In reviewing your code, I wasn't sure why the tag attribute variables are being declared as ValueExpression type?
I think I see what you are trying to do... and would recommend the tag class be structured as follows. If you can provide more information regarding what HTML your component is supposed to generate, I would be happy to help more.
public class MyComponentTag extends UIComponentTag
public static final String COMPONENT_TYPE = "MyComponent";
String text;
String icon;
public void release()
super.release();
text = null;
icon = null;
protected void setProperties(UIComponent component)
super.setProperties(component);
if (text != null)
if (UIComponentTag.isValueReference(text))
FacesContext context = FacesContext.getCurrentInstance();
Application app = context.getApplication();
ValueBinding vb = app.createValueBinding(text);
component.setValueBinding("text", vb);
else
component.getAttributes().put("text", text);
// Something similar for icon attribute goes here.
public String getComponentType()
return COMPONENT_TYPE;
public String getRendererType()
return null;
// Getters and setters for text and icon go here.
}

Similar Messages

  • Is it possible to use JSF file as as error page.

    I am using jsf file as an error page.It is working in fine in websphere. But if i am using that only the exception is raised it is not going to error page.
    In Web.XML file,
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <error-page>
    <error-code>403</error-code>          <location>/faces/unauthorized.jsp</location>
    </error-page>
    jsf codings are placed under *.jsp files. In the time submitting form data to server a method throws NumberFormatException. This exception information is displayed in console. but blankpage is coming . It is not redirected to error.jsp fle which is under faces/error.jsp.
    If i am directly giving /error.jsp then it is giving Faces context is not created error.
    So i tried use simple jsp(pure jsp) file wihtin the folder and i set path like /pages/foo.jsp. It is working.
    Tell me is it possible to use jsf as error page.

    What would you hope to do with the reference?  The Mathscript node doesn't have a file reading capability.  You need to read the file and pass the data into the Mathscript node.
    EDIT: I stand corrected.  You need to use the fopen and fclose functions inside of the MathScript node to be able to read a file inside of it.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • JSF problem -  An internal error occurred during: "Updating JSP Index".

    Hello Friends,
    I am facing following problem in ecplise. Whenever I open JSP page or whenever I save my jsp page.
    !ENTRY org.eclipse.core.jobs 4 2 2008-06-14 13:54:24.151
    !MESSAGE An internal error occurred during: "Updating JSP Index".
    !STACK 0
    java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryInfo
         at org.eclipse.jst.jsp.core.internal.taglib.TaglibHelperCache.createNewHelper(TaglibHelperCache.java:112)
         at org.eclipse.jst.jsp.core.internal.taglib.TaglibHelperCache.getHelper(TaglibHelperCache.java:97)
         at org.eclipse.jst.jsp.core.internal.taglib.TaglibHelperManager.getHelperFromCache(TaglibHelperManager.java:43)
         at org.eclipse.jst.jsp.core.internal.taglib.TaglibHelperManager.getTaglibHelper(TaglibHelperManager.java:36)
         at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.addTaglibVariables(JSPTranslator.java:684)
         at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.translateXMLNode(JSPTranslator.java:997)
         at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.translateRegionContainer(JSPTranslator.java:843)
         at org.eclipse.jst.jsp.core.internal.java.JSPTranslator.translate(JSPTranslator.java:734)
         at org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter.getJSPTranslation(JSPTranslationAdapter.java:131)
         at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchDocument.getJSPTranslation(JSPSearchDocument.java:112)
         at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchDocument.getPath(JSPSearchDocument.java:149)
         at org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate.<init>(JavaSearchDocumentDelegate.java:30)
         at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport.createSearchDocument(JSPSearchSupport.java:401)
         at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport.addJspFile(JSPSearchSupport.java:295)
         at org.eclipse.jst.jsp.core.internal.java.search.JSPIndexManager$ProcessFilesJob.run(JSPIndexManager.java:262)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    I am using Ecplise 3.2.0
    JSF 1.1
    Tomcat 5.5
    JSP2.0
    Any solution for this?
    Thanks & regards
    Abhijai

    Abhijai wrote:
    java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryInfoThis exception is been thrown if the given class was available in classpath during compile time, but not during run time. The solution is obvious: make sure that the given class (or at least the JAR file with the given class) is available in the classpath during run time.
    By the way, why did you think that this problem is related to JSF?

  • JSF Calendar Component JS error

    Hi everyone,
    I have problem with JSF Calendar component. JSP version is 1.2 so we are using com.sun.rave.web.ui.component.Calendar class.
    When HTML code is generated some id missing. For example:
    JavaScript tries to find subForm:startCalendar:_datePicker:row5, but there is only subForm:startCalendar:_datePicker:row4.
    This cause JS error at line 249 in calendar.js:
    this.lastRow = document.getElementById(rowId);
    this.lastRow.style.display = "none"; //error is here this.lastRow is nullAfter few reloads and manual date change calendar seem to work fine for a while, but it can stop at anytime. There are no errors in Tomcat logs (we are using Tomcat 5.5, but we have same error with Glassfish 2).
    Here is JSP code:
    <ui:calendar binding="#{Index.startCalendar}" dateFormatPattern="dd.MM.yyyy" id="startCalendar" style="position: absolute; left: 120px; top: 96px"/>

    I had observed that the code for UI:Calendar Component looks up defaulttheme.jar file which will be avaialble with Sun studio creator or with UI tag jars ...... for its JS files, Images and style sheets etc .
    I tried seeing the contents in the JS files and there is a JS file specifically for Calendar Component ie calendar.js ... editing the same i came to see this
    // This does not work for August (08) and September (09) but it works
    // for all the other months????
    function ui_Calendar_setCurrentValue() {
        var curDate = this.field.value;
        var matches = true;
    but cant see Feb month there...
    It the problem with the code in teh JS file that they are using to generate the component...
    sooo the only solution would be to get the latest jars fixing that issue (defaulttheme.jar)
    I tried googling out for teh latest jars for the same i coudnt find any such...
    This is my investigation on this issue.Hope only code fix kills the flaw
    If any one gets a solution or workaround pls post ASAP to help us.+
    Edited by: Shivaji. on Feb 3, 2009 4:44 AM

  • Appfuse(jsf) project in jdevelop1013,error in login.xml (xml-20100)

    hi,
    i now study the appfuse(jsf) example,and view it in jdevelop1013 ide.
    but when compile the login.jsp,it makes a error.
    Error occurs in login.xml,and says "final error,xml-20100"
    when i run in tomcat5.0 with eclipse,non error occurs.
    why?and how to solve?
    Thank you .

    up.
    anybody help?

  • JSF Nested Datatable , ValueExpression

    Hi, I'm working on an application which is going to use a nested datatable.
    basically I generate 1 datatable which consist of 7 columns , 5 rowsItems and for each column I generate a datatable to handle the data.
    I make a List from RowItems and bind it to my datatable by wrapping it in a datamodel
    the rowItem class consist of 7 List for each column which will be binded to each nested datatable using ValueExpression
    So now the problem is:
    I couldnt get the name for each display, I'm getting error message could not find property "name" for class String.
    output_name.setValueExpression("value", createValueExpression("#{displaycolVar.name}", String.class));but I can get the working unit displayed correctly
    output_workingunit.setValueExpression("value", createValueExpression("#{RowItemsVar.workingtime}", String.class));can someone help me on this problem?
    Thanks in advance
    my code
    calendar.java
    package demo;
    import java.util.ArrayList;
    import javax.el.ValueExpression;
    import javax.faces.component.UIOutput;
    import javax.faces.component.html.HtmlOutputText;
    import javax.faces.context.FacesContext;
    import javax.faces.model.ListDataModel;
    import org.ajax4jsf.org.w3c.tidy.TagTable;
    import org.richfaces.component.*;
    import org.richfaces.component.html.HtmlDataTable;
    import org.richfaces.component.html.HtmlColumn;
    public class Calendar
         // Table Properties
         private String[] days = {"Working Time","Monday","Tuesday","Wednesday","Thursday","Freiday","Saturday","Sunday"};
         private String[] workingunit = {"8:00-8:45","8:45-9:30","9:30-10:15","10:15-11:00","11:00-11:45"};
         private int column; // number of columns
         private int row; // number of rows
         // Main List to store the values
         private ArrayList<RowItems> RowItemList;
         // Datatable backing bean Component
         private UIDataTable calendarDatatable;
         // Constructor
         public Calendar()
              // Initializing row and column
              column = 7;
              row = 5;
              // Initializing Datatable
              calendarDatatable = new HtmlDataTable();
              calendarDatatable.setVar("RowItemsVar");
              calendarDatatable.setRendered(true);
              // Creating List of RowItems
              RowItemList = new ArrayList<RowItems>();
              // Adding rows to the List
              for(int i = 0;i<row;i++)
                   RowItemList.add(new RowItems(workingunit,column,i));
              // Creating creating 7 columns for each day + name column
              for(int i = 0; i <column+1; i++)
                   UIColumn column = new HtmlColumn();
                   UIOutput header = new HtmlOutputText();
                   // Initializing column and header
                   header.setValue(days[i]);
                   column.setHeader(header);
                   // the first column doesn't need a datatable
                   if(i == 0)
                        // Display data
                        HtmlOutputText output_workingunit = new HtmlOutputText();
                        output_workingunit.setValueExpression("value", createValueExpression("#{RowItemsVar.workingtime}", String.class));
                        column.getChildren().add(output_workingunit);
                        System.out.println("\n"+output_workingunit.getValueExpression("value"));
                   else      
                        // Create datatable for each column
                        UIDataTable datatable_nested = new HtmlDataTable();
                        datatable_nested.setVar("displaycolVar");               
                        datatable_nested.setRendered(true);
                        UIColumn column_for_nestedDT = new HtmlColumn();
                        // Display data
                        HtmlOutputText output_name = new HtmlOutputText();
                        output_name.setValueExpression("value", createValueExpression("#{displaycolVar.name}", String.class)); // <- it wont just find the property
                        // add outputtext for each column in nested datatable
                        column_for_nestedDT.getChildren().add(output_name);
                        // Add a column for each nested datatable
                        datatable_nested.getChildren().add(column_for_nestedDT);
                        * the expression value is correct I checked through println
                        switch(i)
                             case 1: datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col1}", String.class));
                                       break;
                             case 2:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col2}", String.class));
                                       break;
                             case 3:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col3}", String.class));
                                       break;               
                             case 4:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col4}", String.class));
                                       break;
                             case 5:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col5}", String.class));
                                       break;
                             case 6: datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col6}", String.class));
                                       break;
                             case 7:     datatable_nested.setValueExpression("value", createValueExpression("#{RowItemsVar.displaylist_col7}", String.class));
                                       break;                    
                        // Add the nested datatable to each column
                        column.getChildren().add(datatable_nested);
                   // Adding each column to highest entity of datatable
                   // 7 column will be added because there is 7 datatable
                   calendarDatatable.getChildren().add(column);
              // Test data
              RowItemList.get(0).getDisplaylist_col1().add(new Display("danny",1,1));
              // Datamodel for the highest entity of datatable
              ListDataModel<RowItems>RowItemsDM = new ListDataModel<RowItems>();
              // Wrapp the data from ArrayList into DataModel object
              RowItemsDM.setWrappedData(RowItemList);
              // Adding datamodel to highest entity of datatable
              calendarDatatable.setValue(RowItemsDM);
         public UIDataTable getCalendarDatatable() {
              return calendarDatatable;
         public void setCalendarDatatable(UIDataTable calendarDatatable) {
              this.calendarDatatable = calendarDatatable;
    // Methode to create a ValueExpression
    private ValueExpression createValueExpression(String valueExpression, Class<?> valueType)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    return facesContext.getApplication().getExpressionFactory().createValueExpression(
    facesContext.getELContext(), valueExpression, valueType);

    RowItems.java
    package demo;
    import java.util.ArrayList;
    * Class to represent each column
    public class RowItems
         private String workingtime;
         private int col;
         private int index;
         // List of list for each column     
         private ArrayList<Display> displaylist_col1 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col2 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col3 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col4 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col5 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col6 = new ArrayList<Display>();
         private ArrayList<Display> displaylist_col7 = new ArrayList<Display>();
         // Constructor
         public RowItems (String workingtime, int col, int index)
              this.workingtime = workingtime;
              this.col = col;
              this.index = index;
         // Getter & Setter
         public String getWorkingtime() {
              return workingtime;
         public void setWorkingtime(String workingtime) {
              this.workingtime = workingtime;
         public int getCol() {
              return col;
         public void setCol(int col) {
              this.col = col;
         public void setIndex(int index) {
              this.index = index;
         public int getIndex() {
              return index;
         public ArrayList<Display> getDisplaylist_col1() {
              return displaylist_col1;
         public void setDisplaylist_col1(ArrayList<Display> displaylist_col1) {
              this.displaylist_col1 = displaylist_col1;
         public ArrayList<Display> getDisplaylist_col2() {
              return displaylist_col2;
         public void setDisplaylist_col2(ArrayList<Display> displaylist_col2) {
              this.displaylist_col2 = displaylist_col2;
         public ArrayList<Display> getDisplaylist_col3() {
              return displaylist_col3;
         public void setDisplaylist_col3(ArrayList<Display> displaylist_col3) {
              this.displaylist_col3 = displaylist_col3;
         public ArrayList<Display> getDisplaylist_col4() {
              return displaylist_col4;
         public void setDisplaylist_col4(ArrayList<Display> displaylist_col4) {
              this.displaylist_col4 = displaylist_col4;
         public ArrayList<Display> getDisplaylist_col5() {
              return displaylist_col5;
         public void setDisplaylist_col5(ArrayList<Display> displaylist_col5) {
              this.displaylist_col5 = displaylist_col5;
         public ArrayList<Display> getDisplaylist_col6() {
              return displaylist_col6;
         public void setDisplaylist_col6(ArrayList<Display> displaylist_col6) {
              this.displaylist_col6 = displaylist_col6;
         public ArrayList<Display> getDisplaylist_col7() {
              return displaylist_col7;
         public void setDisplaylist_col7(ArrayList<Display> displaylist_col7) {
              this.displaylist_col7 = displaylist_col7;
    }display.java
    package demo;
    public class Display
         private Person person;
         private String name;
         private int x;
         private int y;
         public Display(String name, int x, int y)
              this.person = new Person(name);
              this.name = name;
              this.x = x;
              this.y = y;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public Person getPerson() {
              return person;
         public void setPerson(Person person) {
              this.person = person;
         public int getX() {
              return x;
         public void setX(int x) {
              this.x = x;
         public int getY() {
              return y;
         public void setY(int y) {
              this.y = y;
    }

  • JSF page shows runtime error when application deployed in local oc4j server

    I developed a wsrp portlet producer based application and delployed it in oc4j application server. But when I open input.jsp page url which has JackBe portlet mashlets on it in web browser.
    I get an error 'mdsId=/oracle/adf/portlet/wsrpPortletProducer1_1223631729156/ap/E1default_e62a8fe5_011e_1000_8002_ac144d7e5e23.pxml not found'.
    Oc4j, oracle database instance and JackBe presto are running on same local machine.
    I am using trial version of JackBe presto. Similarly while installing oc4jpdk, I do need to change ORACLE_HOME path to oc4j from oracle database folder which stops running of my oracle database(Oracle10g) instance on my machine. Please suggest me with possible solution pointers to resolve it.

    Hi
    Thanks for the input. I checked at the forum you referred to. I did not find any similar question discussed on the forum. I highly appreciate if you suggest me few exact pointers to this issue. I am losing on time and appreciate quick response.
    Thanks & Regards
    Abhijit Kulkarni

  • JSF Bug or stuipid error?

    I've got an problem with the JSF navigation. I developed an simple login with 2 frames. On the right side is the login with user and password. On the left side it would print "success" if the user and password equals root, but if don't it would print "failure". That still works...
    But if I pressed the login button again. The right side with the login screen, would also printed at the left side. What happend? I don't know.
    Now if got the same problem with an web application at work. For an better look I upload the example to following adress:
    http://84.16.237.201/Example3/
    So you can see the problem and download maybe the example war file.
    Thanks for your help guys!

    Just a WAG - are you using DirectX or OpenGL?
    From:
    http://j3d.org/implementation/java3d-OpenGLvsDirectX.html
    Features not supported by Java3D v1.2.1 DirectX version:
    * Line width
    * Line antialiasing
    * Point size
    * Point antialiasing
    * PolygonAttributes backFaceNormalFlip
    * RenderingAttributes ROP_XOR
    * 3D Texture
    * Texture color table

  • JSF error handling when the bean is not correctly loaded

    Hi,
    I am doing some error handling in JSF and I want to do it in an elegant way. I have the following scenario for error handling.
    When the bean is initialized I load the bean with values from DAO which give SQL Exceptions.
    Since the bean is not loaded I properly I have to send the user to an error page showing the error message why I am sending the user to this page.
    I can do it by [ FacesContext.getCurrentInstance.redirect("/error.jsf") ] doing so I will loose all the FacesMessages that are added by the exceptions.
    Instead I want to use the [ FacesContext.getCurrentInstance.dispatch("url") ] which will allow the transfer of the user but I get the following
    16:59:39,341 WARN [lifecycle] executePhase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@8537f9) threw exception
    java.lang.ClassCastException: javax.faces.component.UIViewRoot
    and the method that I am calling is
    public static void programErrorEnd() {
    logger.info("in the prgmErrorEnd mehod");
    //intializing the contex object
    FacesContext ctx = FacesContext.getCurrentInstance();
    try {
    //ready to dispatch the url.
    //ctx.getExternalContext().redirect("app/error/prgmerror.jsf");
    ctx.getExternalContext().dispatch("error/prgmerror.jsf");
    } catch (IOException e) {
    //TODO what to do when there is an error at this stage.
    finally {
    ctx.responseComplete();
    }Thanks and Regarding
    Edited by: sgatl2 on Aug 28, 2008 2:32 PM
    Edited by: sgatl2 on Aug 28, 2008 2:45 PM

    Just let it throw the exception and define an error-page entry in the web.xml which catches the specified exception (or a superclass of it or a HTTP status code) and displays the error.jsf page accordingly.

  • How to handle error pages in JSF

    Hii,
    I am facing problem in JSF handling server side errors like faces exception.
    For Ex; if i have a JSF screen,if i enter invalid data it will show error in the same page if i use messages tag,but i need to display errors in another page like error pages.
    i tried to do as we do in JSP,but facesServlet is not supporting.
    i am very thankful if anyone can help.

    How about asking in the JSF forum where the experts are?

  • Tiles + JSF error (Illegal to flush within a custom tag)

    Hi,
    When I try to use Tiles + JSF I have this error message :
    javax.servlet.jsp.JspException: Illegal to flush within a custom tag
    I am already using flush="false" on my tiles:insert tag.
    This is my .jsp code :
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <tiles:insert beanName="cadastro_base" beanScope="request" flush="false">
    <tiles:put name="form_body" type="string">
    <f:view>
    <h:form id="DisciplinaJsfBean" binding="#{DisciplinaJsfBean.form}" >
    <h:inputText id="codigo" binding="#{DisciplinaJsfBean.itCodigo}"/>
    </h:form>
    </f:view>
    </tiles:put>
    </tiles:insert>
    And this is the stack trace message :
    exception
    javax.servlet.ServletException: Illegal to flush within a custom tag
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspService(cadastrarDisciplinas_jsp.java:99)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    root cause
    javax.servlet.jsp.JspException: Illegal to flush within a custom tag
         com.sun.faces.taglib.jsf_core.ViewTag.doEndTag(ViewTag.java:223)
         org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspx_meth_f_view_0(cadastrarDisciplinas_jsp.java:205)
         org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspx_meth_tiles_put_0(cadastrarDisciplinas_jsp.java:157)
         org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspx_meth_tiles_insert_0(cadastrarDisciplinas_jsp.java:122)
         org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspService(cadastrarDisciplinas_jsp.java:92)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    Danilo.

    What worked for me was to add a flush="false" to each of the <tiles:insert tags in my layout page.
    I'm using this with JSF so it may be different for you:
    ... Layout stuff ...
       <tiles:insert attribute="body" flush="false" />
    ... More layout stuff, including more inserts with the flush="false" ....

  • Jsf error on Sun ONE v9

    I have a small app developed with jsf 1.1 spec. When I deployed this on Sun ONE V9.0 , the following is the error.
    Can't parse configuration file: jar:file:/C:/Sun/SDK/lib/jsf-impl.jar!/com/sun/faces/jsf-ri-runtime.xml: Error at line 3 column 14: jar:file:/C:/Sun/SDK/lib/jsf-impl.jar!/com/sun/faces/jsf-ri-runtime.xml<Line 3, Column 14>: XML-20149: (Error) Element 'faces-config' used but not declared.
         at com.sun.faces.config.ConfigureListener.parse(ConfigureListener.java:1587)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:413)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
         at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:833)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:817)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1479)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1143)
         at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:171)
         at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:275)
         at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:954)
         at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:941)
         at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:448)
         at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
         at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:296)
         at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:203)
         at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:285)
         at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:119)
         at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
         at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
         at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:541)
         at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:585)
         at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:719)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:353)
         at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:336)
         at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:448)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
         at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
         at $Proxy1.invoke(Unknown Source)
         at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
         at com.sun.enterprise.deployment.client.DeploymentClientUtils.startApplication(DeploymentClientUtils.java:133)
         at com.sun.enterprise.deployment.client.DeployAction.run(DeployAction.java:517)
         at java.lang.Thread.run(Thread.java:619)My faces-config.xml is v1.1. any ideas ?
    Thanks

    Hi Frank,
    A couple of things to cross check.
    1) Check the package structure of the war file. And cross check with the format given by SUN at
    http://docs.sun.com/source/816-7150-10/dwdeploy.html#69868
    2) Give more detail logs, and it is available at <deployed server instance>/logs/server.log.
    3) Deploy the war file without running the verifier, and see what is the output.
    If it wont help send the war file to me.
    Thanks,
    -Parsu

  • OLite compile JSF JSP error

    I'm using Olite 10g. I created a JSF JSP in JDeveloper and compiled and tested in. I packaged the web application into a WAR file and expaned it into the OLite webtogo root. When I use the package wizard to publish the web application, the JSF JSP fails to compile with this message:
    oracle.jsp.parse.JspParseException: Line # 4, <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    The JSP lines look like this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    Does anyone have any thoughts as to how to resolve this issue?
    Thank-you.

    Here is a bit more with respect to the package wizard output message:
    C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\_pages
    Created Directory _pages : false
    These are the jspc arguments: -appRoot C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\ -d C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\_pages -packageName maintab -srcdir C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\pages -verbose -addclasspath C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\WEB-INF\classes;C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\WEB-INF\lib\commons-beanutils.jar;C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\WEB-INF\lib\commons-collections.jar;C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\WEB-INF\lib\commons-digester.jar;C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\WEB-INF\lib\commons-logging-api.jar;C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\WEB-INF\lib\commons-logging.jar;C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\WEB-INF\lib\jsf-api.jar;C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\WEB-INF\lib\jsf-impl.jar;C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\WEB-INF\lib\jstl.jar C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\login.jsp C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\maintab.jsp C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\index.jsp
    Translating file: C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\login.jsp
    Translating file: C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\login.jsp
    Parse error in login.jsp:
    oracle.jsp.parse.JspParseException: Line # 4, <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    Error: java.io.FileNotFoundException: C:\oacle\Olite10g\Mobile\Sdk\wtgsdk\root\maintab\http:\java.sun.com\jsf\html (The filename, directory name, or volume label syntax is incorrect)
    ...

  • JHS and JSF Validation Conversion Error Customizations

    Hello
    Have JHS done any work about JSF validation or conversion error customizations?
    I mean the error messages such as "lablename:"value mus be entered etc.
    What can i do if i want to globally customize and localize this error messages.
    I have copied the key such as "javax.faces.component.UIInput.REQUIRED" in my appdeff resource bundle but JHS (or maybe ADF) gives own message yet.
    I Apologize if my problem don't depend on JHS. I wonder that JHS overrided JSF default messages.
    Thank You

    JHeadstart does not use any JSF standard message.
    JHeadstart uses ADF Faces which comes with its own bundle of error messages.
    Please use the JDeveloper forum for instructions on modifying ADF Faces error messages.
    Steven Davelaar,
    JHeadstart Team.

  • JSF Converter Error

    Hi, I have the following:
    JSF 1.2 RI
    Sun App Server 9 Update 1 Patch 1
    Models:
    public interface Model {
      int getId();
      String getName();
    public class Model1 implements Model {
      public int getId() {
        return 1;
      public String getName() {
        return "One";
    public class Model2 implements Model {
      public int getId() {
        return 2;
      public String getName() {
        return "Two";
    Controller:
    public class TestController {
      private Model model;
      private List<Model> models;
      public TestController() {
        models = new ArrayList<Model>();
        models.add(model = new Model1());
        models.add(new Model2());
      public Model getModel() {
        return model;
      public void setModel(Model model) {
        this.model = model;
      public List<SelectItem> getModels() {
        List<SelectItem> list = new ArrayList<SelectItem>();
        for (Model model : models)
          list.add(new SelectItem(model, model.getName()));
        return list;
      public Model findModel(int id) {
        for (Model model : models) {
          if (model.getId() == id)
            return model;
        return null;
    Converter:
    public class ModelConverter implements Converter {
      public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String string) {
        TestController controller = (TestController) facesContext.getExternalContext().getSessionMap().get("testController");
        return controller.findModel(Integer.parseInt(string));
      public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object object) {
        return String.valueOf(((Model) object).getId());
    View:
    <%@ page contentType="text/html" %>
    <%@ page pageEncoding="UTF-8" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>Test JSF</title>
    </head>
    <body>
    <f:view>
      <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
      <h1>Test JSF</h1>
      <h:form>
        <h:panelGrid columns="2">
          <h:outputText value="Model:"/>
          <h:selectOneMenu value="#{testController.model}">
            <f:selectItems value="#{testController.models}"/>
          </h:selectOneMenu>
        </h:panelGrid>
      </h:form>
    </f:view>
    </body>
    </html>
    faces-config.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
                  version="1.2">
      <converter>
        <converter-for-class>com.test.model.Model</converter-for-class>
        <converter-class>com.test.converter.ModelConverter</converter-class>
      </converter>
      <managed-bean>
        <managed-bean-name>testController</managed-bean-name>
        <managed-bean-class>com.test.controller.TestController</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    </faces-config>
    The problem:
    When I run the app, JSF throws the following error:
    javax.servlet.ServletException: Cannot convert com.test.model.Model2@ba30aa of type class com.test.model.Model2 to class com.test.model.Model1
    root cause
    java.lang.IllegalArgumentException: Cannot convert com.test.model.Model2@ba30aa of type class com.test.model.Model2 to class com.test.model.Model1Is there any limitation on converters to prevent using a single Converter for a base class (or interface like Model) and subclasses (like Model1 and Model2)?
    I've tried this using JSF 1.1 RI, Apache MyFaces 1.1 and the error is still there.
    Thanks!

    This sounds like Issue 442, which was resolved in 1.2_03. If I recall right, V1 P1 is 1.2_02. Please upgrade JSF to 1.2_04 [2]. The download section has an updater for GlassFish.
    [1] https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=442
    [2] https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folderID=7089&expandFolder=7089&folderID=0

Maybe you are looking for

  • Spry Accordion issue in IE6/IE7

    I'm having a problem with the Spry Accordion widget that I placed on this page: WireCare Customer Support It works flawlessly in Firefox, but the tab expansion is erratic in IE 6 and IE7. If anyone has a solution, I'd love to hear it. Thanks in advan

  • How do i unlock my ipod password

    My daughter locked her Ipod touch. How do I unlock it? She forgot her password.......

  • Hide "Last Active" status on profile

    I would like to see an option for hiding your last active status on your profile.  Even though you can sign in as invisible, your active status always shows when you have been on line.  This causes problems amongst friends sometimes, because you woul

  • Impossibile eliminare Backup iCloud perché è in corso!

    Buongiorno a tutti, 2 giorni fa mi sono rivolto all'assistenza Apple in quanto il mio iPhone 5 presentava un problema con il tasto standby/spegni. Effettuata la sostituzione gratuita, ho proceduto a ripristinare da iCloud il backup effettuato. Ora pe

  • Desimlockage orange

    bonjour, j'ai demandé à Orange france pour désimlocker mon iphone 4 car je suis belge et je voudrais l utilisé sur le reseau belge. le probleme c'est que je suis le 3eme propriétaire de l iphone. je leur fourni le numéro orange avec lequel le telepho