j2ee中servlet的一个新手问题,页面跳转提示The requested resource is not
用户名:
密码:
登陆类型:
用户
管理员
servlet_in中dopost是这样写的:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
request.setCharacterEncoding("GB18030");
String username=request.getParameter("hom-in-username");
String password=request.getParameter("hom-in-password");
request.setAttribute("name", username);
request.setAttribute("password", password);
request.getRequestDispatcher("hom.jsp").forward(request, response);
}
xml配置:
j2ee-demo
index.html
index.htm
index.jsp
default.html
default.htm
default.jsp
servlet_in
page.servlet_in
servlet_in
/servlet_in |
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|
form的action应该是page/servlet_in吧 |
|
|
|
|
书上说,的格式如果是“/computerBill”那么action就是"computerBill" |
|
|
|
|