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 / General / April 2006

Tip: Looking for answers? Try searching our database.

how to make corresponding java code for html code

Thread view: 
david wolf - 21 Apr 2006 21:07 GMT
I need to put some html code in my java bean or taglib. What I did is
that I first get these html code by designing it in front page. Since I
need to put these html code in a loop(say I want to generate a table
dynamically) in my java bean or taglib, I copied thes html code in my
java bean. And then put these in a stringbuffer.

My question is that it is so tedious to do these. I need to put
msg.append for every line of html code and also use \ to modify every
double quote inside the html.

Is there a tool to help me to this, I mean putting html code inside my
string buffer, automatically without my manually doing this?

--------------------------------------------------------
StringBuffer msg = new StringBuffer();

msg.append("<td>
msg.append("<style type="text/css">
msg.append("<!--

....
...
Oliver Wong - 21 Apr 2006 22:58 GMT
>I need to put some html code in my java bean or taglib. What I did is
> that I first get these html code by designing it in front page. Since I
[quoted text clipped - 15 lines]
> msg.append("<style type="text/css">
> msg.append("<!--

   How about saving your HTML code to a file, and writing your java code to
read from these files?

   - Oliver


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



©2009 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.