Discussion:
JSP and Pathsend
(too old to reply)
wbreidbach
2016-12-06 08:32:10 UTC
Permalink
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
2016-12-06 11:35:39 UTC
Permalink
Post by wbreidbach
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
2016-12-06 13:07:43 UTC
Permalink
Post by Keith Dick
Post by wbreidbach
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.
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
2016-12-06 18:28:37 UTC
Permalink
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
Post by wbreidbach
Post by Keith Dick
Post by wbreidbach
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.
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.
wbreidbach
2016-12-08 14:00:29 UTC
Permalink
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
2017-01-10 10:11:18 UTC
Permalink
Post by 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
2017-01-10 20:02:54 UTC
Permalink
Post by wbreidbach
Post by 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.
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
2017-01-10 20:45:39 UTC
Permalink
Post by Gustavo Martinez
Post by wbreidbach
Post by 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.
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.
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
2017-01-16 12:37:08 UTC
Permalink
Post by wbreidbach
Post by Gustavo Martinez
Post by wbreidbach
Post by 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.
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.
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.
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
2020-11-06 10:43:53 UTC
Permalink
Post by 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.
I sure would like to know how this was done. I"m kinda jumping into this myself.
wbreidbach
2020-12-03 15:01:36 UTC
Permalink
Post by Frank Wood
Post by 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.
I sure would like to know how this was done. I"m kinda jumping into this myself.
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.
Loading...