Matt Raible-3 wrote:
> 
> On 12/5/06, Tim Azzopardi <[EMAIL PROTECTED]> wrote:
> 
>> File-Upload
>> -----------
>>
>> "ant test-all" works all the way up to the File-Upload cannoo web test
>>
>> When I access the File-Upload page manually I get
>> java.lang.IllegalArgumentException: The default() is not defined in
>> action
>> class com.myapp.webapp.action.FileUploadAction
>>         at
>> com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(
>> DefaultActionInvocation.java:363)
>>
>> Anybody got any suggestions for either problem?
> 
> 
> Struts 2 changed the way ! works when used in a URL.  With WebWork, using
> selectFile!default.html called doDefault() in the Action.  With Struts 2,
> it'll call default().  Since default is a keyword, you have to change how
> this works so it calls start() (or something like that).  This is what
> we're
> using in AppFuse 2.0.
> 
> http://fisheye4.cenqua.com/browse/~raw,r=1868/appfuse/trunk/web/struts/src/main/java/org/appfuse/webapp/action/FileUploadAction.java
> 
> Matt
> 
> 

Thanks Matt, I have the file upload working now:
These are the changes required:

In menu-config.xml:
        < Menu name="FileUpload" title="menu.selectFile" description="File
Upload" width="100" page="/uploadFile!start.html" roles="admin,user"/>

In uploadDisplay.jsp
    < input class="button" type="button" style="width: 120px" value="Upload
Another"
      onclick="location.href='uploadFile!start.html'" />

In web-tests.xml
    < invoke description="click Upload a File link"
url="/uploadFile!start.html"/>

In FileUploadAction.java
Change
    public String doDefault() {
        return INPUT;
    }
to
    public String start() {
        return INPUT;
    }


-- 
View this message in context: 
http://www.nabble.com/appfuse-1.9.4-webwork-migration-to-struts2-tf2761053s2369.html#a7735881
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to