[ http://team.andromda.org:8080/jira/browse/BPM-119?page=history ]
Wouter Zoons closed BPM-119:
----------------------------
Resolution: Fixed
I have included the merge points, but with one additional change (also for the
precompilation merge-point): comments are in XML-style rather than in HTML-style
let me know if this works for you
> merge points in web.xml
> -----------------------
>
> Key: BPM-119
> URL: http://team.andromda.org:8080/jira/browse/BPM-119
> Project: Bpm4Struts Cartridge
> Type: Improvement
> Reporter: Sverker Abrahamsson
> Assignee: Wouter Zoons
> Priority: Minor
>
>
> When webdoclet was used for generating web.xml, it was possible to use it's
> merge functionality to add custom settings to the generated file. That was a
> very handy function to e.g. add a tag library.
> It is very simple to modify the template to add merge points as comments to
> the generated web.xml and then use the ant task replace to merge.
> Here is a patch that implements this functionality:
> ------- cut here -------
> 7a8
> > <!-- filter merge-point -->
> 12a14
> > <!-- filter-mapping merge-point -->
> 21a24
> > <!-- servlet merge-point -->
> 44a48
> > <!-- servlet-mapping merge-point -->
> 50a55
> > <!-- welcome-file-list merge-point -->
> 57a63
> > <!-- security-constraint merge-point -->
> 92a99
> > <!-- security-role merge-point -->
> ------- cut here -------
> Not very readable (generated by Examdiff) so I also add the full template:
> <?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 merge-point -->
> <filter>
> <filter-name>ResponseOverrideFilter</filter-name>
>
> <filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class>
> </filter>
> <!-- filter-mapping merge-point -->
> <filter-mapping>
> <filter-name>ResponseOverrideFilter</filter-name>
> <url-pattern>*.do</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>ResponseOverrideFilter</filter-name>
> <url-pattern>*.jsp</url-pattern>
> </filter-mapping>
> <!-- servlet merge-point -->
> <servlet>
> <servlet-name>action</servlet-name>
> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> <init-param>
> <param-name>config</param-name>
> <param-value>/WEB-INF/struts-config.xml</param-value>
> </init-param>
> <init-param>
> <param-name>debug</param-name>
> <param-value>3</param-value>
> </init-param>
> <init-param>
> <param-name>detail</param-name>
> <param-value>3</param-value>
> </init-param>
> <init-param>
> <param-name>validate</param-name>
> <param-value>true</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <!-- precompilation merge-point -->
> <!-- servlet-mapping merge-point -->
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>*.do</url-pattern>
> </servlet-mapping>
> <welcome-file-list>
> <!-- welcome-file-list merge-point -->
> <welcome-file>$welcomeFileName</welcome-file>
> </welcome-file-list>
> #if ($security == "true")
> ##
> ## We don't use security-role-refs at this point, maybe in a later step
> ##
> <!-- security-constraint merge-point -->
> #foreach ($applicationUseCase in $applicationUseCases)
> #foreach ($useCase in $applicationUseCase.allUseCases)
> <security-constraint>
> <web-resource-collection>
> <web-resource-name>$useCase.name resources</web-resource-name>
> <description>
> This collection bundles all pages and resources
> as well as the actions called in the "$useCase.name" use-case
> </description>
> <url-pattern>/${useCase.packagePath}/*</url-pattern>
> <url-pattern>${useCase.actionPathRoot}/*</url-pattern>
> </web-resource-collection>
> <auth-constraint>
> #foreach ($user in $useCase.users)
> <role-name>$user.role</role-name>
> #end
> </auth-constraint>
> <user-data-constraint>
> <transport-guarantee>NONE</transport-guarantee>
> </user-data-constraint>
> </security-constraint>
> #end
> <login-config>
> <auth-method>FORM</auth-method>
> #if ($securityRealm)
> <realm-name>$securityRealm</realm-name>
> #end
> <form-login-config>
> <form-login-page>/login/login-form.jsp</form-login-page>
>
> <form-error-page>/login/login-form.jsp?action=error</form-error-page>
> </form-login-config>
> </login-config>
> <!-- security-role merge-point -->
> #foreach ($user in $applicationUseCase.allUsers)
> <security-role>
> <role-name>$user.role</role-name>
> </security-role>
> #end
> #end
> #end
> </web-app>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://team.andromda.org:8080/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel