So, the most recent Final version of Struts is missing something you need, something you know is in the nightly builds. How do you start using the nightly build of Struts in your project?

First, download (at least) the binary distribution of last night's build: http://cvs.apache.org/builds/jakarta-struts/nightly/

Get the source, too: http://cvs.apache.org/builds/jakarta-struts/nightly/src/

Switching to the nightly build is as simple as copying the .jar and .xml files into your project directory. I do it with an Ant task:

   <property name="webinf" value="webapp\WEB-INF" /> 
   <property name="lib"    value="${webinf}/lib" /> 
   <property name="struts" value="c:\jakarta\jakarta-struts" /> 

      <target name="struts-nightly"> 
     <copy todir="${lib}"> 
        <fileset dir="${struts}/lib"> 
           <include name="*.jar"/> 
        </fileset> 
     </copy> 
     <copy todir="${webinf}"> 
        <fileset dir="${struts}/lib"> 
           <include name="validator-rules.xml"/> 
        </fileset> 
     </copy> 
     <copy todir="${lib}"> 
        <fileset dir="${struts}/contrib/struts-el/lib"> 
           <include name="*.jar"/> 
        </fileset> 
     </copy> 
  </target> 

Take a look at the <!DOCTYPE> tags at the top of your tiles-defs.xml, struts-config.xml, etc., and make sure they are pointing at the latest version of the dtd. Example:

 
<!DOCTYPE struts-config PUBLIC
{{{          "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" 
          "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> 
 

Using URI's in <%@ taglib %> tags will allow the container to discover the tld files inside the .jar files, which means you don't have to keep separate copies of the tld's around. Example:

 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html-el" prefix="html-el" %>
 


Back to the StrutsNewFaqs page

  • No labels