Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / May 2004

Tip: Looking for answers? Try searching our database.

Passing JSP code back from Java Bean

Thread view: 
Bob C - 07 May 2004 14:26 GMT
I have a JSP page that calls a Java Bean method which returns a text
value (e.g., table).

My question is... can the text value that I pass back to the JSP page
be a JSP code snippet?

I assume not because the original JSP code is already precompiled and
wouldn't know what to do with the JSP code returned from the bean.

Any thoughts?
---------------------------------------------
Example:

JSP Include File:

header1 = "Column #1";
header2 = "Column #2";
...

JSP snippet:
<%= mybean.getTableData() %>

Java Bean function:

String getTableData() {
 return ("<TABLE><TR><TH><%= header1 %></TH><TH><%= header2
%></TH></TR></TABLE>");
}

thanks!

BC
rpnman - 16 May 2004 22:05 GMT
I suppose something could be worked out with serialized objects, but the
real question is :

   Why?

What are you trying to do that can't be done better through a more tested
and supportable technology?

Signature

ROGER NEYMAN

> I have a JSP page that calls a Java Bean method which returns a text
> value (e.g., table).
[quoted text clipped - 28 lines]
>
> BC


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.