Maya, For a short, simple answer: You will probably want to use either direct HTML in your page (e.g. <table><tr><td></td><%="some value"%></tr></table> or output it as part of your internal output structure. (e.g. concat it to some variable - "<TR><TD>The calculated value is <b>" + iSomeVal + "</b></TD></TR>" ) -dane
Just to add something else to this thread, while outputting lots of HTML code from inside JSP tags is easily achievable, it's not really best practice since you take away the ability for page authors/designers to take away the page and modify the look and feel. In essence, this is for the same reasons behind why JSPs replace(d) Servlets for generating HTML. With this in mind, given that you need to build a page with tags, there are several ways in which you can minimize the amount of content that custom tags generate. Examples include tags that introduce scripting variables, tags that cooperate on the page, and if you do need to generate HTML, you can use technologies such as CSS to reduce the amount of style information that you put into the page. Hope that's useful... Simon
Originally posted by David O'Meara: I'm going to stick with Simon and say "HTML in tags is evil". Rather than taking our word for it, it may be a process you have to go through yourself, but it's something I'm dead-set against.
I agree with you and Simon too, but there's something interesting about the future to point out: JSP 2.0, currently in public-draft phase, will support the development of tags using JSP itself. That is, you could generate a reusable whole-table tag by creating a "tag file" expressed in JSP instead of Java. It might be fun to play with the current RI; I encourage everyone to try it out. The other major feature of JSP 2.0 is the expression language, drawn from JSTL 1.0.