Splash › Forums › PrettyFaces Users › Specify view-id for "Non-JSF" resources
Tagged: current view-id
This topic contains 2 replies, has 3 voices, and was last updated by 0swald 7 years, 11 months ago.
I noticed in the documentation that it is possible to specify non-jsf resources for view-id of a url-mapping.
I have a servlet which serves an iText pdf, so has no associated JSP, or view of any kind.
How can I use “pretty:monthly-report” in my JSF code:
<url-mapping id="monthly-report" parentId="lang">
Yes, it should be possible to use the URL of a Servlet as a viewId in a mapping. Actually PrettyFaces just forwards the request to the viewId, so every URL that your container knows about should work.
What exactly is your question? How you would use this mapping? You could for example use the <pretty:link> component to create a link to the URL.
BTW: You don’t need to use a Servlet for this. You could also simply create your content in an URL action. See this article for details:
Wow, shame on me! Being your fan for already two years, never read this article and used to code servlets for such sort of tasks
You must be logged in to reply to this topic.
Comments are closed.
If you find our tools useful, please consider making a donation to help us stay online and building software!