wood burning stoves 2.0*
The moose likes Servlets and the fly likes How to embed a html file in a servlet ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to embed a html file in a servlet ?" Watch "How to embed a html file in a servlet ?" New topic
Author

How to embed a html file in a servlet ?

ganshre
Greenhorn

Joined: Jan 05, 2001
Posts: 12
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

Joined: Nov 26, 2000
Posts: 202
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.

Suneel
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to embed a html file in a servlet ?