How to use web.xml or call servlet init () when using GWTTestCase

I am using the GWTTestCase class and I must specify any servlets to use in the module.gwt.xml file with

<servlet path="/somepath" class="com.example.SomeServlet"/>.

The actual requirement is to load other servlets that initialize resources (using the method GenericServlet.init()) to run the tests. web.xml is an obvious choice, as it works with normal application setup. It would also be useful to declare initialization parameters.

How to get GWT to read web.xml file while doing unit testing?

+3
source share
2 answers

I think you will have to:

  • init(),
  • *.gwt.xml ( (), <servlet> )

, , unit test, GWTTestCase, WebDriver/Selenium , (, Jetty).

+2

Google Guice . web.xml. . , . . , , .

0

Source: https://habr.com/ru/post/1758194/


All Articles