Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing FileName for Template - Servlet

Status
Not open for further replies.

vvicin01

Programmer
Aug 14, 2001
21
0
0
US
I've written a serlvet that displays various html templates based on a particular selection. I currently pass a url string to the servlet (for using a GET or POST) and pass those variables to the servlet using the get(parameter). However, I am using a number of html pages that I am reading using the FileReader in the init(). How can I pass the file name to the init(). When I tried to use the get() in the init it will not work. Is there a way to pass a file name (via GET) to the init() when using the FileReader to read the path of the template?
 
No. They hide those facts in the documentation

The host servlet engine calls the init method exactly once after instantiating the servlet. [red]The init method must complete successfully before the servlet can receive any requests[/red].

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top