Re: Error while running unit tests - Servlets in web.xml are not identified

2010-01-22 Thread siva
Anyone has any idea on this ?

-- 
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-tool...@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.



Error while running unit tests - Servlets in web.xml are not identified

2010-01-17 Thread siva
We have a gwt application with some servlets and filters configured in
web.xml. While writing unit tests to test the code making calls to
these servlets, these servlets are not identified and looks like
servlet configuration is expected in x.gwt.xml. There are no
issues with hosted mode in recognizing this configuration in web.xml
and works fine.

-I tried to duplicate this servlet configurationin gwt.xml file. But,
how do I configure my filters in gwt.xml. Without these filters my
unit tests fail.

- Is there a way I can make junit tests identify servlet  filter
configuration in web.xml just the way hosted mode works ?

Any help is much appreciated.



-- 
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-tool...@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.




Re: Error while running unit tests - Servlets in web.xml are not identified

2010-01-17 Thread siva
We are using gwt 2.0
-- 
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-tool...@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.




Re: Servlets and web.xml

2009-02-07 Thread Jonathan

Hi,
Thanks again for the help.

GWT.getModuleBaseURL() returns http://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 404pRequestURI=/com.tergwt.Main//
 FileServlet/ppismall...

 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 : h2HTTP ERROR:
   404/h2preNOT_FOUND/pre
   pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
   href=http://jetty.mortbay.org/;Powered by 
   Jetty:///a/small/i/pbr
   as a response of the server.

   My web.xml updated :
   servlet
                  servlet-namefileServlet/servlet-name
                  
   servlet-classcom.tergwt.server.FileServlet/servlet-class
          /servlet

          servlet-mapping
                  servlet-namefileServlet/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 h2HTTP ERROR:
   404/h2preNOT_FOUND/prepRequestURI=/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-namefileServlet/servlet-name
                   
   servlet-classcom.tergwt.server.FileServlet/servlet-class
           /servlet

           servlet-mapping
                   servlet-namefileServlet/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 

Re: Servlets and web.xml

2009-02-07 Thread jmpeace

Why don't you try opening a separated browser window and point to
http://localhost:/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 404pRequestURI=/com.tergwt.Main//
  FileServlet/ppismall...

  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 : h2HTTP ERROR:
404/h2preNOT_FOUND/pre
pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
href=http://jetty.mortbay.org/;Powered by 
Jetty:///a/small/i/pbr
as a response of the server.

My web.xml updated :
servlet
               servlet-namefileServlet/servlet-name
               
servlet-classcom.tergwt.server.FileServlet/servlet-class
       /servlet

       servlet-mapping
               servlet-namefileServlet/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 h2HTTP ERROR:
404/h2preNOT_FOUND/prepRequestURI=/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-namefileServlet/servlet-name
                
servlet-classcom.tergwt.server.FileServlet/servlet-class
        /servlet

        servlet-mapping
                servlet-namefileServlet/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.

Re: Servlets and web.xml

2009-02-07 Thread Jonathan

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-namefileServlet/servlet-name
servlet-classcom.tergwt.server.FileServlet/servlet-class
/servlet
servlet-mapping
servlet-namefileServlet/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:/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 404pRequestURI=/com.tergwt.Main//
   FileServlet/ppismall...

   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 : h2HTTP ERROR:
 404/h2preNOT_FOUND/pre
 pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
 href=http://jetty.mortbay.org/;Powered by 
 Jetty:///a/small/i/pbr
 as a response of the server.

 My web.xml updated :
 servlet
                servlet-namefileServlet/servlet-name
                
 servlet-classcom.tergwt.server.FileServlet/servlet-class
        /servlet

        servlet-mapping
                servlet-namefileServlet/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 h2HTTP ERROR:
 404/h2preNOT_FOUND/prepRequestURI=/com.tergwt.Main//
 FileServlet/p if i try...

 So i 

Re: Servlets and web.xml

2009-02-07 Thread Jonathan

Wow i don't know what happened but i put
form.setAction(GWT.getHostPageBaseURL() + FileServlet);
using this web.xml and all finally works fine...

Thanks you very much for the help, i can now go forward !
Thanks again !

Best regards,
Jonathan

On 7 fév, 15:48, Jonathan jonathan.delf...@gmail.com wrote:
 Pointing tohttp://localhost:8080/com.tergwt.Main/FileServletshows me
 HTTP 405 (HTTP method GET is not supported by this 
 URL).http://localhost:8080/FileServletshows 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-namefileServlet/servlet-name
                 servlet-classcom.tergwt.server.FileServlet/servlet-class
 /servlet
 servlet-mapping
                 servlet-namefileServlet/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:/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 404pRequestURI=/com.tergwt.Main//
FileServlet/ppismall...

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 : h2HTTP 
  ERROR:
  404/h2preNOT_FOUND/pre
  pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
  href=http://jetty.mortbay.org/;Powered by 
  Jetty:///a/small/i/pbr
  as a response of the server.

  My web.xml updated :
  servlet
                 servlet-namefileServlet/servlet-name
                 
  servlet-classcom.tergwt.server.FileServlet/servlet-class
         /servlet

         servlet-mapping
                 servlet-namefileServlet/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
  

Re: Servlets and web.xml

2009-02-07 Thread Shawn Brown

Hi,

So what is the value for GWT.getHostPageBaseURL()?

What is your app called?  By that I mean under Jetty_home/webapps/, in
what dir is your app.

Probably it's not com.tergwt.Main, but that is what you were asking in
http://localhost:8080/com.tergwt.Main/FileServlet

http://localhost:8080/dir_of_your_app/FileServlet should work.  This
means that your web.xml file is at
/dir_of_your_app/WEB-INF/web.xml

 Wow i don't know what happened but i put
 form.setAction(GWT.getHostPageBaseURL() + FileServlet);

well that is different than...

of form.setAction(GWT.getModuleBaseURL() + /FileServlet);


Glad it works!

Shawn

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Servlets and web.xml

2009-02-06 Thread Jonathan

Hi to all,

I'm under linux and I follow this tutorial
http://jeff.ourexchange.net/2008/03/01/deploying-gwt-applications-with-jetty/.
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 h2HTTP ERROR:
404/h2preNOT_FOUND/prepRequestURI=/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-namefileServlet/servlet-name
servlet-classcom.tergwt.server.FileServlet/servlet-class
/servlet

servlet-mapping
servlet-namefileServlet/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
-~--~~~~--~~--~--~---



Re: Servlets and web.xml

2009-02-06 Thread Jonathan

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 : h2HTTP ERROR:
404/h2preNOT_FOUND/pre
pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
href=http://jetty.mortbay.org/;Powered by Jetty:///a/small/i/pbr
as a response of the server.

My web.xml updated :
servlet
servlet-namefileServlet/servlet-name
servlet-classcom.tergwt.server.FileServlet/servlet-class
/servlet

servlet-mapping
servlet-namefileServlet/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 h2HTTP ERROR:
 404/h2preNOT_FOUND/prepRequestURI=/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-namefileServlet/servlet-name
                 servlet-classcom.tergwt.server.FileServlet/servlet-class
         /servlet

         servlet-mapping
                 servlet-namefileServlet/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
-~--~~~~--~~--~--~---



Re: Servlets and web.xml

2009-02-06 Thread Shawn Brown

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 : h2HTTP ERROR:
 404/h2preNOT_FOUND/pre
 pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
 href=http://jetty.mortbay.org/;Powered by Jetty:///a/small/i/pbr
 as a response of the server.

 My web.xml updated :
 servlet
servlet-namefileServlet/servlet-name
servlet-classcom.tergwt.server.FileServlet/servlet-class
/servlet

servlet-mapping
servlet-namefileServlet/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 h2HTTP ERROR:
 404/h2preNOT_FOUND/prepRequestURI=/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-namefileServlet/servlet-name
 servlet-classcom.tergwt.server.FileServlet/servlet-class
 /servlet

 servlet-mapping
 servlet-namefileServlet/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
-~--~~~~--~~--~--~---



Re: Servlets and web.xml

2009-02-06 Thread Jonathan

Hey i just saw this before your message.
But even with that, it stills not working.
I still get this message 404pRequestURI=/com.tergwt.Main//
FileServlet/ppismall...

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 : h2HTTP ERROR:
  404/h2preNOT_FOUND/pre
  pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
  href=http://jetty.mortbay.org/;Powered by Jetty:///a/small/i/pbr
  as a response of the server.

  My web.xml updated :
  servlet
                 servlet-namefileServlet/servlet-name
                 servlet-classcom.tergwt.server.FileServlet/servlet-class
         /servlet

         servlet-mapping
                 servlet-namefileServlet/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 h2HTTP ERROR:
  404/h2preNOT_FOUND/prepRequestURI=/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-namefileServlet/servlet-name
                  
  servlet-classcom.tergwt.server.FileServlet/servlet-class
          /servlet

          servlet-mapping
                  servlet-namefileServlet/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
-~--~~~~--~~--~--~---



Re: Servlets and web.xml

2009-02-06 Thread Jonathan

With form.setAction(/FileServlet); i get h2HTTP ERROR: 404/
h2preNOT_FOUND/pre
pRequestURI=/FileServlet/p

That's strange.
Thanks for the help.
Cheers

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 404pRequestURI=/com.tergwt.Main//
 FileServlet/ppismall...

 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 : h2HTTP ERROR:
   404/h2preNOT_FOUND/pre
   pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
   href=http://jetty.mortbay.org/;Powered by 
   Jetty:///a/small/i/pbr
   as a response of the server.

   My web.xml updated :
   servlet
                  servlet-namefileServlet/servlet-name
                  
   servlet-classcom.tergwt.server.FileServlet/servlet-class
          /servlet

          servlet-mapping
                  servlet-namefileServlet/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 h2HTTP ERROR:
   404/h2preNOT_FOUND/prepRequestURI=/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-namefileServlet/servlet-name
                   
   servlet-classcom.tergwt.server.FileServlet/servlet-class
           /servlet

           servlet-mapping
                   servlet-namefileServlet/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
-~--~~~~--~~--~--~---