You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kevin Fonner <fo...@greenfern.com> on 2001/05/15 22:37:40 UTC
perplexing multiple servlet output question..
I wanted a web page to display the results of mutiple servlets (maybe even as many as 30 servlets) in rows on a web page. At first I was going to try to do it with frames where each frame would load a servlet. I then ran into a problem. I forgot that frames bind to a window and that you can't scroll through a single page containing multiple frames (at least not that I know of). Anybody have any opinion on how they might try to do this?
Example of a single Web page...
+----------------+
+ servlet 1 +
+----------------+
+ servlet 2 +
+----------------+
+ servlet 3 +
+----------------+
+ ect... +
+----------------+
The user would then scroll through the page containing mutiple servlet output.
Thanks,
Kevin
Re: perplexing multiple servlet output question..
Posted by Richard Draucker <ri...@draucker.com>.
You can do it by generating your output using javascript
document.write from within the servlets to print your
results.
Ex: Within each servlet include something like...
PrintWriter out = response.getWriter();
out.println( "document.write('this is servlet data') );
...and in your web page put something like...
<script src="http://your_url.com/servlet/servlet1"></script>
<script src="http://your_url.com/servlet/servlet2"></script>
<script src="http://your_url.com/servlet/servlet3"></script>
The browser doesn't care that the javascript code is coming
from a servlet. The browser's javascript engine will
execute the document.writes and print the text from the
servlet in place of the <script> tags Use a separate
script tag for each servlet you want output from.
If you format your page with tables and put each script tag
in its own <td> on its own <tr>, you'll get reasonably nice
output of you servlet data.
On Tue, 15 May 2001, you wrote:
>
> I wanted a web page to display the results of mutiple servlets (maybe even as many as 30 servlets) in rows on a web page. At first I was going to try to do it with frames where each frame would load a servlet. I then ran into a problem. I forgot that frames bind to a window and that you can't scroll through a single page containing multiple frames (at least not that I know of). Anybody have any opinion on how they might try to do this?
>
> Example of a single Web page...
>
> +----------------+
> + servlet 1 +
> +----------------+
> + servlet 2 +
> +----------------+
> + servlet 3 +
> +----------------+
> + ect... +
> +----------------+
>
> The user would then scroll through the page containing mutiple servlet output.
>
> Thanks,
> Kevin
>
----------------------------------------
Content-Type: text/html; name="unnamed"
Content-Transfer-Encoding: quoted-printable
Content-Description:
----------------------------------------
--
Richard Draucker, richard@protected-data.com
Protected-Data.Com www.protected-data.com
Remote data support for web developers.
Re: perplexing multiple servlet output question..
Posted by Kevin Fonner <fo...@greenfern.com>.
Yep, I tried that to. Frameset tags don't seem to have scrolling property.
----- Original Message -----
From: "Jan Labanowski" <jk...@osc.edu>
To: <to...@jakarta.apache.org>
Cc: "Jan Labanowski" <jk...@osc.edu>
Sent: Tuesday, May 15, 2001 7:53 PM
Subject: Re: perplexing multiple servlet output question..
> Try to see if putting a frameset into a frame will help
> Jan
>
>
> On Tue, 15 May 2001, Kevin Fonner wrote:
>
> > I wanted a web page to display the results of mutiple servlets (maybe
even as many as 30 servlets) in rows on a web page. At first I was going to
try to do it with frames where each frame would load a servlet. I then ran
into a problem. I forgot that frames bind to a window and that you can't
scroll through a single page containing multiple frames (at least not that I
know of). Anybody have any opinion on how they might try to do this?
> >
> > Example of a single Web page...
> >
> > +----------------+
> > + servlet 1 +
> > +----------------+
> > + servlet 2 +
> > +----------------+
> > + servlet 3 +
> > +----------------+
> > + ect... +
> > +----------------+
> >
> > The user would then scroll through the page containing mutiple servlet
output.
> >
> > Thanks,
> > Kevin
> >
>
> Jan K. Labanowski | phone: 614-292-9279, FAX: 614-292-7168
> Ohio Supercomputer Center | Internet: jkl@osc.edu
> 1224 Kinnear Rd, | http://www.ccl.net/'NA'istry.html
> Columbus, OH 43212-1163 | http://www.osc.edu/
>
Re: perplexing multiple servlet output question..
Posted by Jan Labanowski <jk...@osc.edu>.
Try to see if putting a frameset into a frame will help
Jan
On Tue, 15 May 2001, Kevin Fonner wrote:
> I wanted a web page to display the results of mutiple servlets (maybe even as many as 30 servlets) in rows on a web page. At first I was going to try to do it with frames where each frame would load a servlet. I then ran into a problem. I forgot that frames bind to a window and that you can't scroll through a single page containing multiple frames (at least not that I know of). Anybody have any opinion on how they might try to do this?
>
> Example of a single Web page...
>
> +----------------+
> + servlet 1 +
> +----------------+
> + servlet 2 +
> +----------------+
> + servlet 3 +
> +----------------+
> + ect... +
> +----------------+
>
> The user would then scroll through the page containing mutiple servlet output.
>
> Thanks,
> Kevin
>
Jan K. Labanowski | phone: 614-292-9279, FAX: 614-292-7168
Ohio Supercomputer Center | Internet: jkl@osc.edu
1224 Kinnear Rd, | http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163 | http://www.osc.edu/