`
zz563143188
  • 浏览: 2275956 次
  • 性别: Icon_minigender_1
  • 来自: 珠海
博客专栏
77fc734c-2f95-3224-beca-6b8da12debc8
编程工具介绍
浏览量:578897
D9710da2-8a00-3ae6-a084-547a11afab81
Spring Mvc实战(...
浏览量:1087985
D3f88135-07de-3968-a0f0-d2f13428c267
项目开发经验
浏览量:1657596
社区版块
存档分类
最新评论

Spring mvc+hibernate+freemarker(实战)

阅读更多

   今天我为大家做了一个 spring3 MVC 的例子,希望能对刚接触spring的朋友有所帮助。该流程属于大型项目的流程,涉及的知识比较希望大家耐心学习。 

项目开发流程详解:http://zz563143188.iteye.com/blog/1825168

比特币,区块链白皮书,python,java,oracle,mysql,Spring,Hibernate开发资料下载地址:网盘登录后查看下载   https://pan.baidu.com/share/home?uk=4076915866&suk=r9XiePUxwkUzXtmENt00Sw&view=share#category/type=0
 github查看项目地址  :  https://github.com/zl19861124/codeFactory   
以下是相关资料连接:

1.本工程内容较多,可能需要设计编译目录:                  http://zz563143188.iteye.com/blog/1826517
2.调试网页建议页面调试工具firebug                               http://zz563143188.iteye.com/blog/1825978
3.可以使用Spring mvc 单元测试                                      http://zz563143188.iteye.com/blog/1827454
4.Spring mvc整合hibernate                                             http://zz563143188.iteye.com/blog/1831561
5.日志log4j配置springMvc例子                                        http://zz563143188.iteye.com/blog/1825387        
6.由于webroot下面的内容很多,设置不编译和验证         http://zz563143188.iteye.com/blog/1826517

7. 根据jar生成源码工具                                                    http://zz563143188.iteye.com/blog/1826988   
8.java常用环境变量设置                                                   http://zz563143188.iteye.com/blog/1827884

9.比较全的OA系统功能模块列表                                      http://zz563143188.iteye.com/blog/1860248
10.需求文档管理工具                                                        http://zz563143188.iteye.com/blog/1830393
11.PowerDesinger逆向数据库物理模型及关系图               http://zz563143188.iteye.com/blog/1829068
12.发散性思维工具(思维导图)推荐                                    http://zz563143188.iteye.com/blog/1831562
13.推荐一款好用的笔记管理软件(Evernote)                      http://zz563143188.iteye.com/blog/1830965
14.数据库生成数据字典工具(PDMREAD)图解                    http://zz563143188.iteye.com/blog/1828557
15.代码生动生成工具(POJO,DAO,Service,action)等层代码http://zz563143188.iteye.com/blog/1819765

16.spring3,struts2,hibernate,junit,设计模式视频教程下载 http://zz563143188.iteye.com/blog/1839517

17.UML 的九种模型图                                                       http://zz563143188.iteye.com/blog/1841234

                                                                                         http://zz563143188.iteye.com/blog/1841225

18.Oracle笔记 五、创建表、约束、视图、索引、序列、同义词、表空间

                                                                                        http://zz563143188.iteye.com/blog/1841239

19.Java面试宝典2013版                                                  http://zz563143188.iteye.com/blog/1843725

20.Java技术体系图(从程序员到CTO各阶段技                http://zz563143188.iteye.com/blog/1877266  

21.百万级访问网站前期的技术准备                                 http://zz563143188.iteye.com/blog/1842135

22.关于一个大型web系统架构设计和技术选型的讨论      http://zz563143188.iteye.com/blog/1842128

23.高性能网站性能优化与系统架构                                 http://zz563143188.iteye.com/blog/1842129

24.java23种模式详解 (带源码有图)                                 http://zz563143188.iteye.com/blog/1847029

25.软件开发文档范例                                                      http://zz563143188.iteye.com/blog/1835305

26.软件开发模式对比(瀑布、迭代、螺旋、敏捷)             http://zz563143188.iteye.com/blog/1843691

27.我心目中最好的框架组合                                       http://zz563143188.iteye.com/blog/1867767

28. 全国(大学)高等教育各学科视频教学全集                  http://zz563143188.iteye.com/blog/1823042         

 更多高级应用(项目构架、工程、文档、研发管理)          http://zz563143188.iteye.com/

 

 

      本人只是将www.jeecms.com进行改变。目的是为了让大家更加了解jeecms,这样可以让大家学习。

长虽然我工作很忙没有闲暇时间,但我还是愿意抽时间分享优秀的项目给大家学习。

 

 架构分层图解:

     1.后台工程 包命名规则以com.jeecms.cms.(分为以下图层),项目架构entity,dao,mng,action,html等结构如下图所示。

 

    

 

 2.上图结构图在项目分布图如下。

    

 

3.数据库映射文件,下面有对象处在的包层及对象对应的数据库表。

 

 

4.java bean配置在entity包下面,Base包下面都是直接与数据表关联的对象。在这里创建字段属性及对象对应的xml映射的表字段属性的get,set方法。

 

 

5.我采用的spring mvc实现action,dao,manager依赖注入方法,所以需要将实现类在spring的配置文件中加载,统一首字母小写方式命名。

 

 

6.Dao在spring文件中

 

 

7.业务层的具体实现通过spring的注解实现,事务也交给spring(有网友建议readonly开关设置)

 

 

8.action控制层是业务层与视图层的桥梁,这里需要申明业务层接口,当然spring已经按类型注解。

 

 

9.资源文件是支持国际化的重要文件,这个也需要在springmvc中指定。

 

 

10.html的命名统一,上一次目录都是按照表名来定义。

 

  

开发流程详细介绍:

 

 1.web.xml文件是工程运行的起点,需要在这里配置好所有的配置信息。引导页、spring、log4j,struts、hibernate、过滤器,监听、等等都是在这里配置好。

 

 

2.jeecms工程的访问目录及访问路径在web.xml中的配置

 

  

3.资源文件配置,资源文件的key命名规则用(对象.功能.信息) 

 

 

4.数据库连接文件jdbc.propertiy的配置同spring放置在同一个目录下面。

如果是单元就在classpath:config下面,如果是web.xml加载则在web-inf/config下面

 

 

5.spring加载数据库jdbc文件,通过通配符来读出.properity文件的修正。 如果是单元就在classpath:config下面,如果是web.xml加载则在web-inf/config下面

 

   

6.jeecms自定义标签在spring中初始化,这些标签通过java实现。

 

 

 7.springmvc在控制层返回的路径设置,jeecms_sys是action默认返回的目录。如果文件不在这个目录则无法找到相应的文件,并且配置了只能匹配.html文件。

 

 

8.定义springmvc的view目录及登陆地址。

 

 

9.在spring中配置好资源文件,使spring mvc在html文件能够读到资源文件信息。

 

 

10.配置数据库hibernate的xml文件hbm.xml文件

 

  

11.java对象与hbm.xml文件交换对象的bean对象创建。

 

 

12.DAO层配置,这是直接与数据库找交道的层。

 

 

13.业务层(service)对象配置,也就是常说的上通DAO层下达控制层的中间层 

 

 

14.控制层也就是action层,是业务层与view层的桥梁

 

 

15.在spring文件中配置dao、service对象形成单例,以便在服务器启动的时候加载 。

 

   

16.到这里通过单元测试类test类测试业务层与数据的操作,需要添加junit4到工程中。https://github.com/zl19861124/jeecms/blob/master/src/com/jeecms/cms/test/test.java

 

 

17.好了到现在为止,springmvc业务代码就OK了。接下来开发html文件(数据显示用标签实现)。

 

 

18.编辑界面代码通过freemarker来实现。

 

 

 

19.到这里代码从数据库表到业务层到视图层的代码就完成了,接下来我们codeFactory发布到tomcat中去tomcat用户名是admin密码admin)

 

20.项目发布成功后访问地址 http://127.0.0.1:8088/codeFactory/jeeadmin/jeecms/index.do

 

 

 

21.登陆成功后进入后台界面:强大的后台管理系统不需要一行代码就完成了。到这里一步相信很多人已经糊涂了,这个流程太复杂了

 

 

22. 强大的功能制定,可以任由你选择。

 

 

23.当这一步项目就演示结束了,欢迎大家学习,严禁商用(消化理解jeecms后改进的,只希望更多人了解cms)。

 

 

24、感谢 www.jeecms.com提供了如何优秀的开源项目,以后还会推出权限、流程审批、maven、svn、代码自动生成(从建表到业务层代码界面显示,不需要写一行代码就自动实现)。

44
3
分享到:
评论
75 楼 ceekay_ 2016-11-02  
维Duke 写道
博主,新手,部署配置了运行出现了点问题,希望能指点一二,谢谢您!
严重: Servlet.service() for servlet JeeCmsAdmin threw exception

Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
The problematic instruction:
---

我遇到和你一样的问题,你解决了吗?

同这里出问题,又找不到源文件怎么解决~~~
74 楼 ceekay_ 2016-11-02  
部署了一天环境还是各种异常,伐开心!!!
73 楼 摸爬滚打NO1 2015-05-11  
大哥 写的真不赖啊,去你QQ空间转了转, 真的是大神一枚。多多向楼主学习
72 楼 u011557223 2014-04-17  
楼主,麻烦问一下,jeecms中的session怎么用,我在页面上取不到session的值?楼主一定要看到,看到一定要回复啊,阿门……
71 楼 ldpwxf 2014-03-07  
维Duke 写道
博主,新手,部署配置了运行出现了点问题,希望能指点一二,谢谢您!
严重: Servlet.service() for servlet JeeCmsAdmin threw exception

Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
The problematic instruction:
----------
==> ${root!} [on line 34, column 57 in jeecms_sys/channel/list.html]
----------

Java backtrace for programmers:
----------
freemarker.core.NonStringException: Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
at freemarker.core.Expression.getStringValue(Expression.java:126)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233)
at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jeecms.common.web.ProcessTimeFilter.doFilter(ProcessTimeFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
at java.lang.Thread.run(Thread.java:619)
[framework] 2013-10-11 14:41:51,077 -224283 [http-8080-4] ERROR freemarker.runtime  - Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence

Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
The problematic instruction:
----------
==> ${root!} [on line 34, column 57 in jeecms_sys/channel/list.html]
----------

Java backtrace for programmers:
----------
freemarker.core.NonStringException: Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
at freemarker.core.Expression.getStringValue(Expression.java:126)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233)
at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jeecms.common.web.ProcessTimeFilter.doFilter(ProcessTimeFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
at java.lang.Thread.run(Thread.java:619)
2013-10-11 14:44:05 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet JeeCmsAdmin threw exception

Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
The problematic instruction:
----------
==> ${root!} [on line 34, column 57 in jeecms_sys/channel/list.html]
----------


我遇到和你一样的问题,你解决了吗?
70 楼 维Duke 2013-10-11  
博主,新手,部署配置了运行出现了点问题,希望能指点一二,谢谢您!
严重: Servlet.service() for servlet JeeCmsAdmin threw exception

Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
The problematic instruction:
----------
==> ${root!} [on line 34, column 57 in jeecms_sys/channel/list.html]
----------

Java backtrace for programmers:
----------
freemarker.core.NonStringException: Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
at freemarker.core.Expression.getStringValue(Expression.java:126)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233)
at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jeecms.common.web.ProcessTimeFilter.doFilter(ProcessTimeFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
at java.lang.Thread.run(Thread.java:619)
[framework] 2013-10-11 14:41:51,077 -224283 [http-8080-4] ERROR freemarker.runtime  - Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence

Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
The problematic instruction:
----------
==> ${root!} [on line 34, column 57 in jeecms_sys/channel/list.html]
----------

Java backtrace for programmers:
----------
freemarker.core.NonStringException: Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
at freemarker.core.Expression.getStringValue(Expression.java:126)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283)
at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233)
at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jeecms.common.web.ProcessTimeFilter.doFilter(ProcessTimeFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
at java.lang.Thread.run(Thread.java:619)
2013-10-11 14:44:05 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet JeeCmsAdmin threw exception

Error on line 34, column 59 in jeecms_sys/channel/list.html
Expecting a string, date or number here, Expression root! is instead a freemarker.template.SimpleSequence
The problematic instruction:
----------
==> ${root!} [on line 34, column 57 in jeecms_sys/channel/list.html]
----------
69 楼 mazhimazh 2013-09-25  
非常不错的东西
68 楼 todoloop 2013-08-26  
伟人,感谢      
67 楼 w156445045 2013-08-16  
博主每篇文章 一大堆链接,看起来眼花缭乱
瞬间凌乱了。。。
建议博主分开
66 楼 钢镚cuicheng 2013-08-14  
楼主大哥,有源码能提供一份吗,谢谢你提供这么好的学习文档,cuicheng@139.com如果方便提供一份源码学习一下
65 楼 saviorzuo 2013-08-09  
有没有详细点的文档
还有项目中response.setCharacterEncoding("UTF-8");这个方法报错,应该不同包引起的
64 楼 zz563143188 2013-07-05  
hu401348817 写道
楼主您好!
请教一个问题:
后台-配置-全局设置-部署路径里面写上工程名;这样首页以及其他页面中的样式都是有了,但是具体图片,还是没有显示,需要一个一个前面加工程名。这个修改太麻烦了,有没有快速的方法?

你要改xml文件,在里面有配置。如果html路径就用notepad打开所有htm文件,一次替换所有文件。
63 楼 hu401348817 2013-07-05  
楼主您好!
请教一个问题:
后台-配置-全局设置-部署路径里面写上工程名;这样首页以及其他页面中的样式都是有了,但是具体图片,还是没有显示,需要一个一个前面加工程名。这个修改太麻烦了,有没有快速的方法?
62 楼 zz563143188 2013-06-11  
收集五年的开发资料及源码下载地址:  http://pan.baidu.com/share/link?shareid=3739316113&uk=4076915866#dir/path=%2Fstudy
源码请下载codeFactory20130321,lib20130321文件,
youda520 写道
怎么下载,谢谢。

收集五年的开发资料及源码下载地址:  http://pan.baidu.com/share/link?shareid=3739316113&uk=4076915866#dir/path=%2Fstudy
源码请下载codeFactory20130321,lib20130321文件,

61 楼 youda520 2013-06-11  
怎么下载,谢谢。
60 楼 zz563143188 2013-06-10  
diamondy 写道
楼主能提供一份源码吗,weisljl@foxmail.com,非常感谢

收集五年的开发资料及源码下载地址:  http://pan.baidu.com/share/link?shareid=3739316113&uk=4076915866#dir/path=%2Fstudy
源码请下载codeFactory20130321,lib20130321文件,
59 楼 diamondy 2013-06-09  
楼主能提供一份源码吗,weisljl@foxmail.com,非常感谢
58 楼 zz563143188 2013-06-06  
hua2011 写道
博主好强大,能发份jeecms详细资料给我吗,感谢!!463889198@qq.com

http://pan.baidu.com/share/link?shareid=3739316113&uk=4076915866#dir/path=%2Fstudy
请下载codeFactory20130321,lib20130321文件,
57 楼 hua2011 2013-06-06  
博主好强大,能发份jeecms详细资料给我吗,感谢!!463889198@qq.com
56 楼 zz563143188 2013-06-03  
jacky1982728 写道
首先非常感谢您的贡献,只是下载下来之后发现Jar包不全,项目老报错,请问能否给我发一份完整的Jar包

jacky1982728@163.com

因为是freemarker语法,那错误是可以正常运行的

相关推荐

    struts2+spring2.5+hibernate3.2 + freemarker 全新功能实现的增删改查+freemarker 摸版

    struts2+spring2.5+hibernate3.2 + freemarker 全新功能实现的增删改查+freemarker 摸版 struts2 的方式自己去看简单。 spring2.5 是用注释来注入 hibernate3.2 是用ejb3注解映射关系 hibernate3 +个属性可以自动...

    Spring mvc+hibernate+freemarker(开源项目)

    ### Spring MVC + Hibernate + FreeMarker 开源项目解析 #### 一、项目背景与技术栈介绍 本项目基于Spring MVC框架,结合Hibernate ORM工具以及FreeMarker模板引擎构建,旨在为初学者提供一个完整的Web应用程序...

    spring mvc + hibernate + freemarker开源项目源码下载.zip

    《Spring MVC + Hibernate + Freemarker 开源项目源码解析》 在现代Web开发中,Spring MVC、Hibernate和Freemarker是三个非常重要的技术组件,它们分别承担着不同的职责,共同构建了一个高效、灵活且可扩展的后端...

    spring4MVC+Hibernate4实例(增删改查)

    在本实例中,"spring4MVC+Hibernate4实例(增删改查)"是一个基于Maven构建的Java Web项目,旨在演示如何整合Spring MVC和Hibernate框架来实现数据的CRUD(创建、读取、更新和删除)操作。Spring MVC是Spring框架的...

    手动创建 SpringMvc +SpringDataJpa+Hibernate+ freemarker mavenProject+ 环境切换 webDemo

    总结来说,本项目是一个基础的Web开发框架,结合了SpringMVC的MVC设计模式、Spring Data JPA的数据访问层、Hibernate的ORM能力以及FreeMarker的模板引擎,同时还实现了环境配置的灵活切换,为开发高效、可维护的Web...

    idea工具创建的Spring+SpringMVC+Hibernate+maven项目

    通过学习这个项目,你可以了解如何设置IDE、配置项目结构、使用Maven管理依赖、编写Spring配置、设计Spring MVC控制器、集成Hibernate进行数据库操作等。在实际操作中,你可能还会接触到JDBC、模板引擎(如Thymeleaf...

    Struts2+Spring2.5+hibernate3.2+freemarker

    Struts2、Spring、Hibernate 和 FreeMarker 是Java Web开发中常用的四大框架,它们结合使用能够构建高效、可维护的企业级应用程序。以下是对这些技术及其整合的详细解释: **Struts2** 是一个基于MVC(Model-View-...

    springmvc+spring+hibernate

    Spring MVC、Spring 和 Hibernate 是Java Web开发中的三大主流框架,它们各司其职,共同构建了一个强大而灵活的后端架构。Spring MVC 负责处理HTTP请求并将其路由到相应的控制器,Spring 提供了依赖注入(DI)和面向...

    Spring + Hibernate + Spring mvc +Ajax 整合

    Spring、Hibernate、Spring MVC 和 Ajax 是四个在Java Web开发中广泛应用的技术框架,它们共同构建了一个高效、灵活且功能丰富的后端系统。以下是对这些技术及其整合应用的详细说明: Spring框架是一个全面的企业级...

    (Spring +Spring Mvc + Hibernate) 框架jar包

    SSH框架,全称为Spring、Spring MVC和Hibernate的组合,是Java Web开发中广泛使用的三大开源框架。它们分别负责不同层面的职责,共同构建了一个高效、灵活的开发环境。 Spring框架是核心,它提供了依赖注入...

    Spring4MVC+Hibernate4+Freemarker+Ehcache+EASYUI

    本项目整合了Spring4MVC、Hibernate4、Freemarker、Ehcache以及EasyUI,旨在提供一个强大的后端框架与美观的前端界面,同时优化性能。接下来,我们将详细讨论这些技术组件及其在项目中的作用。 **Spring4MVC**: ...

    SpringMVC3+Spring3+Hibernate3+Freemarker+HTML5的开源项目jeecms

    SpringMVC处理请求,Spring提供依赖注入和事务管理,Hibernate负责数据持久化,Freemarker生成动态页面,而HTML5则提升用户体验。这样的组合在企业级应用中非常常见,体现了现代Web开发的最佳实践。通过对...

    spring+spring mvc+hibernate开发工程财务管理辅助系统

    《基于Spring+Spring MVC+Hibernate的工程财务管理系统详解》 在现代企业中,高效、准确的财务管理是至关重要的。为了实现这一目标,开发者们通常会采用先进的技术框架来构建财务管理系统。本文将深入探讨如何利用...

    SpringMVC+Hibernate+Freemarker 干净的框架

    SpringMVC、Hibernate和Freemarker是Java Web开发中三个重要的技术组件,它们共同构建了一个高效、灵活且可维护的Web应用框架。SpringMVC作为Spring框架的一部分,负责处理HTTP请求和响应,提供模型-视图-控制器...

    maven+springmvc+spring+hibernate+freemarker

    maven管理项目+springmvc+spring+hibernate+freemarker 集成框架。其中注解格式清晰,hibernate进行了代码封装,对开发效率有了提高,对异常进行了封装。freemarker也有优化,参考common包下。对日期工具类有各种...

    spring mvc+hibernate

    Spring MVC 和 Hibernate 是两个在 Java Web 开发中广泛使用的开源框架。Spring MVC 是 Spring 框架的一部分,专门用于构建 Web 应用的模型-视图-控制器(MVC)架构,而 Hibernate 是一个对象关系映射(ORM)工具,...

    (Spring2.5+hibernate3.2)框架源码

    Spring 和 Hibernate 是两个非常重要的 Java 开发框架,它们在企业级应用开发中占据了核心地位。Spring 作为一个全面的后端应用程序框架,提供了依赖注入、面向切面编程、事务管理等功能,而 Hibernate 则是一个强大...

    struts2.1+spring2.5+hibernate3.3整合之第一步(spring2.5+hibernate3.3)

    Struts2.1、Spring2.5和Hibernate3.3是经典的Java企业级开发框架组合,它们各自在应用程序的不同层面提供了强大的支持。本篇将详细阐述这三个组件的整合过程,以及各自的核心特性。 首先,Struts2是一个基于MVC设计...

Global site tag (gtag.js) - Google Analytics