Hi. I am new to JSF. I am currently reading the JSF documentation on the Sun website. I have tried to create a default page for all navigation cases, so I did something like this:
For some reason though, no matter what URL I try and reach, I get a 404 error like the following:
If I try and access test.do it gives me a test.jsp (404) not found error.
Does that make sense? Does JSF try and load a file with the same name as call I made, but replaces '.do' with '.jsp'?
If so, how would I achieve the behavior I want with JSF? I have looked (almost) everywhere and it seems like what I have above is the way to do it in JSF, but it doesn't seem to work for me.
I am coming from Spring and Struts so I am not completely new to MVC frameworks. I also have some knowledge on JSF now, since I have been reading about it, but nothing I have seen so far has given me any indication that I could do what I want, other than the snippet that I provided above.
Maybe I am trying to do something that JSF was not meant for. What I am trying to do is create a way to always have any call to *.do (which is currently mapped to JSF) to resolve to the same JSP file (index.jsp)... always.
I don't want to have to create a jsp file for each and every *.do.
My index.jsp is like a template file that then acts like a view resolver using the * of *.do.
I have another question, are there any good view/template technologies for JSF? Is there anything built in or something open source? I do not want to use tiles, as I am trying to move away from any struts dependencies.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop