Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JSP and Pathsend

311 views
Skip to first unread message

wbreidbach

unread,
Dec 6, 2016, 3:32:11 AM12/6/16
to
We are developing a web application on the NonStop. We want to use JSP (Tomcat) for the GUI itself and interface with one or more Pathway servers to do the real work like accessing the database and delivering the information to be displayed. Unfortunately we did not find any samples for that.
We have been successful converting the messages to and from the first Pathway server using DDL2JAVA and have created a little JAVA program communicating with that server. But we have not yet found a way to do the same using JSP. So my question: Has anybody done something like this before? And if yes, could you provide me with a sample? Our server receives a requestcode, a userid and a password and returns a returncode and a welcome/error message.

Keith Dick

unread,
Dec 6, 2016, 6:35:54 AM12/6/16
to
wbreidbach wrote:
> We are developing a web application on the NonStop. We want to use JSP (Tomcat) for the GUI itself and interface with one or more Pathway servers to do the real work like accessing the database and delivering the information to be displayed. Unfortunately we did not find any samples for that.
> We have been successful converting the messages to and from the first Pathway server using DDL2JAVA and have created a little JAVA program communicating with that server. But we have not yet found a way to do the same using JSP. So my question: Has anybody done something like this before? And if yes, could you provide me with a sample? Our server receives a requestcode, a userid and a password and returns a returncode and a welcome/error message.

I do not have any examples for you. I am writing just to mention that, if you are not already aware of it, it might help you to learn about the Java Infrastructure feature that was added to NonStop Java some time ago. I have not used it, but the brief description I have seen says it allows Java code using the Socket class or the SocketChannel class to communicate via Guardian WRITEREAD or SERVERCLASS_SEND_ to legacy servers transparently on both ends.

It seems like Java Infrastructure is intended mostly to allow easy integration of existing Java-based applications into an existing NonStop application without source code changes on either side (there is some kind of mapping file that provides the Socket class with the necessary bridging information), but it might also be helpful when developing new Java applications intended to utilize existing NonStop servers. The Java programmers would need to know only how to use Java Socket programming to access the existing servers.

This might be off the point, since I do not understand just what the sticking point is that you are having when trying to use JSP to communicate with an existing server. I only wanted to point out that Java Infrastructure exists if you were not already aware of it. If you have examples of what you want to do that uses Java Sockets to communicate with a service, making use of Java Infrastructure might make it possible to use exactly the same Java code to communicate with your existing servers.

wbreidbach

unread,
Dec 6, 2016, 8:07:44 AM12/6/16
to
Just to avoid any misunderstandings:
We have installed JAVA and a simple JAVA program accessing a Pathway server is running without problems. We have defined the messages using DDL and converted the messages to JAVA using DDL2JAVA.
There has been an example we could use for that.
Now we want to do the same thing using JSP (Java Server Pages). Of course there are examples for Java Server Pages. Unfortunately we could not find anything about connecting JSPs to Pathsend and that is what I am looking for.

Bill Honaker

unread,
Dec 6, 2016, 1:28:38 PM12/6/16
to
Wolfgang,

There really isn't anything that special, but often the paradigm is different. In many cases, 'enterprise bean' objects are created that encapsulate the business logic so that the code written in the .JSP file isn't where the JPathSend calls are made.

At the beginning of any page that needs to use these objects, this page directive can be found:

<jsp:useBean id="MyAppBean" class="com.mycompany.namespace.MyAppBean" scope="session" />

Then you can access the public methods in that class as follows:

<%
Boolean bUserVerified = MyAppBean.getIsUserVerified();
%>

I know you can also access properties of the bean for use, for example, in text for labels, I think its something lie:

value="#{MyAppBean.DisplayValue}".

Hope that helps,
Bill

wbreidbach

unread,
Dec 8, 2016, 9:00:31 AM12/8/16
to
Thank you, Bill, we will give it a try.
We meanwhile managed to get the request to and the reply from the Pathway server.

wbreidbach

unread,
Jan 10, 2017, 5:11:19 AM1/10/17
to
Am Donnerstag, 8. Dezember 2016 15:00:31 UTC+1 schrieb wbreidbach:
> Thank you, Bill, we will give it a try.
> We meanwhile managed to get the request to and the reply from the Pathway server.

Just for information: We got the Web-GUI up and running as a first prototype. The GUI includes authorization against Safeguard and session-handling including sessions timing out after too long inactivity. We have created some Pathway-servers doing all the database stuff.
The project is done by a student as the necessary practive project, so the next thing to do is writing the documentation and continue extending the functionality. And, opf course, presenting the results to the management. I am pretty sure that some people will be very surprised that a Web-GUI on NonStop is possible.

Gustavo Martinez

unread,
Jan 10, 2017, 3:02:56 PM1/10/17
to
Good to know that Wolfgang.

Finally (if you can share with us) what was the key to solve the problem between JSPs and Pathway ?

I'm also interested in that info.

Regards,
Gustavo.

wbreidbach

unread,
Jan 10, 2017, 3:45:41 PM1/10/17
to
Please be a bit patient, I have to talk to our student (which in fact is my son) and he will not be available before Thursday. As far as I know he had to separate the JSP part and the JAVA part containing the Jpathsend code.

wbreidbach

unread,
Jan 16, 2017, 7:37:09 AM1/16/17
to
As said before you have to separate the JSP part and the JAVA part that does the communication with the Pathway servers. For the Pathsend part there are some examples within JTOOLKIT.
We did not find really good examples for the JSP part and had to try a lot of things.
A very interesting problem is the different behaviour of the browsers, Firefox in general behaves as expected, same with Iron (should be the same with Chrome). IE has its own interpretation of HTML code and does not always do what you expect.

Frank Wood

unread,
Nov 6, 2020, 5:43:55 AM11/6/20
to
On Thursday, December 8, 2016 at 9:00:31 AM UTC-5, wbreidbach wrote:
> Thank you, Bill, we will give it a try.
> We meanwhile managed to get the request to and the reply from the Pathway server.

I sure would like to know how this was done. I"m kinda jumping into this myself.

wbreidbach

unread,
Dec 3, 2020, 10:01:38 AM12/3/20
to
My experience refers to the older version of JSP (pre 8.5).
What you have to do:
1. License JSP from HPE, JSP is not free
2. Configure an ITP-Webserver, it is needed to run JSP
3. Configure JSP to run with that webserver

All those steps have been pretty easy but than the real fun started.
We had to do several modificatione in the file servlet.conf.
I am not sure if the modifications are the same for the actual version, I did a short documentation of the modifications in German.
Meanwhile we have modified the application, it uses just a standard Tomcat.
0 new messages