-
1. Re: Seam url's without query strings?
vralev May 8, 2007 10:12 AM (in response to rickhoro2)IIRC, you should look at the wiki sample and urlrewrite.
-
2. Re: Seam url's without query strings?
rickhoro2 May 8, 2007 12:02 PM (in response to rickhoro2)Thanks for the tip. I still have more questions, however.
If I understand this correctly, the Seam url rewrite module http://labs.jboss.com/file-access/default/members/jbossweb/freezone/modules/rewrite/index.html rewrites urls received from the browser to something understood by the application.
If that is correct, then this would appear to be only half of the solution. I will be making extensive use of datatable with s:link. Therefore, I would think that I need s:link to generate user/search-engine friendly links, and then possibly convert the friendly links to links that Seam understands when the user clicks on a link, by use of the Seam url rewrite module.
It would be sufficient to solve this problem for s:link, but I would think that a general solution that generates friendly links for all links generated for an output page would be even better.
I would very much appreciate further help/ideas on this subject.
Thanks,
Rick -
3. Re: Seam url's without query strings?
christian.bauer May 8, 2007 12:25 PM (in response to rickhoro2)Seam (in CVS) comes bundled with http://tuckey.org/urlrewrite/
I don't know if it can rewrite rendered links but I also don't see a reason why it shouldn't be able to do that. -
4. Re: Seam url's without query strings?
christian.bauer May 8, 2007 12:26 PM (in response to rickhoro2)In any case, the solution is not making s:link (or other JSF components) do something special, but using a filter with a rewrite engine. So if the URL Rewrite Filter from tuckey.org can't do what you want, enhance it and contribute.
-
5. Re: Seam url's without query strings?
rickhoro2 May 8, 2007 4:14 PM (in response to rickhoro2)OK, I think I get it now. http://tuckey.org/urlrewrite/ can rewrite urls in both directions as shown in this example using <outbound-rule>: http://tuckey.org/urlrewrite/manual/2.6/guide.html#urlabs. The doc says outbound rewriting works with a JSP. Does it also work with .xhtml, as would be used with Seam/facelets?
I will be happy to contribute modifications, if required to do what I need. I just need a clear answer on this before I make a commitment to my client.
Thank you for your help. -
6. Re: Seam url's without query strings?
christian.bauer May 8, 2007 4:34 PM (in response to rickhoro2)Ah, I remember I accidentally activated an outbound rule in my Seam/Facelets application when I started using it. If I'm wrong it should be fairly trivial to support Facelets.
-
7. Re: Seam url's without query strings?
monkeyden May 8, 2007 4:54 PM (in response to rickhoro2)You could write a URL parser in a ServletFilter (or a HttpServlet) and use forwards on the server side of it, so the client doesn't see the URL updates. Not sure if there is anything inherent/better in Seam, but it's a pretty vanilla impl.
-
8. Re: Seam url's without query strings?
rickhoro2 May 9, 2007 10:52 AM (in response to rickhoro2)Thanks everyone for your help. I have just one more question -- for Christian. What you said is a bit confusing...
Ah, I remember I accidentally activated an outbound rule in my Seam/Facelets application when I started using it. If I'm wrong it should be fairly trivial to support Facelets.
Did you mean, "If I'm not wrong, it should..."? I assume you meant that you thought the url rewriter packaged with Seam should just work for Seam/facelets xhtml...correct?
Rick -
9. Re: Seam url's without query strings?
christian.bauer May 9, 2007 12:19 PM (in response to rickhoro2)Yes, I remember that it rewrote outgoing URls by accident. But that has been months ago and lasted only for about 30 seconds, so I'm not sure :)