Hi gurus,

Let's say when a user accesses "http://whatever/faces/index.jsp";,
I want the user actually sees "http://whatever/faces/XXX/index.jsp";
where XXX is from database. 
(The second index.jsp contains JSF tags.)

There're two ways I can think of.

1, In /faces/index.jsp, use a RequestDispatcher#forward or include.
   ( I think the inlude() doesn't work because the path of URL would be 
     different than the original path the user originally requested, so 
     MyFaces cannot properly handle it though.)
2. Make a new ServletFilter to intercept the request and rewrite 
   HttpServletRequest#getPathInfo() or something using 
   HttpServletRequestWrapper class.

I haven't tested both above so I might be totally wrong.

Anyways, which one is better ?
or Is there any typical way to make it ?

Regards,
Wolfgang




--------------------------------------
Know more about Breast Cancer
http://pr.mail.yahoo.co.jp/pinkribbon/

Reply via email to