-
1. Re: JSTL issue with c:url
keithnaas Feb 28, 2008 10:45 PM (in response to romain.dev.easycity.com)The facelets docs specify what jstl tags are available. <c:url/> is not supported.
-
2. Re: JSTL issue with c:url
romain.dev.easycity.com Feb 28, 2008 11:00 PM (in response to romain.dev.easycity.com)Ok, that's right. Thanks.
Do you know how I can do it though ?
Here is the JSP equivalent :
<a href="<%= response.encodeURL("/old/url/scheme/page.jsp") %>">some link</a>
Is there a way to do it with facelets ?
Best,
Romain
-
3. Re: JSTL issue with c:url
keithnaas Feb 28, 2008 11:21 PM (in response to romain.dev.easycity.com)How about
<a href="${request.contextPath}/old/url/scheme/page.jsp">some link</a>
-
4. Re: JSTL issue with c:url
romain.dev.easycity.com Feb 28, 2008 11:30 PM (in response to romain.dev.easycity.com)Thanks,
The link works but it doesn't go into the urlrewriter.
The old URL is displayed.
-
5. Re: JSTL issue with c:url
gavin.king Feb 28, 2008 11:30 PM (in response to romain.dev.easycity.com)Isn't there a h:outputLink that does stuff like this? (I don't think I ever used it, hehe.)
-
6. Re: JSTL issue with c:url
romain.dev.easycity.com Feb 28, 2008 11:36 PM (in response to romain.dev.easycity.com)Great, it works like a charme with h:outputLink !
Cheers
-
7. Re: JSTL issue with c:url
keithnaas Feb 29, 2008 5:47 AM (in response to romain.dev.easycity.com)Yea, I suppose that h:outputLink would work too...If you wanted to do it the easy way..haha :)
-
8. Re: JSTL issue with c:url
romain.dev.easycity.com Feb 29, 2008 12:05 PM (in response to romain.dev.easycity.com)However, I still have an issue here.
If on the same page I have different links that need to be rewritten, the all end up to be the same.
Exemple :
If I click on :
<h:outputLink value="/sitemap/index.seam">Sitemap</h:outputLink>
The url become :
http://localhost:8080/world
cause of this rule :
<outbound-rule> <from>^/sitemap/index.seam$</from> <to>/world</to> </outbound-rule>
Fine.
But when this page loads, it contails a set of diffent links that need to be rewritten :
<h:outputLink href="/sitemap/country.seam?country_code=#{country[0]}">#{country[1]}</h:outputLink>
I set up this rule :
<outbound-rule> <from>^/sitemap/country.seam?country_code=([a-zA-Z]+)$</from> <to>/world/$1</to> </outbound-rule>
However, this is rendered as :
http://localhost:8080/world
Instead of :
http://localhost:8080/world/us
Strange behavior :/