With form.setAction("/FileServlet"); i get <h2>HTTP ERROR: 404</
h2><pre>NOT_FOUND</pre>
<p>RequestURI=/FileServlet</p>That's strange. Thanks for the help. Cheers On 7 fév, 01:59, Jonathan <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 [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 -~----------~----~----~----~------~----~------~--~---
