marino 2004/03/14 09:21:10
Modified: src/java/org/apache/velocity/tools/struts StrutsUtils.java
Log:
change from RequestUtils to ModuleUtils to get the ModuleConfig
Revision Changes Path
1.22 +8 -7
jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsUtils.java
Index: StrutsUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsUtils.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- StrutsUtils.java 12 Mar 2004 23:44:51 -0000 1.21
+++ StrutsUtils.java 14 Mar 2004 17:21:10 -0000 1.22
@@ -32,6 +32,7 @@
import org.apache.struts.config.ActionConfig;
import org.apache.struts.util.MessageResources;
import org.apache.struts.util.RequestUtils;
+import org.apache.struts.util.ModuleUtils;
/**
* <p>A utility class to expose the Struts shared
@@ -70,7 +71,7 @@
ServletContext app)
{
/* Identify the current module */
- ModuleConfig moduleConfig = RequestUtils.getModuleConfig(request, app);
+ ModuleConfig moduleConfig =
ModuleUtils.getInstance().getModuleConfig(request, app);
return (MessageResources)app.getAttribute(Globals.MESSAGES_KEY +
moduleConfig.getPrefix());
}
@@ -92,7 +93,7 @@
MessageResources resources = null;
/* Identify the current module */
- ModuleConfig moduleConfig = RequestUtils.getModuleConfig(request, app);
+ ModuleConfig moduleConfig =
ModuleUtils.getInstance().getModuleConfig(request, app);
if (bundle == null) {
@@ -123,7 +124,7 @@
ServletContext app)
{
/* Match against the list of sub-application prefixes */
- String prefix = RequestUtils.getModuleName(urlPath, app);
+ String prefix = ModuleUtils.getInstance().getModuleName(urlPath, app);
/* Expose the resources for this sub-application */
ModuleConfig config = (ModuleConfig)
@@ -179,7 +180,7 @@
/*********************** Struts Request Resources ****************/
/**
- * Returns the Struts errors for this request or <code>null</code>
+ * Returns the Struts errors for this request or <code>null</code>
* if none exist.
*
* @param request the servlet request
@@ -191,7 +192,7 @@
}
/**
- * Returns the Struts messages for this request or <code>null</code>
+ * Returns the Struts messages for this request or <code>null</code>
* if none exist.
*
* @param request the servlet request
@@ -323,7 +324,7 @@
ServletContext app,
String forward)
{
- ModuleConfig moduleConfig = RequestUtils.getModuleConfig(request, app);
+ ModuleConfig moduleConfig =
ModuleUtils.getInstance().getModuleConfig(request, app);
//TODO? beware of null module config if ActionServlet isn't init'ed?
ForwardConfig fc = moduleConfig.findForwardConfig(forward);
if (fc == null)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]