您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Eclipse使用JSTL需要什么JAR文件,以便最终在GAE / J上运行?

Eclipse使用JSTL需要什么JAR文件,以便最终在GAE / J上运行?

确保您的web.xml根声明 至少 符合Servlet 2.4。

<web-app
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <!-- Config here. -->

</web-app>

或者,如果您的servlet容器支持它,则首选2.5:

<web-app 
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">

    <!-- Config here. -->

</web-app>

O是否支持最新版本3.0

<web-app 
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    version="3.0">

    <!-- Config here. -->

</web-app>

否则,所有内容都会退回到最少支持的方式,并且标签库可能会像这样破坏。

另外,请确保您没有tld在类路径(/WEB- INF/lib文件夹等)中散乱的文件,它们会与JAR文件中的文件冲突。哦,还要确保您没有在中手动定义tlds web.xml,请保持干净。

其他 2022/1/1 18:16:46 有568人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶