package com.wen.action;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class UserServlet extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* The doGet method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to get.
*
* @param request
* the request send by the client to the server
* @param response
* the response send by the server to the client
* @throws ServletException
* if an error occurred
* @throws IOException
* if an error occurred
*/
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}
/**
* The doPost method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to
* post.
*
* @param request
* the request send by the client to the server
* @param response
* the response send by the server to the client
* @throws ServletException
* if an error occurred
* @throws IOException
* if an error occurred
*/
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String userName = request.getParameter("userName");
String password = request.getParameter("password");
String[] intrest = request.getParameterValues("intrest");
System.out.println("userName:" + userName);
System.out.println("password:" + password);
System.out.println("----------------------");
System.out.print("intrest:");
for (String str : intrest) {
System.out.print(str + " ");
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
使用filter配合装饰器模式实现对请求参数加密
共24个文件
class:4个
java:4个
xml:2个
5星 · 超过95%的资源 需积分: 50 57 下载量 153 浏览量
2015-01-03
03:58:32
上传
评论
收藏 21KB ZIP 举报
温馨提示
这是一个基于servlet的方式实现对request参数加密的程序;程序中使用了本人自己封装的工具类感性趣的朋友可自行下载,目前工具类简单;加关注在后期的博客中;工具类会加强;这个程序设计的技术有servlet、filter、装饰器模式;
资源推荐
资源详情
资源评论
收起资源包目录
RequestParamsEncryption.zip (24个子文件)
RequestParamsEncryption
.project 2KB
.mymetadata 342B
src
com
wen
action
UserServlet.java 2KB
filter
EncryptionFilter.java 1024B
EncodingFilter.java 1KB
wrapper
EncryptionReqestWrapper.java 2KB
util
secretKey.properties 9B
WebRoot
WEB-INF
classes
com
wen
action
UserServlet.class 2KB
filter
EncodingFilter.class 2KB
EncryptionFilter.class 2KB
wrapper
EncryptionReqestWrapper.class 2KB
util
secretKey.properties 9B
lib
Tools.jar 3KB
web.xml 1KB
index.jsp 1KB
META-INF
MANIFEST.MF 36B
.myeclipse
.settings
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.common.project.facet.core.xml 252B
org.eclipse.jdt.core.prefs 364B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.core.resources.prefs 57B
org.eclipse.wst.common.component 507B
.jsdtscope 500B
.classpath 529B
共 24 条
- 1
资源评论
- qq_215860532017-11-23值得借鉴!
永远的幸福a
- 粉丝: 24
- 资源: 14
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功