Zc12054-Ftuk-8L2U: Part "Multipart/Form-Data" Encrtype "Multipart/Form-Data" Contenttype "Multipart/Form-Data"

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

ZC12054-FTUK-8L2U

1.
Referring to the above, which one of the following choices below allows the creation
of a Struts-aware HTML form?

<%@ page language="java" %>

<%@ <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri> %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

%@! taglib uri="/WEB-INF/struts-html.tld" prefix="html" %

<%@! page language="java" %>


2.
The Struts message resources can be loaded either by 1) an init parameter in the
servlet config inthe web.xml or 2) by a <message-resources> tag in the strutsconfig.xml.Referring to the above, when is using option 2 required in a Struts
application?

Option 2 is required when the application supports more than one


applicationresource file
.

Option 2 is required when the application supports database access.

Option 2 is required when the application uses the Struts Tiles framework.

Option 2 is required when using Struts v1.2.x or greater.

Option 2 is required when the application uses the Spring framework.[Note:]


You can define more than one message resource file. Therefore you must add a parameter key tothe tag <message-resource>.
With this key Struts knows which message resource file to access.
3.

Referring to the above, which one of the following codes allows a file to be uploaded
to the server?

part="multipart/form-data"

encrtype="multipart/form-data"

contentType="multipart/form-data"

filetype="multipart/form-data"

enctype="multipart/form-data"
[Note:]http://www.roseindia.net/struts/strutsfileuploadandsave.shtml
4. struts-config.xml snippet:
<action
path="/multi"type="test.MultiAction"name="MultiForm"scope="request"input="/multi.jsp"parameter="method"/>
JSP code snippet:
<html:form ction="/multi"><html:submit property="method"><bean:message
key="button.feature1"/></html:submit><html:submit property="method"><bean:message
key="button.feature2"/></html:submit></html:form>
Referring to the above, how does a developer create an Action class capable of
processing multiplesubmit buttons WITHOUT using JavaScript in the form?

By subclassing the DefinitionDispatcherAction class and defining an execute method


calledfeature1 and feature2 in the subclass

By instantiating the DispatchAction class and defining an execute method


called feature1 andfeature

You might also like