Hello
I have followed thethis link(http://groups.google.com/group/
Google-Web-Toolkit/browse_thread/thread/
19ea5c6be6d47848/8a4439de9cd48006?
lnk=gst&q=FancyFileUpload#8a4439de9cd48006) to upload a file,and I am
using Cypal,and question is what
other work is needed,should I add some entries to Test.xml,or to
web.xml,in fact I have added following entries to web.xml:
--------------------------------------------------------------------------
<servlet>
<servlet-name>FileUploadServlet</servlet-name>
<servlet-class>
com.tsolution.emc.server.FileUploadServlet</servlet-
class>
</servlet>
<servlet-mapping>
<servlet-name>FileUploadServlet</servlet-name>
<url-pattern>/FileUploadServlet</url-pattern>
</servlet-mapping>
-------------------------------------------------------------------------------------
but when run hosted model,I got this error:
-------------------------------------------------------------------------
[ERROR] Unable to find 'FileUploadServlet.gwt.xml' on your classpath;
could be a typo, or maybe you forgot to include a classpath entry for
source?
-----------------------------------------------------------------------------
By the way,in the class FancyFileUpload.java,
---------------------------------------
uploadForm.setAction(Test.getRelativeURL("FileUploadServlet"));
----------------------------------------
and this is Test.java
-----------------------------------------------
public class Test implements EntryPoint
{
public void onModuleLoad()
{
FancyFileUpload ffupload = new FancyFileUpload();
RootPanel.get().add(ffupload);
}
public static final String LOCAL_HOST = "http://localhost:
8888/";
public static final String REMOTE_HOST = "http://localhost:
8888/Test/";
public static String getRelativeURL(String url)
{
String realModuleBase;
if (GWT.isScript())
{
String moduleBase = GWT.getModuleBaseURL();
// Use for Deployment to production server
realModuleBase = REMOTE_HOST;
// Use to test compiled browser locally
if (moduleBase.indexOf("localhost") != -1)
{
realModuleBase = LOCAL_HOST;
}
} else
{
// This is the URL for GWT Hosted mode
realModuleBase = LOCAL_HOST;
}
return realModuleBase + url;
}
}
-----------------------------------------------
I added a log informationin servlet,it seemed that servlet did not
receive any request from request,so can you tell me where and how to
set the servlet mapping for url to servlet,thanks in advanced.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---