Tag files for rendering JSF components

Hi people!
     It is possible to render component JSF using Tag-Files? (WEB-INF/tags).
I am having problems with context, seems that the JSF does not recognize pageContext.
Ex:
My Tag-File
<%@ attribute name="nameproperty" required="true" rtexprvalue="true" %>
<%@ attribute name="size"           required="true" rtexprvalue="true" %>
<h:inputText id="${nameproperty}"      size="#{size}" />
My JSP
<%@ taglib tagdir="/WEB-INF/tags" prefix="mayTags"%>
<f:subview id="id001" >
     <myTags:myText propriedade="name_test" size="30" />
</f:subview>
In this in case that the size always is empty, because it does not recognize the target pageContext, but if I to place the size in the target of request already recognizes.
EX:
<%@ attribute name="nameproperty"      required="true" rtexprvalue="true" %>
<%@ attribute name="size"           required="true" rtexprvalue="true" %>
<c:set var"size" value="${size}" scope="request" >
<h:inputText id="${nameproperty}"      size="#{size}" />
In part it decides my problem, but it causes another error, is that if in my JSP it will have two fields (this is more than common) calling tag-file, there the size placed in request is always of it I finish field.
Ex:
<%@ taglib tagdir="/WEB-INF/tags" prefix="mayTags"%>
<f:subview id="paisMan" >
     <myTags:myText propriedade="name_test" size="30" />
     <myTags:myText propriedade="name_test_2" size="70" />
</f:subview>
In this case all the two inputText would have size 70.
It has some thing that I can make to solve this problem?
Thanks for any help.
Pedro Neves - Brazil

You are right in saying that decoding has nothing to
do with rendering per se.I will go even further than Erik did, and dispute this statement.
Consider that you are generating an <input> tag for a text field. Among other things, you have to generate a "name" attribute. Who decides what to put there? The renderer that actually created the markup.
The "renderer" really does
two completely different things. But both should
nevertheless be separate from the component
implementation itself. You could still have the
renderer doing the decoding part, which arguably would
rarely change, and somehow delegate the actual
rendering to an implementation in a tag file.Whether you implement decoding in a separate class or inside the component, what request parameter name do you look for? It is not reasonable to assume that ALL possible renderers will choose the same parameter name ... hence, decoding and encoding are inextricably linked (the code doing the decoding has to know what kind of markup the code doing the encoding actually created). In JavaServer Faces, the current APIs create that linkage by requiring that the decode and encode be done by the same class (either the component, if you are not delegating, or the renderer if you are).
Craig

Similar Messages

  • JSP 2.0 tag files for rendering JSF components

    Over the weekend I read up on new JSP 2.0 features (dunno why I waited this long??) ... I really liked the tag file feature ...
    I was wondering if it were a good idea to use these tag files as renderers for JSF components - ok, this ties us to a JSP only solution but how many in here would be using a non-JSP solution anyway?
    I was thinking along the foll. lines:
    <myComponent id="myComponent1" attr1="value1" attr2=value2">
        <myComponentRenderer var="myComponent1" />
    </myComponent>
    myComponentRenderer can be implemented as a tag file in myComponentRenderer.tag ... The myComponent tag delegates the business logic processing to its associated UIComponent and then sets this component as a pageContext attribute with the id "myComponent1" ... myComponentRenderer in turn gets a reference to this UIComponent and renders it ...
    Again, if one wants a different way of rendering, make another tag file myComponentRenderer2.tag or change myComponentRenderer.tag itself ...
    Indeed, this may not work for components with complicated rendering logic but I believe that's only the 20% case ...
    Comments?
    P.S.:
    I've picked this up from http://forums.java.sun.com/thread.jsp?forum=427&thread=381052&tstart=0&trange=15
    This also compliments another topic: http://forums.java.sun.com/thread.jsp?forum=427&thread=413515&tstart=0&trange=15

    You are right in saying that decoding has nothing to
    do with rendering per se.I will go even further than Erik did, and dispute this statement.
    Consider that you are generating an <input> tag for a text field. Among other things, you have to generate a "name" attribute. Who decides what to put there? The renderer that actually created the markup.
    The "renderer" really does
    two completely different things. But both should
    nevertheless be separate from the component
    implementation itself. You could still have the
    renderer doing the decoding part, which arguably would
    rarely change, and somehow delegate the actual
    rendering to an implementation in a tag file.Whether you implement decoding in a separate class or inside the component, what request parameter name do you look for? It is not reasonable to assume that ALL possible renderers will choose the same parameter name ... hence, decoding and encoding are inextricably linked (the code doing the decoding has to know what kind of markup the code doing the encoding actually created). In JavaServer Faces, the current APIs create that linkage by requiring that the decode and encode be done by the same class (either the component, if you are not delegating, or the renderer if you are).
    Craig

  • Keyword tag file for export

    Is there a keyword tag file I can export to use in Lightroom?
    Thanks, Doug Smith

    I tried that
    What did you try?
    PE only gives me the option of writing an .xml file
    I already explained there are several ways to go here, and so I can't understand why you feel the only option is writing an .xml file (which, by the way, is not one I am familiar with)
    It's like the fact that LR won't recognize my 6,000+ .png files,
    It's like the fact? Oh.
    Lightroom does not recognize .png files. They cannot be imported into Lightroom. You need to convert them to .jpg or .tif or .psd if you want them to be indexed in Lightroom. Which of course is a different issue than the one I thought we were addressing.

  • JSF Design Time View Not working correctly for ADF/JSF components

    My project is not using any external tag libraries. It is based purely on ADF core/html and JSF core/html components. The design time view does not show the appropriate presentation, everything is shown as nexted frame containers (I suppose how you would show a component that does not have a visual representation).
    If I create a new project and copy my jsp (jsf) pages over they show perfectly. I did this activity and all was going well in the new project and then I lost the design time view again. I cannot tell you what I did to cause the issue, maybe it was a modification to the web.xml as has been suggested in some other threads. Can anyone tell me what I should be looking for that causes this problem, what corrective actions I might take to eliminate the issues

    Ok I have isolated this issue. In my phase listener I had this line of code:
    private static final Logger _logger =  Logger.getLogger(EigRequest.class.getPackage().getName());
    and I changed it to
    private static final Logger _logger =
    Logger.getLogger(EigRequest.class.getName());
    and design mode started to work. I guess either of the above works for me although I do not understand why the line works when you run the application but not in design mode.
    Moral to the story is if something fails in any one of these types of decorators you will drop into a raw view mode. The question I have is if errors are occuring how do I figure out where they may be. There is no indication that anything is wrong with the exception that you lose most of the design mode functionality.
    This was not a compile issue, this was not a runtime issue. It took me quite a few hours of writing a test program to validate that it was not just writing a phase-listener issue; then launching, editing, relaunching the application to find the problem. I will say that a good portion of the code came from a Eclipse project. If you add the offending lines of code while using JDeveloper you do not loose design mode immediately. You only see the problem the next time you start JDeveloper which complicates finding the problem.

  • Tagging files for reflow under vista

    On my old computer (with windows 2000) I was able to move files from the laptop to my HP Ipaq 2790b and I could use the reflow feature on the Ipaq in Reader. When I moved to a new laptop and Vista I tried to get Adobe reader for pocket PC from the Adobe website and it said there were technical problems. I was afraid to try installing it with that warning. If I just drag a file from my laptop to the CF card in Microsoft Sync mode I can install the file on the Ipaq but the file is not tagged and as such I can't read it in reflow mode. I can still read the files in reflow that were installed last year on the Ipaq so I know it's not a problem with the Ipaq. Bill T.

    To Truly Julie:
    Thanks for your help. I was afraid that was the answer, but hoped I was just missing something. I've ordered a new laptop with XP and plan on putting the Vista machine in the closet for a while. Again thanks for the help.
    Bill T.

  • Where are configure files for Grid Control components?

    I installed Grid Control 11g on Redhat 5.2, the repository database is Oracle 11.2.0.2 on the same box. It worked after installation, but after some weeks, I restart oms and got error [oracle@cchbi bin]$ ./emctl start oms
    Oracle Enterprise Manager 11g Release 1 Grid Control
    Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
    Starting WebTier...
    WebTier Successfully Started
    Starting Oracle Management Server...
    Oracle Management Server is not functioning because of the following reason:
    Connection to the repository failed. Verify that the repository connection information provided is correct.Tried to google and search the forum, the message is not very selective and got few relevant resut.
    Hope your exterts can point me to the configure file where I can verify the connetion to repository. Alos some one would share with me the knowledge on the following topics
    1) What are the processes/components of Grid Control ? I am aware of oms, opmn, and a process run as /u01/app/midware/oms11g/ccr/bin/nmz -cron –silent. ANy others? What are their functions?
    2) Location of configure files, log files and binary executables of this processes/components.
    Many thnaks.

    Hi,
    to check if the OMS is running properly execute the command "emctl status oms" ($OMS_HOME/bin).
    The result should be "Oracle Management Server is up".
    To check which components are currently running execute the command "opmnctl status" ($OMS_HOME/opmn/bin).
    The result should be something like:
    Processes in Instance: EnterpriseManager0.<host
    -----------------------------------------------------------+---------
    ias-component | process-type | pid | status
    -----------------------------------------------------------+---------
    DSA | DSA | N/A | Down
    LogLoader | logloaderd | N/A | Down
    HTTP_Server | HTTP_Server | 26470 | Alive
    dcm-daemon | dcm-daemon | 26301 | Alive
    OC4J | home | 1953 | Alive
    OC4J | OC4J_EMPROV | 1954 | Alive
    OC4J | OC4J_EM | 26523 | Alive
    WebCache | WebCache | 27085 | Alive
    WebCache | WebCacheAdmin | 27086 | Alive
    Executing this command will answer your question whioch components need/should be up when using OEM/GC.
    You will find some logfiles of the OMS under $OMS_HOME/sysman/log (e.g. emoms.trc, emoms.log). Please check logfile OC4J~OC4J_EM~default_island~1 under $OMS_HOME/opmn/logs as well...
    To start the OMS you might try the command "opmnctl startall"...
    HTH

  • Tags for bookmarks, what file in the Fox profile folder works with the tags? I'm sure it's not in places.sqlite -- I want to save the "tags" file for safekeeping.

    Tags for bookmarks ...

    The tags are stored in places.sqlite in the Tags folder and are also stored in a JSON backup.<br />
    So you can use a JSON backup to have a copy.
    *http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox

  • JSP Syntax for binding JSF components

    I am trying to bind to a map with session scope and the key into the map is
    a string value. It seems that this binding does not work as the key is not found
    before rendering.
    <f:selectItems id="listbox1SelectItems" value="#{idGeneratorBean.myIds['key']}"/>
    The key is a hidden field on the page, and if hard-coded in the above, it will find that data.
    I've seen other postings where the binding is done in the component's initialization code.
    If it is done that way, what should the jsp binding look like?

    Please don't crosspost topics over all places. Stick to one topic.
    Continue here: [http://forum.java.sun.com/thread.jspa?threadID=5299291]

  • Capturing the time for rendering the JSFscreen.

    I have a JSF application running on WAS6.1. We have some performance issues.
    The JSF rendering is taking long time to render the page. All the database operation ie querying the database and leaving the prerender method is happening so fast.
    So how can we capture the time for the JSF components to render the page. Is there any way to do that?

    i tried to implement the phase listener.But i’m getting an error message in the JSP saying
    JSPG0046E: Unable to locate tagfile for tag phaseListener
    My action getting triggered on click of a tab. So in my JSP page I mentioned as
    <ui:tab action="#{reportsView.kpiRanking_action}" binding="#{reportsView.kpiRankingStore}"
    id false*/;&#xa;openPreloadWindow(); &#xa;document.getElementById("form1:periodTypeDropDown")[2].selected = true;&#xa;savePeriodType();"
    style="height: 25px; text-align: center; vertical-align: middle; width: 91px;cursor: pointer;" text="Store KPI Ranking">
    <f:phaseListener binding="#{reportsView.phaseListenerImpl}" type="com.capricorn.sckpi.PhaseListenerImpl"/>
    <ui:panelLayout binding="#{reportsView.layoutPanel30}" id="layoutPanel30" style="height: 335px; width: 100%; overflow-y: auto;">
    <ui:table augmentTitle="false" binding="#{reportsView.storeWithinDistrictTableStore}"
    id="storeWithinDistrictTableStore"
    style="height: 100%; left: 0px; top: 0px; position: relative; width: 100%" title="KPI Ranking">
    <ui:tableRowGroup binding="#{reportsView.storeWithinDistrictRowGroupStore}"
    id="storeWithinDistrictRowGroupStore" sourceData="#{reportsView.defaultTableDataProvider}" sourceVar="currentRow"/>
    </ui:table>
    <ui:table augmentTitle="false" binding="#{reportsView.storeWithinDistrictTableStore1}"
    id="storeWithinDistrictTableStore1"
    style="height: 100%; left: 0px; top: 0px; position: relative; width: 100%" title="YTD Ranking">
    <ui:tableRowGroup binding="#{reportsView.storeWithinDistrictRowGroupStore1}"
    id="storeWithinDistrictRowGroupStore1" sourceData="#{reportsView.defaultTableDataProvider}" sourceVar="currentRow"/>
    </ui:table>
    </ui:panelLayout>
    </ui:tab>
    My header for JSP is
    <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" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    Please help.

  • 3D Picture Control Using Solid Works VRML File and Moving Individual Components

    Hi, i am new to these forums and am looking for help concerning 3d picture control, i am a undergraduate student doing a second year project to control a 4DoF UAV.
    I'm trying to sort out the 3d simulation of it, i have made the solid works drawings and assembly then exported that to a single WRL file (in the correct format ie. ver. 97) however when trying to import that to Labview i am having difficulty setting the relationships so different parts rotate etc. in the assembly.
    i'll attach the corresponding example vi from labview and my solid work files.
    Any help is very much appreciated
    Thanks
    Tom
    Attachments:
    CDEx Draw Helicopter 3D Model.vi ‏21 KB
    WRL and solid work files.zip ‏4235 KB

    hi again,
    i've tried your suggestion with the naming however, i am using seperate VRML files for the different components and using the main vrml file to control the prent-child relationship etc. however when trying to access that file through labview it can't open it. this is the code within the vrml file
    #VRML V2.0 utf8
    DEF assembly Transform {
    Children [
    Inline {
    url [" Bottom Base.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Revolve Transform {
    Children [
    Inline {
    url [" Top Base.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Elevation Transform {
    Children [
    Inline {
    url [" Arm Pivot.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Connector Transform {
    Children [
    Inline {
    url [" Rod-Base Connector.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Rod Transform {
    Children [
    Inline {
    url [" Rod.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Roll Transform {
    Children [
    Inline {
    url [" Mount Connector.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Pitch Transform {
    Children [
    Inline {
    url [" Mount Pivot.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Mount Transform {
    Inline {
    url [" Arm Mount.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Chassis Transform {
    Inline {
    url [" Chassis.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Gearhead1 Transform {
    Inline {
    url [" i_gearhead.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Gearhead2 Transform {
    Inline {
    url [" i_gearhead-1.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Gearhead3 Transform {
    Inline {
    url [" i_gearhead-2.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Gearhead4 Transform {
    Inline {
    url [" i_gearhead-3.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shaft1 Transform {
    Inline {
    url [" i_shaft.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shaft2 Transform {
    Inline {
    url [" i_shaft-1.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shaft2 Transform {
    Inline {
    url [" i_shaft-2.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shaft3 Transform {
    Inline {
    url [" i_shaft-3.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Prop1 Transform {
    Inline {
    url [" Propeller.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Prop2 Transform {
    Inline {
    url [" Propeller-1.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Prop3 Transform {
    Inline {
    url [" Propeller-2.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Prop4 Transform {
    Inline {
    url [" Propeller-3.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shell Transform {
    Inline {
    url [" Shell.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Dome Transform {
    Inline {
    url [" Dome.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000

  • Ojspc (with JDeveloper 10.1.3.2.0) keeps recompiling .tag files.

    I find it takes an extremely long time to compile my web application with 75 .jsp files (14188 non-blank lines) and 24 .tag files (438 non-blank lines). About 24 minutes, in fact. I attribute this to the utility insisting on recompiling each and every .tag file for every .jsp that uses them.
    During translation, I see the javac process start up several times, and I inspected the javacXXX temporary file that gets created (it stores the VM arguments for each compilation) whenever Oracle needs to compile a page. Now compilation is supposed to happen after translation, but it still happens repeatedly for the same .tag file. If the .tag file is used in each of the 75 .jsp files, then it gets compiled 75 times! I even tried adding the temporary directory where Oracle outputs its .class files for these .tag files to the compilation classpath, and it didn't have any effect.
    I also can't precompile the .tag files in an attempt to force it to use already compiled .tag files, as ojspc doesn't seem to want to translate/compile them on its own (but only as a result of a .jsp that needs them).
    Here are the options in my build.xml:
      <target name="ojspc">
        <path id="ojspc.classpath">
          <fileset dir="${source.web.path}/WEB-INF/lib">
            <include name="*.jar" />
          </fileset>
          <!-- The following is where the .tag files end up after being automatically translated,
               then compiled (even though the compiled versions are .class files and should go in
               oracle/generatedClass, below) -->
          <pathelement path="${build.root}/oracle/generatedJava" />
        </path>
        <property name="ojspc.classpath" refid="ojspc.classpath" />
        <mkdir dir="${build.root}/oracle" />
        <mkdir dir="${build.root}/oracle/generatedClass" />
        <mkdir dir="${build.root}/oracle/generatedJava" />
        <oracle:compileJsp verbose="true"
          appRoot="${build.webapp.path}"
          dir="${build.root}/oracle/generatedClass"
          srcDir="${build.root}/oracle/generatedJava"
          addClassPath="${ojspc.classpath}">
          <fileset dir="${build.webapp.path}">
            <include name="**/*.jsp" />
          </fileset>
        </oracle:compileJsp>
      </target>There's nothing particularly memorable about the ant output. Everything succeeds. But 24 minutes for 15k lines of JSP sounds pretty ridiculous... this whole endeavor was an attempt to reduce initial page hit lags after deployment, but ..... 24 minutes??? :)
    Thanks,
    Scott

    Marco,
    the bug is published and visible in Metalink.
    - Select "Document Id" in "Quick find"
    - enter the bug number: 4556035
    - click "Go"
    Bug 4556035 is fixed in JDeveloper 10.1.3.3
    It's also included in http://www.oracle.com/technology/products/jdev/htdocs/10.1.3.3/fixlist.htm
    Regards,
    Didier.

  • Can I write Design-time for JSP custom tag(not JSF components)

    I have some old JSP custom tags(not JSF components), and I want to use them in the IDE through the toolbox.
    Now I have already written the BeanInfos for these tags, and they can be drag from the toolbox; but it will throw a Exception when render the tags, and the properties in the Property Editor are not which I describe in the BeanInfos.
    How can I write Design-time for these tags? or whether it is possible to write the Design-time for these tags?
    the Exception is shown as follow:
    java.lang.ClassCastException
         at com.sun.rave.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1347)
    [catch] at com.sun.rave.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1086)
         at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:993)
         at com.sun.rave.css2.FacesSupport.getFacesHtml(FacesSupport.java:152)
         at com.sun.rave.css2.CssContainerBox.addNode(CssContainerBox.java:373)
         at com.sun.rave.css2.CssContainerBox.createChildren(CssContainerBox.java:354)
         at com.sun.rave.css2.DocumentBox.createChildren(DocumentBox.java:90)
         at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:160)
         at com.sun.rave.css2.PageBox.layout(PageBox.java:392)
         at com.sun.rave.css2.PageBox.relayout(PageBox.java:454)
         at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:313)
         at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:460)
         at com.sun.rave.css2.DocumentBox.changed(DocumentBox.java:634)
         at com.sun.rave.designer.DesignerPaneUI$UpdateHandler.changedUpdate(DesignerPaneUI.java:1012)
         at com.sun.rave.text.Document.fireChangedUpdate(Document.java:851)
         at com.sun.rave.text.Document$5.run(Document.java:631)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

    I have some old JSP custom tags(not JSF components), and I want to use them in the IDE through the toolbox.
    Now I have already written the BeanInfos for these tags, and they can be drag from the toolbox; but it will throw a Exception when render the tags, and the properties in the Property Editor are not which I describe in the BeanInfos.
    How can I write Design-time for these tags? or whether it is possible to write the Design-time for these tags?
    the Exception is shown as follow:
    java.lang.ClassCastException
         at com.sun.rave.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1347)
    [catch] at com.sun.rave.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1086)
         at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:993)
         at com.sun.rave.css2.FacesSupport.getFacesHtml(FacesSupport.java:152)
         at com.sun.rave.css2.CssContainerBox.addNode(CssContainerBox.java:373)
         at com.sun.rave.css2.CssContainerBox.createChildren(CssContainerBox.java:354)
         at com.sun.rave.css2.DocumentBox.createChildren(DocumentBox.java:90)
         at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:160)
         at com.sun.rave.css2.PageBox.layout(PageBox.java:392)
         at com.sun.rave.css2.PageBox.relayout(PageBox.java:454)
         at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:313)
         at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:460)
         at com.sun.rave.css2.DocumentBox.changed(DocumentBox.java:634)
         at com.sun.rave.designer.DesignerPaneUI$UpdateHandler.changedUpdate(DesignerPaneUI.java:1012)
         at com.sun.rave.text.Document.fireChangedUpdate(Document.java:851)
         at com.sun.rave.text.Document$5.run(Document.java:631)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

  • 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

  • JSF tags are not rendered in error page

    I have configured error page for HTTP 404 error in web.xml like this
    <error-page>
    <error-code>404</error-code>
    <location>/Common/error.jspx</location>
    </error-page>
    Faces Servlet is configured as follows
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    My error page (error.jspx) looks like this
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html" xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:tr="http://myfaces.apache.org/trinidad" xmlns:c="http://java.sun.com/jsp/jstl/core">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <html>
    <head>
    <title>Error Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    </head>
    <body id="b1">
    <h4 style="color:red">An Error Occured. Please click Back button or Signout.</h4>
    <input type="button" value="Back" onclick="history.back()"/>
    <tr:commandButton id="cb1" text="SIGN OUT" action="exit" actionListener="#{Login.LogOut}"/>
    </body>
    </html>
    </jsp:root>
    When I deploy application and run into 404 error, page displays error message with only Back button. I don't see SingOut button. I have checked url and it follows /faces/* pattern. Still to double check, I made a change and configured servlet mapping in web.xml as
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    <url-pattern>*.jspx</url-pattern>
    </servlet-mapping>
    Still commandButton is not rendered. I understand that my error page don't have access to FacesContext or not going through Faces Servlet. I know this is a small issue, but couldn't figure out what can be done. I have also tried using .xhtml and .jsf as per googled suggestion. But no luck
    I have tried different solutions to my problem and googled for solutions. But I couldn't get it resolved.
    So can you please provide any suggestions...
    Edited by: user1818355 on May 22, 2013 2:29 PM

    I think my faces servlet is configured to handle URLs having /faces/* pattern. I don't have any folder named with faces but I can access all my web pages which have /faces/ in their url. All jspx pages in application are configured in task flows. So I think they have access in FacesContext. But error page is configured in only web.xml and some how it is missing access to FacesContext and not rendering JSF tags. Any help?

  • JSF Properties File for Images

    I got a .war file where all my jsps are, including my JSF properties file that include a path(outside my .war file), for example:
    urlWatermark=file:///C:/SA/images/watermark.jpg
    Then in my JSP page:
    <f:loadBundle basename="jsfks.bundle.image" var="msgImage" />
    <c:set var="pageWater" scope="session">               <h:outputText value="#{msgImage.urlWatermark}" />
    </c:set>
    <img src="${pageWater}" />
    but it dont want to display my image, as when i view the source in the browser, it shows:
    <img src="file:///C:/wesbankSA/images/watermark.jpg" />
    how can i change this so that the image will display.
    thanks

    so I have to write 2000 lines of code just to reference images, outside my war
    file, using a JSP props file?No. Re-count the lines of the last given ImageServlet example (you may skip comments) and read the given examples how to use it.
    Isnt there a simpler way of doinig thisYes, copypaste the ImageServlet code, change it where needed (at least the base path, the rest can be kept default), define this servlet in your web.xml, change your <img> or <h:graphicImage> tags to make use of it and run it.

Maybe you are looking for

  • Drivers for HP Officejet 150 (mobile) will not install

    I've been attempting to install a HP officejet 150 on a Mac air laptop that is running windows 7 (64 bit). Every time I try to run the installation program for either the full software and driver set OR the basic drivers it tells me that the computer

  • Duplicates in Itunes:

    I recently moves all my songs over to an external drive but couldn't access them from itunes. Thanks to responses from this forum I fixed that problem by moving the entire Itunes folder to the external drive. My problem now is that every single song

  • Tv@ plus question...

    i have a usb digital speaker system (genius) but the sound  only come from speakers and not from de usb speaker, i change the audio option but still the same thing, any suggestions?   

  • Remove pipe delimited and  quotes USING SAME ctL FILE

    i need to remove quotes and delimited(|) using control file in SQL LOADER. I am able to remove delimited but not able to " "(quotes).Can any one help me? "1"|"tom "|"newyork" LOAD DATA INSERT INTO TABLE temp_table FIELDS TERMINATED BY "|" TRAILING NU

  • Shorter Domain Address

    I recently published an iweb created site on MobileMe. The URL might be confusing to some. is it possible to place my name before the web.mac.com/ rather than after?