ah got it just now. it's very very easy in eclipse. As i added new entry
point from eclipse project setting, it created a folder with the new entry
point in the *war *folder. I just need to refer the .js file inside that
folder in a new .html file.

-Sanjith.

On Sun, Nov 8, 2009 at 12:51 AM, Sanjith Chungath <[email protected]>wrote:

> Thanks a lot Bob for sharing the solution. I was trying to do exactly what
> you referred below. For me the default entry point is for normal user and I
> want a new one for admin user.
>
> I already did steps 1 and 2, also i think steps 4 and 5 will be
> automatically taken care as I added new entry point in the eclipse project
> setting dialog.
>
> I want to know what you wrote in "com.myApp.db_maint.nocache.js" that
> you referred in step 3.
>
> Are there any documentation on how to define and use new entry points?
>
> -Sanjith.
>
> On Thu, Sep 24, 2009 at 8:40 PM, BobM <[email protected]> wrote:
>
>>
>> I have solved my problem.  The solution may be helpful to others with
>> similar requirements.
>>
>> my solution:
>>
>> 1. Create a new and additional module, db_maint.gwt.xml:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <module>
>>  <inherits name="com.google.gwt.user.User"/>
>>  <entry-point class="com.myApp.client.DB_MaintEntryPoint"/>
>>  <stylesheet src="maintenancePage.css"/>
>>  <stylesheet src="messagePanel.css"/>
>> </module>
>>
>> 2. Create a new EntryPoint class, DB_MaintEntryPoint.java:
>> /* DB_MaintEntryPoint.java
>>  *
>>  */
>> package com.myApp.client;
>> import com.google.gwt.core.client.EntryPoint;
>> import com.myApp.client.gui.MainFrame;
>> public class DB_MaintEntryPoint implements EntryPoint {
>>    /** Creates a new instance of MainEntryPoint */
>>    public DB_MaintEntryPoint() {
>>    }
>>    /**
>>        The entry point method, called automatically by loading a
>> module
>>        that declares an implementing class as an entry-point
>>    */
>>    public void onModuleLoad() {
>>        new MainFrame();
>>    }
>> } // End of DB_MaintEntryPoint
>>
>> 3. Create a new html to load the new module, db_maint.html:
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD.HTML 4.0 Strict//EN" "http://
>> www.w3.org/TR/html40/Strict.dtd">
>> <HTML>
>>  <HEAD>
>>    <TITLE>MyApp Database maintenance</TITLE>
>>  </HEAD>
>>  <BODY>
>>    <script language="javascript"
>> src="com.myApp.db_maint.nocache.js"></script>
>>  </BODY>
>> </HTML>
>>
>> 4. My development environment is driven by ant, so I had to modify my
>> build.xml to include my new module in the compile process, both for
>> that process which does the GWT compile for deployment and,
>> separately, for the process that drives the hosted mode:
>>
>> In my build.xml, GWTcompile target:
>>    <!-- GWT compile db_maint module  -->
>>    <java classname="com.google.gwt.dev.GWTCompiler"
>>      fork="true"
>>      maxmemory="256m" >
>>      <arg value="-out"/>
>>      <arg value="web"/>
>>     <arg value="com.myApp.${db_maint.module.name}" />
>>      <classpath path="${project.class.path}" />
>>    </java>
>>
>> Then into the GWTshell target:
>>  <!-- GWTShell compile db_maint module  -->
>>  <target name="gwtRAD_db_maint" depends="compile" description="Runs
>> the application under the GWT shell">
>>    <java classname="com.google.gwt.dev.GWTShell"
>>      fork="true"
>>      spawn="true"
>>      maxmemory="256m" >
>>      <arg value="-out"/>
>>      <arg value="web"/>
>>      <arg value="com.myApp.${db_maint.module.name}/$
>> {db_maint.module.name}.html" />
>>      <classpath path="${project.class.path}" />
>>    </java>
>>    <echo>
>> The GWT shell is starting database maintenance.
>>    </echo>
>>  </target>
>>
>> Having accomplished these steps and then compiled and deploy to tomcat
>> I can run my main application by
>>     http://localhost:8080/myApp
>> and my subApp by
>>     http://localhost:8080/db_maint.html
>>
>> Works for me!  I hope this may to useful to others.  Enjoy!
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to