-
1. Re: outputLink vs. s:link output different results?
pmuir Jul 13, 2008 3:18 PM (in response to deanhiller2000)I fixed your code blocks for you (by adding back ticks)
Anyway, yes, <h:outputLink /> isn't very useful (actually, that reminded me to add it to the agenda for JSF 2, thanks!). I don't see why you need quite that amount of code, doing
<h:outputLink value="/#{facesContext.externalContext.requestContextPath}/foo.xhtml" />
is enough as http recognises that as a link relative to the server root.As a short cut, define <factory name="requestContextPath" value="#{facesContext.externalContext.requestContextPath}" /> in components.xml.
-
2. Re: outputLink vs. s:link output different results?
deanhiller2000 Jul 13, 2008 3:45 PM (in response to deanhiller2000)never mind, I got it figured out. outputlink is just a relative OR absolute URL while s:link is only the absolute from the servlet context root!!! Then, with base path, I just have to change the output link to value="secure/company.xhtml" and thanks to the base I set in the template, it will all work just fine, and s:link never fools around with the base because it is sooo cool that it doesn't have to. These details kill people though...ugh... oh well, won't forget this next time and I hope this helps someone else out.