Win a copy of Spring Boot in Practice this week in the Spring forum!

Prakash Velusamy

+ Follow
since Oct 03, 2014
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prakash Velusamy

I am creating an application which accesses Asset's Folder's HTML Page.The HTML File as below,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<link href="css/index.css" rel="stylesheet" type="text/css" />
<h3> A White Header </h3>
<p> This paragraph has a blue font.
The background color of this page is gray because
we changed it with CSS!

and the index.css file is,

body{ background-color: gray;}
p { color: blue; }
h3{ color: white; }

I am reading the HTML file from Android and writing to socket outputstream like,

try {
InputStream localInputStream = this.context.getAssets().open("sendSMS.html");
PrintStream localPrintStream = new PrintStream(this.socket.getOutputStream(), true);
byte[] arrayOfByte = new byte[8192];
localPrintStream.println("HTTP/1.0 200 OK");
localPrintStream.println("Content-Type:text/html;charset=" + "UTF-8");
if ( != -1)
String str = new String(arrayOfByte).trim();

} catch (IOException e) {
// TODO Auto-generated catch block
the expected Page output is,

but the received output is,

It seems like Once the response is written the HTML Page couldnt locate the local css file i specified.

So is there anyway i can read the css file specified in HTML Page and write it back to the outpustream?

I think i can do this with reading Page header but i dont know how to implement. Would be very grateful if someone could help me with this.Thanks
7 years ago
Hi All,
I am noob to android development.I need to develop android application which is exactly similar to this know i have to use Socket Connection as a base to communicate with android to PC.But i am stuck with how to use this Socket Connection to Create Dynamic HTML Page from Android with List of Folders,Files and Send the page to the Browser.Kindly anyone help me with this.Thanks.
7 years ago
i am working on simple desktop based java swing billing application which has to work multiple computers.mysql db should has to be shared with every computers over LAN.

in this case should i use an application server?or is it enough to specify ip address of server system in jdbc connection like

connection = DriverManager .getConnection("jdbc:mysql://ipaddress of server
system(","root", "password");

Kindly help me to understand the better method. Thanks in advance.
Greetings to all,
I am learner of Java.I would like to know the possible ways to put up JInternalFrame over JPanel to achieve the following output.

Is it even Possible because i learned JInternalFrame can only be added to JDesktopPane.?
7 years ago