Anyone get Uploader widget to work? [message #87126] |
Wed, 14 May 2008 06:47  |
Eclipse User |
|
|
|
Has anyone gotten the RAP File Uploader widget to work? I am using the
latest version of bundle org.eclipse.rwt.widgets.upload from CVS. I get
this exception
java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
at
org.apache.commons.fileupload.servlet.ServletFileUpload.pars eRequest(ServletFileUpload.java:126)
at
org.eclipse.rwt.widgets.upload.servlet.FileUploadServlet.doP ost(FileUploadServlet.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.service(ServletManager.jav
a:180)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.jav
a:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.eclipse.equinox.http.jetty.internal.HttpServerManager$In ternalHttpServiceServlet.service(HttpSe
rverManager.java:270)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
at
org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java: 820)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37)
at
org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)
Thanks,
David
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Anyone get Uploader widget to work? [message #91429 is a reply to message #87396] |
Tue, 03 June 2008 06:46   |
Eclipse User |
|
|
|
Hi,
I having a problem using the uploader widget when deployed in tomcat.I
integrated the FileUpload widget on to my application and the following is
the code inside the createDialogArea of Dialog :
Composite composite = new Composite(parent,SWT.None);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
GridLayout gLayout = new GridLayout();
composite.setLayout(gLayout);
final Upload upload = new Upload(composite, SWT.NONE, null, true);
upload.setLayoutData( new GridData( 300, SWT.DEFAULT ) );
final Label image = new Label( parent, SWT.NONE );
final Label lab = new Label( parent, SWT.NONE );
UploadAdapter uploadAdapter = new UploadAdapter() {
public void uploadFinished( final UploadEvent uploadEvent ) {
if( uploadEvent.isFinished() ) {
File lastUploadedFile = upload.getLastUploadedFile();
try {
System.out.println("FILE NAME :"
+ lastUploadedFile.getName() + " Path :"
+ lastUploadedFile.getCanonicalPath());
;
_tdsatLog.info("FILE NAME :"
+ lastUploadedFile.getName() + " Path :"
+ lastUploadedFile.getCanonicalPath());
;
}catch(Exception ex) {}
lab.setText(lastUploadedFile.getName());
}
}
};
upload.addUploadListener( uploadAdapter );
When i locally launch it, the upload happens successfully only once.When u
attempt it consecutively it remains unresponsive.
Now when u deploy the war on to tomcat, the upload widget remains
unresponsive,the uploadFinished method will never get called.
Has anyone faced a similar problem, do please help me resolve this issue.
My dev environment consists of Eclipse_3.4 with Rc2 target.
Regards,
Murali
|
|
|
Re: Anyone get Uploader widget to work? [message #91672 is a reply to message #91429] |
Wed, 04 June 2008 03:31   |
Eclipse User |
|
|
|
Originally posted by: fappel.innoopract.com
Hi,
I think your problem is the same as described in the thread 'Uploader:
fails to upload file on Windows', see the post from Cheney Chen. Stefan
has spend some time on reworking the file upload widget and will commit
the new version soon. This will use a service handler instead of an
extra servlet so this problem should vanish completely.
Ciao
Frank
-----Ursprüngliche Nachricht-----
Von: Murali Krishna [mailto:murakris@gmail.com]
Bereitgestellt: Dienstag, 3. Juni 2008 12:46
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Anyone get Uploader widget to work?
Betreff: Re: Anyone get Uploader widget to work?
Hi,
I having a problem using the uploader widget when deployed in tomcat.I
integrated the FileUpload widget on to my application and the following
is the code inside the createDialogArea of Dialog :
Composite composite = new Composite(parent,SWT.None);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, true));
GridLayout gLayout = new GridLayout();
composite.setLayout(gLayout);
final Upload upload = new Upload(composite, SWT.NONE,
null, true);
upload.setLayoutData( new GridData( 300, SWT.DEFAULT )
);
final Label image = new Label( parent, SWT.NONE );
final Label lab = new Label( parent, SWT.NONE );
UploadAdapter uploadAdapter = new UploadAdapter() {
public void uploadFinished( final UploadEvent uploadEvent
) {
if( uploadEvent.isFinished() ) {
File lastUploadedFile = upload.getLastUploadedFile();
try {
System.out.println("FILE NAME :"
+
lastUploadedFile.getName() + " Path :"
+
lastUploadedFile.getCanonicalPath());
;
_tdsatLog.info("FILE NAME :"
+
lastUploadedFile.getName() + " Path :"
+
lastUploadedFile.getCanonicalPath());
;
}catch(Exception ex) {}
lab.setText(lastUploadedFile.getName());
}
}
};
upload.addUploadListener( uploadAdapter );
When i locally launch it, the upload happens successfully only once.When
u attempt it consecutively it remains unresponsive.
Now when u deploy the war on to tomcat, the upload widget remains
unresponsive,the uploadFinished method will never get called.
Has anyone faced a similar problem, do please help me resolve this
issue.
My dev environment consists of Eclipse_3.4 with Rc2 target.
Regards,
Murali
|
|
|
|
Re: Anyone get Uploader widget to work? [message #91989 is a reply to message #91743] |
Thu, 05 June 2008 11:53  |
Eclipse User |
|
|
|
Hi Murali,
I committed a new version of the upload widget today. Can you check if
your deployment problems persist?
Regards,
Stefan.
Murali Krishna schrieb:
> Oh, that's great and i will look forward for the same.Can i know when
> will that happen.Will it be a part of RAP target platform?
> Thanks,
> Murali
>
|
|
|
Powered by
FUDForum. Page generated in 0.04461 seconds