This is either a configuration question or else it's a design question. I'm
sure someone will have a strong opinion on the matter. ;-)

I have a servlet that outputs html. For the sake of modularity, I'd like
(conceptually) to have some of its content be provided by another servlet.
Let's say for the sake of example that I want to generate a table on my
page.

Based on what I've read of JSSI, JSSI seems a good solution. My servlet
outputs html that includes some <SERVLET ...> tags where I want the table,
then good things happen as the table gets handled by a different servlet.
It's not clear to me, however, if it's possible to set things up so that
servlet output can be chained through JSSI. The FAQ comments on chaining
suggest not. But maybe it doesn't have to be done via chaining.

Perhaps the best solution (this is why it might be a design question) is to
write a class that does the table, then write a separate wrapper for that
class for use via JSSI when the page is static, and call the class directly
when the page is being generated by a servlet.

It seems to me (if both choices are possible) that the advantage of using
JSSI is simplicity at a possible slight speed penalty, while the advantage
of calling the class directly is maybe speed at the cost of complexity
(more to maintain).

Meanwhile, the JSSI approach lets me potentially separate content from
logic more.

I know, I'm trailing off into a design discussion. I'm asking here because
I want to know if the servlet through jssi filter is even possible (and not
somehow ill-advised). Feel free to propose a better forum if this is
getting too far off topic for the aveerage JAU-er. ;-)

Tia.

Jeff

-------------------------------------------------------------------------
   Jeff Abrahamson      <http://www.purple.com/jeff>
   [EMAIL PROTECTED]       BeOS, unix, MacOS Development





--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to