Apache Struts 1.0.x Setup
Installation and configuration guide for NES for Apache Struts 1.0.x
Setup Instructions
NES for Apache Struts 1.0 requires Java 8 or newer at runtime. OSS Struts 1.0.2 ran on much older JVMs — upgrade the JVM to at least Java 8 before switching. Building with a newer JDK works with source/target 8.
Configure Registry
Create or update your registry configuration. Get your NES access token from Access Tokens:
<settings>
<servers>
<server>
<id>herodevs-nes-registry</id>
<username>any_text_here_not_used</username>
<password>YOUR_NES_ACCESS_TOKEN</password>
</server>
</servers>
</settings>
See the guides for Sonatype Nexus or JFrog Artifactory for setup to the HeroDevs NES registry.
Update Build Configuration
Add the NES repository and dependencies to your build configuration:
Look up the latest artifact version in the "Struts 1 Release Notes".
<!-- Update the Struts 1.0 dependency version -->
<dependencies>
<dependency>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
<version>1.0.2-struts-1.0.4</version><!-- Updated Version -->
</dependency>
...
</dependencies>
<!-- Add NES repository -->
<repositories>
<repository>
<id>herodevs-nes-registry</id>
<url>https://registry.nes.herodevs.com/maven</url>
</repository>
</repositories>
Handle Breaking Change
CVE-2006-1546: Validation always skipped with Globals.CANCEL_KEY
Issue: Cancel Processing
The Struts <html:cancel> tag sets a request parameter org.apache.struts.taglib.html.Constants.CANCEL which causes validation to be skipped.
Spoofing this request parameter however, could be used maliciously in order to circumvent an applications validation and proceed with the request processing with erroneous and potentially damaging data.
Resolution: Cancellable Attribute
A new cancellable attribute has been introduced on the <action> element which indicates whether an action is allowed to be cancelled or not. The default value is false; without updating the struts-config.xml, an application will not be able to use cancel processing.
A cancel token submitted to an action that is not cancellable is rejected with an HTTP 400 Bad Request instead of silently skipping validation.
Upgrade Implications
Any existing applications that use cancel processing will need to modify their struts-config.xml to set the cancellable attribute for actions which require it.
<action path="/fooAction"
input="/foo.jsp"
validate="true"
cancellable="true">
<forward name="success" path="/bar.jsp"/>
</action>
The cancellable attribute is declared in the updated struts-config_1_0.dtd bundled in the NES jar (org/apache/struts/resources/struts-config_1_0.dtd), which is what the framework validates against at startup. If your build or CI validates struts-config.xml against an externally cached copy of the OSS DTD, refresh it from the NES jar or that validation will reject the new attribute.
Multipart Upload Limits
Two hardening limits were added to the multipart request handling, both configured as ActionServlet init-parameters in web.xml:
partHeaderSizeMax(CVE-2025-48976): maximum size of a single part's headers. Enabled by default at 512 bytes; set to-1to disable. If uploads with unusually large part headers start failing after the upgrade, raise this value.fileCountMax(CVE-2023-24998): maximum number of parts allowed in a single multipart request. Disabled by default (-1); set the init-parameter to enable it.
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>partHeaderSizeMax</param-name>
<param-value>512</param-value>
</init-param>
<init-param>
<param-name>fileCountMax</param-name>
<param-value>50</param-value>
</init-param>
</servlet>
Build
In order to remove potential obstacles before building your project, make sure the following domains are whitelisted by your firewall/networking team:
registry.nes.herodevs.comassets.nes.herodevs.com
This will ensure that your network/firewall allows connection to our registry.
Run your build tool:
mvn clean install
Verification
To verify your installation, check that:
- Dependencies are downloaded successfully
- No version conflicts are reported in your build
- Your application starts without errors
NES for Apache Struts 1.0 publishes -sources jars alongside the main artifacts; -javadoc jars are not published, so configure your IDE to skip javadoc download for these dependencies.
Reverting to OSS
To switch back to the OSS artifacts: restore the dependency version to 1.0.2, and remove the NES <repository> and <server> entries. Additionally, remove any cancellable attributes from struts-config.xml — the attribute is not declared in the OSS 1.0.2 DTD, so an OSS rollback fails config validation at startup until it is removed. The partHeaderSizeMax/fileCountMax init-parameters are simply ignored by OSS Struts and may remain.
Manual Downloads
Direct downloads use the same NES access token via HTTP basic auth (unauthenticated requests receive a 401; downloads redirect to assets.nes.herodevs.com). The direct download URLs for NES for Apache Struts packages follow this format:
| Portion | Value |
|---|---|
| base_url | https://registry.nes.herodevs.com/maven/struts/ |
| package_name | struts |
| version | 1.0.2-struts-1.0.4 |
| filename | package_name + version + extension |