Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > how to make corresponding java code for html code

Reply
Thread Tools

how to make corresponding java code for html code

 
 
david wolf
Guest
Posts: n/a
 
      04-21-2006
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("<!--

.....
....

 
Reply With Quote
 
 
 
 
Oliver Wong
Guest
Posts: n/a
 
      04-21-2006

"david wolf" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>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("<!--


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

- Oliver

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any corresponding C++ component for java.lang.reflect? xiebopublic@gmail.com C++ 1 08-18-2006 01:00 AM
Is there C/C++ corresponding function in Linux for Java's java.util.Locale.getCountry? xiebopublic@gmail.com C++ 2 07-23-2006 04:27 PM
How to convert a big java project to corresponding c++ version? xiebopublic@gmail.com C++ 5 03-13-2006 11:27 AM
what is corresponding code in c++ for malloc Sameer C++ 1 02-21-2006 07:48 AM
Conduit in PIX without corresponding Static Atif Sajid Cisco 3 01-24-2004 07:25 PM



Advertisments