posted @ 2009-09-13 15:23
随笔分类 - JSP
摘要:1.index.html<iframe id="mainIframe" scrolling="no" frameborder="0" width="100%" src="a.html"></iframe><a href="#" onclick="page('a.html')">a页面</a><a href="#" onclick="page('...
阅读全文
摘要:linux 上tomcat 服务器抛出socket异常“文件打开太多”的问题 java.net.SocketException: Too many open filesat java.net.PlainSocketImpl.socketAccept(Native Method)at java.net.PlainSocketImpl.accept(PlainSocketImp...
阅读全文
posted @ 2009-09-08 09:18
摘要:tomcat5下jsp出现getOutputStream() has already been called for this response异常的原因和解决方法在tomcat5下jsp中出现此错误一般都是在jsp中使用了输出流(如输出图片验证码,文件下载等),没有妥善处理好的原因。具体的原因就是在tomcat中jsp编译成servlet之后在函数_jspService(HttpServletR...
阅读全文
posted @ 2009-09-07 21:58
摘要:System.out.println("request.getRemoteAddr(): " + request.getRemoteAddr()); System.out.println("request.getRemoteHost(): " + request.getRemoteHost());得到的结果相同(局域网内试验的结果)。 那么getRemoteAddr()和getRemoteHost...
阅读全文
posted @ 2009-06-25 13:13
摘要:1。最直接最简单的,方式是把文件地址直接放到html页面的一个链接中。这样做的缺点是把文件在服务器上的路径暴露了,并且还无法对文件下载进行其它的控制(如权限)。这个就不写示例了。 2。在服务器端把文件转换成输出流,写入到response,以response把文件带到浏览器,由浏览器来提示用户是否愿意保存文件到本地。(示例如下) 3。既然是JSP的话,还有一种方式就是用Applet来实现文件的下载...
阅读全文
posted @ 2008-07-14 15:00
摘要: Form中的get和post方法,在数据传输过程中分别对应了HTTP协议中的GET和POST方法。二者主要区别如下:
1、Get是用来从服务器上获得数据,而Post是用来向服务器上传递数据。
阅读全文
posted @ 2007-06-04 09:41
浙公网安备 33010602011771号