|
-
Oct 20th, 2008, 08:57 AM
#1
Thread Starter
Addicted Member
[RESOLVED] help w/ JSP
I need some help w/ what i hope is a simple JSP page. Now I may be over simplifying it and if thats the case feel free to splap me. Below is the start of a simple JSP page and for now all I need it to do is show me what the session names are and display them. The include statements are from the IBM host on dempand API. and I will include the relavent part of that document at the end of the post. So what am i dong wrong that keeps this from working. I dont think I am getting it to make the call to the function correctly and I thought the function call get all session names Works when you include it. So could someone explain to me what I am missing and help point me to fix this stupid little thing.
Thanks as always.
My current JSP page.
Code:
<%@ page language="java" buffer="none" contentType="text/html; charset=UTF-8" %>
<%@ page import = "java.applet.Applet" %>
<%@ page import = "com.ibm.enetwork.HOD.BaseApplet " %>
<%@ page import= "com.ibm.enetwork.HOD.HostOnDemand" %>
<%@ page import= "com.ibm.enetwork.HOD.JSHostOnDemand" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h2>Hello World!</h2>
<input type="text" name="AgentID" value="" />
<input type="submit" value="Push to As400" name="AgentID" />
<p>
<%
response.getWriter().write("testing");
String freak = getAllSessionNames();
response.getWriter().write(freak);
%>
</body>
</html>
Excert form IBM API document.
Using Session Manager APIs, application developers can write JavaScript code that manipulates data from the data stream presentation space (such as 3270, 5250, and Virtual Terminal) without requiring any Java coding. The presentation space represents a virtual terminal screen that contains both data and selected associated attributes presented by host applications. These JavaScript Session Manager APIs have many functions, including starting, stopping, and displaying sessions, starting macros, opening a session to the host, waiting for incoming host data, getting specific strings from the imaginary screen, setting new string values, sending data stream function keys back to the host, and waiting for the next host response. After an interaction is complete, the JavaScript code can switch to other tasks or simply close the session. The entire operation can be performed without ever showing host screens.
In order for JavaScript code to work with host sessions, it must interact with the Host On-Demand applet com.ibm.eNetwork.HOD.JSHostOnDemand. An application developer can create JavaScript files for the required functions and incorporate them into a Web page. JavaScript files must be placed into the Host On-Demand publish directory.
The following diagram shows how the JSHostOnDemand applet encapsulates the HostOnDemand applet:
java.applet.Applet
|
+--com.ibm.eNetwork.HOD.BaseApplet
|
+--com.ibm.eNetwork.HOD.HostOnDemand
|
+--com.ibm.eNetwork.HOD.JSHostOnDemand
public String getAllSessionNames ()
The getAllSessionNames method returns a string of all active session names in the following format:
sessionName+sessionID;sessionName+sessionID
e.g. 3270 Display - A;5250 Display - B
The caller can tokenize the string with the ";" character and use the full session names on APIs such as sendKeys, sendString, and getString.
Thanks as for any help or suggestions
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|