This project might be useful:
 http://code.google.com/p/urlrewritefilter/
This could allow you to effectively take the "proxy server" approach that Frank suggested, but do the url modification within your webapp rather than in an external application.

[EMAIL PROTECTED] schrieb:
This approach sounds like a bad idea to me. Having all your pages in the root directory means your app will not scale beyone a few dozen pages; it will just get unmanageable. And this approach simply feels wrong.

If you really want to do this then I would agree with Frank's suggestion to do this by configuring a proxy server.

The alternative would be to write a custom JSF ViewHandler class. It is the JSF ViewHandler that is responsible for creating a view and rendering it. In fact, JSF supports the "decorator" pattern for ViewHandlers, so your code would override a couple of methods but mostly delegate to the underlying implementation. I think that implementing this isn't *too* difficult, but not trivial either. You will certainly probably need to read through the source code for the ViewHandler implementation of your JSF implementation (Mojarra or Myfaces Core) and maybe read parts of the JSF specification. Having a good JSF textbook handy could also be useful.

Regards,
Simon

v aditya schrieb:
I'll definately look into how to use proxy server but is there some way to do
it from JSF standpoint?
Thanks in advance!

-aditya



Frank Nimphius-2 wrote:


Hi,
can't you set a proxy on the HTTP server. I remember that this is
possible to do in Apache. In fact what you want is to intercept the
request and forward it on the server side
Frank
v aditya wrote:

  no its not about jsp:includes .
suppose u have a URL like www.abc.com/pages/first.jsf  .I want the jsf
page
"first.jsf" to be picked up from the root directory instead of "first.jsf
"
from the path "/pages/first.jsf" but for the next request the URL should
still remain like its coming from "/pages/first.jsf".

Frank Nimphius-2 wrote:
Hi,
sorry, I don't understand the question, can you rephrase ? Do you mean
jsp:includes ?
Frank
v aditya wrote:

  I want to use some "part" of a URL to identify a particular sub
directory(under root directory) and I want to use the styles and images
from
this sub directory to display a page in the root directory here the URL
should still remain the same that is it should still have the "part"
intact.
All the pages are present only in root directory and styles and images are present only in sub directory.Can someone give me any pointers about how should I proceed.




Reply via email to