1 Reply Latest reply on Oct 25, 2007 11:03 AM by Jonathan Hayward

    Want to set Expires and Cache-control HTTP headers for bundl

    Jonathan Hayward Newbie

      I am presently working with a bundle that includes Liferay 4.3.3 running over JBoss + Tomcat 4.2 (download link). I want to get the server to set far-future Expires and Cache-Control HTTP headers for images and JavaScript files, which I can identify either by MIME type or by file extension.

      I'll try to post the contents of server/default/deploy/ROOT.war/WEB-INF/web.xml in a reply to this message, and appears to specify values high enough so that successive visits will load images and JavaScript from the browser cache instead of the server. However, Yslow and page load times both suggest that these files are being downloaded directly from the server and not loaded from cache.

      Do you have any suggestions for how I might adjust what I have now so that frequent visitors will load images and external JavaScript files from the cache?

      Thank you,
      Jonathan Hayward
      Jonathan's Corner: A Glimpse into Eastern Orthodox Christianity

        • 1. Re: Want to set Expires and Cache-control HTTP headers for b
          Jonathan Hayward Newbie

          Here are the contents of server/default/deploy/ROOT.war/WEB-INF/web.xml and jboss-web.xml:

          server/default/deploy/ROOT.war/WEB-INF/web.xml wrote:
          <?xml version="1.0" encoding="UTF-8"?>

          <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">
          <filter>
          <filter-name>Auto Login Filter</filter-name>
          <filter-class>com.liferay.portal.servlet.filters.autologin.AutoLoginFilter</filter-class>
          </filter>
          <filter>
          <filter-name>CAS Filter</filter-name>
          <filter-class>com.liferay.portal.servlet.filters.sso.cas.CASFilter</filter-class>
          </filter>
          <filter>
          <filter-name>Compression Filter</filter-name>
          <filter-class>com.liferay.filters.compression.CompressionFilter</filter-class>
          </filter>
          <filter>
          <filter-name>Double Click Filter</filter-name>
          <filter-class>com.liferay.filters.doubleclick.DoubleClickFilter</filter-class>
          </filter>
          <filter>
          <filter-name>Header Filter</filter-name>
          <filter-class>com.liferay.filters.header.HeaderFilter</filter-class>
          <init-param>
          <param-name>Cache-Control</param-name>
          <param-value>max-age=172801, public</param-value>
          </init-param>
          <init-param>
          <param-name>Expires</param-name>
          <param-value>172801</param-value>
          </init-param>
          </filter>
          <filter>
          <filter-name>Layout Cache Filter - Friendly</filter-name>
          <filter-class>com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter</filter-class>
          <init-param>
          <param-name>pattern</param-name>
          <param-value>0</param-value>
          </init-param>
          </filter>
          <filter>
          <filter-name>Layout Cache Filter - Layout</filter-name>
          <filter-class>com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter</filter-class>
          <init-param>
          <param-name>pattern</param-name>
          <param-value>1</param-value>
          </init-param>
          </filter>
          <filter>
          <filter-name>Layout Cache Filter - Resource</filter-name>
          <filter-class>com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter</filter-class>
          <init-param>
          <param-name>pattern</param-name>
          <param-value>2</param-value>
          </init-param>
          </filter>
          <filter>
          <filter-name>Ntlm Filter</filter-name>
          <filter-class>com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter</filter-class>
          </filter>
          <filter>
          <filter-name>Secure MainServlet Filter</filter-name>
          <filter-class>com.liferay.filters.secure.SecureFilter</filter-class>
          <init-param>
          <param-name>portal_property_prefix</param-name>
          <param-value>main.servlet.</param-value>
          </init-param>
          </filter>
          <filter>
          <filter-name>Session Id Filter</filter-name>
          <filter-class>com.liferay.portal.servlet.filters.sessionid.SessionIdFilter</filter-class>
          </filter>
          <filter>
          <filter-name>Strip Filter</filter-name>
          <filter-class>com.liferay.filters.strip.StripFilter</filter-class>
          </filter>
          <filter>
          <filter-name>Velocity Filter</filter-name>
          <filter-class>com.liferay.portal.servlet.filters.velocity.VelocityFilter</filter-class>
          <init-param>
          <param-name>pattern</param-name>
          <param-value>(.+)/css/main.css(.+)</param-value>
          </init-param>
          </filter>
          <filter>
          <filter-name>Virtual Host Filter</filter-name>
          <filter-class>com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter</filter-class>
          </filter>
          <filter-mapping>
          <filter-name>Session Id Filter</filter-name>
          <url-pattern>/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Virtual Host Filter</filter-name>
          <url-pattern>/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>CAS Filter</filter-name>
          <url-pattern>/c/portal/login</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>CAS Filter</filter-name>
          <url-pattern>/c/portal/logout</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Ntlm Filter</filter-name>
          <url-pattern>/c/portal/login</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Auto Login Filter</filter-name>
          <url-pattern>/c/portal/change_password</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Auto Login Filter</filter-name>
          <url-pattern>/c/portal/fckeditor</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Auto Login Filter</filter-name>
          <url-pattern>/c/portal/layout</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Auto Login Filter</filter-name>
          <url-pattern>/c/portal/login</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Auto Login Filter</filter-name>
          <url-pattern>/c/portal/render_portlet</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Auto Login Filter</filter-name>
          <url-pattern>/group/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Auto Login Filter</filter-name>
          <url-pattern>/user/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Auto Login Filter</filter-name>
          <url-pattern>/web/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Layout Cache Filter - Friendly</filter-name>
          <url-pattern>/group/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Layout Cache Filter - Friendly</filter-name>
          <url-pattern>/user/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Layout Cache Filter - Friendly</filter-name>
          <url-pattern>/web/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Layout Cache Filter - Layout</filter-name>
          <url-pattern>/c/portal/layout</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Layout Cache Filter - Resource</filter-name>
          <url-pattern>/c/portal/css_cached</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Layout Cache Filter - Resource</filter-name>
          <url-pattern>/c/portal/javascript_cached</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Double Click Filter</filter-name>
          <url-pattern>/c/portal/layout</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Double Click Filter</filter-name>
          <url-pattern>/group/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Double Click Filter</filter-name>
          <url-pattern>/user/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Double Click Filter</filter-name>
          <url-pattern>/web/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Secure MainServlet Filter</filter-name>
          <url-pattern>/c/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Secure MainServlet Filter</filter-name>
          <url-pattern>/group/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Secure MainServlet Filter</filter-name>
          <url-pattern>/user/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Secure MainServlet Filter</filter-name>
          <url-pattern>/web/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>/c/portal/css_cached</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>/c/portal/javascript_cached</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>/image/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>/language/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>*.css</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>*.gif</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>*.html</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>*.jpg</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>*.js</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Header Filter</filter-name>
          <url-pattern>*.png</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Compression Filter</filter-name>
          <url-pattern>/c/portal/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Compression Filter</filter-name>
          <url-pattern>/group/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Compression Filter</filter-name>
          <url-pattern>/user/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Compression Filter</filter-name>
          <url-pattern>/web/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Compression Filter</filter-name>
          <url-pattern>*.css</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Compression Filter</filter-name>
          <url-pattern>*.html</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Compression Filter</filter-name>
          <url-pattern>*.js</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Compression Filter</filter-name>
          <url-pattern>*.jsp</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Strip Filter</filter-name>
          <url-pattern>/c/portal/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Strip Filter</filter-name>
          <url-pattern>/group/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Strip Filter</filter-name>
          <url-pattern>/user/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Strip Filter</filter-name>
          <url-pattern>/web/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Strip Filter</filter-name>
          <url-pattern>*.css</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Strip Filter</filter-name>
          <url-pattern>*.html</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Strip Filter</filter-name>
          <url-pattern>*.js</url-pattern>
          </filter-mapping>
          <filter-mapping>
          <filter-name>Strip Filter</filter-name>
          <url-pattern>*.jsp</url-pattern>
          </filter-mapping>
          <listener>
          <listener-class>com.liferay.portal.servlet.PortalSessionListener</listener-class>
          </listener>
          <listener>
          <listener-class>com.liferay.portal.kernel.servlet.PortletSessionListenerManager</listener-class>
          </listener>
          <listener>
          <listener-class>com.liferay.portal.kernel.servlet.SerializableSessionAttributeListener</listener-class>
          </listener>
          <servlet>
          <servlet-name>MainServlet</servlet-name>
          <servlet-class>com.liferay.portal.servlet.MainServlet</servlet-class>
          <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml,/WEB-INF/struts-config-ext.xml</param-value>
          </init-param>
          <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
          </init-param>
          <init-param>
          <param-name>detail</param-name>
          <param-value>0</param-value>
          </init-param>
          <load-on-startup>1</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>FriendlyURLPrivateGroupServlet</servlet-name>
          <servlet-class>com.liferay.portal.servlet.FriendlyURLServlet</servlet-class>
          <init-param>
          <param-name>private</param-name>
          <param-value>true</param-value>
          </init-param>
          <init-param>
          <param-name>user</param-name>
          <param-value>false</param-value>
          </init-param>
          <load-on-startup>2</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>FriendlyURLPrivateUserServlet</servlet-name>
          <servlet-class>com.liferay.portal.servlet.FriendlyURLServlet</servlet-class>
          <init-param>
          <param-name>private</param-name>
          <param-value>true</param-value>
          </init-param>
          <init-param>
          <param-name>user</param-name>
          <param-value>true</param-value>
          </init-param>
          <load-on-startup>3</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>FriendlyURLPublicServlet</servlet-name>
          <servlet-class>com.liferay.portal.servlet.FriendlyURLServlet</servlet-class>
          <init-param>
          <param-name>private</param-name>
          <param-value>false</param-value>
          </init-param>
          <load-on-startup>4</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>ImageServlet</servlet-name>
          <servlet-class>com.liferay.portal.servlet.ImageServlet</servlet-class>
          <load-on-startup>5</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>LanguageServlet</servlet-name>
          <servlet-class>com.liferay.portal.servlet.LanguageServlet</servlet-class>
          <load-on-startup>6</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>LuceneServlet</servlet-name>
          <servlet-class>com.liferay.portal.servlet.LuceneServlet</servlet-class>
          <load-on-startup>7</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>SitemapServlet</servlet-name>
          <servlet-class>com.liferay.portal.servlet.SitemapServlet</servlet-class>
          <load-on-startup>8</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>PortalDelegatorServlet</servlet-name>
          <servlet-class>com.liferay.portal.kernel.servlet.PortalDelegatorServlet</servlet-class>
          <load-on-startup>9</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>ResourceProxyServlet</servlet-name>
          <servlet-class>com.liferay.portal.wsrp.servlet.ResourceProxyServlet</servlet-class>
          <load-on-startup>10</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>PortletBridgeServlet</servlet-name>
          <servlet-class>org.portletbridge.portlet.PortletBridgeServlet</servlet-class>
          <init-param>
          <param-name>mementoSessionKey</param-name>
          <param-value>mementoSessionKey</param-value>
          </init-param>
          <init-param>
          <param-name>cssRegex</param-name>
          <param-value>(?:url\((?:'|")?(.*?)(?:'|")?\))|(?:@import\s+[^url](?:'|")?(.*?)(?:'|")|;|\s+|$)</param-value>
          </init-param>
          <init-param>
          <param-name>jsRegex</param-name>
          <param-value>open\('([^']*)'|open\("([^\"]*)"</param-value>
          </init-param>
          <init-param>
          <param-name>ignoreRequestHeaders</param-name>
          <param-value>accept-encoding,connection,keep-alive</param-value>
          </init-param>
          <init-param>
          <param-name>ignorePostToGetRequestHeaders</param-name>
          <param-value>content-type,content-length</param-value>
          </init-param>
          <load-on-startup>11</load-on-startup>
          </servlet>
          <servlet>
          <servlet-name>SoftwareCatalogServlet</servlet-name>
          <servlet-class>com.liferay.portal.servlet.SoftwareCatalogServlet</servlet-class>
          <load-on-startup>12</load-on-startup>
          </servlet>
          <servlet-mapping>
          <servlet-name>MainServlet</servlet-name>
          <url-pattern>/c/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>FriendlyURLPrivateGroupServlet</servlet-name>
          <url-pattern>/group/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>FriendlyURLPrivateUserServlet</servlet-name>
          <url-pattern>/user/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>FriendlyURLPublicServlet</servlet-name>
          <url-pattern>/web/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>ImageServlet</servlet-name>
          <url-pattern>/image/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>LanguageServlet</servlet-name>
          <url-pattern>/language/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>SitemapServlet</servlet-name>
          <url-pattern>/sitemap.xml</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>PortalDelegatorServlet</servlet-name>
          <url-pattern>/delegate/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>ResourceProxyServlet</servlet-name>
          <url-pattern>/wsrp/resource_proxy/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>PortletBridgeServlet</servlet-name>
          <url-pattern>/pbhs/*</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
          <servlet-name>SoftwareCatalogServlet</servlet-name>
          <url-pattern>/software_catalog/*</url-pattern>
          </servlet-mapping>
          <session-config>
          <session-timeout>30</session-timeout>
          </session-config>
          <welcome-file-list>
          <welcome-file>index.html</welcome-file>
          <welcome-file>index.jsp</welcome-file>
          </welcome-file-list>
          <jsp-config>
          <taglib>
          <taglib-uri>http://displaytag.sf.net</taglib-uri>
          <taglib-location>/WEB-INF/tld/displaytag.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://easyconf.sourceforge.net/tags-easyconf</taglib-uri>
          <taglib-location>/WEB-INF/tld/easyconf.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://java.sun.com/jstl/core_rt</taglib-uri>
          <taglib-location>/WEB-INF/tld/c-rt.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://java.sun.com/jstl/fmt_rt</taglib-uri>
          <taglib-location>/WEB-INF/tld/fmt-rt.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://java.sun.com/jstl/sql_rt</taglib-uri>
          <taglib-location>/WEB-INF/tld/sql-rt.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://java.sun.com/jstl/xml_rt</taglib-uri>
          <taglib-location>/WEB-INF/tld/x-rt.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://java.sun.com/portlet</taglib-uri>
          <taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://liferay.com/tld/portlet</taglib-uri>
          <taglib-location>/WEB-INF/tld/liferay-portlet-ext.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://liferay.com/tld/security</taglib-uri>
          <taglib-location>/WEB-INF/tld/liferay-security.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://liferay.com/tld/theme</taglib-uri>
          <taglib-location>/WEB-INF/tld/liferay-theme.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://liferay.com/tld/ui</taglib-uri>
          <taglib-location>/WEB-INF/tld/liferay-ui.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://liferay.com/tld/util</taglib-uri>
          <taglib-location>/WEB-INF/tld/liferay-util.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://struts.apache.org/tags-bean</taglib-uri>
          <taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://struts.apache.org/tags-bean-el</taglib-uri>
          <taglib-location>/WEB-INF/tld/struts-bean-el.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://struts.apache.org/tags-html</taglib-uri>
          <taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://struts.apache.org/tags-html-el</taglib-uri>
          <taglib-location>/WEB-INF/tld/struts-html-el.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://struts.apache.org/tags-logic</taglib-uri>
          <taglib-location>/WEB-INF/tld/struts-logic.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://struts.apache.org/tags-logic-el</taglib-uri>
          <taglib-location>/WEB-INF/tld/struts-logic-el.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://struts.apache.org/tags-nested</taglib-uri>
          <taglib-location>/WEB-INF/tld/struts-nested.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://struts.apache.org/tags-tiles</taglib-uri>
          <taglib-location>/WEB-INF/tld/struts-tiles.tld</taglib-location>
          </taglib>
          <taglib>
          <taglib-uri>http://struts.apache.org/tags-tiles-el</taglib-uri>
          <taglib-location>/WEB-INF/tld/struts-tiles-el.tld</taglib-location>
          </taglib>
          </jsp-config>
          <resource-ref>
          <res-ref-name>jdbc/LiferayPool</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
          <res-sharing-scope>Shareable</res-sharing-scope>
          </resource-ref>
          <resource-ref>
          <res-ref-name>mail/MailSession</res-ref-name>
          <res-type>javax.mail.Session</res-type>
          <res-auth>Container</res-auth>
          </resource-ref>
          <security-constraint>
          <web-resource-collection>
          <web-resource-name>/c/portal/protected</web-resource-name>
          <url-pattern>/c/portal/protected</url-pattern>
          <http-method>GET</http-method>
          <http-method>POST</http-method>
          </web-resource-collection>
          <auth-constraint>
          <role-name>users</role-name>
          </auth-constraint>
          <user-data-constraint>
          <transport-guarantee>NONE</transport-guarantee>
          </user-data-constraint>
          </security-constraint>
          <login-config>
          <auth-method>FORM</auth-method>
          <realm-name>PortalRealm</realm-name>
          <form-login-config>
          <form-login-page>/c/portal/j_login</form-login-page>
          <form-error-page>/c/portal/j_login_error</form-error-page>
          </form-login-config>
          </login-config>
          <security-role>
          <role-name>users</role-name>
          </security-role>
          </web-app>


          server/default/deploy/ROOT.war/WEB-INF/jboss-web.xml wrote:
          <?xml version="1.0"?>
          <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">

          <jboss-web>
          <security-domain>java:/jaas/PortalRealm</security-domain>
          <context-root>/</context-root>
          <resource-ref>
          <res-ref-name>jdbc/LiferayPool</res-ref-name>
          <jndi-name>java:/jdbc/LiferayPool</jndi-name>
          </resource-ref>
          <resource-ref>
          <res-ref-name>mail/MailSession</res-ref-name>
          <jndi-name>java:/mail/MailSession</jndi-name>
          </resource-ref>
          </jboss-web>


          Do I need to add directives to jboss-web.xml?

          Thanks for any help,
          http://JonathansCorner.com/