Hi Ranchers,
I am not able to get the contents for the csv file but for other files its working fine.
The code is
<s:form action="doUpload" method="POST" enctype="multipart/form-data">
<tr>
<td colspan="2"><h1>File Upload Example</h1></td>
</tr>
<s:file name="upload" label="File"/>
<s:textfield name="caption" label="Caption"/>
<s:submit />
</s:form>
---------------------------------------------------------------------------
in Struts.xml i have placed the below code
<action name="upload" method="upload" class="UploadAction" >
<result name="success">/pages/uploadsuccess.jsp</result>
</action>
---------------------------------------------------------------------------
uploadsuccess.jsp has
<%@ page
language="java"
contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Showcase</title>
</head>
<body>
<table class="wwFormTable">
<tr>
<td colspan="2"><h1>File Upload Example</h1></td>
</tr>
<tr>
<td class="tdLabel"><label for="doUpload_upload" class="label">File:</label></td>
<td><s
roperty value="upload" /></td>
</tr>
</table>
</body>
</html>
Can you please tell me how to upload a csv file. I badly need this to be solved. So please help out