Hi after using struts 1.1 the migrate to 1.3 doesn't seem smooth ... Is there a different in how you insert a tile in a JSP between these versions of struts? <tiles:insert> gives an error on 1.3.8
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hi after using struts 1.1 the migrate to 1.3 doesn't seem smooth ... Is there a different in how you insert a tile in a JSP between these versions of struts? <tiles:insert> gives an error on 1.3.8
I removed the tld's since they longer needed in struts-1.3.8 but i get the following error
13:09:58,328 INFO [http-8082-Processor25] ComposableRequestProcessor:147 - Initializing composable request processor for module prefix '' 13:09:58,453 INFO [http-8082-Processor25] CreateAction:97 - Initialize action of type: com.deltaprofile.action.WelcomeAction 13:09:58,546 INFO [http-8082-Processor25] TilesPreProcessor:216 - Tiles process complete; forward to /jsp/main_pdelta.jsp 13:09:58,781 INFO [http-8082-Processor25] CreateAction:97 - Initialize action of type: com.deltaprofile.action.NavigationAction 13:10:00,375 WARN [http-8082-Processor25] AbstractExceptionHandler:95 - Unhandled exception org.apache.jasper.JasperException: /tiles/pdelta_navigation.jsp(12,3) According to TLD or attribute directive in tag file, attribute test does not accept any expressions at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:376) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150) at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:941) at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:696) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213) at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219) at org.apache.jasper.compiler.Node$Root.accept(Node.java:456) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Validator.validate(Validator.java:1475) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:214) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:461) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:442) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:430) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499) at org.apache.struts.chain.commands.servlet.PerformForward.handleAsInclude(PerformForward.java:141) at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:92) at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:610) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:604) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:129) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:152) at org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:764) at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:896) at org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:465) at org.apache.jsp.jsp.main_005fpdelta_jsp._jspx_meth_tiles_insert_0(main_005fpdelta_jsp.java:168) at org.apache.jsp.jsp.main_005fpdelta_jsp._jspx_meth_html_html_0(main_005fpdelta_jsp.java:98) at org.apache.jsp.jsp.main_005fpdelta_jsp._jspService(main_005fpdelta_jsp.java:63) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.struts.tiles.commands.TilesPreProcessor.doForward(TilesPreProcessor.java:260) at org.apache.struts.tiles.commands.TilesPreProcessor.execute(TilesPreProcessor.java:217) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Thread.java:595)
jsp
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> <table width="100%"> <tr> <td> <html:link action="welcome">HOME</html:link> <br /> <html:link action="searchposts">SEARCH</html:link> <br /> <c:if test="${print eq true}"> <html:link action="/quals.do?qualmems=true">QUALIFIED</html:link> <br /> <html:link action="/quals.do?nonqualmems=true">NON QUALIFIED</html:link> </c:if> </td> </tr> </table>
Hello jsnx7,
I can't see anything wrong here although I do not have much experience with JSP.
Do these links help?
Tiles - Create a Tile Layout
Tiles - Use a Tile Layout
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.
Not sure if this has been solved or not but the reason you are seeing this error message is that the attribute test in the <c:if> tag does not accept EL expression which might sound somewhat strange. Are you really including the correct tag library?
What version of servlet api are you using?
Might this one work better?
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
// Json