jsp代码
pageEncoding="UTF-8"%>
Insert title here选择框
java servlet代码
package com.itzheng.servlet;
import java.io.IOException;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.itzheng.dao.UserDao;
import com.itzheng.dao.impl.UserDaoImpl;
import com.itzheng.domain.UserBean;
/**
* Servlet implementation class LoginServlet
*/
public class LoginServlet extends ServletDemo {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
String auto = request.getParameter("auto");
//判断是否选中
if("on".equals(autologin)) {
//如果选中执行如下代码
........
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
拿着玫瑰花的稻草人
发布了4 篇原创文章 · 获赞 2 · 访问量 95
私信
关注
标签:Java,Servlet,request,jsp,com,itzheng,import,servlet,javax
来源: https://blog.csdn.net/qq_44757034/article/details/104105020