1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    9
    Vote Rating
    0
    q1111 is on a distinguished road

      0  

    Default gwt+spring deploy tomcat failed

    gwt+spring deploy tomcat failed


    gwt+spring run in host mode is fine. but when i deployed war in tomcat ,rpc call is wrong.
    web.xml
    PHP Code:
      <servlet>
      <
    servlet-name>gwt-controller</servlet-name>
      <
    servlet-class>
       
    org.springframework.web.servlet.DispatcherServlet
      
    </servlet-class>
      
      <
    load-on-startup>2</load-on-startup>
     </
    servlet>
      <
    servlet-mapping>
      <
    servlet-name>gwt-controller</servlet-name>
      <
    url-pattern>*.gwt.rpc</url-pattern>
     </
    servlet-mapping
    gwt-controller-servlet.xml
    PHP Code:
     <bean id="handlerMapping"
      
    class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />
     <
    bean name="/testgwt5/greet.gwt.rpc"
      
    id="greetService"
      
    class="com.zeng.server.GreetingServiceImpl">
     </
    bean
    GreetingService.java
    PHP Code:
    @RemoteServiceRelativePath("greet.gwt.rpc")
    public interface 
    GreetingService extends RemoteService {
     
    String greetServer() throws IllegalArgumentException;

    TestGWT5.java
    PHP Code:
    greetingService.greetServer(
          new 
    AsyncCallback<String>() {
           public 
    void onFailure(Throwable caught) {
            
    // Show the RPC error message to the user
            
    dialogBox
              
    .setText("Remote Procedure Call - Failure");
            
    serverResponseLabel
              
    .addStyleName("serverResponseLabelError");
            
    serverResponseLabel.setHTML(SERVER_ERROR);
            
    dialogBox.center();
            
    closeButton.setFocus(true);
           }
           public 
    void onSuccess(String result) {
            
    dialogBox.setText("Remote Procedure Call");
            
    serverResponseLabel
              
    .removeStyleName("serverResponseLabelError");
            
    serverResponseLabel.setHTML(result);
            
    dialogBox.center();
            
    closeButton.setFocus(true);
           }
          }); 
    when i deploy on tomcat ,always run to onFailure(Throwable caught){}
    Please help me. thanks a lot.

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Posts
    9
    Vote Rating
    0
    q1111 is on a distinguished road

      0  

    Default


    GWTController.java
    PHP Code:
    public abstract class GWTController extends RemoteServiceServlet implements  ControllerServletContextAware{
     private static final 
    Log log LogFactory.getLog(GWTController.class);
     public 
    ServletContext m_servletContext;
        
        public 
    ModelAndView handleRequest (HttpServletRequest requestHttpServletResponse responsethrows Exception
        
    {
         
    doPost (requestresponse);
            return 
    null;
        }
        public 
    void setServletContext (ServletContext servletContext)
        {
            
    this.m_servletContext servletContext;
        }
        public 
    ServletContext getServletContext ()
        {
            return 
    m_servletContext;
        }

    GreetingServiceImpl.java
    PHP Code:
    public class GreetingServiceImpl extends GWTController implements
      
    GreetingService {
     public 
    String greetServer() throws IllegalArgumentException {
    ...
    }


Similar Threads

  1. Deploy Ext JS without ext-all-debug.js
    By tBSTAR in forum Ext 2.x: Help & Discussion
    Replies: 11
    Last Post: 2 Jul 2009, 8:44 AM
  2. Which files of ext to deploy with my application?
    By chrizmaster in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 9 Mar 2009, 6:11 AM
  3. netbeans deploy
    By helmishariff in forum Ext GWT: Help & Discussion (1.x)
    Replies: 3
    Last Post: 9 Dec 2008, 2:15 PM
  4. I Can't deploy ExtJS 2.0
    By mniktw in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 21 Jan 2008, 12:09 AM
Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi