0

In the "search" XHTML portion of my project, the "h" tags arent being recognized. I really have no clue why they aren't working. Any insight? Here's a link to the xhtml file hosted on google code so the entire project can be viewed.

https://code.google.com/p/xdsgui/source/browse/trunk/Frontend/WebContent/search.xhtml

Thanks.

pnuts
  • 58,317
  • 11
  • 87
  • 139
Luc
  • 87
  • 5
  • What do you mean by "they aren't recognized?" Is your IDE showing an error, or are the pages failing to load? – Ian McLaird Aug 02 '12 at 02:10
  • When I run search.xhtml on the server, the elements that I define with "h" just don't show up. – Luc Aug 02 '12 at 02:22
  • I peeked a bit round in the remaining source code of your project. You've there some pretty painful design mistakes in the code. A `public static InputStream` in the `RequestHandler`? :/ I gather that this is just a hobby project? – BalusC Aug 02 '12 at 02:43
  • How would you recommend it be structured then? I'm still a novice, any suggestions would be appreciated greatly. This project is for an internship and everyone coding it hasn't finished their undergrad yet. :) – Luc Aug 02 '12 at 04:00

1 Answers1

3

They are supposed to be parsed by the FacesServlet. If they appear unparsed in the retrieved HTML output, then it simply means that the FacesServlet isn't been invoked at all.

Your project's web.xml shows that it's been mapped on an URL pattern of *.jsf. So if you change the .xhtml extension in the request URL of the page in the browser's address bar to .jsf, then it'll work.

Better is however to just map the FacesServlet on an URL pattern of *.xhtml directly. This way you never need to fiddle with virtual URLs and the endusers will also never be able to see the raw JSF source code when they purposefully changes the .jsf extension to .xhtml in the request URL.

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