Search code examples
javajspwebsphere

JSP exception for component already used in view


I get this exception in my java application running on WAS 8.5:

Caused by: javax.servlet.jsp.JspException: Component ID 'ResultURL' has already been used in the view.

I assumed it meant some jsp had more than one component with ResultURL for the ID but I cheked and there is only one jsp file containing this and no sign of a duplicate. What could be causing this?

This is the component:

<h:inputHidden id="ResultURL" value="http://localhost:9080/HP_Web/DefaultLoginServlet"/>

Solution

  • In the application, the original line had been commented out and a new line added. The webserver didn't seem to recognise the code comment though so thought there was two lines with the same ID. When I removed the commented out line the error disappeared.