Searching for "struts"

Q:

How to upload struts file in DHTML?

Answer

The interface org.apache.struts.upload.FormFile is used for the struts file upload application. This interface represents a file that has been uploaded by a client. It is the only interface or class in upload package which is typically referenced directly by a Struts application.


This is not specific to Struts in case of DHTML but the two things that are needed in DHTML page is: first, the form needs to specify an enctype of multipart/form-data and second an <input> form control of type file.


Following are the steps to load file in DHTML:


- Creating a bean


- Writing the ActionClass.


- Mapping the bean in struts-config.xml


- Defining actionmapping


- Developing the DHTML page.

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

Q:

Explain about struts dispatch action in DHTML

Answer

DispatchAction is an action that comes with Struts 1.1 or later, that let us combine Struts actions into single class, each with their own method. The org.apache.struts.action.DispatchAction class allows multiple operations to map to the different functions in the same Action class.


For e:g; html:hidden property="dispatch" value="error"/>


<SCRIPT>function set(target) {document. forms[0].dispatch. value=target;}</SCRIPT>

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology