BUG 、小东西汇总

xiaoxiao2025-12-06  10

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/目录下
转载请注明原文地址: https://www.6miu.com/read-5040403.html

最新回复(0)