- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
出现这个问题也许是你在配置spring的时候,将生成的文件放到的位置不是WEB-INF下面,通常是src下,所以会产生这样的错误。解决的办法很简单:1.在web.xml文件夹中配置applicationContext.xml的路径: contextConfigLocation classpath:applicationContext.xml
2017-03-06 11:54:31 322
原创 jsp:使用include乱码
我使用include来包含一个jsp文件,一个html文件以及一个txt文件,出问题的是html和txt文件。解决的办法如下:对于txt文件:在记事本中打开,文件—》另存为,编码方式选择你需要的,我选择的是utf-8编码方式。尽管在myEclipse中新建的txt文件你使用记事本打开的话,会显示编码方式为utf-8,但是还是会遇到乱码的问题。如果你是在myEclipse中建立txt文件
2017-02-28 14:07:23 340
原创 BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the Applic
BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext,我出现的这个问题是出在applicationContext.xml配置文件中,具体的出现错误的原因我不知道,不过我下面的这样的做法他就会出错:
2017-02-27 14:05:11 222
原创 ognl.SimpleNode.isSequence(Lognl/OgnlContext;)Z
这个问题出现是因为ognl的jar包出现了问题,也许你在项目中有ognl的jar包,但是也许并不是你需要的。解决方法:比如说我使用的struts2是这个版本:struts-2.3.24.3。在解压后的文件夹中lib下,就有我需要得ognl的jar包,ognl-3.0.6.1.jar。不同的版本struts2需要的ognl不一样,你去你的文件夹下查找,把它放到项目里面就好了。
2017-02-23 15:43:09 2300
原创 There is no result type defined for type 'json' mapped with name 'success'.
出现这种错误的原因有两种可能:1.所需要的jar包你忘记导入了,在struts2中,如果你需要使用json结果类型,你需要导入struts2-json-plugin-2.3.24.3以及json-lib-2.3-jdk15两个包。2.json的结果类型的问题:我看网上大部分的解决方法是在pakage 中扩展json-default,代码是这样子的:name="default"
2017-02-21 10:20:44 1948
原创 org.hibernate.MappingException: must specify an identifier type:
出现这个问题的原因是由于在hbm.xml配置文件中,id缺少name属性导致的,我的出现错误的配置文件部分代码如下: 由于在id中,没有配置name,所以就报错了。添加上name=“oid”之后,问题解决。
2017-02-14 19:55:40 1186
原创 The JSP specification requires that an attribute name is preceded by whitespace
这个问题出现在提示的页面中,是由于缺少一个空格导致的:The JSP specification requires that an attribute name is preceded by whitespace,通过提示的错误信息,我们可以确定是哪一行出现了错误,比如我的这个错误信息:org.apache.jasper.JasperException: /WEB-INF/html/r
2017-01-19 12:21:34 298
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人