Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

need some help regarding java

Should you have problems with the JavaViewer, here's the place to look for help or report issues
Post Reply
khanshab
Posts: 3
Joined: 2009-02-20 18:39

need some help regarding java

Post by khanshab »

hello everyone,

ok here is my problem. i have a java servlet wherein it has a StringBuffer that appends my html tags and a javascript. My question is that is there a way wherein i can append a javascript in the StringBuffer using response.setContentType("text/html")? oris there another way to append a javascript in java to be flushed in html?
below is a sample script i made.

StringBuffer buff = new StringBuffer();

buff.append("<p>just some text here..</p>");
buff.append("<script \"text/javascript\">callFunction();</script>");

response.setContentType("text/html");
response.getWriter().println(buff.toString());
response.getWriter().flush();

whenever i execute this program it outputs the html part but does not execute the javascript part.

thanks
Post Reply