BUG 、小东西 汇总

1.form中没有method="" 不转页只刷新
2.form中要是上传文件要有<form enctype="multipart/form-data">
3.bug:getOutputStream() has already been called for this response
原因:在tomcat下jsp中出现此错误一般都是在jsp中使用了输出流,具体原因是在tomcat编译之后的jsp中,_jspService(HttpServletRequest request,HttpServletResponse response){}中的最后一行代码finally{if(_jspxFactory!=null) _jspxFactory.releasePageContext(_jspx_pag_context)} 会调用response.getWriter(),和jsp页面中的response.getOutputStream()冲突。
解决办法:out.clear();out=pageContext.pushBody();
4.<td title="abc">就可以在鼠标放在上面的时候显示abc了。
5.struts1解决刷新后又增加的方法:在struts-config.xml中<forward name="reSearch" path="*.do?method=search" redirect="true"/>
6.struts限制上传文件大小,在struts-config.xml中<controller nocache="true" inputForward="true" maxFileSize="10M"/>所有配置文件只有一个好使,不能多个控制文件大小。
7.获取真实路径:getServlet().getServletContext().getRealPath();
8.日期显示效果:<bean:write name="" property="" format="yyyy-MM-dd HH:mm"/>
9.灰掉效果:<input type="text" id="a"/>
<script>document.getElementById("a").disabled = true;</script>
10.weblogic.utils.ParsingException:nested TokenStreamException:antlr.TokenStreamIOException 异常原因:jsp页面编码错误
11.weblogic版本问题会导致Oracle中clob在页面中无法显示,8.1.2不显示;8.1.6就显示
12.<bean:write filter="false"/>过滤功能,是true会把clob格式过滤掉
13.检测数据是否存在:map.containsKey(key);
14.创建目录:file.mkdir();一级文件夹 file.mkdirs();多级文件夹
15.背景透明:<body style="background:transparent"/>
16.struts下拉列表框:<html:select property="后台名" name="后台form名">
<html:optionsCollection name="后台form名" porperty="后台map名“ value="key" label="value"/>
</html:select>
17.oracle中between and 用法:between "2009-07-02 00:00:00" and "2009-07-02 23:59:59"

18.java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver tomcat报错
解决方案:1.检查对应的数据库JAR包是否导入工程
2.检查.classpath文件里是否引入<classpathentry exported="true" kind="lib" path="C:/workspace/jtds-1.2.jar"/>
3.检查对应的JAR包是否导入Tomcat下的/common/lib/目录下
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值