JSF 2.0 EL tags not showing in browser

Below is my file index.htmlthat contains JSF: http://pastie.org/3755252

When I select Run as > Run on Server(Tomcat 7.0.12) in Eclipse Indigo, I get a page that says only the following:

You have login attempts left.

The same thing happens in Chrome. Although, looking at the source of the page, it displays just like I wrote in Eclipse (the previous paste file), but it seems that it should be translated into html.

This is my Member.java file: http://pastie.org/3755277 And here is my web.xml: http://pastie.org/3755284

It worked before I noticed that I was mixing JSF 2.0 with JSF1 syntax. *. Then I changed my * .jsp to * .html and it does not work.

+1
source share
1 answer

The pastes seem to be omitted (I cannot read your files) ... but Tomcat is not a full Java EE container. You will need the time of Mohara’s work. Do you have this in your assembly?

EDIT: NM is back. I see the JSF servlet in your web.xml, so you can ignore this answer.

EDIT2: add this to your web.xml:

 <context-param>
  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  <param-value>.xhtml</param-value>
 </context-param>

Then rename your .html files to .xhtml. I have a feeling that the servlet did not know that it should display your files using JSF.

EDIT3: , , , , Faces. URL- url- - "localhost/app/faces/index.html", . ? , .xhtml, , , , , .html .xhtml.

, .html5, web.xml:

 <context-param>
  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  <param-value>.html5</param-value>
 </context-param>

, ... :

  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
  <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.html</param-value>
  </context-param>

http://localhost/app/index.jsf

+3

All Articles