WEB开发中遇到的问题_JAVA_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > JAVA > WEB开发中遇到的问题

WEB开发中遇到的问题

 2013/8/26 19:04:49  78425665  程序员俱乐部  我要评论(0)
  • 摘要:1.FailedtoloadorinstantiateTagLibraryValidatorclass:org.apache.taglibs.standard.tlv.JstlCoreTLV缺少standard和servlet-api.jar;这或许是低版本的jstl或javaee52.http://java.sun.com/jstl/corecannotberesolvedineitherweb.xmlorthejar连接地址和jstl版本不对应1.2以后是http://java.sun
  • 标签:Web 问题 Web开发 开发
1.
Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
缺少standard和servlet-api.jar;这或许是低版本的jstl或javaee5

2.
http://java.sun.com/jstl/core cannot be resolved in either web.xml or the jar
连接地址和jstl版本不对应
1.2以后是http://java.sun.com/jsp/jstl/core
还有可能
如果用javaee6,
javaee5之后就只有 jstl.jar 这一个jar包了,没有standard.jar包,tld文件也打包到jar里面去了,啥在web.xml文件里配置jsp-config的解决方式也是浮云。
      最终查到问题是 jstl.jar 包在ide项目中有,但在tomcat发布的应用WEB-INF/lib下没有,这是工具发布项目的问题,复制一个jstl-impl.jar和 javax.servlet.jsp.jstl.jar过去问题就解决了
3.
<c:param name="test" value="${hello}" />
value中不能用c:out和bean:write
4.
找不到页面,一般都是form中是用xx.do,html:form中是用/xx.do和xx.do都可以
5.
Cannot load a validator resource from
validation.xml和rules的xml文件中的版本不一致或者xml中的url不能ping通
6.
java.lang.NoSuchMethodError:   org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
从网上下一个最新的asm-all-3.0.jar的jar包,然后把原来的所有asm开头的jar包全部删掉,还有一个cglib-2.1.3.jar 也删掉.
7.
Invalid property 'hbmDaos' of bean class [com.maowenping.action.LoginAction]: Bean property 'hbmDaos' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
没有hbmDaos这个属性;类中没这个变量,没有set和get
8.
java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
缺少xbean-spring.jar,acivemq依赖次jar包
9.
org/hibernate/context/CurrentSessionContext
spring 2.5不支持hibernate 3.0,要3.0以上的
10.
org.apache.jasper.JasperException: /archives/listAnswers.jsp(134,62) equal symbol expected

是由于单引号和双引号的混乱使用导致的。 解决办法: 将双引号里面的双引号改成单引号; 单引号里面的双引号该成单引号。
11.
Invalid location of tag (form).
form不能写在table里面,但html:form可以
12.
No result defined for action action.LoginAction and result success-
13.
Invalid result location value/parameter
右键项目->MyEclipse->Exclude From Validation
MyEclipse-->Run Validation
13.
Not closing pre-bound Hibernate Session after HibernateTemplate
session没有close
14.
struts2验证信息重复
看是不是spring管理action时候,没配置成单件模式
15.
InvocationTargetException
getTemplate().find("from Table as p where p.name like ? and p.pass like ?",name,pass)传如多个参数出错,貌似不能用
16.
Duplicate class/entity mapping com.maowenping.po.Attend
hbm.xml文件中映射了同一个数据表
17.
Failed to read auto-increment value from storage engine
mysql自身bug,可以先添加一行,在把删除掉,就可以用了
18.
jar重复的问题,特别是针对myeclise的,可以到 window-->perferences-->Myeclipse-->Project CXXX里进行删除
19.
org.apache.jsp.index_jsp._jspInit(index_jsp.java:25)
在Myeclipse 9.0用ssh开发时,在window-->perferences-->Myeclipse-->Java Enterprise Project-->Library Sets删除javax.servlet.jar 和javax.servlet.jsp.jar
20.
Executing action method = null
默认的execute看写错没,或者action里method标签配置正确
21.
这个乱码问题是最简单的乱码问题。一般新会出现。就是页面编码不一致导致的乱码。
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=iso8859-1"%>
<html>
<head>
<title>中文问题</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
</head>
<body>
   我是个好人
</body>

三个地方的编码。

第一个地方的编码格式为jsp文件的存储格式。Eclipse会根据这个编码格式保存文件。并编译jsp文件,包括里面的汉字。

第二处编码为解码格式。因为存为UTF-8的文件被解码为iso8859-1,这样如有中文肯定出乱码。也就是必须一致。而第二处所在的这一行,可以没有。缺省也是使用iso8859-1的编码格式。所以如果没有这一行的话,“我是个好人”也会出现乱码。必须一致才可以。

第三处编码为控制浏览器的解码方式。如果前面的解码都一致并且无误的话,这个编码格式没有关系。有的网页出现乱码,就是因为浏览器不能确定使用哪种编码格式。因为页面有时候会嵌入页面,导致浏览器混淆了编码格式。出现了乱码。 
22.在jsp中,特别是html的表面,路径/xx/xx.jsp表示相对于tomcat容器,表现出的url为:http: //localhost:8080/
路径xx/xx.jsp相对于当前位置    
23.先在VisualSVN建立一个文件夹,而后在checkout出来,即可 ;maven项目可以先建立,在右键projectTeam->share project
24.
Document base D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\OASystem does not exist or is not a readable directory
tomcat配置删了,在配置一个
25.
把Myeclipse发布的lib+mail.jar+servlet-api.jar+jsp-api.jar拷贝到javaEE的工程lib中去就可以了
26.
乱码
一般用new String(xxx.getBytes("iso-8859-1"),"gbk");如果读取文件,首先保证文件时ansi编码,而不是 unicode,其次特别注意font类的第一参数,需要指明类型,不然就变成默认了,估计是utf-8;new Font("宋体","xxx","xxx");
27.
java中,.有意义的,如果要输出.了,就要//.
//表示后一个/是转义符号,如果要输出/,就需要////
28.java中的.表示project的路径
29.<c:if test="!empty ${xx}">
<s:if test="#xxx!=null">
30.Lucene中创立IndexWriter需要提交:
1,调用close方法,间接提交,但是这样就不能共用一个IndexWriter
2,显示调用commit方法
31.new IndexWriter(dir, new StandardAnalyzer(Version.LUCENE_30), true,
                IndexWriter.MaxFieldLength.UNLIMITED)
第三个参数,true:新建或覆盖;false:新建或追加
当没有这个参数时候,表示false
32.除了实时搜索,其他用IndexWriter或IndexSearcher打开的索引都是上次的(不包括刚增加或删除的)
发表评论
用户名: 匿名