I hope this is the right place, it is basically about use of URL and OutputStreamWriter but is has aspects of other things.
I have a
test web page that has 1 button, and will change the value of a text label when the button is pressed. It is developed with
Java Studio Creator. This works when I use a browser.
I am trying to write a java
applet to interact with the web server. I just want it to press the button. I use the code below [1] (from javaalmanac.com). It receives the page OK (see the output of the program [2]), but the button is not pressed (the code should change from not pressed to pressed).
Any help greatly apperitiated.
[1]
[2] data = form1%3Abutton1=Submit
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en-GB" lang="en-GB"><head><meta http-equiv="Cache-Control" conte
nt="no-cache"/><meta http-equiv="Pragma" content="no-cache"/><title>test2 Title<
/title><link type="text/css" rel="stylesheet" href="resources/stylesheet.css"/><
/head><body style="-rave-layout: grid"><form id="form1" method="post" action="/s
msserver/faces/test2.jsp;jsessionid=77015A9ABE16DB8C7BFFC7E7A730F370" enctype="a
pplication/x-www-form-urlencoded">
<span id="form1
utputText1" style="left: 168px; top: 72px; position: absolute">
not pressed</span><input id="form1:button1" type="submit" name="form1:button1" v
alue="Submit" style="left: 168px; top: 144px; position: absolute" /><input type=
"hidden" name="form1" value="form1" /></form></body></html>
[ August 28, 2006: Message edited by: Huw Morgan ]
[ August 28, 2006: Message edited by: Huw Morgan ]
[ August 28, 2006: Message edited by: Huw Morgan ]