Hello everybody, I've been working in a Java EE Project using JSF as my framework and JPA for persistence. The issue is kind of complex for me, well I think maybe it's simplier than it looks like.
I've developed a web application in which an user can register itself to send documents in pdf through a nice user interface. When the user is registered he uploads a document and when he click on a button named "Send document", he specifies an email to alert the recipient that he has recieved a document.
I've already managed to send the email through my application, the email contains a text like this: "You have recieved a file, to look it please click on the following url: sjdhajhdajsd.xhtml"
When somebody click this link if he's not registered in my application he can see the document but he has no all the options I included in this application. But if he's registered he can access all the options. I don't know if there's some solution for this case, it's something like using profiles?
Please I'd be very grateful if somebody could help me. I heard from a friend that in Struts2 he did it something similar by creating a public directory and a private directory and configure both tomcat and web.xml
A URL in the form "sjdhajhdajsd.xhtml" would generally be wrong, since ".xhtml" is commonly used as the resource file extension, and resource paths and URL paths are not the same thing, even if they do look almost identical. It confuses a lot of people.
In any event, JSF isn't a good mechanism for serving up static or generated content, such as PDFs. For that part of the webapp, use a file copy servlet. You can then define the URL of that servlet as a secured URL in the web.xml, just like you would in Struts.
Customer surveys are for companies who didn't pay proper attention to begin with.