[Opensource] remove

Peter A. J. Pilgrim peterp at xenonsoft.demon.co.uk
Wed Nov 20 17:00:24 PST 2002


Paulo Alvim wrote:
> 
> -----Mensagem original-----
> De: opensource-admin at jcorporate.com
> [mailto:opensource-admin at jcorporate.com]Em nome de
> pshah at adaptivesoftware.biz
> Enviada em: terça-feira, 19 de novembro de 2002 9:19
> Para: opensource at jcorporate.com
> Assunto: [Opensource] problem with using multipart/form-data
> 
> 
> Hi,
> I am using expresso for an application I am developing. One of the forms
> needs to support file update.
> I use the struts html:file tag
> I also use the Struts Action Servlet
> I have set enctype="multipart/form-data"
> There is an ActionForm associated with the controller which is called as the
> result of the form POST
> The ActionForm has an attribute of type FormFile (from Struts) to recieve
> the contents of the uploaded file
> 
> ****************ERROR**********************************
> When the form is submitted I get an error message which says
> 1.The Controller object called
> "biz.adaptivesoftware.jms.qm.controller.QMStateMachine" reported a problem.
> 2.The problem reported was "You must specify a non-blank state. No default
> initial state is specified."
> 3.No error number was specified.
> ***************************************************
> The controller state which gets control when the form is posted is
> represented as an empty method. This is becuase I really want control to go
> to the JSP page which is mapped against 'forward' for that state. This JSP
> page propmts the user with the data they just entered.
> 
in your action mapping for the controller then you just declare the
action forward for the state.


	<action-mappings>
		<!-- Browse Forum Messages -->
		<action path="/eforum/Browse"
			type="com.jcorporate.eforum.controller.Browse"
			name="browseForm"
			scope="session"
			validate="false" >
			<forward name="promptSelGroups" path="/expresso/components/eforum/jsp/groups.jsp"/>
			<forward name="promptGroupSubscribe" path="/expresso/components/eforum/jsp/subscribe.jsp"/>


The name of the forward matches the state name in the controller.
For example  "promptGroupSubscribe" is the state name, which is
in reality is the method

`protected void runPromptGroupSubscribeState( .... ) { ... }'

So all you have to do is carefully match the names.

-- 
Peter Pilgrim
ServerSide Java Specialist

My on-line resume and for interview videos about myself, J2EE
Open Source, Struts and Expresso.
    ||
    \\===>  `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''




More information about the Opensource mailing list