2019-12-13

get:点击网址,超链接,method后面写get,查询最大255字符,是以明文形式进行传输的,传输不了中文(传中文得处理,有的浏览器可能会自动处理)。

post:method后面写post,不是以明文的形式进行传输,相对来说安全,post传输的数据量没有大小限制.

web应用程序使用三层体系结构

数据层:数据库

业务层:web服务器

表示层:客户端

开发工具

eclipse:免费

Myeclipse:收费

idea:收费

主流的Java Web应用服务器

Tomcat:免费

JBoss:收费

WebLogic Server:收费

lib目录:存放部署Java类库

bin目录:存放与Tomcat运行有关的类、类库和DOS的批处理文件

webapps:部署WEB项目

什么是 Servlet ?

Servlet 是一个java类,能运行在服务器上,处理客户端发送过来的请求(get,post)

servlet生命周期

servlet是以单例的模式完成的,构造器调用一回。

init:只有在第一次访问servlet 时调用初始化

service:有doget(),和dopost()方法

destory:结束服务器的时候调用

request 请求

response 响应

request.getParameter("表单元素名字);返回值是表单的值

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n66" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">String name = request.getParameter("useName");</pre>

</pre>

request.getParameterValues(表单元素名字);返回值是一个数组,例如复选框

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n71" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">String[] aihao = request.getParameterValues("aihao");</pre>

</pre>

控制台中文问题解决 ,传输过程中的问题,取表单中元素

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n76" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">request.setCharacterEncoding("utf-8");</pre>

</pre>

页面中文问题解决

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n81" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">response.setContentType("text/html;charset=utf-8");</pre>

</pre>

response.getWriter();返回一个PrintWriter对象,对象.write(),可以在页面输入

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n86" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">​</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> PrintWriter out = response.getWriter();</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("<html>");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("<title>标题</title>");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("<body>");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("<h1>大家好</h1>");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("<h1>用户名:"+name+"</h1>");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("<h1>性别:"+sex+"</h1>");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("<h1>爱好:");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> for (int i = 0; i < aihao.length; i++) {</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write(aihao[i]+"  ");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> }</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("</h1>");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("</body>");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> out.write("</html>");</pre>

</pre>

超链接也是可以传值的

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n89" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"><h3><a href="servlet/MyServlet?useName=aaaa1&aihao=chi&aihao=he">超链接传一个值</a></h3></pre>

</pre>

调到另一个servlet

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n92" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">request.getRequestDispatcher("FindAll").forward(request, response);</pre>

</pre>

防止添加东西加入js代码等恶意代码,写一个工具包,里面写一个类加入这个方法

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n95" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">public static String htmlfilter(String input) {</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> if (input == null) {</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> return null;</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> }</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> if (input.length() == 0) {</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> return input;</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> }</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> input = input.replaceAll("&", "&");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> input = input.replaceAll("<", "<");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> input = input.replaceAll(">", ">");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> input = input.replaceAll(" ", " ");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> input = input.replaceAll("'", "'");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> input = input.replaceAll(""", """);</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> input = input.replaceAll("\n", "
");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> return input;</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> }</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">​</pre>

</pre>

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n96" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">//添加时调用这个方法</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">m.setTxt(Tools.htmlfilter(area));</pre>

</pre>

数据库连接池

提高我们的数据库并发访问能力,不能从根本上解决

假如支持1秒钟100个并发访问(最大并发访问量),先一直开30个连接(最大空闲数),有人访问就给他,如果超过30个,就在开新的连接,如果超过100个,后面的排队,等前面的连接用完。

Cookie

是存在于客户端,浏览器所在的那块硬盘上的一个文本文件,是以键值对(键值都是字符串)的形式存储的

例如论坛记住密码1周,1天都是存在COOkie里,在登录的时候,在要求的时间里都自动登录

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n111" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">//添加一个Cookie</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">Cookie c=new Cookie("time", new Date()+"");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> //cookie保存时间</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> c.setMaxAge(60*60);</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> //把cookie写入文本文件</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> response.addCookie(c);</pre>

</pre>

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n112" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">查找Cookie</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">Cookie[] cookies = request.getCookies();</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> Cookie c =null;</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> if(cookies!=null){</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> for(int i= 0; i < cookies.length; i++) {</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> c = cookies[i];</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> System.out.println("key:"+c.getName());</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> System.out.println("value:"+c.getValue());</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> }</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> }</pre>

</pre>

存取cookie value值得中文处理

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n114" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">//(存值)value写中文添加,报500错误,需要做value中文处理</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">String key=request.getParameter("key");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> String value=request.getParameter("value");</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;"> String value_utf8 = java.net.URLEncoder.encode(value,"utf-8"); </pre>

</pre>

<pre class="md-fences md-end-block" lang="" contenteditable="false" cid="n115" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9rem; white-space: pre; line-height: 1.71429em; text-align: left; break-inside: avoid; display: block; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(218, 218, 218); position: relative !important; margin-bottom: 3em; padding-left: 1ch; padding-right: 1ch; margin-left: 2em; width: inherit;">

<textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="box-sizing: border-box; overflow: auto; color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; margin: 0px; position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">//查找取值的时候中文处理</pre>

<pre class=" CodeMirror-line " role="presentation" style="box-sizing: border-box; overflow: visible; font-family: inherit; font-size: inherit; white-space: pre-wrap; line-height: 1.71429em; break-inside: avoid; padding: 0px 4px; border-radius: 0px; border-top-width: 0px; border-right: none; border-bottom-width: 0px; border-left-width: 0px; background: 0px 0px; margin: 0px; word-wrap: break-word; color: inherit; z-index: 2; position: relative; word-break: normal; width: inherit;">String value_utf8=java.net.URLDecoder.decode(c.getValue(), "utf-8");</pre>

</pre>

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,921评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 87,635评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 151,393评论 0 338
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,836评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,833评论 5 368
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,685评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,043评论 3 399
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,694评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 42,671评论 1 300
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,670评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,779评论 1 332
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,424评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,027评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,984评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,214评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,108评论 2 351
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,517评论 2 343

推荐阅读更多精彩内容

  • 会话(session)会话他是一个作用域,可以存值,可以取值,session的id一样,就是同一个会话,不一样,就...
    刘昌林11阅读 176评论 0 0
  • 一. Java基础部分.................................................
    wy_sure阅读 3,789评论 0 11
  • JAVA面试题 1、作用域public,private,protected,以及不写时的区别答:区别如下:作用域 ...
    JA尐白阅读 1,143评论 1 0
  • 1、不安全的随机数生成,在CSRF TOKEN生成、password reset token生成等,会造成toke...
    nightmare丿阅读 3,673评论 0 1
  • 凌河美酒 酸菜炖白肉 醉望秋月分外圆 天高云淡锦州 吴刚伐桂几年 嫦娥寂寞与否 会当绝顶有时 相望执子之手
    小崔随笔阅读 233评论 3 6