Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-02-2012, 03:42 AM   PM User | #1
AT-LOW
New to the CF scene

 
Join Date: Dec 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
AT-LOW is an unknown quantity at this point
HTML into java code

Hey guys,

I was wondering if you could take source code from a website shown in HTML and convert it into java code. Is there any way to see the source code in java code instead of HTML?

Thanks.
AT-LOW is offline   Reply With Quote
Old 12-03-2012, 04:07 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Nope, you can't really view the source of Java code. The bytecode may be somewhat legible though, but its not the same as the source.
To create Java from HTML you would need to write a parser to effectively go through the html source and build the necessary components you want to display as java components. So you would check for an input type of text, and give it a JTextField for example. Layout will be much harder as you'll need to write a CSS parser for it, then give it explicit layout settings for each component. Won't be pretty for things that are inherited like block levels in HTML since Java doesn't understand what that is so it'll just keep stacking components on top of components.
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 06:19 AM.


Advertisement
Log in to turn off these ads.