aspose file tools*
The moose likes Struts and the fly likes Struts2JQuery plugin problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2JQuery plugin problem" Watch "Struts2JQuery plugin problem" New topic
Author

Struts2JQuery plugin problem

rajiv shrestha
Ranch Hand

Joined: Aug 25, 2010
Posts: 30
i am facing problem with Struts2JQuery plugin.
in my index page i did something like below



But after adding <sj:head>, it is giving error regarding "FreeMarker template error!"

FreeMarker template error!

Error on line 101, column 6 in template/jquery/head.ftl
Expecting a boolean (true/false) expression here
Expression parameters.debug?default(false) does not evaluate to true/false
it is an instance of freemarker.ext.beans.StringModel
The problematic instruction:
----------
==> if parameters.debug?default(false) [on line 101, column 1 in template/jquery/head.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.NonBooleanException: Error on line 101, column 6 in template/jquery/head.ftl
Expecting a boolean (true/false) expression here
Expression parameters.debug?default(false) does not evaluate to true/false
it is an instance of freemarker.ext.beans.StringModel
at freemarker.core.Expression.isTrue(Expression.java:150)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:232)
at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:168)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530)
at org.apache.struts2.components.UIBean.end(UIBean.java:484)
at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
at org.apache.jsp.index_jsp._jspx_meth_sj_005fhead_005f0(index_jsp.java:98)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
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.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)
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:128)
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:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
index page




At last, it is printing "index page".

How do i get rid of this error??
I have included jar files:
commons-logging
freemaker
ognl
strut2-core
struts2-jquery-grid-plugin
struts2-jquery-plugin
xwork



Johannes Geppert
Ranch Hand

Joined: Jan 12, 2010
Posts: 67
which plugin version do you use?


My Java and Webprogramming Blog
rajiv shrestha
Ranch Hand

Joined: Aug 25, 2010
Posts: 30
i have used plugins as


struts2-jquery-plugin-2.5.0.jar
struts2-jquery-grid-plugin-2.5.0.jar


I want to do some projects implementing grid but i am unable to address the error.
When i kept <sj:head/> in head section, it gives error (FreeMarker template error).
rajiv shrestha
Ranch Hand

Joined: Aug 25, 2010
Posts: 30
i went through this site.
webpage

It has mentioned to use only Struts2 2.1.x or higher. With respect to that i used struts2 2.1.6. But still struts2 jquery plugin not working.
I need some assist.

Looking for help . Thank you
rajiv shrestha
Ranch Hand

Joined: Aug 25, 2010
Posts: 30
With struts 2.1.6 and struts2-jquery 2.5.0 , it gave error as

HTTP Status 404 -

--------------------------------------------------------------------------------

type Status report

message

description The requested resource () is not available.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.20





Dec 31, 2010 9:48:53 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: Lcom/opensymphony/xwork2/util/logging/Logger;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:168)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.logging.Logger
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
... 22 more
Dec 31, 2010 9:48:53 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Dec 31, 2010 9:48:53 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/StrutsJqueryplugin] startup failed due to previous errors
Dec 31, 2010 9:48:53 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8082
Dec 31, 2010 9:48:53 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8010
Dec 31, 2010 9:48:53 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
Dec 31, 2010 9:48:53 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2669 ms
Johannes Geppert
Ranch Hand

Joined: Jan 12, 2010
Posts: 67
this error has nothing to do with the struts2 jquery plugin.
read the stacktrace. the xwork.jar is missing.

Johannes
rajiv shrestha
Ranch Hand

Joined: Aug 25, 2010
Posts: 30
thnx Johannes. solved the problem
 
 
subject: Struts2JQuery plugin problem