Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

preventing direct access to html files

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application, i am redirecting my control to a html file using response.sendRedirect(). Once this is done, that html file is freely accessible even if the url is copy-pasted into other browser. Is there any way that we can find out if client is trying to access that file directly.
I cannot put file inside web-inf,because response.sendRedirect() is not authorised to redirect control to files inside web-inf.
Any suggestions.
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can write a servlet which will send content of your html file to the client end.
[ December 15, 2008: Message edited by: Himanshu Gupta ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic