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 wbreidbachPost by Keith DickPost by wbreidbachWe 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.