Spring mvc整合httl,出现找不到javax.Servlet.http包异常

异常信息,太多,不过前面大家如果遇到了,应该都一样,实在没弄白!

在官网http://httl.github.io/zh/help.html找了半天也没解释清楚。

问题记下,留着解决,如果有人知道这个问题啥原因,欢迎指教!感激不尽!

2013-12-11 17:33:09 org.apache.catalina.core.StandardWrapperValve invoke

严重: Servlet.service() for servlet [httl] in context with path [/springMVC] threw exception [Request processing failed; nested exception is java.text.ParseException: Failed to compile class, cause: Compilation failed. class: httl.spi.translators.templates.Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream, diagnostics: [Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。], class: httl.spi.translators.templates.Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream, stack: java.lang.IllegalStateException: Compilation failed. class: httl.spi.translators.templates.Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream, diagnostics: [Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。]


java.lang.IllegalStateException: Compilation failed. class: httl.spi.translators.templates.Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream, diagnostics: [Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。]
at httl.spi.compilers.JdkCompiler.doCompile(JdkCompiler.java:188)
at httl.spi.compilers.JdkCompiler.doCompile(JdkCompiler.java:161)
at httl.spi.compilers.AbstractCompiler.compile(AbstractCompiler.java:161)
at httl.spi.compilers.AdaptiveCompiler.compile(AdaptiveCompiler.java:96)
at httl.spi.translators.templates.CompiledVisitor.compile(CompiledVisitor.java:780)
at httl.spi.translators.CompiledTranslator.parseClass(CompiledTranslator.java:498)
at httl.spi.translators.CompiledTranslator.translate(CompiledTranslator.java:412)
at httl.spi.translators.MixedTranslator.translate(MixedTranslator.java:59)
at httl.spi.engines.DefaultEngine.parseTemplate(DefaultEngine.java:255)
at httl.spi.engines.DefaultEngine.getTemplate(DefaultEngine.java:233)
at httl.Engine.getTemplate(Engine.java:423)
at httl.web.springmvc.HttlView.renderMergedTemplateModel(HttlView.java:40)
at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
] with root cause
java.text.ParseException: Failed to compile class, cause: Compilation failed. class: httl.spi.translators.templates.Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream, diagnostics: [Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。], class: httl.spi.translators.templates.Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream, stack: java.lang.IllegalStateException: Compilation failed. class: httl.spi.translators.templates.Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream, diagnostics: [Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:4: 软件包 javax.servlet 不存在, Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java:5: 软件包 javax.servlet.http 不存在, 注意:Template__WEB_INF_view_httl_books_html__WEB_INF_httl_UTF_8_1386751924052_stream.java from JavaFileObjectImpl 使用了未经检查或不安全的操作。, 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。]

你可能感兴趣的:(Spring mvc整合httl,出现找不到javax.Servlet.http包异常)