BrowseForFile.jsp Sample
This topic inludes the source code for the BrowseForFile.jsp Sample.
Sample Location
This sample is located in the following directory in your WebLogic Workshop installation:
BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui/fileUpload/
Sample Source Code
01 <!--Generated by WebLogic Workshop-->
02 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
03 <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
04 <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
05 <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
06 <netui:html>
07 <head>
08 <title>
09 browseForFile.jsp
10 </title>
11 </head>
12 <body>
13 <jsp:include page="/resources/jsp/header.jsp"/>
14 <h3>FileUpload Tag Sample</h3>
15 <%--
16 <netui:form> tags that contain the <netui:fileUpload> tag must
17 have the attribute: enctype="multipart/form-data".
18 --%>
19 <netui:form action="uploadFile" enctype="multipart/form-data">
20 <table border="0" bgcolor="#ccffff">
21 <tr>
22 <td>
23 <b>Upload a File</b>
24 </td>
25 </tr>
26 <tr>
27 <td>
28 <netui:fileUpload tagId="inputbox" dataSource="{actionForm.theFile}" />
29 </td>
30 </tr>
31 <tr align="right">
32 <td>
33 <netui:button value="Upload File" action="uploadFile"></netui:button>
34 </td>
35 </tr>
36 </table>
37 </netui:form>
38 <hr>
39 <netui:anchor href="/WebApp/tagSamples/tagSamplesController.jpf">Return to Tag Samples</netui:anchor>
40 </body>
41 </netui:html>
|