Pointing to http://localhost:8080/com.tergwt.Main/FileServlet shows me HTTP 405 (HTTP method GET is not supported by this URL). http://localhost:8080/FileServlet shows 404 (normal it's not in my webapp folder).
So, the FileServlet is here, but it stills can't be found by the form action ? I'm not using the GWT hosted browser with the tomcat integrated server (I'm using Jetty). Here is my web.xml file : <servlet> <servlet-name>fileServlet</servlet-name> <servlet-class>com.tergwt.server.FileServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>fileServlet</servlet-name> <url-pattern>/FileServlet</url-pattern> </servlet-mapping> Thanks, Regards On 7 fév, 15:23, jmpeace <jmpe...@gmail.com> wrote: > Why don't you try opening a separated browser window and point > tohttp://localhost:8888/FileServlet > > It should give you a HTTP Status 500 error meaning it is listening > there in hosted mode > > On Feb 7, 8:05 am, Jonathan <jonathan.delf...@gmail.com> wrote: > > > Hi, > > Thanks again for the help. > > > GWT.getModuleBaseURL() returnshttp://localhost:8080/com.tergwt.Main/ > > so i guess the path is correct... > > I tried to put the hardcoded path to my app folder (/home/jon/ > > GWTDeploy/webapps/com.tergwt.Main + /FileServlet) and i still get this > > 404. > > I even tried to point it to the classes folder ... > > > I'm not sure to understand very well in what involves this setAction > > line. It should point to my FileServlet.class file ? > > Or something else ? > > > This servlet/form works fine in the embedded tomcat in hosted browser. > > So i guess something between the two config is missing (in my jetty > > server) > > But i can't find what ! It's quite annoying :) > > > Thanks in advance... > > Regards > > > On 7 fév, 01:59, Jonathan <jonathan.delf...@gmail.com> wrote: > > > > Hey i just saw this before your message. > > > But even with that, it stills not working. > > > I still get this message 404<p>RequestURI=/com.tergwt.Main// > > > FileServlet</p><p><i><small>... > > > > And i changed my formAction to form.setAction("/FileServlet"); instead > > > of form.setAction(GWT.getModuleBaseURL() + "/FileServlet"); > > > So now, no more idea on my side ... > > > > Cheers > > > > On 7 fév, 01:50, Shawn Brown <big.coffee.lo...@gmail.com> wrote:> Well > > > you have to specify a valid url. > > > > > You are configuring /fileServlet to go to your servlet and then asking > > > > requesting a url of /FileServlet. > > > > > Aren't you? I am not sure but think capitalization is significant. > > > > > Best, > > > > > Shawn > > > > > On Sat, Feb 7, 2009 at 9:42 AM, Jonathan <jonathan.delf...@gmail.com> > > > > wrote: > > > > > > Wow, i'm almost happy ! > > > > > I finally managed to get rid of the HTTP ERROR 503. > > > > > I misplaced the bin files (.classes), they need to be under yourapp/ > > > > > web-inf/classes/... > > > > > So i took the time to copy libs here too (in lib folder). > > > > > > OK this done, i don't success to upload my file. > > > > > I browse it correctly, but when i click submit i get : <h2>HTTP ERROR: > > > > > 404</h2><pre>NOT_FOUND</pre> > > > > > <p>RequestURI=/com.tergwt.Main//FileServlet</p><p><i><small><a > > > > > href="http://jetty.mortbay.org/">Powered by > > > > > Jetty://</a></small></i></p><br> > > > > > as a response of the server. > > > > > > My web.xml updated : > > > > > <servlet> > > > > > <servlet-name>fileServlet</servlet-name> > > > > > > > > > > <servlet-class>com.tergwt.server.FileServlet</servlet-class> > > > > > </servlet> > > > > > > <servlet-mapping> > > > > > <servlet-name>fileServlet</servlet-name> > > > > > <url-pattern>/fileServlet</url-pattern> > > > > > </servlet-mapping> > > > > > > My entrypoint if needed: > > > > > onModuleLoad() { > > > > > final FormPanel form = new FormPanel(); > > > > > form.setAction(GWT.getModuleBaseURL() + "/FileServlet"); > > > > > ... > > > > > } > > > > > > If someone could tell me what's wrong, it could be nice :) > > > > > > Thanks in advance, > > > > > Regards. > > > > > > On 6 fév, 21:05, Jonathan <jonathan.delf...@gmail.com> wrote: > > > > >> Hi to all, > > > > > >> I'm under linux and I follow this > > > > >> tutorialhttp://jeff.ourexchange.net/2008/03/01/deploying-gwt-applications-wit.... > > > > >> I have a simple gwt application that browses for a file and upload it > > > > >> using a servlet (class FileServlet extends HttpServlet). > > > > >> In hosted mode (with tomcat) with the hosted browser of gwt, all > > > > >> works > > > > >> as expected, my servlet runs fine. > > > > > >> I try to deploy application to a Jetty embedded server and i get a > > > > >> HTTP ERROR: 503 SERVICE_UNAVAILABLE if i enable my servlet in web.xml > > > > >> (under WEB-INF). Also when i run the Jetty server (in console), i get > > > > >> two exceptions like "Failed startup of context > > > > >> org.mortbay.jetty.webapp.webappcont...@1b9ce4b{/com.tergwt.Main,file:/ > > > > >> home/jon/GWTDeploy/webapps/com.tergwt.Main/}" > > > > >> java.lang.NullPointerException > > > > >> I don't see the form of the upload. > > > > > >> If i disable the servlet declaration in the xml file, the server runs > > > > >> without exceptions but it doesnt upload and i get "<h2>HTTP ERROR: > > > > >> 404</h2><pre>NOT_FOUND</pre><p>RequestURI=/com.tergwt.Main// > > > > >> FileServlet</p>" if i try... > > > > > >> So i guess it has something to do with the web.xml file. > > > > >> Unfortunately, i don't success with it. > > > > >> Here is the content of my web.xml file without the web-app marks. > > > > >> <servlet> > > > > >> <servlet-name>fileServlet</servlet-name> > > > > >> > > > > >> <servlet-class>com.tergwt.server.FileServlet</servlet-class> > > > > >> </servlet> > > > > > >> <servlet-mapping> > > > > >> <servlet-name>fileServlet</servlet-name> > > > > >> <url-pattern>/files/*</url-pattern> > > > > >> </servlet-mapping> > > > > > >> I don't know what else i can do to fix this problem as i'm not an > > > > >> expert with these things. > > > > >> My main.java contains the upload form and it uses the FileServlet to > > > > >> make the doPost(). > > > > >> Here is the full tree of my webapp deployed folder with the embed > > > > >> Jetty server :http://filebin.ca/cjgvj/tree.txt. > > > > > >> Thanks in advance. > > > > >> Best regards. > > > > >> Jonathan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---