SSI Jboss 不包括 html(上下文问题)

发布于 2024-07-27 21:01:07 字数 1915 浏览 7 评论 0原文

嗨,我希望有人可以提供关于这里的线索。 问题就在这里。

我已经在 Solaris 下的一些 jboss 中启用了 SSI,我的应用程序 web.xml 配置如下:

<filter>
    <filter-name>ssi</filter-name>
    <filter-class>
        org.apache.catalina.ssi.SSIFilter
    </filter-class>
    <init-param>
        <param-name>contentType</param-name>
        <param-value>application/xml(;.*)?</param-value> <!-- also have tried here html(;.*)? -->
    </init-param>
    <init-param>
        <param-name>debug</param-name>
        <param-value>0</param-value>
    </init-param>
    <init-param>
        <param-name>expires</param-name>
        <param-value>666</param-value>
    </init-param>
    <init-param>
        <param-name>isVirtualWebappRelative</param-name>
        <param-value>0</param-value>
    </init-param>
</filter>

  <filter-mapping>
    <filter-name>ssi</filter-name>
    <url-pattern>*.xsl</url-pattern>
</filter-mapping>
    <!-- the following mappings were inserted after -->
<filter-mapping>
    <filter-name>ssi</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>ssi</filter-name>
    <url-pattern>*.shtml</url-pattern>
</filter-mapping>

所以我的问题是 SSI 适用于 XSL 文件,但不适用于 HTML 文件。 另外,我将上下文问题放在标题中,因为我在 jboss 中有一个指向我的 app.war 的符号链接,这是因为我正在使用 CMS,并且我需要将文件发布到文件系统中的某个位置。

我可以想到的两件事是,要么是我的多个过滤器映射声明搞乱了(这不太可能),另一件事是 jboss 无法重新加载此应用程序的上下文。war

我还把这里有一些关于 Context.xml 的信息,因为我想你可能会要求它,

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" reloadable="true" privileged="true"/>

我将不胜感激任何指示,我不知道它可能是什么

Hi I hope that someone out there could give a clue on where to here. Here's the problem.

I have enabled SSI in some jboss under Solaris, I have the application web.xml configured as follows:

<filter>
    <filter-name>ssi</filter-name>
    <filter-class>
        org.apache.catalina.ssi.SSIFilter
    </filter-class>
    <init-param>
        <param-name>contentType</param-name>
        <param-value>application/xml(;.*)?</param-value> <!-- also have tried here html(;.*)? -->
    </init-param>
    <init-param>
        <param-name>debug</param-name>
        <param-value>0</param-value>
    </init-param>
    <init-param>
        <param-name>expires</param-name>
        <param-value>666</param-value>
    </init-param>
    <init-param>
        <param-name>isVirtualWebappRelative</param-name>
        <param-value>0</param-value>
    </init-param>
</filter>

  <filter-mapping>
    <filter-name>ssi</filter-name>
    <url-pattern>*.xsl</url-pattern>
</filter-mapping>
    <!-- the following mappings were inserted after -->
<filter-mapping>
    <filter-name>ssi</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>ssi</filter-name>
    <url-pattern>*.shtml</url-pattern>
</filter-mapping>

So my problem is that the SSI is working for XSL files but not for HTML files. Also I put the Context issues in the title since I have a symbolic link to my app.war in jboss this is because I'm using a CMS and I need the files to be posted somewhere in the file system.

The two things I can think about this, is that either is something messing up with my multiple filter mapping declarations (which is very unlikely) and the other one is that jboss is not able to reload the context for this app.war

Also I put here some information about Context.xml since I think you might ask for it

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" reloadable="true" privileged="true"/>

I will appreciate any pointers, I can't figure out what could it be

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心房敞 2024-08-03 21:01:07

刚刚从过滤器更改为 servlet,并且工作得很好,这是代码

<servlet>
    <servlet-name>ssi</servlet-name>
    <servlet-class>org.apache.catalina.ssi.SSIServlet</servlet-class>
    <init-param>
        <param-name>buffered</param-name>
        <param-value>1</param-value>
    </init-param>
    <init-param>
        <param-name>debug</param-name>
        <param-value>0</param-value>
    </init-param>
    <init-param>
        <param-name>expires</param-name>
        <param-value>60</param-value>
    </init-param>
    <init-param>
        <param-name>isVirtualWebappRelative</param-name>
        <param-value>1</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

just changed from filter to servlet and worked just fine here's the code

<servlet>
    <servlet-name>ssi</servlet-name>
    <servlet-class>org.apache.catalina.ssi.SSIServlet</servlet-class>
    <init-param>
        <param-name>buffered</param-name>
        <param-value>1</param-value>
    </init-param>
    <init-param>
        <param-name>debug</param-name>
        <param-value>0</param-value>
    </init-param>
    <init-param>
        <param-name>expires</param-name>
        <param-value>60</param-value>
    </init-param>
    <init-param>
        <param-name>isVirtualWebappRelative</param-name>
        <param-value>1</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文