Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > showing reports created in an applet

Reply
Thread Tools

showing reports created in an applet

 
 
bucky.pope
Guest
Posts: n/a
 
      06-27-2008
I want to build a report in a String in an applet then display that
string in a browser window without writing a file to disk.

Any suggestions?
 
Reply With Quote
 
 
 
 
Mark Rafn
Guest
Posts: n/a
 
      06-27-2008
In article <(E-Mail Removed)>,
bucky.pope <(E-Mail Removed)> wrote:
>I want to build a report in a String in an applet then display that
>string in a browser window without writing a file to disk.
>
>Any suggestions?



 
Reply With Quote
 
 
 
 
Dave Miller
Guest
Posts: n/a
 
      06-27-2008
bucky.pope wrote:
> I want to build a report in a String in an applet then display that
> string in a browser window without writing a file to disk.
>
> Any suggestions?

The applet is running in the same browser window? If yes, why wouldn't
you display the report within the applet / where exactly within the
window do you want to display the report?

--
Dave Miller
Java Web Hosting at:
http://www.cheap-jsp-hosting.com/
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      06-27-2008
On Fri, 27 Jun 2008 09:32:55 -0700 (PDT), "bucky.pope"
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone who
said :

>I want to build a report in a String in an applet then display that
>string in a browser window without writing a file to disk.


You might just throw the whole thing in a JTextArea with a scroller.
see http://mindprod.com/jgloss/jtextarea.html

A bit more complex, use a JTable if you want columns or editing. see
http://mindprod.com/jgloss/jtable.html

If you want to write it to disk you must sign the app or write as a
JWS app.
see http://mindprod.com/jgloss/javawebstart.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      06-28-2008
On Jun 28, 5:27 am, Roedy Green <(E-Mail Removed)>
wrote:
....
> If you want to write it to disk you must sign the app or write as a
> JWS app.
> see http://mindprod.com/jgloss/javawebstart.html


That's a good page, but I don't see any reference to some
recent developments that involve hooking applets into webstart
services (and making them draggable). This allows an unsigned
applet, embedded in a web page, to access the local disks
using the JNLP API (and also to be dragged off the web page -
thereby installing them locally).

This was only introduced into the 1.6.0_10 (beta, when I
last saw it) JRE, but it does seem interesting (interesting
enough for me to download the _10-beta update to play with
it).

JNLP support:
<https://jdk6.dev.java.net/plugin2/jnlp/>
Draggable applet:
<https://jdk6.dev.java.net/plugin2/#EXPERIMENTAL_FUNCTIONALITY>

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
Mark Space
Guest
Posts: n/a
 
      06-28-2008
bucky.pope wrote:
> I want to build a report in a String in an applet then display that
> string in a browser window without writing a file to disk.
>
> Any suggestions?


You probably mean scriptlet, not applet. The two are very different too.

Scriptlets are for web programming and for web apps, and use Java EE (I
think that's what they're calling it these days). Applets are much
older tech that never really caught on, and are not used much any more.


http://java.sun.com/javaee/

<http://www.javapassion.com/j2ee/>

<http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/>

 
Reply With Quote
 
bucky.pope
Guest
Posts: n/a
 
      06-28-2008
On Jun 27, 12:53*pm, Dave Miller <(E-Mail Removed)> wrote:
> bucky.pope wrote:
> > I want to build a report in a String in an applet then display that
> > string in a browser window without writing a file to disk.

>
> > Any suggestions?

>
> The applet is running in the same browser window? If yes, why wouldn't
> you display the report within the applet / where exactly within the
> window do you want to display the report?
>
> --
> Dave Miller
> Java Web Hosting at:http://www.cheap-jsp-hosting.com/


This is an app that might run from a local web page or from a remotely
loaded web page. I figured by displaying the report in the browser,
the user would have all his or her regular browser capabilities: save,
print, email or they might want to keep several reports open in tabs.
That would save me a lot of programming.
 
Reply With Quote
 
bucky.pope
Guest
Posts: n/a
 
      06-28-2008
On Jun 28, 1:33*pm, Mark Space <(E-Mail Removed)> wrote:
> bucky.pope wrote:
> > I want to build a report in a String in an applet then display that
> > string in a browser window without writing a file to disk.

>
> > Any suggestions?

>
> You probably mean scriptlet, not applet. *The two are very different too.
>
> Scriptlets are for web programming and for web apps, and use Java EE (I
> think that's what they're calling it these days). *Applets are much
> older tech that never really caught on, and are not used much any more.
>
> http://java.sun.com/javaee/
>
> <http://www.javapassion.com/j2ee/>
>
> <http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/>


I may deploy this app either from a hosted webpage for a local copy of
the same page loaded from a distribution cd. I thought EE was server
only. I'm looking for the simplist solution possible.
 
Reply With Quote
 
bucky.pope
Guest
Posts: n/a
 
      06-28-2008
On Jun 28, 1:38*am, Andrew Thompson <(E-Mail Removed)> wrote:
> On Jun 28, 5:27 am, Roedy Green <(E-Mail Removed)>
> wrote:
> ...
>
> > If you want to write it to disk you must sign the app or write as a
> > JWS app.
> > seehttp://mindprod.com/jgloss/javawebstart.html

>
> That's a good page, but I don't see any reference to some
> recent developments that involve hooking applets into webstart
> services (and making them draggable). *This allows an unsigned
> applet, embedded in a web page, to access the local disks
> using the JNLP API (and also to be dragged off the web page -
> thereby installing them locally).
>
> This was only introduced into the 1.6.0_10 (beta, when I
> last saw it) JRE, but it does seem interesting (interesting
> enough for me to download the _10-beta update to play with
> it).
>
> JNLP support:
> <https://jdk6.dev.java.net/plugin2/jnlp/>
> Draggable applet:
> <https://jdk6.dev.java.net/plugin2/#EXPERIMENTAL_FUNCTIONALITY>
>
> --
> Andrew Thompsonhttp://pscode.org/


JNLP has a showDocument like AppletContext, but it also requires a
URL. Is there any way to create a URL that points to a String in
memory instead of a file or a web page?
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      06-29-2008
On Jun 29, 7:00*am, "bucky.pope" <(E-Mail Removed)> wrote:
...
> > JNLP support:

...
> JNLP has a showDocument like AppletContext, but it also requires a
> URL. Is there any way to create a URL that points to a String in
> memory instead of a file or a web page?


Short answer no, long anwser, nope.

But if the applet wraps the report up as the
*parameters* for an URL, a JS* on the receiving
web page could write out the report in a form
suitable for the browser to render it, and the user
to print it. There will be numerous problems
trying to 'save' such a report though.

I think your best (least effort) option is to
sign the applet, as Roedy suggested, then write
a temporary file containing the report. If your
users want these reports, they should be willing
to accept a trusted applet (especially if you
explain why the extended trust is required).

I saw a great applet that asked at start-up if
you wanted to trust it, initially I said no, so
it went ahead to prepare the visually interesting
parts of the applet, but had things like the 'Print'
and 'Save' buttons disabled - 'These are available
in the trusted version'.

* Noting that you are not running an active
server in some cases.

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems using ASP and Crystal Reports 8.5 to create dynamic PDF reports PughDR@gmail.com ASP General 0 10-23-2006 02:50 PM
Is it possible to get Crystal Reports to print multiple reports in ASP.NET? Rod ASP .Net 2 05-25-2006 02:12 PM
How to launch reports (done with Crystal Reports) from a Java application? minjie@excite.com Java 2 03-15-2006 08:40 PM
Calling Crystal Reports in ASP.NET using the rptserver.asp given by Crystal Reports Peri ASP .Net 1 07-21-2005 12:56 PM
Displaying Microsoft Access Reports (active reports) via ASP.NET Brian Barnes ASP .Net 1 02-18-2004 05:59 AM



Advertisments