Re: GWTTest case mapping URI to file for testing

2010-12-01 Thread Raphael André Bauer
On Mon, Nov 29, 2010 at 3:54 PM, ep eplisc...@googlemail.com wrote:
 have you registered a servlet in your GWT module?

 servlet class=yourServletClass path=/test.json/


Hi ep,


you were totally right. I was confused with web.xml and the servlets
defined in the gwt.xml module. The other confusion came from the way
the servlet mapping is made.

a

servlet class=yourServletClass path=/test.json/

translates to a
GWT.getModuleBaseURL() + /test.json
in the client module.

apart from that it works fine :)


Thanks for the hint!

Cheers,


Raphael








 On 29 Nov., 14:54, Raphael André Bauer raphael.andre.ba...@gmail.com
 wrote:
 Hi folks,

 I want to write a GWTTestcase that fetches a file from the server.
 My setup is maven + headless htmlunit for integration testing (target
 integration-test).

 Say I got a json file (named test.json I want to read from the
 server in directory root. Where do I have to put my json file in my
 test setup so that a GET at /test.json returns that file?

 I always get a Error 404 NOT_FOUND from my jetty in the testcase.

 Thanks,

 Raphael

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



-- 
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: GWTTest case mapping URI to file for testing

2010-11-29 Thread ep
have you registered a servlet in your GWT module?

servlet class=yourServletClass path=/test.json/

On 29 Nov., 14:54, Raphael André Bauer raphael.andre.ba...@gmail.com
wrote:
 Hi folks,

 I want to write a GWTTestcase that fetches a file from the server.
 My setup is maven + headless htmlunit for integration testing (target
 integration-test).

 Say I got a json file (named test.json I want to read from the
 server in directory root. Where do I have to put my json file in my
 test setup so that a GET at /test.json returns that file?

 I always get a Error 404 NOT_FOUND from my jetty in the testcase.

 Thanks,

 Raphael

-- 
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: GWTTest case mapping URI to file for testing

2010-11-29 Thread Raphael André Bauer
On Mon, Nov 29, 2010 at 2:54 PM, Raphael André Bauer
raphael.andre.ba...@gmail.com wrote:
 Hi folks,


 I want to write a GWTTestcase that fetches a file from the server.
 My setup is maven + headless htmlunit for integration testing (target
 integration-test).

 Say I got a json file (named test.json I want to read from the
 server in directory root. Where do I have to put my json file in my
 test setup so that a GET at /test.json returns that file?

 I always get a Error 404 NOT_FOUND from my jetty in the testcase.

okay I solved it...

I had to put it into the public directory inside the test case package...


cheers,

ra





 Thanks,

 Raphael


-- 
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: GWTTest case mapping URI to file for testing

2010-11-29 Thread Raphael André Bauer
On Mon, Nov 29, 2010 at 3:54 PM, ep eplisc...@googlemail.com wrote:
 have you registered a servlet in your GWT module?

 servlet class=yourServletClass path=/test.json/

thanks for that hint...

However - are you sure it still works?


http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
says:

servlet path=url-path class=classname / : For RPC, this element
loads a servlet class mounted at the specified URL path. The URL path
should be absolute and have the form of a directory (for example,
/calendar). Your client code then specifies this URL mapping by
annotating the service interface with the @RemoteServiceRelativePath
attribute. Any number of servlets may be loaded in this manner,
including those from inherited modules.
The servlet element applies only to GWT's embedded server
server-side debugging feature.
NOTE: as of GWT 1.6, this tag does no longer loads servlets in
development mode, instead you must configure a WEB-INF/web.xml in your
war directory to load any servlets needed.


Thanks,


Raphael



 On 29 Nov., 14:54, Raphael André Bauer raphael.andre.ba...@gmail.com
 wrote:
 Hi folks,

 I want to write a GWTTestcase that fetches a file from the server.
 My setup is maven + headless htmlunit for integration testing (target
 integration-test).

 Say I got a json file (named test.json I want to read from the
 server in directory root. Where do I have to put my json file in my
 test setup so that a GET at /test.json returns that file?

 I always get a Error 404 NOT_FOUND from my jetty in the testcase.

 Thanks,

 Raphael

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



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