JSP message Session

Source: Internet
Author: User

Simple Message Board Display

<%@ Pagelanguage= "Java"ContentType= "text/html; charset=utf-8"pageencoding= "UTF-8"%><!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd "><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>Message boards</title></Head><Body><formAction= "session0625.jsp"Method= "POST"ID= "Form1"name= "Form1"><DivAlign= "Center"><Tablewidth= "50%"Border= "0"><TR><TDwidth= "10%">Your contact e-mail:</TD><TDwidth= "40%"><inputtype= "text"name= "Email"/></TD></TR></Table><Tablewidth= "50%"Border= "0"Height= "40%"><TR><TD>Message content:</TD></TR><TR><TD><inputtype= "text"style= "width:50%;height:100%"name= "Liuyan"/></TD></TR><TR><TD><inputtype= "Submit"value= "Submit"/></TD></TR></Table></Div></form></Body></HTML>
<%@ Pagelanguage= "Java"ContentType= "text/html; charset=utf-8"pageencoding= "UTF-8"%><!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd "><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>Message Board session</title></Head><Body><%stringEmail=newString (request.getparameter ("email"). GetBytes ("Iso-8859-1"), "UTF-8"), Session.setattribute ("email", email); String Liuyan=newString (Request.getparameter ("Liuyan"). GetBytes ("Iso-8859-1"), "UTF-8"), Session.setattribute ("Liuyan", Liuyan );%><formAction= "result0625.jsp"Method= "POST"><Table><TR><TD>OK to show message content?</TD></TR><TR><TD><inputtype= "Submit"value= "OK"/></TD><TD><inputtype= "Reset"value= "Cancel"/></TD></TR></Table></form><%-- your e-mail address is: <%=email%><BR>the content of your message is:<%=liuyan%>--%></Body></HTML>
<%@ Pagelanguage= "Java"ContentType= "text/html; charset=utf-8"pageencoding= "UTF-8"%><!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd "><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>Insert Title here</title></Head><Body><%stringEmail= (String) session.getattribute ("email");String Liuyan= (String) session.getattribute ("Liuyan");%>your e-mail address is:<%=email%><BR>the content of your message is:<%=liuyan%></Body></HTML>

Operation Result:

JSP message Session

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.