macray / htmlcompressor

Automatically exported from code.google.com/p/htmlcompressor
Apache License 2.0
0 stars 0 forks source link

Attribute removeInputAttributes invalid for tag html according to TLD #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First, I'd like to say that this is a great lib and I'm so thankful for it.  
Please keep up the good work.  Now, onto my problem...

What steps will reproduce the problem?
1. Upgrade JAR to version 1.1
2. Add any of the new "remove*" attributes to compress:html TLD tag 
3. Run webpage (and View Source if you can) to see output

What is the expected output? What do you see instead?
I expected the page to render and successfully compress/minify HTML code (as it 
did before using earlier versions).  However, I got a blank page due to the 
below error.

What version of the product are you using? On what operating system?
I'm using version 1.1 of JAR in Windows XP/Eclipse environment

Please provide any additional information below.

Mar 28, 2011 4:09:27 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /common/templates/default/index.jsp(11,0) 
Attribute removeInputAttributes invalid for tag html according to TLD
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)
    at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1235)
    at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:846)
    at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
    at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
    at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
    at org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
    at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1763)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    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.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
    at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
    at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:650)
    at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:644)
    at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:126)
    at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:149)
    at org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:761)
    at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:893)
    at org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:462)
    at org.apache.jsp.index_jsp._jspx_meth_tiles_005finsert_005f0(index_jsp.java:169)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:95)
    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:377)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    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 com.spafinder.cms.request.RequestFilter.doFilter(RequestFilter.java:103)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.spafinder.servlet.filter.EncodingFilter.doFilter(EncodingFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.spafinder.cms.request.VanityUrlFilter.doFilter(VanityUrlFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
    at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
    at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:407)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    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.acegisecurity.securechannel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:138)
    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
    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.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)

Original issue reported on code.google.com by ram...@gmail.com on 28 Mar 2011 at 8:20

GoogleCodeExporter commented 9 years ago
That's one thing I didn't test because I thought the change is simple enough to 
work the first time :)

Thanks, will fix it tonight.

Original comment by serg472@gmail.com on 28 Mar 2011 at 9:04

GoogleCodeExporter commented 9 years ago
Hm, I tested and it worked. I think your web.xml is still linking to the old 
TLD file.

Original comment by serg472@gmail.com on 29 Mar 2011 at 1:16

GoogleCodeExporter commented 9 years ago
I'm still experiencing this problem.  I've restarted my eclipse IDE, 
double-checked my lib folder to make sure I'm only using version 1.1, and 
cleared my application cache and restarted the app.  Then, I added the 
removeLinkAttributes="true" attribute and the app breaks.  If I remove the 
attribute or roll back to an older version, everything works fine.

Original comment by ram...@gmail.com on 29 Mar 2011 at 3:25

GoogleCodeExporter commented 9 years ago
Do you link TLD file from a web.xml? 

If you don't, then go to the htmlcompressor jar you should be using and unzip 
it. Check tld file inside META-INF folder, it should have all the declarations 
for new parameters. If if does then there is old htmlcompressor jar somewhere 
in your classpath. Maybe you have old jar in tomcat lib folder?

Original comment by serg472@gmail.com on 29 Mar 2011 at 3:34

GoogleCodeExporter commented 9 years ago
You were absolutely correct.  For some strange reason, the old jar was still in 
the deploy path of my tomcat server, despite me clearing cache earlier and 
re-deploying the app.  Everything appears to be working fine now.  Thanks for 
your help.

Original comment by ram...@gmail.com on 29 Mar 2011 at 5:25

GoogleCodeExporter commented 9 years ago
You are welcome, glad everything was sorted out.

Original comment by serg472@gmail.com on 29 Mar 2011 at 5:41