This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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