select column_name from user_tab_columns where table_name='table1';
<input name="Submit6" type="button" value="选择号牌" class="Button_B" onClick="window.open('njjl/SB_Manage/Equip_Visio/Visio_Change_HPHM.jsp?dqdm=<%=form.getDQDM()%>&change=able&Djzsbh='+document.form1.djzsbh.value+'&hphm='+document.form1.hphm.value+'','','width=600,height=300,menubar=no,resizable ...
环境mysql+tomcat:
<1>先在mysql下建立如下的table. 并insert图像.
mysql.sql文件如下:
CREATE TABLE photo (
photo_no int(6) unsigned NOT NULL auto_increment,
image blob,
PRIMARY KEY (`photo_no`)
)
<2>把show.jsp放在tomcat的任意目录下. show.jsp作用:从数据库中读出blob,并产生image/jpg.
show.jsp文件如下:
<%@ page contentType="text/html; ch ...
- 09:48
- 浏览 (385)
- 评论 (0)
下在这个 1.htm 用来调用servlet
<!------------ 文件 1.htm 开始-------------------->
<html>
<head><title>用servlet 显示图片</title></head>
<body>
<img src="http://localhost:8080/servlet/showimage">
</body>
</html>
<!------------ 文件 1.htm 结束 ---------------->
在Servlet 中,是靠 doGe ...
创建序列
create sequence seq_a minvalue 1000 maxvalue 99999999 start with 1000 increment by 1 nocache;
查询序列
select seq_a.nextval from dual;
为每张表生成对应的序列
--创建存储过程
create or replace procedure p_createseq(tablename in varchar2)
is
strsql varchar2(500);
begin
strsql:='create sequence seq_'||tablename||' ...
要在oracle里面存入图片 用 blob类型
首先在数据库里建立:
--连接到管理员
conn sys/tbsoft as sysdba;
--为scott用户授权
grant create any directory to scott;
--回到scott用户
conn scott/tiger;
--创建存储图片的表
CREATE TABLE IMAGE_LOB (T_ID VARCHAR2 (5) NOT NULL,T_IMAGE BLOB NOT NULL);
--创建存储图片的目录
CREATE OR REPLACE DIRECTORY IMAGES AS 'C: ...
package list;
import javax.servlet.http.*;
import javax.servlet.*;
import java.util.*;
public class onLineUser implements HttpSessionBindingListener {
public onLineUser(){
}
private Vector users ...
- 16:51
- 浏览 (279)
- 评论 (0)
在一个有密码保护的Web应用中,正确处理用户退出过程并不仅仅只需调用HttpSession的invalidate()方法。现在大部分浏览器上都有后退和前进按钮,允许用户后退或前进到一个页面。如果在用户在退出一个Web应用后按了后退按钮浏览器把缓存中的页面呈现给用户,这会使用户产生疑惑,他们会开始担心他们的个人数据是否安全。许多Web应用强迫用户退出时关闭整个浏览器,这样,用户就无法点击后退按钮了。还有一些使用JavaScript,但在某些客户端浏览器这却不一定起作用。这些解决方案都很笨拙且不能保证在任一情况下100%有效,同时,它也要求用户有一定的操作经验。
这篇文章以示例阐述了正确解决用户退 ...
- 16:17
- 浏览 (380)
- 评论 (0)
用户登录和退出日志
当用户登录系统时,在日志表中插入一条记录,记录用户登录的时间,在用户退出系统时记录用户退出系统的时间。
我们利用HttpSessionBindingListener接口来完成记录登录和退出日志的功能,该接口中定义了两个方法:
·valueBound(HttpSessionBindingEvent event)
·valueUnbound(HttpSessionBindingEvent event)
如果一个类实现了HttpSessionBindingListener接口,当对象通过session.setAttribute()被绑定到Sessi ...
(-)使用监听查看在线用户
1 显示层(一)登录界面index.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>index.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my p ...
- 浏览: 8414 次

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
删除重复数据的一种高效的 ...
没有主键(Primary Key)约束保护的表格可能会让重复的数据行被插入进来。 ...
-- by czllfy -
删除重复数据的一种高效的 ...
5555 好想了解怎么回事,不过看不懂,兄台能否讲解一下?
-- by yiding_he






评论排行榜