- 浏览: 280408 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (251)
- 面试基础 (9)
- java基础 (40)
- 调试配置 (10)
- 转载文章 (4)
- 心灵鸡汤 (8)
- java工具 (6)
- CSS学习 (7)
- css案例 (2)
- 经济 (1)
- 小节惹的祸 (1)
- 实例心得 (21)
- 数据库 (7)
- 有用的代码 (17)
- Struts (3)
- Hibernate (5)
- Spring (3)
- java xml (7)
- Java Reflection API (1)
- 网络配置 (4)
- SSH (8)
- java开源框架 (13)
- ajax (4)
- swing (1)
- 设计模式 (1)
- 未主流组件 (7)
- WebService (6)
- 20111019 (1)
- xiao清讲课笔笔~~~UML (0)
- 笔记 (2)
- SOAP (9)
- 第一天遇到的问题 (1)
- Java Card (3)
- 面试 (18)
- Java (17)
- JNLP 集群 (0)
- java 面试 (3)
最新评论
-
ap0406708:
138XXXXXXXX
webserivce spring-ws 安全 -
yezhuzhe:
...
[code]SSH上传下载 ------温故知新 -
thinking_ou:
怎么需要解压密码
webserivce spring-ws 安全 -
ap0406708:
uuu999ggg 写道连return都写错了
try catch finally 块 与 函数的return -
wst0350:
...
java正则表达式,js正则表达式
1.
[ERROR] 2009-09-01 19:30:11 org.hibernate.proxy.BasicLazyInitializer - CGLIB Enhancement failed: com.zhao.model.User
net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
原因:
映射文件无
<hibernate-mapping>
<class name="com.zhao.model.User" table="user" catalog="guestbook" lazy="false">
中的lazy="false"
2.
javax.servlet.ServletException: ids for this class must be manually assigned before calling save(): com.zhao.model.User; nested exception is org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.zhao.model.User
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
原因:id属性设成了 <property ~~~
要设成生成器的~~~
<id name="id" type="string" unsaved-value="null">
<column name="id" sql-type="char(32)" />
<generator class="uuid.hex"/>
</id>
3.
javax.servlet.ServletException: Request[/userLogin] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:222)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:256)
原因:是动态的action的form.jsp无method去指定方法
4.
javax.servlet.ServletException: Admin is not mapped. [from Admin where username=? and password=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: Admin is not mapped. [from Admin where username=? and password=?]
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
原因:admin的hbm.xml未加入到配置中
5.
javax.servlet.ServletException: The given object has a null identifier:
org.springframework.dao.InvalidDataAccessApiUsageException: The given objec
原因:添加记录是应该用save(),而用了update()修改就会出现这个错误~~
6.
【错误】 This absolute uri http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application
原因:只是jstl相关的两个包无放入去lib~~~
7.
username: ${item.username} 时间:${item.datetime} 主题:${item.title}
内容:${item.content}
email: ${item.email} homepage: ${item.homepage}
el表达式不显示
这并不与你的 EL 表达式相关,而是你的 JSTL 版本的问题。
解决方法有2个
1、将 <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
更改为
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
2、使用JSTL的备用库,
将 <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
更改为
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
或
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core_rt"%>
几种换下试一下
8.
[ERROR] 2009-09-02 10:29:08 org.apache.struts.actions.DispatchAction - Request[/guestbook] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
[ERROR] 2009-09-02 10:29:08 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/guestbook2].[action] - Servlet.service() for servlet action threw exception
javax.servlet.ServletException: Request[/guestbook] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
at org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:222)
http://127.0.0.1:8080/guestbook2/guestbook.do?userView 这样去调用
http://127.0.0.1:8080/guestbook2/guestbook.do?method=userView 应该这样
9.
<c:out value="${sessionScope['user.username']}"/>
会打印出 ap0406708
而单单是 ${sessionScope['user.username']} 就不能打印出ap0406708
记得在jsp中可打印出的
是加了struts标签的问题?????????????????????
10.
Attribute value request.getParameter("id") is quoted with " which must be escaped when used within the value
<%@ page import =java.xxx.*; %>
java.xxx没有用"";上面是错误的写法.如下是正确的写法:
<%@ page import ="java.sql.*"; %>
xxx.jsp(X,Y) quote symbol expected 问题
当 <%@taglib prefix="s" uri=/struts-tags" %>这样写时会报一个quote symbol expected 异常。
这的问题主要是少写一个冒号了"”"
正确写法是:<%@taglib prefix="s" uri="/struts-tags" %>
注意第一个指令是没有写“的
引号出现的问题~~~这太烦了
11.
java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
原因:无发现类~~~多数是包无加入~~
12.
org.apache.jasper.JasperException: /index.jsp(31,0) Unterminated <c:url tag
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
<a href="<c:url value="/form/adminLogin.jsp" />" >管理员登录</a><br/>
写成了
<a href="<c:url value="/form/adminLogin.jsp" >" >管理员登录</a><br/>
这样就会报错,标签无闭口。
13.
[ERROR] 2009-09-03 09:53:43 org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
Caused by:
java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1880)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.hibernate.mapping.Table.<init>(Table.java:33)
at org.hibernate.cfg.Mappings.addTable(Mappings.java:165)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:299)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:656)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
[ERROR] 2009-09-03 09:53:43 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/guestbook2] - Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
Caused by:
java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1880)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.hibernate.mapping.Table.<init>(Table.java:33)
at org.hibernate.cfg.Mappings.addTable(Mappings.java:165)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:299)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:656)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
原因:主要是commons-collections.jar包冲突
这里是因为把commons-collections.jar拉到了lib,直接删除lib中的commons-collections.jar(因为之前加入到lib中)就OK了
14.
数据库库添加时乱码~~~~
加了fitter,还是乱码,之后用System加到相关的处理方法中去看,发现是入数据库时乱码~~~
忘了为mysql的连接设编码方式~~~
<property name="url">
<value>jdbc:mysql://127.0.0.1:3306/guestbook?characterEncoding=UTF-8&useUnicode=true</value>
</property>
15.
java.lang.NoSuchMethodException: com.zhao.action.GuestbookAction.guestView(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
at java.lang.Class.getMethod(Unknown Source)
原因:动态action中无方法 guestView
16.
String viewType=request.getParameter("viewType");
System.out.println(viewType);
System.out.println(viewType=="guestView");
System.out.println(viewType.equals("guestView"));
guestView
false
true
老问题了,字符串比较
[ERROR] 2009-09-01 19:30:11 org.hibernate.proxy.BasicLazyInitializer - CGLIB Enhancement failed: com.zhao.model.User
net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
原因:
映射文件无
<hibernate-mapping>
<class name="com.zhao.model.User" table="user" catalog="guestbook" lazy="false">
中的lazy="false"
2.
javax.servlet.ServletException: ids for this class must be manually assigned before calling save(): com.zhao.model.User; nested exception is org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.zhao.model.User
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
原因:id属性设成了 <property ~~~
要设成生成器的~~~
<id name="id" type="string" unsaved-value="null">
<column name="id" sql-type="char(32)" />
<generator class="uuid.hex"/>
</id>
3.
javax.servlet.ServletException: Request[/userLogin] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:222)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:256)
原因:是动态的action的form.jsp无method去指定方法
4.
javax.servlet.ServletException: Admin is not mapped. [from Admin where username=? and password=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: Admin is not mapped. [from Admin where username=? and password=?]
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
原因:admin的hbm.xml未加入到配置中
5.
javax.servlet.ServletException: The given object has a null identifier:
org.springframework.dao.InvalidDataAccessApiUsageException: The given objec
原因:添加记录是应该用save(),而用了update()修改就会出现这个错误~~
6.
【错误】 This absolute uri http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application
原因:只是jstl相关的两个包无放入去lib~~~
7.
username: ${item.username} 时间:${item.datetime} 主题:${item.title}
内容:${item.content}
email: ${item.email} homepage: ${item.homepage}
el表达式不显示
这并不与你的 EL 表达式相关,而是你的 JSTL 版本的问题。
解决方法有2个
1、将 <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
更改为
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
2、使用JSTL的备用库,
将 <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
更改为
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
或
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core_rt"%>
几种换下试一下
8.
[ERROR] 2009-09-02 10:29:08 org.apache.struts.actions.DispatchAction - Request[/guestbook] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
[ERROR] 2009-09-02 10:29:08 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/guestbook2].[action] - Servlet.service() for servlet action threw exception
javax.servlet.ServletException: Request[/guestbook] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
at org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:222)
http://127.0.0.1:8080/guestbook2/guestbook.do?userView 这样去调用
http://127.0.0.1:8080/guestbook2/guestbook.do?method=userView 应该这样
9.
<c:out value="${sessionScope['user.username']}"/>
会打印出 ap0406708
而单单是 ${sessionScope['user.username']} 就不能打印出ap0406708
记得在jsp中可打印出的
是加了struts标签的问题?????????????????????
10.
Attribute value request.getParameter("id") is quoted with " which must be escaped when used within the value
<%@ page import =java.xxx.*; %>
java.xxx没有用"";上面是错误的写法.如下是正确的写法:
<%@ page import ="java.sql.*"; %>
xxx.jsp(X,Y) quote symbol expected 问题
当 <%@taglib prefix="s" uri=/struts-tags" %>这样写时会报一个quote symbol expected 异常。
这的问题主要是少写一个冒号了"”"
正确写法是:<%@taglib prefix="s" uri="/struts-tags" %>
注意第一个指令是没有写“的
引号出现的问题~~~这太烦了
11.
java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
原因:无发现类~~~多数是包无加入~~
12.
org.apache.jasper.JasperException: /index.jsp(31,0) Unterminated <c:url tag
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
<a href="<c:url value="/form/adminLogin.jsp" />" >管理员登录</a><br/>
写成了
<a href="<c:url value="/form/adminLogin.jsp" >" >管理员登录</a><br/>
这样就会报错,标签无闭口。
13.
[ERROR] 2009-09-03 09:53:43 org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
Caused by:
java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1880)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.hibernate.mapping.Table.<init>(Table.java:33)
at org.hibernate.cfg.Mappings.addTable(Mappings.java:165)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:299)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:656)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
[ERROR] 2009-09-03 09:53:43 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/guestbook2] - Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
Caused by:
java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1880)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.hibernate.mapping.Table.<init>(Table.java:33)
at org.hibernate.cfg.Mappings.addTable(Mappings.java:165)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:299)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:656)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
原因:主要是commons-collections.jar包冲突
这里是因为把commons-collections.jar拉到了lib,直接删除lib中的commons-collections.jar(因为之前加入到lib中)就OK了
14.
数据库库添加时乱码~~~~
加了fitter,还是乱码,之后用System加到相关的处理方法中去看,发现是入数据库时乱码~~~
忘了为mysql的连接设编码方式~~~
<property name="url">
<value>jdbc:mysql://127.0.0.1:3306/guestbook?characterEncoding=UTF-8&useUnicode=true</value>
</property>
15.
java.lang.NoSuchMethodException: com.zhao.action.GuestbookAction.guestView(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
at java.lang.Class.getMethod(Unknown Source)
原因:动态action中无方法 guestView
16.
String viewType=request.getParameter("viewType");
System.out.println(viewType);
System.out.println(viewType=="guestView");
System.out.println(viewType.equals("guestView"));
guestView
false
true
老问题了,字符串比较
发表评论
-
IOException while loading persisted sessions: java.io.EOFException
2010-06-11 09:43 745Tapestry @Persist 引起的 删除tomca ... -
[code]el表达式不运作
2009-12-02 16:46 784tomcat5.5默认是关el要用下面的句 <%@pag ... -
[download]oracle9i占用8080端口使tomcat不能启动,myeclipse控制台不显示tomcat信息
2009-11-18 11:10 12001.改tomcat的端口 2.在MyEclipse菜单中wi ... -
面试的guestbook遇到的问题(jsp+servlet+mysql+js验证)
2009-09-04 16:00 22521. java.sql.SQLException: Colum ... -
[download]第一个SSH的guestbook遇到的问题多多 (1)springaop2.0,2.5
2009-09-04 15:45 71241. HTTP Status 500 - --------- ... -
jsp不能显示图片,CSS
2009-07-29 10:15 1244通过 <img src=/file/name.jpg&g ... -
jsp用include包含的文件不能直接显示中文
2009-07-29 09:42 1165<%@ page contentType=&qu ... -
解决eclipse编辑时文件不能保存中文的问题
2009-07-29 09:05 1257Reason: Some characters can ... -
配置tomcat5.5 jndi
2009-04-06 15:09 1746准备工作: 安装tomcat5.5(注意这点) 安装mysql ...
相关推荐
综上所述,SSH2网上留言系统是一个融合了Struts2、Spring3.1和Hibernate3.2的Java Web应用,利用MySQL数据库存储数据,实现了用户互动留言的功能。它展示了Java开发中的MVC架构、ORM技术以及依赖注入等核心概念,是...
标题 "一个不错的JAVA guestbook" 暗示我们正在探讨一个用Java编程语言实现的简易留言簿应用。这个应用可能包含用户交互、数据存储以及服务器端处理等功能。描述中的 "一个不错的JAVA guestbook" 重复了标题信息,...
Java Guestbook 是一个基于 Java 语言开发的简单留言板应用,它提供了一个用户交互的界面,允许访客留下他们的信息并查看其他人的留言。这个源码实例对于初学者来说是一个很好的学习资源,因为它涵盖了基本的 Web ...
这个“SSH框架留言本”项目是一个基于这些技术的简单应用实例,旨在帮助初学者理解如何在实际开发中整合和运用这些框架。下面我们将深入探讨SSH框架的核心组件及其在该项目中的应用。 首先,Struts2是MVC(Model-...
2. `comments`:如果需要用户回复留言,可设立一个评论表格,结构类似,但增加`parent_id`字段,关联原留言的`id`。 四、开发语言与技术栈 1. 前端:HTML用于构建页面结构,CSS负责样式布局,JavaScript处理表单...
在这里,可能有一个名为`guestbook`的数据库,其中包含一个或多个表格来存储用户信息和留言内容。例如,一个`comments`表可能有`id`(主键,自动增长)、`name`(用户名)、`email`(用户邮箱)、`message`(留言...
"guestbook1.zip"这个压缩包文件,从其名字来看,可能是一个包含了“客册”或“留言簿”数据的集合。在信息技术领域,这样的文件往往用于存储用户在网站、论坛或特定应用程序中的留言、反馈或交互记录。在"guestbook...
在网页设计与开发中,一个简单的“guestbook”(留言板)系统是初学者和专业人士都会遇到的基础项目。它主要用于访客在网站上留下他们的评论、建议或反馈,无需注册即可直接使用,极大地提高了网站的互动性。标题中...
1. **创建数据库表**:根据提供的SQL脚本,创建了admin、book、category、guestbook和product五个表,用于存储不同类型的业务数据。 2. **配置SSH框架**:在项目中集成Struts2、Spring和Hibernate的配置文件,包括...
于是一时兴起写了这个留言本的小示例。数据库操作采用的NHibernate,UI直接用的 ASP.NET Mvc了。项目基于VS2010 + SQLServer 2005 ,就一个表的增删改查操作很简单。目的是为了体验下Unity的Ioc功能。 项目只是...
SSH,全称Spring、Struts、Hibernate,是中国Java Web开发领域广泛应用的一种技术栈,它整合了Spring、Struts和Hibernate这三个强大的开源框架,为开发者提供了一种高效、灵活且功能丰富的构建企业级Web应用的解决...
Struts2_Guestbook是一个基于Struts2框架的实践示例,主要用于展示和学习Struts2框架的基础用法和核心特性。在这个项目中,我们可以通过实际操作来理解Struts2如何处理用户请求、如何实现视图与控制层的解耦,以及...
1. 在MyEclipse中创建一个基于J2EE 5.0标准的新Web项目,命名为`guestbook2`。 2. 新建`lib`文件夹,后续将用于存放项目所需的JAR包。 ##### 第二步:添加Hibernate支持 1. 集成Hibernate 3.1核心库至`lib`文件夹,...
- 新建一个Java EE 5.0的Web项目,例如名为`guestbook2`。 - 在项目中创建一个名为`lib`的文件夹,用于存放SSH相关的JAR包。 **3. 数据库配置** - 使用Hibernate视图创建数据库配置,指定JDBC驱动的位置(例如Class...
《HyperBook Guestbook 汉化版》是一款适用于IT行业的开源留言本系统,它已经被精心地翻译成中文,便于国内用户使用。这个系统基于Web技术,可以为网站提供一个互动的平台,让访客能够留下他们的反馈、建议或交流...
虽然“Ex-guestbook.rar”是一个基础版本,但GuestBook可以扩展许多功能: 1. 验证码:为了防止机器人自动灌水,可以添加验证码功能,要求用户输入图片上的字符或数字。 2. 时间戳:为每条留言记录添加时间戳,...
在本文档中,作者通过一个实际的项目案例,详述了如何使用SSH(Struts、Spring、Hibernate)框架集成开发一个简单的Web应用。这个应用的主要功能是向数据库中插入数据,以此来熟悉这三个框架的结合使用。以下是按照...
【标题】"guestbook jsp源代码"涉及的是一个基于JSP技术的简易留言板系统,其后端数据库选择了Oracle。这个系统旨在实现用户与网站之间的交互,允许访客留下他们的信息,提供了一个基本的在线交流平台。 【描述】中...
1. fileinfo.txt:这通常是一个文本文件,可能包含了关于压缩包内所有文件的元信息,如文件大小、创建日期等,用于记录和了解文件的基本情况。 2. 6fbe74790cc9fe1ecd51df0d4ddd5916.txt、fc7c090db934bc2577d56b7b...
标题中的"guestbook_1vvefq_guestbook_1vvefq_GuestBook_"似乎是一个以"guestbook"为关键元素的项目或应用的标识符,可能是为了区分不同的GuestBook实例。描述提到这是一个"php源码实现"的查询工具,意味着它是一个...