How can I use Java API into JSP???

Sir,
So I will be using the Java API’s in a java extension file.And I can compile and run…But How can I use these Java API’s into the JSP.

Can anyone help me pls?

Thank u.

dgdfgf

I’m not sure if I understand correctly, what do you mean by “java extension file”.

Anyway. You can access X-Application’s Java API by embedding code like this into you JSP pages:

<%@ page import=“com.softwareag.xtools.xapplication.jsp." %>
<%@ page import="com.softwareag.xtools.xapplication.businessdocument.
” %>

<% SessionContext sessionContext = ServletSessionContext.getSessionContext(pageContext); %>

The SessionContext object holds the state of the current user’s session, in some sense it’s the mother of all X-Application objects. You can use it, e.g., to access a document like this:
<% BusinessDocument document = sessionContext.getDocument(null); %>
… work with document …


Michael

Software AG Germany, Darmstadt

Thank u sir!!

But in your Examples API.You have stored the API files in .java extension??

So always I should use the API’s only in the way you have given right?? I should not write it in separate .java file right??

dgdfgf

I’m confused. What do you mean by “java extension”?

Michael

Software AG Germany, Darmstadt

Java extensions :-
for example “CreaterPropertyDocuments.java”
Like files with .java (this is java extension)

dgdfgf

Hello,

this topic will be moved to the Assistance Forum in the next days.
The assistance forum is intended to be used for technical questions and answers.

Thank you for your understanding.

Regards,
Christian.