org.symbian.tools.wrttools.previewer/http-content/wrtdebugger/debugger.jsp
author tasneems@symbian.org
Thu, 11 Mar 2010 13:15:14 -0800
changeset 252 87ba64dae28d
parent 41 fc4a1d68260a
permissions -rw-r--r--
Fixed 2164: Deployment settings for WRT Application pop-up menu item is confusing
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41
fc4a1d68260a Preview is now feeded from the embedded HTML server
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 2
diff changeset
     1
<%@ page import="org.symbian.tools.wrttools.previewer.http.WebAppInterface" %>
2
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
     2
<%
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
     3
	String widget = WebAppInterface.decode(request.getParameter("widget"));
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
     4
	String id = request.getParameter("session");
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
     5
%>
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
     6
<html>
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
     7
<head>
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
     8
	<title><%=widget %></title>
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
     9
	<% WebAppInterface.connectDebugger(widget, id); %>
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    10
	<script type="text/javascript">
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    11
		var req;
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    12
		
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    13
		function connect() {
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    14
			req = new XMLHttpRequest();
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    15
			req.onreadystatechange = testconnection;
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    16
			req.open("GET", "<%=WebAppInterface.getAjaxUri(widget, id) %>", true);
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    17
			req.send(null);
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    18
		}
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    19
		
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    20
		function testconnection() {
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    21
			if (req.readyState == 4) {
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    22
				if (req.status == 200) {
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    23
					window.setTimeout(connect, 200);
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    24
				} else {
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    25
					window.location = '<%=WebAppInterface.getUrl(widget, id) %>';
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    26
				}
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    27
			}
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    28
		}
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    29
	</script>
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    30
</head>
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    31
<body onload="connect()">
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    32
Establishing debug connection...
e4420d2515f1 Initial version of WRT Debugger.
TasneemS@US-TASNEEMS
parents:
diff changeset
    33
</body>