Andreas Mähler schrieb:
Hello struts-users,
I am currently developing a webapp for my diploma thesis that can be
extended with plugins (JARs that are dropped into a dedicated folder).
I am using the Java Plugin Framework[1] to do this and I was already
able to move certain policies (e.g. search or tag cloud generation) to
plugins and it is working fine.
I have the following questions:
1) Is there a way to alter the struts config (e.g. add new Actions)
programmatically? It would be cool, if I could create plugins that add
actions at runtime.
2) I already know that it is not possible to use JSPs in the JAR files
to inject HTML fragments to the website and that I need to learn
Freemaker (as Freemaker-Templates can be stored in the classpath). But
how do I create exactly the same environment that the calling JSP page
has (ValueStack, etc.) so that I can use e.g. the Struts 2 tags in the
template? I have already had a look at the S2 source, but I haven't got
it yet.
One more question:
3) I would like to make the plugins provide files (icons and the like).
Therefore I am trying to write a servlet that fetches the resources from
the classpath. My web.xml looks like this:
[...]
<servlet>
<servlet-name>resource</servlet-name>
<servlet-class>de.uka.ipd.taxor.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>resource</servlet-name>
<url-pattern>/res/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
[...]
Is there a way to prevent struts from processing a request like
/rex/icon.png without setting the url-pattern of the filter-mapping to
sth. like /foo/* ?
Thanks in advance!
~Andreas
[1] http://jpf.sourceforge.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]