Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
tomcat deployable user jar?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 42 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Watson  
View profile  
(8 users)  More options May 18 2006, 1:30 am
From: "John Watson" <jkwat...@gmail.com>
Date: Thu, 18 May 2006 05:30:00 -0000
Subject: tomcat deployable user jar?
The jars as distributed are not "legal" to deploy into tomcat, as they
contain the javax.servlet packages.  These can't end up in WEB-INF/lib,
since that violates the servlet spec (tomcat refuses to load the jars).
 I have built my own custom version of the user jar that is deployable
into tomcat, but it seems like it would be good to a) document this
issue and b) distribute a version of the jar which doesn't include the
servlet classes in it.

Just thought I'd mention it.

Thanks,
  John


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chiraz  
View profile  
(2 users)  More options May 18 2006, 1:50 am
From: "Chiraz" <gtoons...@gmail.com>
Date: Wed, 17 May 2006 22:50:02 -0700
Local: Thurs, May 18 2006 1:50 am
Subject: Re: tomcat deployable user jar?
Thanks,

I just suffered from the same issue and this solved it.

I agree that there should at least be a paragraph written in the
documentation on how to deploy a simple GWT app on at least a Tomcat
server (for testing).

Only thing to solve in my case now is that client side does not make
server-calls yet, but I'm not sure what may be causing this.

Cheers,


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tahir akhtar  
View profile  
 More options May 18 2006, 4:46 am
From: "tahir akhtar" <tahir.akh...@gmail.com>
Date: Thu, 18 May 2006 08:46:46 -0000
Local: Thurs, May 18 2006 4:46 am
Subject: Re: tomcat deployable user jar?
This is probably due to the server path issue. First the Entry point
must be set to a valid url. For example, calendar example
SchoolCalendarWidget may be modified to say

        ServiceDefTarget target = (ServiceDefTarget) calService;
        String staticResponseURL = GWT.getModuleBaseURL();
        staticResponseURL += "/calendar";
        target.setServiceEntryPoint(staticResponseURL);
and the servlet  must be mapped to URL /calendar (or whatever you
specified in entry point) in web.xml.

Remember that the XXXServiceImpl class (e.g SchoolCalendarServiceImpl)
actually extends a Servlet class. So somthing like this will go in
web.xml

        <servlet>
                <servlet-name>SchoolCalendarService</servlet-name>
                <servlet-class>com.google.gwt.sample.dynatable.server.SchoolCalendarService Impl</servlet-class>
        </servlet>

        <servlet-mapping>
                <servlet-name>SchoolCalendarService</servlet-name>
                <url-pattern>/calendar</url-pattern>
        </servlet-mapping>

Well, thats the theory but I have to get it to work before I can say
with surety.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tahir akhtar  
View profile  
 More options May 18 2006, 5:02 am
From: "tahir akhtar" <tahir.akh...@gmail.com>
Date: Thu, 18 May 2006 09:02:00 -0000
Subject: Re: tomcat deployable user jar?
Well looking closely calendar service example gives you an option to
turn off static behaviour
change private final static boolean USE_STATIC_RPC_ANSWERS = true;
to private final static boolean USE_STATIC_RPC_ANSWERS = false;
in SchoolCalendarWidget
recompile the SchoolCalendarWidget into java class (not same as GWT
Compile which emits the javascript etc)
Deploy the servlet as I mentioned in previous post and test

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tahir akhtar  
View profile  
(30 users)  More options May 18 2006, 6:39 am
From: "tahir akhtar" <tahir.akh...@gmail.com>
Date: Thu, 18 May 2006 10:39:02 -0000
Local: Thurs, May 18 2006 6:39 am
Subject: Re: tomcat deployable user jar?
OK got it running on Tomcat. Here are the steps

1. Strip the javax.* packages from gwt-user.jar . You can do it with
winzip/winrar etc. Open the jar in such tools and delete all files in
javax folder including the folder

2. Copy the stripped jar in your webapps/YourApp/WEB-INF/lib. Copy the
compiled classes (e.g copy the folder "com" in samples/dynatable/bin )
to webapps/YourApp/WEB-INF/classes

3. Modify your Service Entry point code (if required). Note the text
you put in place /calendar line. You will use this text in web.xml
later
        ServiceDefTarget target = (ServiceDefTarget) calService;
        String staticResponseURL = GWT.getModuleBaseURL();
        staticResponseURL += "/YourApp/calendar";
        target.setServiceEntryPoint(staticResponseURL);
4. Run DynaTable-compile.cmd (replace dynatable with app name). File
will be generated in www\com.google.gwt.sample.dynatable.DynaTable\ .
Copy all files within this folder to webapps/YourApp/

5.  Create modify web.xml and place it in WEB-INF
<?xml version="1.0" encoding="UTF-8"?>
<web-app>

        <servlet>
                <servlet-name>SchoolCalendarService</servlet-name>

<servlet-class>com.google.gwt.sample.dynatable.server.SchoolCalendarService Impl</servlet-class>
        </servlet>

        <servlet-mapping>
                <servlet-name>SchoolCalendarService</servlet-name>
                <url-pattern>/calendar</url-pattern>
        </servlet-mapping>

</web-app>
5. Launch tomcat. Open browser e.g.
localhost:8080/YourApp/DynaTable.html
6. Enjoy


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Burning Iez  
View profile  
(1 user)  More options May 18 2006, 10:08 am
From: "Burning Iez" <nasir.ja...@gmail.com>
Date: Thu, 18 May 2006 07:08:36 -0700
Local: Thurs, May 18 2006 10:08 am
Subject: Re: tomcat deployable user jar?
Hi,

I followed you step by step and successfully configured my web app.
This is great.

Thanks. :)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tahir Akhtar  
View profile  
 More options May 18 2006, 11:00 am
From: "Tahir Akhtar" <tahir.akh...@gmail.com>
Date: Thu, 18 May 2006 20:00:56 +0500
Local: Thurs, May 18 2006 11:00 am
Subject: Re: tomcat deployable user jar?

We aim to please !
:)
Wassalam

On 5/18/06, Burning Iez <nasir.ja...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rob_cranfill  
View profile  
(2 users)  More options May 18 2006, 11:28 am
From: "rob_cranfill" <robcranf...@comcast.net>
Date: Thu, 18 May 2006 15:28:55 -0000
Local: Thurs, May 18 2006 11:28 am
Subject: Re: tomcat deployable user jar?
I'm trying to do the same, no joy. Here are my notes:

= Create folders:
         {tomcat}\webapps\DynaTable
         {tomcat}\webapps\DynaTable\WEB-INF
         {tomcat}\webapps\DynaTable\WEB-INF\lib
         {tomcat}\webapps\DynaTable\WEB-INF\classes

= Copy contents of
        gwt-windows-1.0.20\samples\DynaTable\www\com.google.gwt.sample.dynatable.Dy naTable
                to
        {tomcat}\webapps\DynaTable

= Copy
        gwt-user-minus-javax.jar
                to
        {tomcat}\webapps\DynaTable\WEB-INF\lib

= Copy
        gwt-windows-1.0.20\samples\DynaTable\bin\com
                to
        {tomcat}\webapps\DynaTable\WEB-INF\classes
        (creating {tomcat}\webapps\DynaTable\WEB-INF\classes\com\google\{etc})

- Test #1: browse http://localhost:8080/DynaTable/

        HTTP Status 404 - /DynaTable/
        type Status report
        message /DynaTable/
        description The requested resource (/DynaTable/) is not available.

= Copy
        D:\dev\gwt-windows-1.0.20\samples\DynaTable\tomcat\webapps\ROOT\WEB-INF\web .xml
                to
        {tomcat}\webapps\DynaTable\WEB-INF\

? Test #2: browse http://localhost:8080/DynaTable/

        HTTP Status 500 -
        type Exception report
        message
        description The server encountered an internal error () that prevented
it from fulfilling this request.
        exception
        javax.servlet.ServletException: Wrapper cannot find servlet class
com.google.gwt.dev.shell.GWTShellServlet or a class it depends on
                org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 5)
                org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.process Connection(Http11BaseProtocol.java:664)
                org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja va:527)
                org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW orkerThread.java:80)
                org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja va:684)
                java.lang.Thread.run(Unknown Source)

= Create and copy
        gwt-dev-windows-minus-javax-servlet.jar
                to
        {tomcat}\webapps\DynaTable\WEB-INF\lib

? Test #3: browse http://localhost:8080/DynaTable/

        Browser:
                "To launch an an application, specify a URL of the form
/module/file.html"
        Tomcat console:
                (nothing)

- Test #4: (browse http://localhost:8080/DynaTable/DynaTable.html)

        Browser:
                "Unable to find/load module 'DynaTable.html' (see server log for
details)"

        Tomcat console:
        - #0 The server received a request to generate a host page for module
'DynaTable.html'
        - #0.0 Loading module 'DynaTable.html'
        - #0.0.0 Unable to find 'DynaTable/html.gwt.xml' on your classpath;
could be a typo, or maybe you forgot to include a classpath entry for
source?

--- FYI, here's console output from a typical startup of Tomcat:
- The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java
.library.path:
D:\dev\Tomcat5.5\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\system32;C :\WINDOWS;C:\WINDOWS\System32\
Wbem;D:\dev\jwsdp20\jwsdp-shared\bin;c:\mobius\Mobius-1.8.0\bin;C:\bin;D:\d ev\bin;D:\dev\cygwin\bin;D:\dev\jdk5\bin;C:\P
rogram Files\SecureCRT;C:\Program
Files\SecureFX;D:\dev\Subversion\bin;D:\dev\MinGW\bin
- Initializing Coyote HTTP/1.1 on http-8080
- Initialization processed in 771 ms
- Starting service Catalina
- Starting Servlet Engine: Apache Tomcat/5.5.16
- XML validation disabled
- org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain: [org.apache.webap
p.balancer.rules.URLStringMatchRule: Target string: News / Redirect
URL: http://www.cnn.com], [org.apache.webapp.balance
r.rules.RequestParameterRule: Target param name: paramName / Target
param value: paramValue / Redirect URL: http://www.y
ahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
Redirect URL: http://jakarta.apache.org]]
- Starting Coyote HTTP/1.1 on http-8080
- JK: ajp13 listening on /0.0.0.0:8009
- Jk running ID=0 time=0/30  config=null
- Find registry server-registry.xml at classpath resource
- Server startup in 3555 ms

Thanks for any help or ideas!
   - rob


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rob_cranfill  
View profile  
 More options May 18 2006, 11:30 am
From: "rob_cranfill" <robcranf...@comcast.net>
Date: Thu, 18 May 2006 15:30:50 -0000
Local: Thurs, May 18 2006 11:30 am
Subject: Re: tomcat deployable user jar?
Oh, and by the way, notice that I found it necessary to add a
stripped-down (no javax.servlet.*) version of gwt-dev-windows.jar,
because of that

javax.servlet.ServletException: Wrapper cannot find servlet class
com.google.gwt.dev.shell.GWTShellServlet or a class it depends on

exception.

  - rob


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tahir akhtar  
View profile  
 More options May 18 2006, 12:03 pm
From: "tahir akhtar" <tahir.akh...@gmail.com>
Date: Thu, 18 May 2006 16:03:02 -0000
Local: Thurs, May 18 2006 12:03 pm
Subject: Re: tomcat deployable user jar?
This step is wrong:
= Copy

D:\dev\gwt-windows-1.0.20\samples\DynaTable\tomcat\webapps\ROOT\WEB-INF\web .xml
                to
        {tomcat}\webapps\DynaTable\WEB-INF\

Try creating a new web.xml with contents i provided in my previous
post.
Following is also *not* needed
= Create and copy
        gwt-dev-windows-minus-javax-servlet.jar
                to
        {tomcat}\webapps\DynaTable\WEB-INF\lib

Test: http://localhost:8080/DynaTable/DynaTable.html


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tahir akhtar  
View profile  
 More options May 18 2006, 12:04 pm
From: "tahir akhtar" <tahir.akh...@gmail.com>
Date: Thu, 18 May 2006 16:04:10 -0000
Local: Thurs, May 18 2006 12:04 pm
Subject: Re: tomcat deployable user jar?
That error is due to wrong web.xml. Use the above web.xml and it will
go away.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rob_cranfill  
View profile  
 More options May 18 2006, 1:45 pm
From: "rob_cranfill" <robcranf...@comcast.net>
Date: Thu, 18 May 2006 17:45:50 -0000
Local: Thurs, May 18 2006 1:45 pm
Subject: Re: tomcat deployable user jar?
You are right on both counts, of course! That fixes it - I'm running
DynaTable under Tomcat 5.5.16!!

Thanks, now I'm off to try coding my own first app.... :)

  - rob


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tahir Akhtar  
View profile  
 More options May 18 2006, 4:32 pm
From: "Tahir Akhtar" <tahir.akh...@gmail.com>
Date: Fri, 19 May 2006 01:32:43 +0500
Local: Thurs, May 18 2006 4:32 pm
Subject: Re: tomcat deployable user jar?

You are welcome :)

On 5/18/06, rob_cranfill <robcranf...@comcast.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Patterson  
View profile  
 More options May 19 2006, 4:33 am
From: "Dave Patterson" <davpa...@hotmail.com>
Date: Fri, 19 May 2006 01:33:42 -0700
Local: Fri, May 19 2006 4:33 am
Subject: Re: tomcat deployable user jar?
Out of interest, why would you want to deploy the GWT jars on Tomcat?

Aren't all the generated products are hot-deployable?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tahir Akhtar  
View profile  
 More options May 19 2006, 4:42 am
From: "Tahir Akhtar" <tahir.akh...@gmail.com>
Date: Fri, 19 May 2006 13:42:58 +0500
Local: Fri, May 19 2006 4:42 am
Subject: Re: tomcat deployable user jar?

Not sure what you mean by hot-deployable. What I (and other folks on this
thread) wanted to do was: Let a GWT app make rpc calls to our servlets
deployed on a tomcat instance.

Agreed that GWT uses Tomcat itself in shell mode, but for a different
purpose IMO. It deploys a standard GWT shell servlet that serves you your
pages generated from java source in Shell browser. You can get a better
understanding of this by looking at the web.xml within tomcat folder inside
of GWT app folder.

I will post back after I have completely figured out the process :).

On 5/19/06, Dave Patterson <davpa...@hotmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Patterson  
View profile  
 More options May 19 2006, 5:07 am
From: "Dave Patterson" <davpa...@hotmail.com>
Date: Fri, 19 May 2006 02:07:00 -0700
Subject: Re: tomcat deployable user jar?
Hi Tahir,

Are you trying to test your RPC calls in hosted mode (running the
GWTShell)? If so, do you need really Tomcat to launch GWTShell?

If you are trying to test the compiled code in an ordinary browser then
you should be able to run the compile outside tomcat and copy (or 'hot
deploy') the generated files into your web-app's root directory.

Dave P.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tahir Akhtar  
View profile  
 More options May 19 2006, 5:50 am
From: "Tahir Akhtar" <tahir.akh...@gmail.com>
Date: Fri, 19 May 2006 14:50:23 +0500
Local: Fri, May 19 2006 5:50 am
Subject: Re: tomcat deployable user jar?

Yes I would like to do that: test my RPC calls in hosted mode (running the
GWTShell), but
* I figure that I wont be able do that with a separate tomcat instance as
there is no straight-forward way IF hosted mode browser honours the usual
browser security pertaining to cross domain calls. I haven't tried that yet.
* Another way is to tweak the generated web.xml. I hope it won't be rocket
science but got no time at my hand at the moment to give it a try.

Currently doing the rpc test in separate browser. Yes the copy to tomcat
works and we discussed in this thread what to copy where within the tomcat.
But you still need to come up with servlet mappings in web.xml. We discussed
that too.

Hope that helps
Regards
Tahir Akhtar

On 5/19/06, Dave Patterson <davpa...@hotmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Patterson  
View profile  
 More options May 19 2006, 7:13 am
From: "Dave Patterson" <davpa...@hotmail.com>
Date: Fri, 19 May 2006 04:13:53 -0700
Local: Fri, May 19 2006 7:13 am
Subject: Re: tomcat deployable user jar?
<penny drops>
Now I get it - The example servlets depend on the server.rpc package in
the gwt-user.jar.
</penny drops>

Sounds like the server-side RPC code is a candidate for a seperate
deployable JAR as per your stripped copy.

Sorry for being so slow :(

Dave P.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tahir Akhtar  
View profile  
 More options May 19 2006, 11:04 am
From: "Tahir Akhtar" <tahir.akh...@gmail.com>
Date: Fri, 19 May 2006 20:04:58 +0500
Local: Fri, May 19 2006 11:04 am
Subject: Re: tomcat deployable user jar?

Acutally the whole rpc mechanism provided by GWT depends on server.rpcpackage in
the gwt-user.jar.

You *must* use it if you do not want to write custom method for rpc. If you
want to use something else, JSON could be an option as it has support for
most platforms/langs like ASP, PHP etc.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tahir Akhtar  
View profile  
(1 user)  More options May 19 2006, 12:42 pm
From: "Tahir Akhtar" <tahir.akh...@gmail.com>
Date: Fri, 19 May 2006 21:42:11 +0500
Local: Fri, May 19 2006 12:42 pm
Subject: Re: tomcat deployable user jar?

Well, finally found what I was missing from the beginning: Testing rpc
services from withing the GWTShell

We can add servlet declarations (think of it as definition + url mapping in
one line) in app.gwt.xml. And the embedded tomcat in shell will load and map
the servlet at the specified url.

So we will only have to do all the tomcat deployment stuff just for final
testing.

The servlet is already mapped for DynaTable example, see

--DynaTable.gwt.xml
<module>
    <inherits name='com.google.gwt.user.User'/>
    <entry-point class='com.google.gwt.sample.dynatable.client.DynaTable'/>
    <servlet path='/calendar' class='
com.google.gwt.sample.dynatable.server.SchoolCalendarServiceImpl'/>
</module>
All you have to do is to enable the calls in SchoolCalendarWidget
  private final static boolean USE_STATIC_RPC_ANSWERS = false;
And ensure that entry point is set according to above mapping
public CalendarProvider()
...
target.setServiceEntryPoint("/calendar");

See docs for more details


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Manu  
View profile  
 More options May 20 2006, 12:48 am
From: "Manu" <binesh.kut...@gmail.com>
Date: Fri, 19 May 2006 21:48:02 -0700
Local: Sat, May 20 2006 12:48 am
Subject: Re: tomcat deployable user jar?
Hi Tahir,

I did the same way you mention to invoke the RPC. I can't able to
polulate the table in DynaTable.html.

Failed to access data: <html><head><title>Apache Tomcat/5.0.28 - Error
report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;f ont-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;f ont-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;f ont-size:14px;}
BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size :12px;}A
{color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 404 -
/samples/DynaTable/samples/calendar</h1><HR size="1"
noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b>
<u>/samples/DynaTable/samples/calendar</u></p><p><b>description</b>
<u>The requested resource (/samples/DynaTable/samples/calendar) is not
available.</u></p><HR size="1" noshade="noshade"><h3>Apache
Tomcat/5.0.28</h3></body></html>

I think i am unable to get data from the server
SchoolCalendarServiceImpl.java.

one more issue. When i tried to call "DynaTable-compile.cmd", it is not
creating classes in bin folder. So i think i have to compile
SchoolCalendarServiceImpl.java separately and copy to WEB-INF/classes

I have a suggestion to you. Can you do a HelloWorld sample RPC program
with step by step. It will help all the developers to begin this GWT
use. I will really appreciate if you can do that for all developers.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tahir akhtar  
View profile  
 More options May 20 2006, 7:54 am
From: "tahir akhtar" <tahir.akh...@gmail.com>
Date: Sat, 20 May 2006 11:54:28 -0000
Local: Sat, May 20 2006 7:54 am
Subject: Re: tomcat deployable user jar?
Hi Manu,
You have hit the common confusion point :) Welcome to the club.

Actually the compile.cmd is *not* for compiling java to byte code.
Instead it translates java *source code* to javascript.

Whenever you change a java file that is supposed to be translated to
java script *and* you want to view it in normal browser you must use
the compile.cmd and then open the generated html from www folder.

But if you have changed some server side stuff like service impl then
you may have to recompile the to java .class using javac. (I suspect
that GWT have some built in way to trigger javac compile when you
launch shell mode, but I have to confirm that)

Now back to your original issue, the RPC call.

The error you are getting means that the servlet is not mapped to
/samples/DynaTable/samples/calendar but your translated javascript is
trying to find it at this location.
You can fix either the servlet mapping or change the entry point like
target.setServiceEntryPoint("whereever/the/servlet/is/mapped");

For the Hello World program you have suggested, I would try to do a
write-up on running the Calendar example (If I get the weekend off :(
) .
I think for learning purpose, it is better to stick with the
App.gwt.xml method coupled with shell mode.

Regards
Tahir Akhtar


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Manu  
View profile  
 More options May 20 2006, 3:38 pm
From: "Manu" <binesh.kut...@gmail.com>
Date: Sat, 20 May 2006 12:38:04 -0700
Local: Sat, May 20 2006 3:38 pm
Subject: Re: tomcat deployable user jar?
Tahir,

I really appreciate for your fast response. I changed the mapping for
the servlet and able to resolve the issue happened last time. But still
getting message failed to access data.
Rest of the classes are same with no change.

I have copied DynaTable to
C:\appl\Tomcat 5.0\webapps\samples\DynaTable\

My Web.xml have
    <servlet>
      <servlet-name>SchoolCalendarService</servlet-name>

<servlet-class>com.google.gwt.sample.dynatable.server.SchoolCalendarService ­Impl</servlet-class>

    </servlet>
        <servlet-mapping>
                <servlet-name>SchoolCalendarService</servlet-name>
                <url-pattern>/DynaTable/calendar</url-pattern>
        </servlet-mapping>

I have copied the server and client classes to
C:\appl\Tomcat 5.0\webapps\samples\DynaTable\WEB-INF\classes\

I have changed SchoolCalendarWidget.java

      if (USE_STATIC_RPC_ANSWERS) {

        /* Org Implementation */

        //ServiceDefTarget target = (ServiceDefTarget) calService;
        //String staticResponseURL = GWT.getModuleBaseURL();
        //staticResponseURL += "/calendar" + startRow + ".txt";
        //target.setServiceEntryPoint(staticResponseURL);

        ServiceDefTarget target = (ServiceDefTarget) calService;
        String staticResponseURL = GWT.getModuleBaseURL();
        staticResponseURL += "/calendar";
        target.setServiceEntryPoint(staticResponseURL);
      }
*************************************************************************** *********************************************************
But still calService.getPeople(), goes to onFailure() and i am getting
"Failed to access data" in Navbar. So i hope that i am able to get in
the server class, but the issue is because of data. Any idea about this
issue?

calService.getPeople(startRow, maxRows, new AsyncCallback() {
        public void onFailure(Throwable caught) {
          acceptor.failed(caught);
        }

        public void onSuccess(Object result) {
          Person[] people = (Person[]) result;
          lastStartRow = startRow;
          lastMaxRows = maxRows;
          lastPeople = people;
          pushResults(acceptor, startRow, people);
        }

      });


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Manu  
View profile  
 More options May 20 2006, 7:55 pm
From: "Manu" <binesh.kut...@gmail.com>
Date: Sat, 20 May 2006 16:55:21 -0700
Local: Sat, May 20 2006 7:55 pm
Subject: Re: tomcat deployable user jar?
Hi Tahir,
Sorry for the above wrong message. please ignore it. It happend coz of
some other directory issue.

1) I have copied DynaTable to
C:\appl\Tomcat 5.0\webapps\samples\DynaTable\

2)  My Web.xml have
    <servlet>
      <servlet-name>SchoolCalendarService</servlet-name>

<servlet-class>com.google.gwt.sample.dynatable.server.SchoolCalendarService ­­Impl</servlet-class>

    </servlet>
    <servlet-mapping>
         <servlet-name>SchoolCalendarService</servlet-name>
         <url-pattern>/DynaTable/calendar</url-pattern>
    </servlet-mapping>

3)  I have copied the server and client classes to
C:\appl\Tomcat 5.0\webapps\samples\DynaTable\WEB-INF\classes\

4) I have changed SchoolCalendarWidget.java to
 ServiceDefTarget target = (ServiceDefTarget) calService;
        String staticResponseURL = GWT.getModuleBaseURL();
        staticResponseURL += "/calendar";
        target.setServiceEntryPoint(staticResponseURL);
5) <Context path="/samples" docBase="samples" debug="0"
privileged="true"></Context>

I got the following error "HTTP Status 404 -
/samples/DynaTable/calendar"
Failed to access data: <html><head><title>Apache Tomcat/5.0.28 - Error
report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;f ont-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;f ont-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;f ont-size:14px;}
BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size :12px;}A
{color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 404 -
/samples/DynaTable/DynaTable/calendar</h1><HR size="1"
noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b>
<u>/samples/DynaTable/DynaTable/calendar</u></p><p><b>description</b>
<u>The requested resource (/samples/DynaTable/DynaTable/calendar) is
not available.</u></p><HR size="1" noshade="noshade"><h3>Apache
Tomcat/5.0.28</h3></body></html>

Can you help me to figure out, what is wrong in the entire flow, why i
can't get the Server classes the web.xml


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Manu  
View profile  
 More options May 20 2006, 10:07 pm
From: "Manu" <binesh.kut...@gmail.com>
Date: Sat, 20 May 2006 19:07:57 -0700
Local: Sat, May 20 2006 10:07 pm
Subject: Re: tomcat deployable user jar?
Hi Tahir,

Thanks for help.

I am able to solve the issue and able to launch the sample. I will try
to do a sample HelloWorld Service tomorrow, with all the steps to
follow. So others can use it to save time with for simple RPC.

-Binesh


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 42   Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google