aspose file tools*
The moose likes Struts and the fly likes Struts 1.3.8 and tomcat 5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.3.8 and tomcat 5" Watch "Struts 1.3.8 and tomcat 5" New topic
Author

Struts 1.3.8 and tomcat 5

jean luc picard
Greenhorn

Joined: Feb 05, 2009
Posts: 1
Hello,
I'm using commons fileupload and am able to see that the file upload portion works fine, as per the example here. I want to build upon the basic idea by setting a maxFileSize and specifying a path. I understand that these can be done in struts-config.xml <controller> section. However, I'm having some issues -

1. I don't know if there is a specific order to be maintained in the struts-config.xml when inserting <controller> element. I put it at the very end, or before/after tiles <plug-in>, before/after <message-resources> but every time I get the following error on startup.
java.lang.NullPointerException
org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(FactorySet.java:116)

2. To specify the temp location of the uploaded file, I understand I can use tempDir in the <controller> but what I don't get is the path. Can it be absolute? Or is to be a location within the servlet container? If the latter then what would be the starting point - /WEB-INF?

I guess these are very basic questions, but they are roadblocks for me .
Any suggestions would be appreciated. Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61187
    
  66

"jean luc picard", please beam down your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

1. Look at the DTD to determine what the element ordering must be.
2. Seems like it'd be pretty simple to just TRY it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 1.3.8 and tomcat 5