Right. The reason for the prefix is that when the GWT classes are built, they will go into:
target/webapp/ModuleName/* This is just the default GWT compiler behavior, but it has secondary advantages I talked about in the other thread going on here about module prefix directories. Basically it works like this: When your module is built, that "ModuleName" folder in front of everything becomes the GWT.getModuleBaseURL() (I think that is the name). You can then prepend that into the URLs for your service stubs and they will work end to end. This can be a little confusing in the GWTShell because your MySQLConnService in the shell will answer on BOTH "/MySQLConnService" AND "com.tribling.gwt.test.mysqlconn.server.MySQLConnServiceImpl/com.tribling.gwt.test.mysqlconn.MySQLConn/MySQLConnService" However, since the war will usually have a context path in front of it, using the full version so that the Module Base URL in your compiled GWT code contains the context path is handy. That is, that servlet mapping, when running, will make getModuleBaseURL() return: http://localhost:8080/artifactId/com.tribling.gwt.test.mysqlconn.server.MySQLConnServiceImpl/com.tribling.gwt.test.mysqlconn.MySQLConn/MySQLConnService which should be a valid URL. Also, if you are building multiple modules into the same WAR file, this prevents collisions. As for checking the path for the pom file, no. That META-INF/maven directory only gets built into JAR files. When you build a WAR file, it doesn't go into the WEB-INF/classes directory by default. You could use an antrun goal to copy it there if you need it for your code to run properly, however. On Wed, Feb 18, 2009 at 11:45 AM, ytbryan <[email protected]> wrote: > > this is from my application.gwt.xml > > <servlet > class="com.tribling.gwt.test.mysqlconn.server.MySQLConnServiceImpl" > path="/MySQLConnService"/> > > is there something wrong? > > > On Feb 18, 5:41 pm, ytbryan <[email protected]> wrote: >> i realised that the servlet and servlet mapping that gwt-maven added >> are kinda weird. >> >> below: >> >> <servlet> >> <servlet- >> name>com.tribling.gwt.test.mysqlconn.server.MySQLConnServiceImpl/ >> com.tribling.gwt.test.mysqlconn.MySQLConn/MySQLConnService</servlet- >> name> >> <servlet- >> class>com.tribling.gwt.test.mysqlconn.server.MySQLConnServiceImpl</ >> servlet-class> >> </servlet> >> <!--inserted by gwt-maven--> >> <servlet-mapping> >> <servlet- >> name>com.tribling.gwt.test.mysqlconn.server.MySQLConnServiceImpl/ >> com.tribling.gwt.test.mysqlconn.MySQLConn/MySQLConnService</servlet- >> name> >> <url-pattern>/com.tribling.gwt.test.mysqlconn.MySQLConn/ >> MySQLConnService</url-pattern> >> </servlet-mapping> >> >> is there somethign wrong? >> >> On Feb 18, 5:39 pm, ytbryan <[email protected]> wrote: >> >> > gosh.... >> > thank you for your patience.......... may i check the path for pom.xml >> > is META-INF/maven/pom.xml? >> >> > i edit that pom.xml but it is still not working..... do i need to >> > comment out " <warSourceExcludes>.gwt-tmp/**</warSourceExcludes> " >> >> > On Feb 18, 5:21 pm, "Robert \"kebernet\" Cooper" <[email protected]> >> > wrote: >> >> > > Well, the general idea here is this: >> >> > > you have a web.xml file under src/main/webapp/WEB-INF. >> >> > > There you can put anything you want that ISN'T a GWT servlet. Like >> > > filters, authentication settings, etc. >> >> > > The mergewebxml goal reads that web.xml file, and adds all the GWT >> > > servlets in the right place, and writes to target/web.xml. You then >> > > build your war file with the target/web.xml file and you have >> > > everything you have manually configured + all the GWT servlets defined >> > > in your modules. >> >> > > On Wed, Feb 18, 2009 at 11:18 AM, ytbryan <[email protected]> wrote: >> >> > > > i think i got it . it should be added under <webapp> >> >> > > > but how come webmergexml doesn't do it for me =.= >> >> > > > On Feb 18, 5:07 pm, ytbryan <[email protected]> wrote: >> > > >> i did ran the webmergexml. but i check teh web.xml and it does not >> > > >> have servet or servlet mapping. >> >> > > >> sorry i am not familiar with what you are saying...... my gwt.xml is >> > > >> below...... can you explain to me again>? >> >> > > >> <?xml version="1.0" encoding="UTF-8" standalone="no"?><module> >> >> > > >> <!-- Inherit the core Web Toolkit stuff. --> >> > > >> <inherits name="com.google.gwt.user.User"/> >> > > >> <inherits name="com.gwtext.GwtExt"/> >> > > >> <inherits name="com.gwtext.Charts"/> >> >> > > >> <!-- Inherit the gwtextux plugin stuff. --> >> > > >> <!-- <inherits name="com.gwtextux.GridSearchPlugin"/>--> >> >> > > >> <!-- Specify the app entry point class. --> >> > > >> <entry-point >> > > >> class="com.tribling.gwt.test.mysqlconn.client.MySQLConn"/ >> >> > > >> <!-- style --> >> > > >> <stylesheet src="style.css"/> >> > > >> <stylesheet src="js/ext/resources/css/ext-all.css"/> >> > > >> <script src="js/ext/adapter/ext/ext-base.js"/> >> > > >> <script src="js/ext/ext-all.js"/> >> >> > > >> <!-- servlet context - path is arbritray, but must match up with >> > > >> the rpc init inside java class --> >> > > >> <!-- Tomcat will listen for this from the server and waits for rpc >> > > >> request in this context --> >> > > >> <servlet >> > > >> class="com.tribling.gwt.test.mysqlconn.server.MySQLConnServiceImpl" >> > > >> path="/MySQLConnService"/> >> >> > > >> </module> >> >> > > >> On Feb 18, 4:56 pm, "Robert \"kebernet\" Cooper" <[email protected]> >> > > >> wrote: >> >> > > >> > Yeah. >> >> > > >> > If you are running the mergewebxml goal as part of your build, you >> > > >> > should see something like: >> >> > > >> > <servlet> >> > > >> > <name>me.MyModule/me.MyServlet</name> >> > > >> > <class>me.MyServlet</class> >> > > >> > </servlet> >> >> > > >> > and >> >> > > >> > <servlet-mapping> >> > > >> > <name>me.MyModule/me.MyServlet</name> >> > > >> > <url>me.MyModule/me.MyServlet</name> >> > > >> > </servlet-mapping> >> >> > > >> > for each servlet defined in your gwt.xml module descriptor. If you >> > > >> > aren't running this goal as part of your build, you need to manually >> > > >> > add those to a web.xml file in your project >> > > >> > (src/main/webapp/WEB-INF/web.xml) >> >> > > >> > On Wed, Feb 18, 2009 at 10:53 AM, ytbryan <[email protected]> wrote: >> >> > > >> > > thank you for your reply. do you mean the WEB-INF/web.xml file? >> > > >> > > inside myapplication.war ?? >> >> > > >> > > On Feb 18, 4:45 pm, "Robert \"kebernet\" Cooper" >> > > >> > > <[email protected]> >> > > >> > > wrote: >> > > >> > >> Are you running the mergewebxml goal as part of your build? >> >> > > >> > >> What is in your deployed WEB-INF/web.xml file? >> >> > > >> > >> On Wed, Feb 18, 2009 at 10:43 AM, ytbryan <[email protected]> >> > > >> > >> wrote: >> >> > > >> > >> > hi all, >> >> > > >> > >> > after i deploy my application( that has RPC) on tomcat using , >> > > >> > >> > i got >> > > >> > >> > the following error: >> >> > > >> > >> > HTTP Status 404 - /gwt-test-MySQLConn/ >> > > >> > >> > com.tribling.gwt.test.mysqlconn.MySQLConn/MySQLConnService >> >> > > >> > >> > type Status report >> >> > > >> > >> > message >> > > >> > >> > /gwt-test-MySQLConn/com.tribling.gwt.test.mysqlconn.MySQLConn/ >> > > >> > >> > MySQLConnService >> >> > > >> > >> > description The requested resource (/gwt-test-MySQLConn/ >> > > >> > >> > com.tribling.gwt.test.mysqlconn.MySQLConn/MySQLConnService) is >> > > >> > >> > not >> > > >> > >> > available. >> >> > > >> > >> > i have no clue what is wrong as it was working fine at hosted >> > > >> > >> > mode. >> > > >> > >> > please help me!! >> >> > > >> > >> > and the MySQLConnService is in the client folder of >> > > >> > >> > com.tribling.gwt.test.mysqlconn >> >> > > >> > >> > what is com.google.gwt.user.client.rpc.StatusCodeException >> > > >> > >> > exactly? >> >> > > >> > >> -- >> > > >> > >> :Robert "kebernet" Cooper >> > > >> > >> ::[email protected] >> > > >> > >> Alice's cleartext >> > > >> > >> Charlie is the attacker >> > > >> > >> Bob signs and >> > > >> > >> encryptshttp://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8 >> >> > > >> > -- >> > > >> > :Robert "kebernet" Cooper >> > > >> > ::[email protected] >> > > >> > Alice's cleartext >> > > >> > Charlie is the attacker >> > > >> > Bob signs and >> > > >> > encryptshttp://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8 >> >> > > -- >> > > :Robert "kebernet" Cooper >> > > ::[email protected] >> > > Alice's cleartext >> > > Charlie is the attacker >> > > Bob signs and >> > > encryptshttp://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8 > > > -- :Robert "kebernet" Cooper ::[email protected] Alice's cleartext Charlie is the attacker Bob signs and encrypts http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "gwt-maven" 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/gwt-maven?hl=en -~----------~----~----~----~------~----~------~--~---
