Hi Grrgor,
Thanks for your reply. Yes, adding of source path stuff works.
But I am still facing one issue.
I am having my existing application setup in RAD for
compiling,generating war file for WepSphere Application server.
Here in RAD the project has various packages like
bean,dao,delegate,servlet ... etc.
I am configuring GWT eclipse project (genearetd by
applicationCreator). Since I cannot import the GWT project into
existing setup , I just copied all relavant packages from my existing
to GWT project. For example partuclarly the bean folder due to client
side code is refering for displaying values in GWT component from the
bean which is stored in session by servlet class.
After compiling, copying the content of www folder of GWT module into
my existing WEB-INF folder leaving server class just minimal code.
I am pasting existing server side code into GWT servlet class after
copying GWT servlet into my existing servlet packages.I
am redoing the the same packages client (which is having RPC
definitions) in my existing setup to avoid compilation error for
server side code.
The GWT servlet class configured in my web.xml file that is working
fine.
My clarification is
------------------------
1) Is this a way to work GWT in existing project in Eclipse or
RAD?
2) In my existing application , PDF will be generated on the fly
and will be displayed to the user by adding OutputStream of the
Servlet Response then immedaitely deletes the physical file from
system once successfull PDF creation done.
a) Here GWT fails saying java.lang.IllegalStateException:
SRVE0199E: OutputStream already obtained
b) I tried another approach using frame.setUrl( ) of GWT, but
issues are
1) The above method works only hosted browser by passing
reportdirectory( it will be configured in Unix at remote palce not at
server's dir) and genaredt pdf file name. The same thing not works in
IE. It expects the URL something lke http://<hostname>:9080/xxxx.pdf
in IE instead simply d:/reports/xxx.pdf.
2) Physical file will not be kept as per my existing
requirment, even if kept for testing purpose I am getting illeageState
error. the reason was my existing delegate class writes the pdf
content into stream. Then GWT also tries something.
My final clarification is
--------------------------------
1) Is GWT works as same as my my existing application opens in new
window displaying pdf content automatically once the method finishes.
2)Will you please help me how I can fix this issue?
Wish you happy and prosperous 2009!
Thanks Arul.
On Dec 29, 10:00 pm, gregor <[email protected]> wrote:
> Hi Arul,
>
> Yes, the reason your client side GWT code cannot see your shared bean
> class is because it does not live within the compilation scope (i.e.
> underneath) your GWT module *.gwt.xm file.
>
> The solution is as follows:
>
> 1) leave your bean class where it is in your server side code
>
> 2) create a new GWT module file in a convenient location somewhere
> above the shared bean .java file in your server side source structure,
> say MyModuleSharedBeans.gwt.xml. In this file you simply specify a
> path statement to the source packages (and their child packages) to
> include (NB: the path is relative to the location of this new module
> file), for example (and no more than this is needed):
>
> module>
> <inherits name='com.google.gwt.user.User'/>
> <source path="path.to.my.beans"/>
> // you can have more than one path statement,,,,
> </module>
>
> 3) include this module in your main application *.gwt.xl, e.g:
>
> module>
> .....
> <inherits name='path.to.MyModuleSharedBeans'/>
> .....
> </module>
>
> As long as you get the paths right in these two entries, you should be
> good to go. The only thing to remember is that all java classes in the
> specified packages must be compatible with GWT JRE Emulation. This
> means that sometimes you have to artificially create a separate
> package for beans you want to use both client and server side which
> can be a bit of a nuisance since you might not be able to put your
> shared beans in the most logical package. A simple trick is to add an
> extra package, say "shared", directly under the logical package you
> would have put the bean in normally and have
> MyModuleSharedBeans.gwt.xml point directly to that so as to by-pass
> the non-GWT friendly classes in the "real" package.
>
> regards
> gregor
>
> On Dec 29, 3:53 pm, Arul <[email protected]> wrote:
>
>
>
> > Hi,
> > Would you please clarify below questions.
> > 1) Is the package struct client must be followed using
> > applicationCreator? if no, will you please tell me how can use
> > applicationCreator without package client be created.
>
> > 2)I understant applicationCreator is tool for helping to develop
> > project quickly.
> > Is possible to develop the package struture ( GWT application) without
> > using this tool? if yes how can specifiy client to gwt.
> > and generate the nochahe.js file etc.
>
> > 3) There is no problem in server side code, it is not forcing to
> > create under server folder. because deployment decriptor helps loading
> > the server side code.
> > What I am coming here is, Is there similar approach for client side
> > code?. Right now if i did not put any java file which is referred by
> > EntryPoint class under client package then it is treating as module
> > and fails to load.
>
> > Thanks Arul- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---