baozheliu / ajax-file-upload-struts2 Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/ajax-file-upload-struts2
Automatically exported from code.google.com/p/ajax-file-upload-struts2
file-upload-struts2 could provide freemarker tag library.
Original issue reported on code.google.com by [email protected]
on 9 Feb 2010 at 4:18
What needs to be changed to use 0.4 from 0.3? I had 0.3 working and I
upgraded to 0.4 (along with upgrading struts to 2.1) and I get the
following error:
The absolute uri: http://www.davidjc.com/taglibs can not be resolved
Original issue reported on code.google.com by [email protected]
on 30 Jul 2009 at 6:52
This source code is not latest.
Original issue reported on code.google.com by [email protected]
on 28 Jan 2010 at 6:31
What steps will reproduce the problem?
1. I don't know how to send in text through this Ajax file upload plugin
What is the expected output? What do you see instead?
I want to send in file title and description together with the uploaded
file. So I added the title and description string field in the form
<@s.form id="ajaxFileUploadForm" onsubmit="return false"
action="${parameters.action?html}" method="post" enctype="multipart/form-
data" >
<@s.file name="upload" id="upload" label="Select file" accept="*/*"
size="40" />
<@s.textfield name="title" id="title" label="Title" />
<@s.textarea name="description" id="description" label="Description"
cols="50" rows="5" />
<@s.submit value="Upload" onclick="return hutufa.AjaxFileUpload.initialise
(${dobefore}, ${doafter});" />
</@s.form>
I also add the fields in FileUpload class.
public abstract class FileUpload extends ActionSupport {
...
private File upload;
private String contentType;
private String filename;
private String title;
private String description;
...
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
...
}
But seems the added title and description fields were not picked up in the
demo action.
String title = getTitle();
System.out.println(title);
String description = getDescription();
System.out.println(description);
What version of the product are you using? On what operating system?
I used the latest version in SVN.
Please provide any additional information below.
It seems that the added two fields were not in the value stack, why?
Original issue reported on code.google.com by [email protected]
on 15 Oct 2009 at 10:07
What steps will reproduce the problem?
1. Downloading 0.4.0 version
2. Modifying everything for this version (Eg.: taglib to com.devedup...)
3. Compiling JSPs
-What version of the product are you using? On what operating system?
Java 5... is it compiled with Java 6 and that's the problem?
-Please provide any additional information below.
I've tried to download source code to recompile it myself with maven but source
code here is
previous 0.3 version.
Original issue reported on code.google.com by [email protected]
on 21 Sep 2009 at 12:14
What steps will reproduce the problem?
1. setup the example from
http://www.struts2.org/ajax-file-upload-in-struts2-using-ajax-file-upload-
plugin/
2. Upload larg file
What is the expected output? What do you see instead?
Progress bar should shown as per file upload progress.
What version of the product are you using? On what operating system?
ajax-file-upload-plugin-0.4.0 with struts 2.1.6.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 3 Aug 2009 at 5:12
Hi,
I am not able to use the "http://www.devedup.com/taglibs" url. This URL is no longer available. Please help us how we can make use this plugin?
Thanks in Advance,
Shashi
Original issue reported on code.google.com by [email protected]
on 10 Nov 2011 at 8:44
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 7 Nov 2007 at 2:43
I am trying to download the source for version 0.4.0 but the trunk is still on
0.3.0.
Where can I find the most recent sources ?
Thanks
Original issue reported on code.google.com by [email protected]
on 15 Oct 2010 at 2:59
No where I could find this.
Can anybody help please
Original issue reported on code.google.com by [email protected]
on 10 Sep 2010 at 5:05
What steps will reproduce the problem?
1. upload any image file using this control in a form as in example in IE11
browser
2. Though server side response has clear response, but request never end at
client and crashes IE 11
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 11 Aug 2014 at 6:25
What steps will reproduce the problem?
1. the jsp page is shown below
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://www.devedup.com/taglibs" prefix="afile"%>
<head>
<script
src="http://yui.yahooapis.com/2.4.1/build/yahoo/yahoo-min.js"></script>
<script
src="http://yui.yahooapis.com/2.4.1/build/event/event-min.js"></script>
<script
src="http://yui.yahooapis.com/2.4.1/build/connection/connection-min.js"></script
>
<afile:head />
</head>
<style>
body {font-family:"Tahoma";}
.file_container {width:480px;font-size:11px;border: 1px solid
black;margin:0px;border-collapse:collapse;}
.filelist {font-size:11px;width:100%;margin:0px;border-collapse:collapse;}
#ajaxFileUploadForm .label {font-size:11px;}
#ajaxFileUploadForm input {font-size:11px;}
.filelist tr.odd {background-color:#eef;}
.filelist tr.even { background-color:#dde;}
.filelist tr td {padding:4px;}
</style>
<script>
var callback =
{
cache:false,
success: function(o) {document.getElementById('did').innerHTML =
o.responseText;}
}
function show_list() {
var transaction = YAHOO.util.Connect.asyncRequest('GET',
'/jctaylor/FileUploadDetailsAction.action', callback, null);
}
</script>
<body>
<table class="file_container">
<tr><td>This demonstrates the use of Struts2 Ajax upload plugin and YUI
Ajax connect library.
For more details see <a href="">here</a>.
</td></tr>
<tr>
<td><afile:ajaxfileuploadform action="FileUploadDemoAction" dobefore=""
doafter="show_list" /></td>
</tr>
<tr>
<td><div id='did'></div></td>
</tr>
</table>
</body>
2. call this page assuming creating all the action classes and action
mapping provided by this link:
http://www.struts2.org/ajax-file-upload-in-struts2-using-ajax-file-upload-plugin
/
What is the expected output? What do you see instead?
1. I should see the page to browse the files
2. But I am seeing the 500 error page with the following error:
org.apache.jasper.JasperException: Template
/template/simple/progressbar-close.ftl not found. - Class:
freemarker.template.Configuration
File: Configuration.java
Method: getTemplate
Line: 489 - freemarker/template/Configuration.java:489:-1
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
What version of the product are you using? On what operating system?
I am using version ajax-file-upload-plugin-0.4.0.jar
with struts2.1.6
Please provide any additional information below.
here is my action classes and mappings:
package ajaxupload.action;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.interceptor.ServletRequestAware;
import com.devedup.ajaxfileupload.action.FileUpload;
import com.opensymphony.xwork2.Action;
public class FileUploadDemoAction extends FileUpload implements
ServletRequestAware{
HttpServletRequest request;
@SuppressWarnings("unchecked")
public String execute() {
File uploadedFile = this.getUpload();
String contentType = this.getUploadContentType();
String fileName = this.getUploadFileName();
List<String> l =
(List<String>)request.getSession(true).getAttribute("uploaded_list");
if(l== null) {
l = new ArrayList<String>();
request.getSession(true).setAttribute("uploaded_list", l);
}
l.add("FileName: "+fileName+"\n"+"ContentType: "+contentType+"\n");
return Action.SUCCESS;
}
public void setServletRequest(HttpServletRequest req) {
request = req;
}
}
Mapping file:
<action name="FileUploadDemoAction"
class="ajaxupload.action.FileUploadDemoAction">
<interceptor-ref name="fileUploadStack" />
<result name="success" type="httpheader">
<param name="status">200</param>
</result>
</action>
<action name="FileUploadDetailsAction"
class="ajaxupload.action.FileUploadDetailsAction">
<result>/jctaylor/pages/insuranceApplication/uploadedFilelist.jsp</result>
</action>
Original issue reported on code.google.com by [email protected]
on 25 Sep 2009 at 9:45
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.