It is sometimes desirable to generate dynamic content via servlets instead of pipelines. To do this, the ISML function servlet()
is used.
It generates the part of an URL string that addresses Java application components that are downloaded, on demand, to the part of system that needs them. As with action(), the function servlet()
is only used within url()and urlex().
Servlet(String servletName) Servlet(String servletName, String serverGroupName)
The following example shows how to call the LineChart servlet, which generates a new URL with the requested servlet and the server group encoded.
<img src="#URL(Servlet('LineChart'),Parameter('title','Memory'), ...)#">
The servlet()
function within the url()function returns the following URL:
http://
<webserver-host>:<port>/INTERSHOP/servlet/WFS/LineChart?title=Memory& ...
This URL contains the name of the servlet (LineChart) and the server group, e.g., WFS, which is also the default server group.
With the servlet mapping to LineChart, the Web Adapter can address the LineChart servlet in an application server that is part of the WFS server group.
Therefore, the Web Adapter uses this URL:
http://
<appserver-host>:<port>/servlet/LineChart?title=Memory& ...