THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
To include static resources in your plugins add them under "/static" in your jar. And include them in your page using "/struts" as the path, like in the following example:
Code Block | ||||
---|---|---|---|---|
| ||||
Assuming /static/main.css is inside a plugin jar, to add it to the page:
<@s.url value="/struts/main.css" var="css" />
<link rel="stylesheet" type="text/css" href="%{#css}" />
|
...
Wiki Markup |
---|
{snippet:id=extensionPoints|javadoc=true|url=org.apache.struts2.config.BeanSelectionProviderDefaultBeanSelectionProvider} |
Plugin Examples
Let's look at two similar but different plugins bundled with the core distribution.
...
The sitemesh-plugin.jar
contains several classes, a standard JAR manifest, and a plugin configuration file.
Code Block |
---|
+ META-INF/
+ manifest.mf
+ org
+ apache
+ struts2
+ sitemesh
+ FreeMarkerPageFilter.class
+ TemplatePageFilter.class
+ VelocityPageFilter.class
+ struts-plugin.xml
|
...
The tiles-plugin.jar
contains several classes, a standard JAR manifest, and a configuration file.
Code Block |
---|
+ META-INF/
+ manifest.mf
+ org
+ apache
+ struts2
+ tiles
+ StrutsTilesListener.class
+ StrutsTileUtilImpl.class
+ views
+ tiles
+ TilesResult.class
+ struts-plugin.xml
|
...