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

How to embed a html file in a servlet ?

 
ganshre
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a client requests for my servlet, i've to send a html file which is located in Public_html directory of Javawebserver. Other wise I want to send a html file to my client. Can anybody please reply me ?
 
Suneel Setlur
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Do you want to redirect the request to a html file?
If yes, then you can use
response.sendRedirect(String)
where you can pass the location of the html document in the String.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic