File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes outputting html content to the server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply locked New topic
Author

outputting html content to the server

mj zammit
Ranch Hand

Joined: Nov 16, 2008
Posts: 49
Hi i am building a proxy and i am having problems outputting the html contents which the proxy retrieves to the client.
My web server first outputs a form to the client and retrieves the clients requests.
The requested url is then sent to a proxy class where the url's html is retrieved.
The HTML which the proxy retrieves is placed in a public variable called HTMLstring.

This is my code:



Why isnt the html shown to the client??
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8907
    
    8

It would be polite to give us code that compiles:

PostRealCode

Also, I've noticed that your displayed name does not conform to our naming policy. In short, your displayed name must be a real (or at least real sounding) first and last name separated by a space. You can change your name here.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8907
    
    8

Also, never do this:

If you are getting an exception in your code, you'd never know it. At the very least, print out the stack trace.
mj zammit
Ranch Hand

Joined: Nov 16, 2008
Posts: 49
my first name are my mine intials which if i am not mistaken are allowed...
The code i sent out has a few java classes which i didnt think were necessary in giving. The program does not give me an error, internally it works correctly, but when i come to output the html that the proxy got it does not do it. I am not so sure if it has anything to do when i am outputting the stream to the client... Any ideas will be greatly appreciated
mj zammit
Ranch Hand

Joined: Nov 16, 2008
Posts: 49
I realized that the title to this thread is wrong. I should have written...outputting html content to the client...sorry for the mistake
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8907
    
    8

continued here
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: outputting html content to the server