2010-07-17 120 views
1

http://127.0.0.1:8888/socialnetwork/contactsServiceGWT + GAE Servlet URL和Servlet映射

這就是我的一個servlet的當前URL。我的問題是,我該如何改變它?

在我的web.xml文件,改變

<servlet-mapping> 
    <servlet-name>contactsServiceServlet</servlet-name> 
    <url-pattern>/socialnetwork/contactsService</url-pattern> 
    </servlet-mapping> 

<servlet-mapping> 
    <servlet-name>contactsServiceServlet</servlet-name> 
    <url-pattern>/a/contactsService</url-pattern> 
    </servlet-mapping> 

完全不會有什麼區別它請求的URL,當我做一個RPC調用這個servlet。

回答

1

一旦你完成上面的你需要改變,你調用(在下面的註釋說明)在...

// The RemoteServiceRelativePath annotation automatically calls setServiceEntryPoint() 
@RemoteServiceRelativePath("email") 
public interface MyEmailService extends RemoteService { 
    void emptyMyInbox(String username, String password); 
} 

http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.html

+0

就是這樣,謝謝。 :) – 2010-07-18 15:19:42