Message Board (application)

Source: Internet
Author: User

Make a simple message board with application

<%@ 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= "55555.jsp"Method= "POST"><Table><TR><TD>Nickname:</TD><TD><inputtype= "text"name= "Name"/></TD></TR><TR><TD>Mailbox:</TD><TD><inputtype= "text"name= "Email"/></TD></TR><TR><TD>Message content:</TD></TR></Table><Table><TR><TD><textareaname= "Liuyan"rows= " the"cols= "$"></textarea></TD></TR></Table><Table><TR><TD><inputtype= "Submit"value= "Submit"/></TD><TD><inputtype= "Reset"/></TD></TR></Table></form></Body></HTML>

Processing interface:

<%@ 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><% Stringname=newString (Request.getparameter ("name"). GetBytes ("Iso-8859-1"), "UTF-8"); String Email=request.getparameter ("email");String Liuyan=newString (Request.getparameter ("Liuyan"). GetBytes ("Iso-8859-1"), "UTF-8"); if (name==""|| email== "" | | liuyan== ""){out.print ("Please add the content complete, 5 seconds after the jump to the Message interface");        Response.setheader ("Refresh", "5;appliuyan.jsp"); }else{string s= "Name:"+name+ "<br>E-mail: "+email+"<BR>Message content: "+liuyan+"<BR>"; String message1= (String) application.getattribute ("message"), if (message1==null) {Application.setattribute (" Message ", s);}    else{message1+=s;    Application.setattribute ("message", Message1); }out.print ("Message submitted successfully!") ");} %><formAction= "66666.jsp"><Table><TR><TD>View other messages</TD></TR><TR><TD><inputtype= "Submit"value= "View"/></TD></TR></Table></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>Insert Title here</title></Head><Body><%stringStr= (String) application.getattribute ("message");out.print (str);><ahref= "appliuyan.jsp">Continue message</a></Body></HTML>

Operation Result:

Message Board (application)

Related Article

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.