Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 10th, 2004, 05:49 PM
Registered User
 
Join Date: Apr 2004
Location: guadalajara, jalisco, Mexico.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alf.guzman
Default How Can I call a HTML file from a servlet?

Hi my question is how can I call a HTML file (index.html) from a servlet? I know that I can write html source in the servlet, but I don´t want to write the html code into the servlet, I want a html file separated.

Other Cuestion is how can I modify a HTML file from a servlet?

Thanks I hope you could help me is really important I just want a example or explication.

Bye

 
Old December 13th, 2004, 10:17 AM
Registered User
 
Join Date: Dec 2004
Location: delhi, delhi, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi
  why dont you try using RequestDispatcher ..

regards
srinivas


 
Old December 13th, 2004, 11:36 AM
Registered User
 
Join Date: Apr 2004
Location: guadalajara, jalisco, Mexico.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alf.guzman
Default

thanks for answer me, but could you be more specific, is just that I´m not an expert with servlets, I´m learning and I don´t know how can I call a html file or modificate some one that exist right now.

Thanks

 
Old January 24th, 2005, 04:51 AM
Authorized User
 
Join Date: Feb 2004
Location: Jilin, Jilin, China.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to cash
Default

RequestDispatcher rd = request.getRequestDispatcher("/my.html");
rd.include(request, response);





Similar Threads
Thread Thread Starter Forum Replies Last Post
Servlet Call Applet azimdgreat Servlets 2 July 16th, 2008 05:48 AM
servlet call using hyperlink tusharkale Servlets 4 October 3rd, 2007 06:02 AM
Dynamic html file call in XSL suri XSLT 4 June 22nd, 2007 08:03 AM
Can I call a servlet from a JFram madas Servlets 5 September 26th, 2005 12:52 PM
Servlet and HTML form qiezi J2EE 2 August 21st, 2004 04:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.