GWT 2.5 Application Deployment in Tomcat? -
i using gwt 2.5. have application using gwt-rpc. have compiled project , create war file using ant-script. when deploy project on tomcat loads doesn't show control. simple blank html page. here files. module
class="lang-xml prettyprint-override"><?xml version="1.0" encoding="utf-8"?> <!-- when updating version of gwt, should update dtd reference, app can take advantage of latest gwt module capabilities. --> <!doctype module public "-//google inc.//dtd google web toolkit 2.5.0//en" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd"> <module rename-to='interviewscheduler'> <!-- inherit core web toolkit stuff. --> <inherits name='com.google.gwt.user.user'/> <!-- inherit default gwt style sheet. can alter --> <!-- theme of gwt application uncommenting --> <!-- 1 of next lines. --> <inherits name='com.google.gwt.user.theme.clean.clean'/> <!-- <inherits name='com.google.gwt.user.theme.standard.standard'/> --> <!-- <inherits name='com.google.gwt.user.theme.chrome.chrome'/> --> <!-- <inherits name='com.google.gwt.user.theme.dark.dark'/> --> <!-- other module inherits --> <inherits name="com.smartgwt.smartgwt"/> <!-- specify app entry point class. --> <entry-point class='interviewscheduler.client.interviewscheduler'/> <!-- specify paths translatable code --> <source path='client'/> <source path='shared'/> </module>
remote service
class="lang-java prettyprint-override">package interviewscheduler.client; import interviewscheduler.shared.interview; import interviewscheduler.shared.teacher; import java.util.linkedhashmap; import java.util.list; import com.google.gwt.user.client.rpc.remoteservice; import com.google.gwt.user.client.rpc.remoteservicerelativepath; @remoteservicerelativepath("interviewscheduler") public interface interviewschedulerservice extends remoteservice{ boolean loadstudentdata() throws illegalargumentexception; boolean loadparentdata() throws illegalargumentexception; boolean loadteacherdata() throws illegalargumentexception; boolean loadclassdata() throws illegalargumentexception; boolean loadclassmembershipdata() throws illegalargumentexception; boolean loadroomdata() throws illegalargumentexception; boolean loadsessiondata() throws illegalargumentexception; boolean loadinterviewdata() throws illegalargumentexception; linkedhashmap<string, string> getstudentnames() throws illegalargumentexception; string getparentname(string studentkey) throws illegalargumentexception; list<teacher> getavailableteachers(string studentkey) throws illegalargumentexception; list<teacher> getrequestedteachers(string studentkey) throws illegalargumentexception; list<interview> getinterviewbystudent(string studentkey) throws illegalargumentexception; list<interview> getinterviewbyteacher(string teachercode) throws illegalargumentexception; list<object> getinterviewsforgrid(list<interview> list) throws illegalargumentexception; string addinterview(interview obj) throws illegalargumentexception; string removeinterview(string studentid, string teacherid) throws illegalargumentexception; }
web.xml
class="lang-xml prettyprint-override"><?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"> <!-- servlets --> <servlet> <servlet-name>interviewschedulerservlet</servlet-name> <servlet-class>interviewscheduler.server.interviewschedulerserviceimpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>interviewschedulerservlet</servlet-name> <url-pattern>/interviewscheduler/interviewscheduler</url-pattern> </servlet-mapping> <!-- default page serve --> <welcome-file-list> <welcome-file>interviewscheduler.html</welcome-file> </welcome-file-list> </web-app>
any ideas doing wrong.? urgent.
class="lang-java prettyprint-override">package interviewscheduler.client; import com.google.gwt.core.client.entrypoint; import com.google.gwt.core.client.gwt; import com.google.gwt.user.client.window; import com.google.gwt.user.client.rpc.asynccallback; import com.google.gwt.user.client.ui.rootlayoutpanel; import com.smartgwt.client.widgets.layout.vlayout; /** * entry point classes define <code>onmoduleload()</code>. */ public class interviewscheduler implements entrypoint { /** * entry point method. */ private interviewschedulerserviceasync remoteobject=gwt.create(interviewschedulerservice.class); private vlayout wrapper=new vlayout(); private vlayout headerarea=new header(); private vlayout contentarea=new contentarea(); public void onmoduleload() { window.enablescrolling(true); window.setmargin("0px"); remoteobject.loadstudentdata(new asynccallback<boolean>() { @override public void onsuccess(boolean result) { rootlayoutpanel.get().add(drawwrapper()); } @override public void onfailure(throwable caught) { system.out.println("failed*****************"); } }); } /** * initialize wrapper of web site holds other content------main container */ public vlayout drawwrapper(){ wrapper.setwidth100(); wrapper.setheight100(); wrapper.setmargin(0); wrapper.addmember(drawheaderarea()); wrapper.addmember(drawcontentarea()); homecoming wrapper; } /** * initialize header area of web site contains logo title , logout button */ public vlayout drawheaderarea(){ headerarea.redraw(); homecoming headerarea; } /** * initialize content area of web site holds main tabset */ public vlayout drawcontentarea(){ contentarea.redraw(); homecoming contentarea; } }
you have show info somehow in application. you're doing right calling bunch of services. it's quite confusing. should of in 1 phone call server. save lot of round trips , save having failed calls.
gwt tomcat deployment gwt-rpc
No comments:
Post a Comment