解决方案 »
- 找一款制作网页软件
- jsp菜鸟 求教部署tomcat 回答全者付100分
- 如何拆分、组合新的字符串?很急!谢谢各位,
- JSP网站的一个小问题
- 烦人的错误You have an error in your SQL syntax; 郁闷啊...........
- 求教一个关于java结合数据库开发系统的源代码下载地址!!
- 一道关于继承的问题,立即结贴。
- 急呀,关于下载的问题,怎样才能把一个文件夹下的所有文件以列表的形式排列出来(包括中文的),点击下载,可以删除
- bodytag的问题,困扰许久请援手!<jsp>
- java.io.FileNotFoundException: class path resource [com/heima/bos/domain/]
- 如何在jsp页面上打开word,excel,pdf等文档??
- 求助:什么是容器?
下个虚拟小龙亭去看看
<%@ page import="java.lang.*" %>
<%@ page import="java.io.*" %>
<%@ page import="javax.rmi.PortableRemoteObject" %>
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="commonHome" %>
<%@ page import="commonRemote" %><%-- String Error_message= req.getParameter("error");--%>
<%
commonRemote common;
InitialContext ic = new InitialContext();
Object objref_find = ic.lookup("java:comp/env/ejb/common");
commonHome home_find=(commonHome)PortableRemoteObject.narrow(objref_find,commonHome.class);
common=home_find.create();
//HttpSession session = request.getSession(true);
session.setAttribute("common",common);
%>
<html>
<head>
<title>用户登录</title>
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=GB2312">
</head>
<body>
<center>
<form name=form1 action=update method=post>
KONICA PARTS SYSTEM
<p>
用户登录
<p>
<%
String Error_message=request.getParameter("error");
if (Error_message!=null)
{
%>
错误信息:<%=new String(Error_message.getBytes("gb2312"),"8859_1")%>
<%
}
%>
<p>
<table border>
<tr>
<td>用户号</td>
<td><input name=code value=""></td>
</tr>
<tr>
<td>密码</td>
<td><input name=password value=""></td>
</tr>
<tr>
<td><input type="submit" value="更新"></td>
</form>
<form name="form2" action="register" method="post">
<td><input type="submit" value="注册"></td>
</form>
<form name="form3" action="special_register" method="post">
<td><input type="submit" value="特殊用户注册"></td>
</form>
</tr>
</table>
</center>
</body>
</html>
客户端与服务器端交互就会产生一个session,
建义将用户ID放入session中进行传递
就是用户非正常退出,SESSION仍然保留了下来,如何处理???!!!
Removes the object bound with the specified name from this session.