0

I am using Struts 1.x framework in my web application .

When the user hits the application URL... ..intranet link is fetched from the db and it should generate the PDF and send this to the user..

Shall I use response.sendRedirect(intranet link);

Will this work in public server(internet)?

Please help me with this

androidDev
  • 1,179
  • 4
  • 13
  • 31

1 Answers1

0

A browser on the web will in general not be able to fetch something from the intranet.

The expensive alternative is to fetch the files from the intranet by your application, and stream them out.

If the intranet uses a user authentication, browser based, maybe Windows Active Directory (via LDAP), maybe SAML, then it gets even harder.

Pragmatic might be to send an e-Mail with the link, allowing the user to get the document in-house only.

Joop Eggen
  • 107,315
  • 7
  • 83
  • 138
  • Thanks @Joop for replyin....Is there any way to redirect/forward the intranet link inside the web application only just to open the PDF. – androidDev Sep 21 '15 at 16:41
  • If the pdfs are not protected, search for **proxy**. Talk with the maintainers, maybe a **network drive/share** can be made and your app may serve the files like it serves images. – Joop Eggen Sep 21 '15 at 17:09
  • Sorry "proxy server" is a large area, needing careful ... care. Also it will not turn an intranet into an open net easily. Try to load the pdf in your application first for forwarding. Next optimization to have a shared network directory. Last touch the infrastructure. Which has a couple of dangers, like performance for all in the intranet and security, vulnaribility. – Joop Eggen Sep 21 '15 at 17:32