>
> My clarification is
> ------------------------
>   1)  Is this a way to work GWT  in existing project in Eclipse or
> RAD?

Well I would probably put the GWT module code within the existing
project structure and include a GWT compile task in my Ant build for
deploying to websphere. So long as your GWT module client/public/
server folders are separated from the rest of your project in the
source structure (i.e. nothing from remainder of project lives under
your module.gwt.xml file) and the extra module for including your
shared beans is in place as discussed previously this should not be a
problem. Once you get it set up right it should work better, whereas
if you do what you are doing now (pre-compile the GWT module then copy
the output + servlet source into existing project as I understand it)
I would think you will get continuous hassles and unexpected errors
you can't easily debug.

>   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

That probably means you are either accessing somewhere the response
output stream more than once (which is not allowed), or a JSP or
struts Action class is involved somewhere and is doing that
automatically

>    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.

I think you want to write it to the output stream.

>
>             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.

this is probably a consequence of previous error

>
> 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.

If you want to display the PDF in a separate browser tab or window, it
is a bit trickier because a GWT module works from within one HTML page
that houses its javascript and because you are rendering the PDF from
a stream rather than from disk file (which would be easy).

Something like this may work (from a post by Alex):

       Window.open("http://path_to_yourservlet/servlet?
param=value&param2=value2", "newWindowName", "window features.");
   }

If it doesn't I would open a new thread for specific advice about how
best to get the PDF generated in servlet as stream shown in new tab/
window. Never done it myself.

regards
gregor





> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to