Joke Collection Website - Public benefit messages - Preparation of JSP verification code
Preparation of JSP verification code
ServletOutputStream sos = response.getOutputStream();
: Get an output stream object
ImageIO.write(image, "jpeg", sos); < /p>
: Write the given picture to the specified stream of sos.
sos.close();
: Close the stream and output the stream at the same time. If this sentence is not added, the picture cannot be displayed.
out.clear();
out = pageContext.pushBody();
The above two sentences are required. It should be that the out object is the default output stream object in jsp. This object is called when each request is completed. The out object conflicts with the getOutputStream related to using streams in jsp pages. Therefore, the two sentences above must be added. Otherwise, an exception will be reported. (But you don’t need to do the above processing in servlet)
- Previous article:New rules of Zhongshan provident fund loan
- Next article:What is the customer service phone number of Guangdong Unicom?
- Related articles
- Lots of goods, hooligans.
- What are the advantages of Panda Express?
- Will you be quarantined if you come to Jiangmen from Shanghai during the epidemic (can you go to Jiangmen now due to the epidemic)?
- Judy's strategy
- How to write the welcome speech of the meeting? Meeting welcome SMS model essay
- I forgot how to retrieve the SMS verification code. what can I do?
- How to search with mobile phone
- I want to ask how to send text messages in groups.
- How to send a simple New Year greeting in the Year of the Tiger?
- Short version of the groom's confession: the groom's affectionate confession at the wedding.