Hi Nickelnext, > What i cannot do is to configure the setAction properly (i tried with > "/MyFormHandler", with the whole path "WEB-INF/CLASSES/.../server/ > MyFormHandler", with and without using the GWT.getModuleBaseUrl() and > the others two .get methods provided by GWT. But it's always the same > 404 not found.
So what you're looking for here is a URL relative to your HTML page that matches your servlet mapping in web.xml. Let's say you have this URL pattern in web.xml: <url-pattern>/myFormHandler</url-pattern> and your application is deployed here: http://localhost:8080/myApp/index.html Then the URL for your servlet would be: http://localhost:8080/myApp/myFormHandler So you would call setAction() like so: form.setAction(GWT.getModuleBaseURL() + "myFormHandler"); Where GWT.getModuleBaseURL() returns the path to your HTML, without the file name: http://localhost:8080/myApp/ See how that all comes together? >From your description, it sounds like you may already have tried this setup. But I suspect you might be changing your web.xml directly in the tomcat/webapps/myApp directory instead of going through a build/deploy cycle. If that's so, then Tomcat may not be recognizing your changes and reconfiguring your application before your next test. So, you'll want to either adopt a build process (Ant's my tool of choice) or be sure to restart the webapp through the Tomcat manager (or you could restart Tomcat if that's easier). Can you setup your web.xml and form action similar to the above, make sure your changes get deployed, and then let me know if that's working? - Isaac On Thu, Apr 9, 2009 at 8:34 AM, Nickelnext <[email protected]> wrote: > > Hello Isaac, hello everyone > > First of all, I'd like to thank you for your help, i really appreciate > it. > So, if u let me, i'll resume a bit my situation so it will be more > clear for everyone. > > I changed the web.xml pointing to the FormHandler which is in > the .server package. I also changed the module.gwt.xml to match the > servlet (i read it in the > com.google.gwt.eclipse.sdkbundle.linux_1.6.4.v200904062254/gwt- > linux-1.6.4/doc/helpInfo/servletMappings.html). > So now my servlet should be created (and compiled) with a .class file > (i see it in the war/WEB-INF/classes/com/my/site/myprojects/ > provaupload2/ProvaUpload2/server/ folder). > > What i cannot do is to configure the setAction properly (i tried with > "/MyFormHandler", with the whole path "WEB-INF/CLASSES/.../server/ > MyFormHandler", with and without using the GWT.getModuleBaseUrl() and > the others two .get methods provided by GWT. But it's always the same > 404 not found. > > Should i run with -noserver instead of running with eclipse and the > pressing the "compile/browse" button? > Do i miss something? Surely something stupid... > > Thank you again for your help. > - Nickelnext > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
