{Statement: Do not reprint}
At that time, it seems that I used DJ Java decompiler to decompile the. Class file given by icarnegie, and then copied some code. The code I provided does not seem to be able to compile. Please be careful.
/**
* Author:
* Date: 05-09
* Description: exercise6
*/
Import java. Io .*;
Import javax. servlet .*;
Import javax. servlet. http .*;
Public class oogallery extends httpservlet {
Public void dopost (httpservletrequest request,
Httpservletresponse response)
Throws servletexception, ioexception {
/**
* Indicate the content type (for example, text/html ),
* Being returned by the response
*/
/* Add your code here */
Response. setcontenttype ("text/html ");
/**
* Retrieve an output stream to use to send data to the client
*/
/* Add your code here */
Printwriter out = response. getwriter ();
/**
* Get the user input from the form
*/
/* Add your code here */
String themepicture1 = request. getparameter ("theme") + "one ";
String themepicture2 = request. getparameter ("theme") + "two ";
String backgroundimage = "/" + request. getparameter ("bgrnd") + ". GIF ";
String bgcolor = "# fff8dc ";
/**
* Create an instance of the htmlpage class
*/
/* Add your code here */
Htmlpage = new htmlpage ();
/**
* Create an instance of the htmlimage class for the first image
*/
/* Add your code here */
Htmlimage htmlimage1 = new htmlimage ("/" + themepicture1 + ". jpg", themepicture1 );
/**
* Create an instance of the htmlimage class for the second image
*/
/* Add your code here */
Htmlimage htmlimage2 = new htmlimage ("/" + themepicture2 + ". jpg", themepicture2 );
/**
* Set the attributes of the htmlpage object
*/
/* Add your code here */
Htmlpage. settitle ("oogallerypage using htmlpage and htmlimage classes ");
Htmlpage. setbackgroundimage (backgroundimage );
Htmlpage. setbackgroundcolor ("bgcolor ");
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.