Using Tomcat 6.35 when I change some input parameters and reload the page I recive the error:
Duplicate ID component 'form1:_id4' found in the view.
The http://www-01.ibm.com/support/docview.wss?uid=swg1PK48744 says:
To prevent collision with existing client IDs, the
com.ibm.ws.jsf.storeDynamicClientIds property must be set to
"true" in the web.xml file. For example:
<description>If this property is set to true, the number
that is used to generate new client IDs is stored in the view
so that it is saved between requests.
This is true for WebSphere server.
which can be the corresponding instructions to change the web.xml for Tomcat?
To overcome the error I always press F5 but this can not be the solution at runtime.
I'm on the right track to find a solution?
This topic has been locked.
10 replies Latest Post - 2013-04-03T17:39:33Z by SystemAdmin
Pinned topic "DUPLICATE COMPONENT" ERRORS ARE RECEIVED WHEN USING JSF.
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-04-03T17:39:33Z at 2013-04-03T17:39:33Z by SystemAdmin
dan_darnell 27000038BE936 PostsACCEPTED ANSWER
Re: "DUPLICATE COMPONENT" ERRORS ARE RECEIVED WHEN USING JSF.2013-03-27T16:36:04Z in response to paolocDid you try adding that context-param entry to your project's web.xml? If not, slam it in there and see what happens. (Probably nothing because it appears that the fix is in WebSphere, not in the Faces implementation.)
There also appears to be a second work-around noted in that APAR ... give an explicit 'id' to all of your components...
"To work around the issue simply modify this:
to give it an id, for example:
The general Internet wisdom seems to be along these same lines ... always give your components unique ID's so that the internally generated stuff doesn't conflict.
Re: "DUPLICATE COMPONENT" ERRORS ARE RECEIVED WHEN USING JSF.2013-03-30T07:14:53Z in response to dan_darnellHi Dan,
I cannot found the cause of the error.
All fields are created with drag and drop from the palette.All fields have an ID.
The page works well if I press F5 between the displays are sended to the server.
How to debug? what to do?
Re: "DUPLICATE COMPONENT" ERRORS ARE RECEIVED WHEN USING JSF.2013-04-02T07:31:27Z in response to paolocThe view may contain components that do not have a counterpart in the UI; hence, it is not always possible to provide an explicit ID for all components in a view.
We have experienced similar issues and in our case the culprit was the (well documented) discrepancy between JSP and JSF life cycles. Have you tried identifying the problematic component with JST Trace?
BTW, in my experience, dragging components from the palette does not guarantee flawless jsp-code. You should check the resulting code manually (and understand its details).
Re: "DUPLICATE COMPONENT" ERRORS ARE RECEIVED WHEN USING JSF.2013-04-02T19:03:03Z in response to paolocTo use JSF tracing open the JSF Trace view. It explains you what you need to to in order to start tracing. I have found tracing an invaluable tool in debugging what happens when a JSF request is processed. (Here it helps if you are familiar with JSF application lifecycle.) In your case, I was hoping that you might be able to trace where the components with duplicate id come from.
Re: "DUPLICATE COMPONENT" ERRORS ARE RECEIVED WHEN USING JSF.2013-04-03T10:31:01Z in response to SystemAdminJSF Trace view does not report any error that I understand.
some lines are marked with green color other with yellow,but they are not the fields in error.
In "Incomming request:com.sun.faces.context.MyHTTPServeletRequestWrapper@278063d2" I can see an
com.sun.faces.VIEW=_id4:_id5 that looks like the error log duplicate component form1:id4
but _id4 does not appear elsewhere (see attachment).
Can I print this trace?
I do not know where to look for the error.
Re: "DUPLICATE COMPONENT" ERRORS ARE RECEIVED WHEN USING JSF.2013-04-03T12:52:41Z in response to paolocI cannot say much based on that except that setting ids manually will not help, since the problematic component is com.sun.faces.VIEW.
A few questions. First, which version of RBD (or RAD) are you using? Your screenshot does not show details about the phases. Secondly, which JSF implementation are you using? As you are running Tomcat 6, you should be using JSF 1.2 implementation.