This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java Micro Edition and the fly likes html code to webpage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "html code to webpage" Watch "html code to webpage" New topic
Author

html code to webpage

Ashley Swinson
Greenhorn

Joined: Jul 20, 2004
Posts: 12
I have two laptops that are communicating over a wireless ad-hoc connection (I'm not using a webserver). After my server computer transfers an html file to the client computer, the client computer just prints out the code that was transferred. How do I get the client to display the html file as an actual webpage instead of a lot of messy html code?
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Is the client a J2ME-based client?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Ashley Swinson
Greenhorn

Joined: Jul 20, 2004
Posts: 12
Yes, the server and client are J2ME based.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
As far as I know, there is no built-in library in the J2ME APIs for rendering HTML. For example, ReqWireless WebViewer uses a servlet which first fetches web pages, translates them into a "simplified" HTML document, and then delivers the simplified HTML to the device where the WebViewer client code renders the HTML "manually". I'm afraid you'll have to do something similar (write code for rendering HTML yourself).

(Obviously I'll be glad to hear about any existing libraries for doing this!)


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
jQuery in Action, 2nd edition
 
subject: html code to webpage