Hello Community,
my customer want publish a pdf-file in JIRA for a named user-group. Only authentificated members should be access this pdf-file!
So I brood over a good way to implement this.
My steps:
Now my questions:
Or have anyone a better solution for my problem.
Best regards
Matthias
Community moderators have prevented the ability to post new answers.
how can I send the content of file to browser?
You write the bytes of file to the outputstream of your HttpServletResponse object. Extra hint: use the FileCopyUtils class from Spring to save you some repetitive code.
If user not logined, how page I redirect?
You simply have to return the corresponding HTTP status code and the second URL, like here: http://www.tutorialspoint.com/servlets/servlets-page-redirect.htm
Or have anyone a better solution for my problem.
You should really check out our JIRA PDF View Plugin if you want an easy to use, customizable and maintained PDF exporter for JIRA. See more details here.
Hello Ferenc Kiss, thank you for your respond and your first help. The pdf-file that I want to send to authentificated user, is a self written manual with some instructions to use our jira-instance. I want store this file in the jira-plugin-container (.jar-file). So nothing should be exportet or else. The redirect-question is solved by your support - thanks again! For my first toppic I need additional help: * in my JAR-File in Folder /ressources/PDF-FILE.PDF the file is stored. * the HttpServlet is implement in a separate namespace * how I open this file and use the FileCopyUtil? Is it possible to send a short example-code? Thank your for your assistance in the matter. Best regards Matthias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.