webwork/src/docs/cookbook PicoContainer_Integration.html,NONE,1.1 Spring_Framework_Integration.html,NONE,1.1 CookBook.html,1.3,1.4 Handling_file_uploads.html,1.2,1.3 Using_WebWork_Components.html,1.2,NONE

[email protected] Thu, 01 Jan 2004 19:04:11 -0800
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/docs/cookbook
In directory sc8-pr-cvs1:/tmp/cvs-serv9549

Modified Files:
	CookBook.html Handling_file_uploads.html 
Added Files:
	PicoContainer_Integration.html 
	Spring_Framework_Integration.html 
Removed Files:
	Using_WebWork_Components.html 
Log Message:
Updated from wiki


--- NEW FILE: PicoContainer_Integration.html ---
<html><head><title>PicoContainer Integration</title></head><body>
PicoContainer is an IoC (inversion of control) container that will automatically handle relationships between components for you. You can read more about the problems it solves and issues it addresses at <span class="nobr"></img><a href="http://www.picocontainer.org/.">&#104;ttp://www.picocontainer.org/.</a></span> Basically it removes the need for you to worry about lookups and passing in components into your actions. If all this sounds a little abstract, here is a trivial example.<p class="paragraph"></p>Let us say that you have a number of actions that require a UserManager component. These actions have no relationship to one another and no commonality beyond that requirement. So, one potential solution would be to introduce a base class that handles looking up and instatiating your UserManager. This however violates a number of sensible design principles, and needlessly cripples your
  actions. What happens if a few weeks down the line you need a TransactionManager, then later on a Scheduler? Your base class will mushroom out of control, and your actions will all suddenly get a Scheduler component regardless of whether they have any interest in such a component.<p class="paragraph"></p>Enter picocontainer, which will elegantly solve this problem for you. The rest of this article will take you through the process of integrating picocontainer in your webwork application step by step.<p class="paragraph"></p>For the purposes of this example, we will assume that you actions require a combination of a UserManager and a Scheduler.
<h3 class="heading-1-1">Download all required picocontainer jars. 
</h3><p class="paragraph"></p>These are:
picocontainer.jar
picoextras-integration.jar
picoextras-servlet.jar
picoextras-webwork.jar<p class="paragraph"></p>These can all be found at <span class="nobr"></img><a href="http://dist.codehaus.org/picocontainer/jars/.">&#104;ttp://dist.codehaus.org/picocontainer/jars/.</a></span> The latest versions of each will do.<p class="paragraph"></p>Download these 4 jar files into your WEB-INF/lib directory.
<h3 class="heading-1-1">Register the containers to listen to session and application scopes.
</h3><p class="paragraph"></p>Add the following to your web.xml:
<div class="wikicode"><pre>&#60;listener&#62;
  &#60;listener&#45;class&#62;org.picoextras.servlet.ServletContainerListener&#60;/listener&#45;class&#62; 
&#60;/listener&#62;</pre></div>
<h3 class="heading-1-1">Register the pico-webwork dispatcher.
</h3><p class="paragraph"></p>This dispatcher behaves identically to the webwork dispatcher, but performs the extra step of building a container for each request and ensuring webwork actions are created appropriately.<p class="paragraph"></p>Modify the mapping for your action servlet in web.xml to the following:
<div class="wikicode"><pre>&#60;servlet&#62;
 &#60;servlet&#45;name&#62;action&#60;/servlet&#45;name&#62;   
  &#60;servlet&#45;class&#62;org.picoextras.webwork.PicoServletDispatcher&#60;/servlet&#45;class&#62;  
 &#60;load&#45;on&#45;startup&#62;1&#60;/load&#45;on&#45;startup&#62;
&#60;/servlet&#62;</pre></div>
<h3 class="heading-1-1">Implement your container assembler class.
</h3><p class="paragraph"></p>This class is responsible for assembling all the components required for your container. In our case, we have two components: UserManager and Scheduler. Our container assembler will therefore look something like this:<p class="paragraph"></p><div class="wikicode"><pre><span class="java&#45;keyword">package</span> com.mydomain.webwork;<p class="paragraph"></p><span class="java&#45;keyword">public</span> class WebContainerAssembler <span class="java&#45;keyword">implements</span> org.picoextras.integrationkit.ContainerAssembler
&#123;
  <span class="java&#45;keyword">public</span> void assembleContainer(MutablePicoContainer container, <span class="java&#45;object">String</span> name) 
  &#123;
    <span class="java&#45;keyword">if</span> (name.equals(<span class="java&#45;quote">"application"</span>)) 
    &#123;
      //we create one scheduler and put it in our application scope
      container.register(Scheduler.class, <span class="java&#45;keyword">new</span> Scheduler());
    &#125;
    <span class="java&#45;keyword">else</span> <span class="java&#45;keyword">if</span> (name.equals(<span class="java&#45;quote">"session"</span>)) 
    &#123;
      //we don't have any session specific components
    &#125;
    <span class="java&#45;keyword">else</span> <span class="java&#45;keyword">if</span> (name.equals(<span class="java&#45;quote">"request"</span>)) 
    &#123;
      //we create a <span class="java&#45;keyword">new</span> UserManager <span class="java&#45;keyword">for</span> every request
      container.register(UserManager.class, <span class="java&#45;keyword">new</span> LDAPUserManager());
    &#125;
  &#125;
&#125;</pre></div><p class="paragraph"></p>In this particular case we have our class hardcoded for the sake of simplicity, but you're free to use whatever mechanism you want.<p class="paragraph"></p>Note that the container names (application, session, request) are flexible, so you could for example add different containers based on your needs. For example, you could have an "action" container name that will create a new instance of your component for every action.
<h3 class="heading-1-1">Register your ContainerAssembler.
</h3><p class="paragraph"></p>In your web.xml file, add the following:<p class="paragraph"></p><div class="wikicode"><pre>&#60;context&#45;param&#62;
 &#60;param&#45;name&#62;assembler&#60;/param&#45;name&#62;
 &#60;param&#45;value&#62;com.mydomain.webwork.WebContainerAssembler&#60;/param&#45;value&#62;
&#60;/context&#45;param&#62;</pre></div><p class="paragraph"></p>In addition to this, you will need to inform webwork that it should use the picocontainer aware action factory to construct actions. Add the following line to your webwork.properties file:<p class="paragraph"></p><div class="wikicode"><pre>webwork.action.factory=org.picoextras.webwork.WebWorkActionFactory</pre></div>
<h3 class="heading-1-1">Modify your Actions.
</h3><p class="paragraph"></p>Now that the picocontainer setup is complete, the final step is to modify your actions so as to use the components that are now available. All you have to do is ensure you have a suitable constructor that takes in as a parameter the components it is interested in. So for example:<p class="paragraph"></p><div class="wikicode"><pre><span class="java&#45;keyword">public</span> class MyAction <span class="java&#45;keyword">extends</span> ActionSupport
&#123;
  <span class="java&#45;keyword">public</span> MyAction(UserManager manager, Scheduler scheduler)
  &#123;
    //store refs, lookup stuff, whatever you want.
  &#125;
&#125;</pre></div><p class="paragraph"></p>...and that's it! picocontainer will take care of all the plumbing, and will automatically wire up your actions with your components, leaving you free to deal with business logic and presentation fun!</body></html>
--- NEW FILE: Spring_Framework_Integration.html ---
<html><head><title>Spring Framework Integration</title></head><body>
<h3 class="heading-1">Integrating the Spring Framework with Webwork 1.x (1.4.1 or higher)
</h3><p class="paragraph"></p>This is a step by step guide on integrating WebWork with the Spring Framework <span class="nobr"></img><a href="http://www.springframework.org">&#104;ttp://www.springframework.org</a></span> . Like the integration with PicoContainer (see <a href="PicoContainer_Integration.html">PicoContainer Integration</a>), Spring can be used to manage Webwork Actions, handle the "wiring" of business objects, action or any JavaBeans, by the time the web application starts up. Another benefit of integrating Spring is that it enables the use of interceptors and all other AOP features.<p class="paragraph"></p>The first step is to ensure that you have the appropriate jars in place. Copy spring.jar to your WEB-INF/lib directory. If you want to use interceptors and other AOP features, then you should also copy cglib.jar, asm.jar, and aopalliance.jar to the web lib directory.<p c
 lass="paragraph"></p>The next step is to provide an implementation of ActionFactoryProxy, SpringActionFactoryProxy. This will cause Webwork to first attempt to find actions in Spring's ApplicationContext; if it's not found Webwork will then look for it in the same manner as without Spring (simply instantiate the action class).<p class="paragraph"></p><b class="bold">SpringActionFactoryProxy.java:</b>
<div class="wikicode"><pre><span class="java&#45;keyword">package</span> webwork.action.factory;<p class="paragraph"></p><span class="java&#45;keyword">import</span> webwork.action.Action;
<span class="java&#45;keyword">import</span> webwork.action.ServletActionContext;
<span class="java&#45;keyword">import</span> org.springframework.beans.BeansException;
<span class="java&#45;keyword">import</span> org.springframework.beans.factory.NoSuchBeanDefinitionException;
<span class="java&#45;keyword">import</span> org.springframework.web.context.support.WebApplicationContextUtils;
<span class="java&#45;keyword">import</span> org.apache.commons.logging.Log;
<span class="java&#45;keyword">import</span> org.apache.commons.logging.LogFactory;<p class="paragraph"></p><span class="java&#45;keyword">public</span> class SpringActionFactoryProxy <span class="java&#45;keyword">extends</span> ActionFactoryProxy
&#123;
  <span class="java&#45;keyword">private</span> <span class="java&#45;keyword">static</span> <span class="java&#45;keyword">final</span> Log log = LogFactory.getLog(SpringActionFactoryProxy.class);<p class="paragraph"></p>  <span class="java&#45;keyword">public</span> SpringActionFactoryProxy(ActionFactory factory)
  &#123;
    <span class="java&#45;keyword">super</span>(factory);
  &#125;<p class="paragraph"></p>  <span class="java&#45;keyword">public</span> Action getActionImpl(<span class="java&#45;object">String</span> aName) <span class="java&#45;keyword">throws</span> Exception
  &#123;
    Action action;
    <span class="java&#45;keyword">try</span>
    &#123;
      action = (Action)WebApplicationContextUtils.getWebApplicationContext(
                    ServletActionContext.getServletContext()).getBean(aName);
      <span class="java&#45;keyword">return</span> (action != <span class="java&#45;keyword">null</span>) ? action : getNextFactory().getActionImpl(aName);
    &#125;
    <span class="java&#45;keyword">catch</span>(NoSuchBeanDefinitionException ex)
    &#123;
      action = getNextFactory().getActionImpl(aName);
      <span class="java&#45;keyword">if</span>(action!=<span class="java&#45;keyword">null</span>)
      &#123;
        log.warn(<span class="java&#45;quote">"No spring bean '"</span> + aName + 
        <span class="java&#45;quote">"' found, using standard instantiation"</span>);
      &#125;
    &#125;
    <span class="java&#45;keyword">catch</span>(BeansException e)
    &#123;
      action = getNextFactory().getActionImpl(aName);
      log.error(<span class="java&#45;quote">"Error getting spring bean "</span> + aName, e);
    &#125;
    <span class="java&#45;keyword">return</span> action;
  &#125;
&#125;</pre></div><p class="paragraph"></p>In addition, a custom ActionFactory, SpringActionFactory, must be specified to insert the SpringActionFactoryProxy into the ActionFactory stack.<p class="paragraph"></p><b class="bold">SpringActionFactory.java:</b>
<div class="wikicode"><pre><span class="java&#45;keyword">package</span> webwork.action.factory;<p class="paragraph"></p><span class="java&#45;keyword">public</span> class SpringActionFactory <span class="java&#45;keyword">extends</span> DefaultActionFactory
&#123;
  <span class="java&#45;keyword">protected</span> ActionFactory getRootFactory()
  &#123;
    ActionFactory root = <span class="java&#45;keyword">super</span>.getRootFactory();
    <span class="java&#45;keyword">return</span> <span class="java&#45;keyword">new</span> SpringActionFactoryProxy(root);
  &#125;
&#125;</pre></div><p class="paragraph"></p>Note that the above codes is in webwork packages, but can be in any other package.<p class="paragraph"></p>In webwork.properties change/add this line:
<div class="wikicode"><pre>webwork.action.factory=webwork.action.factory.SpringActionFactory</pre></div><p class="paragraph"></p>Finally, register the spring listener or servlet in your web.xml, by adding the following (this example uses the servlet for compatibility with old/odd containers, but if your container supports it you should use the spring listener instead).<p class="paragraph"></p><b class="bold">web.xml</b>
<div class="wikicode"><pre>&#60;servlet&#62;
  &#60;servlet&#45;name&#62;springloader&#60;/servlet&#45;name&#62;
    &#60;servlet&#45;class&#62;
      org.springframework.web.context.ContextLoaderServlet
    &#60;/servlet&#45;class&#62;
    &#60;load&#45;on&#45;startup&#62;1&#60;/load&#45;on&#45;startup&#62;
&#60;/servlet&#62;</pre></div><p class="paragraph"></p>This takes care of the webwork side of things. Next, spring must be configured.<p class="paragraph"></p>For the purposes of this example, webwork has one Action class (com.springapp.TestAction). com.springapp.EntityManager is a 'manager' business object that the TestAction requires. TestAction has get/setManager methods that take in an EntityManager.<p class="paragraph"></p>Spring can also be used to specify interceptors. In this example, a trivial TimerInterceptor is specified that simply logs the duration of method calls for all our beans (including actions).<p class="paragraph"></p><b class="bold">WEB-INF/applicationContext.xml</b>
<div class="wikicode"><pre>&#60;!DOCTYPE beans PUBLIC <span class="java&#45;quote">"&#45;//SPRING//DTD BEAN//EN"</span> 
<span class="java&#45;quote">"http://www.springframework.org/dtd/spring&#45;beans.dtd"</span>&#62;
&#60;beans&#62;
  &#60;!&#45;&#45; 
  The webwork action. Note that the name OR id must be the fully qualified 
  name, <span class="java&#45;keyword">this</span> is required <span class="java&#45;keyword">for</span> webwork to successfully look up the action, 
  as it uses class names.<p class="paragraph"></p>  The singleton property specifies that <span class="java&#45;keyword">this</span> bean should be created on 
  every call. WebWork assumes that there is an action is specific to 
  its request.
  &#45;&#45;&#62;
  &#60;bean id=<span class="java&#45;quote">"test"</span> name=<span class="java&#45;quote">"com.springapp.TestAction"</span>
        class=<span class="java&#45;quote">"com.springapp.TestAction"</span> 
        singleton=<span class="java&#45;quote">"<span class="java&#45;keyword">false</span>"</span>&#62;
    &#60;!&#45;&#45; Specify the manager property of the action class &#45;&#45;&#62;
    &#60;property name=<span class="java&#45;quote">"manager"</span>&#62;&#60;ref local=<span class="java&#45;quote">"entityManager"</span>/&#62;&#60;/property&#62;
  &#60;/bean&#62;
  &#60;!&#45;&#45; Specify the entity manager. Here we are not required to us the 
  classname as the id or name, since it is not a webwork action. &#45;&#45;&#62;
  &#60;bean id=<span class="java&#45;quote">"entityManager"</span> 
        class=<span class="java&#45;quote">"com.springapp.EntityManager"</span> singleton=<span class="java&#45;quote">"<span class="java&#45;keyword">true</span>"</span> /&#62;
  &#60;!&#45;&#45; Specify our timer interceptor &#45;&#45;&#62;
  &#60;bean id=<span class="java&#45;quote">"timerInterceptor"</span> class=<span class="java&#45;quote">"com.springapp.TimerInterceptor"</span> /&#62;<p class="paragraph"></p>  &#60;!&#45;&#45; 
  This bean is responsible <span class="java&#45;keyword">for</span> applying the interceptor to our classes.
  The proxyTargetClass must be set to <span class="java&#45;keyword">true</span> to enforce usage of cglib,
  rather than dynamic proxies. Dynamic proxies won't work with the valuestack
  &#45;&#45;&#62;
  &#60;bean id=<span class="java&#45;quote">"proxyCreator"</span> 
        class=<span class="java&#45;quote">"org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"</span>&#62;
    &#60;property name=<span class="java&#45;quote">"proxyTargetClass"</span>&#62;
      &#60;value&#62;<span class="java&#45;keyword">true</span>&#60;/value&#62;
    &#60;/property&#62;
    &#60;!&#45;&#45; Specify the interceptors to apply &#45;&#45;&#62;
    &#60;property name=<span class="java&#45;quote">"interceptors"</span>&#62;
      &#60;list&#62;
        &#60;ref bean=<span class="java&#45;quote">"timerInterceptor"</span>/&#62;
      &#60;/list&#62;
    &#60;/property&#62;
    &#60;!&#45;&#45; Specify the beans to apply the interceptors on &#45;&#45;&#62;
    &#60;property name=<span class="java&#45;quote">"beanNames"</span>&#62;
      &#60;list&#62;
        &#60;value&#62;test&#60;/value&#62;
        &#60;value&#62;&#42;Manager&#60;/value&#62;
      &#60;/list&#62;
    &#60;/property&#62;
  &#60;/bean&#62;
&#60;/beans&#62;</pre></div><p class="paragraph"></p>For the sake of completeness, here are the Java sources:<p class="paragraph"></p><b class="bold">TestAction.java</b>
<div class="wikicode"><pre><span class="java&#45;keyword">package</span> com.springapp;<p class="paragraph"></p><span class="java&#45;keyword">import</span> webwork.action.ActionSupport;<p class="paragraph"></p><span class="java&#45;keyword">public</span> class TestAction <span class="java&#45;keyword">extends</span> ActionSupport
&#123;
  <span class="java&#45;keyword">private</span> EntityManager manager;<p class="paragraph"></p>  <span class="java&#45;keyword">public</span> EntityManager getManager()
  &#123;
    <span class="java&#45;keyword">return</span> manager;
  &#125;<p class="paragraph"></p>  <span class="java&#45;keyword">public</span> void setManager(EntityManager manager)
  &#123;
    <span class="java&#45;keyword">this</span>.manager = manager;
  &#125;
&#125;</pre></div><p class="paragraph"></p>
<b class="bold">EntityManager.java</b>
<div class="wikicode"><pre><span class="java&#45;keyword">package</span> com.springapp;<p class="paragraph"></p><span class="java&#45;keyword">public</span> class EntityManager
&#123;
  <span class="java&#45;keyword">public</span> <span class="java&#45;object">String</span> getStuff()
  &#123;
    <span class="java&#45;keyword">return</span> <span class="java&#45;quote">"some stuff"</span>;
  &#125;
&#125;</pre></div><p class="paragraph"></p><b class="bold">TimerInterceptor.java</b>
<div class="wikicode"><pre><span class="java&#45;keyword">package</span> com.springapp;<p class="paragraph"></p><span class="java&#45;keyword">import</span> org.aopalliance.intercept.MethodInterceptor;
<span class="java&#45;keyword">import</span> org.aopalliance.intercept.MethodInvocation;
<span class="java&#45;keyword">import</span> org.apache.commons.logging.Log;
<span class="java&#45;keyword">import</span> org.apache.commons.logging.LogFactory;<p class="paragraph"></p><span class="java&#45;keyword">public</span> class TimerInterceptor <span class="java&#45;keyword">implements</span> MethodInterceptor
&#123;
  <span class="java&#45;keyword">private</span> <span class="java&#45;keyword">static</span> <span class="java&#45;keyword">final</span> Log log = LogFactory.getLog(TimerInterceptor.class);<p class="paragraph"></p>  <span class="java&#45;keyword">public</span> <span class="java&#45;object">Object</span> invoke(MethodInvocation methodInvocation) <span class="java&#45;keyword">throws</span> Throwable
  &#123;
    <span class="java&#45;keyword">if</span>(methodInvocation.getMethod().getDeclaringClass()==<span class="java&#45;object">Object</span>.class)
    &#123;
      <span class="java&#45;keyword">return</span> methodInvocation.proceed();
    &#125;
    <span class="java&#45;object">long</span> startTime = <span class="java&#45;object">System</span>.currentTimeMillis();
    <span class="java&#45;object">String</span> className = methodInvocation.getThis().getClass().getName();
    <span class="java&#45;object">int</span> dot = className.lastIndexOf('.');
    <span class="java&#45;keyword">if</span>(dot &#62; &#45;1) className = className.substring(dot + 1, className.length());
    <span class="java&#45;keyword">try</span>
    &#123;
      <span class="java&#45;keyword">return</span> methodInvocation.proceed();
    &#125;
    <span class="java&#45;keyword">finally</span>
    &#123;
      log.info(className + '.' + methodInvocation.getMethod().getName() 
      + <span class="java&#45;quote">" "</span> + (<span class="java&#45;object">System</span>.currentTimeMillis() &#45; startTime) + <span class="java&#45;quote">"ms"</span>);
    &#125;
  &#125;
&#125;</pre></div><p class="paragraph"></p>All that remains is the standard webwork configuration of mapping views to actions via actions.xml or views.properties.<p class="paragraph"></p>Finally, deploy your web application, and have Spring help with assembling and wiring business objects into your actions - no more lookup code across your Action code!</body></html>
Index: CookBook.html
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/docs/cookbook/CookBook.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CookBook.html	15 Nov 2003 03:28:32 -0000	1.3
+++ CookBook.html	2 Jan 2004 03:04:08 -0000	1.4
@@ -12,7 +12,7 @@
 <li><a href="Select_Tag_Tips.html">Select Tag Tips</a></li>
 <li><a href="Action_Tag.html">Action Tag</a></li>
 <li><a href="Form_Validation.html">Form Validation</a></li>
-<li><a href="Performance_Tips.html">Webwork Performance Tips</a></li>
+<li><a href="Performance_Tips.html">Performance Tips</a></li>
 <li><a href="Reloading_Java_Actions.html">Reloading Java Actions</a></li>
 <li><a href="Reloading_xml_files.html">Reloading xml files</a></li>
 <li><a href="Populate_Form_Bean_and_access_its_value.html">Populate Form Bean and access its value</a></li>
@@ -24,5 +24,6 @@
 <li><a href="Running_WebWork_on_SunONE.html">Running WebWork on SunONE</a></li>
 <li><a href="Using_JSTL_seamlessly_with_WebWork.html">Using JSTL seamlessly with WebWork</a></li>
 <li><a href="Handling_file_uploads.html">Handling file uploads</a></li>
-<li><a href="Using_WebWork_Components.html">Using WebWork Components</a> (Webwork 2 only)</li>
+<li><a href="PicoContainer_Integration.html">PicoContainer Integration</a></li>
+<li><a href="Spring_Framework_Integration.html">Spring Framework Integration</a> (Webwork 1.4 or above)</li>
 </ul></body></html>

Index: Handling_file_uploads.html
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/docs/cookbook/Handling_file_uploads.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Handling_file_uploads.html	15 Nov 2003 03:28:32 -0000	1.2
+++ Handling_file_uploads.html	2 Jan 2004 03:04:08 -0000	1.3
@@ -5,6 +5,7 @@
 <li>webwork.multipart.parser - This should be set to a class that extends MultiPartRequest. Currently WebWork ships with two implementations. "com.opensymphony.webwork.dispatcher.multipart.PellMultiPartRequest" and "com.opensymphony.webwork.dispatcher.multipart.CosMultiPartRequest" If the property is not found the Pell parser is used. There are two special names for this property, <b class="bold">pell</b>, and <b class="bold">cos</b>. These special properties map to the Pell multiparser or to Jason Hunter's COS multiparser respectively.</li>
 <li>webwork.multipart.saveDir - The directory where the uploaded files will be placed. If this property is not set it defaults to javax.servlet.context.tempdir.</li>
 <li>webwork.multipart.maxSize - The maximum file size to allow for upload. This helps prevent system abuse by someone uploading lots of large files. The default value is 2 Megabytes and can be set as high as 2 Gigabytes (higher if you want to edit the Pell multipart source but you really need to rethink things if you need to upload files larger then 2 Gigabytes!) If you are uploading more than one file on a form the maxSize applies to the combined total, not the individual file sizes.</li>
+<li>webwork.multipart.uploadToMemory - A flag telling the multipart request wrapper to not store the uploaded data as files in the temp directory. The uploaded data is    accessible using ActionContext.getMultiPartRequest().getMemoryFileContents().</li>
 </ol><p class="paragraph"></p>If you're happy with the defaults there is no need to put any of the properties in webwork.properties. Here is the relevant porion of webwork.properties
 <div class="wikicode"><pre>webwork.multipart.parser=pell
 webwork.multipart.saveDir=/tmp</pre></div><p class="paragraph"></p>Note, while you can set these properties to new values at runtime the MultiPartRequestWrapper is created and the file handled before your action code is called. So if you want to change values you must do so before this action.

--- Using_WebWork_Components.html DELETED ---




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click