Is there a taglib in JSF for inserting the proper application context root in any URL I want, just like the <c:url> tag in JSP does?
Is there a taglib in JSF for inserting the proper application context root in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not exactly that, but all JSF components which refer to an URL resource will already automatically include the proper context path and eventually also the
FacesServletmapping. For example the<h:link>:which renders something like (assuming that your context path is
/contextnameand yourFacesServletis mapped on*.xhtml):You can include request parameters by
<f:param>:which renders something like:
Other link components which also do that are the
<h:outputStylesheet>,<h:outputScript>and<h:graphicImage>for CSS, JS and images respectively:which renders something like: