|
-
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
-
Oct 23rd, 2008, 07:59 AM
#2
Re: help w/ JSP
What do you mean session names!! There is no such concept in JSP
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Oct 23rd, 2008, 08:07 AM
#3
Thread Starter
Addicted Member
Re: help w/ JSP
Its an application that will send a string over to an AS400 conection. The include statements are from the as400 API. The get session names are the name of each connection.
So by session name I mean show the connections that are made.
does that make since?
-
Oct 23rd, 2008, 08:41 AM
#4
Re: help w/ JSP
yes it does, but I don't think you should go through the documentation provided by IBM api for this. Or maybe contact them
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Oct 26th, 2008, 07:26 PM
#5
Re: help w/ JSP
hockey1314... Java code and JavaScript code are not the same thing.
-
Oct 26th, 2008, 07:48 PM
#6
Re: help w/ JSP
 Originally Posted by leinad31
hockey1314... Java code and JavaScript code are not the same thing.
I don't know if you've read the post. There is nothing about JavaScript in here. He was talking about JSP which is Java as far as I know
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Oct 27th, 2008, 01:04 AM
#7
Re: help w/ JSP
 Originally Posted by ComputerJy
I don't know if you've read the post. There is nothing about JavaScript in here. He was talking about JSP which is Java as far as I know
Is that so. Then the IBM documentation needs to be updated.
Last edited by leinad31; Oct 27th, 2008 at 01:08 AM.
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
|