0

When i try to run my jsf file i get this warning:

12:27:49,357 WARNING [javax.enterprise.resource.webcontainer.jsf.renderkit] (http-localhost-    127.0.0.1-8080-7) JSF1090: Navigation case not resolved for component j_idt24.

In order to fix this problem I need to find out which one is the j_idt24 component, And I'm not sure how to do it, so I figured that I would probably find it in the generated servlet file(Am i right?) , So where can i find the generated Servlet file, or what would be a better way?

-Java

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Dani Gilboa
  • 599
  • 4
  • 13
  • 30
  • why do you think there is a servlet file? That is true for JSPs, not necessarily JSF. – Gimby Jan 30 '14 at 10:36
  • Oh.. I thought it's the same of JSF.. – Dani Gilboa Jan 30 '14 at 10:37
  • Perhaps it still is, JSF allows you to choose the view technology. Are you using JSPs (.jsp) or facelets (.xhtml) ? If its facelets there are no generated servlets, everything is processed at runtime. – Gimby Jan 30 '14 at 10:41
  • Well , I'm using .xhtml.. So how still can I find out which one is the j_idt24 component ? – Dani Gilboa Jan 30 '14 at 10:43

1 Answers1

3

You're confusing JSF with JSP. JSF is a MVC framework which can for the "V" part use either JSP, or Facelets or something entirely different.

What you're stating is true for JSP, but not necessarily for JSF. In JSF2, JSP is succeeded by Facelets which is compiled to a XML document, not a Servlet class. You're also confusing "JSF source code" with "JSF component tree". Those autogenerated IDs are not visible in the compiled XML document of Facelets nor Servlet class of JSP. They are only created during generating the HTML output based on the JSF component tree in server's memory during view render time (that JSF component tree is in turn created based on that XML document or Servlet class during view build time).

Coming back to your concrete problem, this warning will occur when you specify an invalid outcome in <h:link> or <h:button> component. Easiest way to naildown the culprit is to give every single <h:link> and <h:button> a fixed ID so that JSF doesn't need to autogenerate them so that you can just do rightclick, View Source in browser and do a Ctrl+F.

<h:link id="fooLink" value="Foo" outcome="foo" />

An alternative is to add <ui:debug> and explore the JSF component tree which is presented "plain text" in the debug popup and then trackback the found component to its declaration in the JSF (XHTML) source code.

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555