4.0 -> 4.1

No changes required

4.1 -> 5.0

esigate-servlet module

The project esigate-core has been split into 2 modules:

  • esigate-core
  • esigate-servlet

In your project dependencies, you should now use esigate-servlet instead of esigate-core. esigate-servlet depends on esigate-core.

In future versions it will be possible in other contexts than a servlet engine, this is why it was necessary to split.

ESI & Aggregator

ESI tags and comment-based directives are now processed by extensions. These extensions are enabled by default.

  • org.esigate.extension.Esi
  • org.esigate.extension.Aggregate

If you are overriding extensions in esigate.properties and use ESI and/or Aggregator features, you must add the corresponding extension before other rendering extensions (especially ResourceFixup)

Servlets and servlet filter

The aggregator and proxy servlet have been replaced by a servlet filter that enables more complex url mappings and supports local and cross-context providers.

All the servlets have to be replaced by a unique servlet filter for example:

<servlet>
	<servlet-name>provider1</servlet-name>
	<servlet-class>org.esigate.servlet.ProxyServlet</servlet-class>
	<init-param>
		<param-name>provider</param-name>
		<param-value>provider1</param-value>
	</init-param>
</servlet>
<servlet>
	<servlet-name>provider2</servlet-name>
	<servlet-class>org.esigate.servlet.ProxyServlet</servlet-class>
	<init-param>
		<param-name>provider</param-name>
		<param-value>provider2</param-value>
	</init-param>
</servlet>
<servlet-mapping>
	<servlet-name>provider1</servlet-name>
	<url-pattern>/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
	<servlet-name>provider2</servlet-name>
	<url-pattern>/provider2/*</url-pattern>
</servlet-mapping>
				

Will be replaced by:

<filter>
	<filter-name>EsiGate</filter-name>
	<filter-class>org.esigate.servlet.ProxyFilter</filter-class>
</filter>
<filter-mapping>
	<filter-name>EsiGate</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>
				

And the url mappings have to be moved to esigate.properties file:

provider1.remoteUrlBase=http://host1/
provider1.mappings=*

provider1.remoteUrlBase=http://host2/
provider2.mappings=/provider2/*
				

JSP taglib

JSP taglib has been removed. It can be replaced by the servlet filter (see above) combined with ESI tags. The advantage is that this is compatible with any presentation framework like JSP, JSF components or Wicket components.

Here are some examples of JSP tags and their equivalent in ESI tags.

JSP taglib:

<%@taglib uri="http://www.esigate.org/taglib" prefix="assemble"%>
				

Equivalent ESI tag:

 
				

JSP taglib:

<assemble:includeBase page="block.jsp" />
				

Equivalent ESI tag:

<esi:vars><base href="$(PROVIDER{default})block.jsp" /></esi:vars>
				

JSP taglib:

<assemble:includeblock page="block.jsp" name="block1" />
				

Equivalent ESI tag:

<esi:include src="$(PROVIDER{default})block.jsp" fragment="block1" />
				

JSP taglib:

<assemble:includeblock page="error500.jsp" name="block1" />
				

Equivalent ESI tag (Note: default Exception handling is different in ESI tags, that is why we need some code to reproduce exactly the same behavior):

<esi:try>
<esi:attempt><esi:include src="$(PROVIDER{default})error500.jsp" fragment="block1" /></esi:attempt>
<esi:except code="500">500 Internal_Server_Error</esi:except>
</esi:try>
				

JSP taglib:

<assemble:include-xml source="xml-page.xml" xpath="//html:div/html:div">
	<assemble:replace expression ="Item">New Item</assemble:replace>
</assemble:include-xml>
				

Equivalent ESI tag:

<esi:include src="$(PROVIDER{default})xml-page.xml" xpath="//html:div/html:div">
	<esi:replace expression ="Item">New Item</esi:replace>
</esi:include>
				

JSP taglib:

<assemble:include-xml source="xml-page.xml" template="/WEB-INF/xml-template.xslt" >
	<assemble:replace expression ="Item">New Item</assemble:replace>
</assemble:include-xml>
				

Equivalent ESI tag:

<esi:include src="$(PROVIDER{default})xml-page.xml" stylesheet="/WEB-INF/xml-template.xslt" >
	<esi:replace expression ="Item">New Item</esi:replace>
</esi:include>
				

Cache

The HTTP client and cache has been updated to Apache HttpClient 4.3. This release fixes handling of "Vary: Cookie" header and has been through major refactoring. All esigate tests have passed, but there may be other small differences in behavior. It would be a good idea to test your applications to ensure they are not broken by these changes.

Events

Event properties are now accessible through getter and setters.

Default option values

"preserveHost" is now set to true by default.

Cookies are now forwarded by default. "forwardCookies" parameter has been removed and a new parameter "storeCookiesInSession" has been created to be able to keep some cookies in the session.

Aggregator extension is not enabled anymore in the default extensions list. I you still use the old html comments based aggregator syntax, you have to add this extension.

"fixResources" option has been removed. Urls inside pages are now rewritten by default. To desactivate it, you have to remove org.esigate.extension.ResourceFixup extension.

org.esigate.extension.ConfigReloadOnChange is now activated by default. The configuration file is checked every 5 seconds and automatically reloaded if the file has changed. This can be useful in development.

WWW-Authenticate response header and Authorization request header are now forwarded (basic authentication).

comments powered by Disqus