The <include name="GreetingServiceImpl.java"/>
should not be in the gwt.xml. The Impl class is server-side code and shouldn't be included as a GWT source. If you use any non-emulated classes such as third-party libraries like Apache Commons, you'll get compile errors.
You might need to make some changes to your web.xml to point to the GreetingsServiceImpl class, which may be what you were trying to achieve in your gwt.xml. I'd recommend going through this tutorial to double-check your configuration.
http://www.vogella.com/tutorials/GWT/article.html#server
Assuming your configuration is working. The getFileList() method in your GreetingServiceImpl class is probably throwing an exception. That's normally what triggers the onFailure method to be called. Since your GreetingServiceImpl I can't be sure if that's what's going on or not though.
Update
The 404 error means GWT can't find your Impl class. There are two possibilities.
- Your Web Server isn't running.
- Your web.xml isn't configured correctly.
If you're running in hosted mode, #1 shouldn't be the case. If you're not sure, there's more information on hosted mode here: http://www.gwtproject.org/doc/latest/DevGuideCompilingAndDebugging.html
For #2, reference the tutorial I linked above. If you're Servlet (the Impl class) isn't mapped correctly, you'll continue to get a 404. Basically you need the Impl class in the com.example.smartgwtproject.sever package and have a corresponding record in the web.xml. It should look something like:
<servlet>
<servlet-name>GreetingService</servlet-name>
<servlet-class>com.example.smartgwtproject.sever.GreetingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>GreetingService</servlet-name>
<url-pattern>/GreetingService</url-pattern>
</servlet-mapping>
However I can't garuntee that is correct for your set up. Again, refer to the tutorial for all the details. Tutorial Link
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…