Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.4K Intelligent Advisor
- 75 Insurance
- 537.7K On-Premises Infrastructure
- 138.7K Analytics Software
- 38.6K Application Development Software
- 6.1K Cloud Platform
- 109.6K Database Software
- 17.6K Enterprise Manager
- 8.8K Hardware
- 71.3K Infrastructure Software
- 105.4K Integration
- 41.6K Security Software
Call a Java Class using the CALLJAVA tag

933715
Member Posts: 9
Hi everyone,
I`m using webcenter Sites last version and I want to access a class that was made by me too. To do this call I`m using the CALLJAVA xml tag in a jsp template.
My problem is that the tag do not find the class that I placed in the Java class path and returns me the 900 erro code that means "Java class not found".
Following the documentation I implemented the COM.FutureTense.XML.Template.Seed interface, created the jar and put it in the Weblogic path below:
/u01/oracle/Middleware/user_projects/domains/cs_domain/lib
The code is that:
<SETVAR NAME="errno" VALUE="0"/>
<CALLJAVA CLASS="timeexample">
<ARGUMENT NAME="logindate"
VALUE="SessionVariables.logintime"/>
</CALLJAVA>
<IF COND="IsError.Variables.errno=true">
<THEN>
<!--Handle error-->
</THEN>
</IF>
Please I need some help. Thanks.
I`m using webcenter Sites last version and I want to access a class that was made by me too. To do this call I`m using the CALLJAVA xml tag in a jsp template.
My problem is that the tag do not find the class that I placed in the Java class path and returns me the 900 erro code that means "Java class not found".
Following the documentation I implemented the COM.FutureTense.XML.Template.Seed interface, created the jar and put it in the Weblogic path below:
/u01/oracle/Middleware/user_projects/domains/cs_domain/lib
The code is that:
<SETVAR NAME="errno" VALUE="0"/>
<CALLJAVA CLASS="timeexample">
<ARGUMENT NAME="logindate"
VALUE="SessionVariables.logintime"/>
</CALLJAVA>
<IF COND="IsError.Variables.errno=true">
<THEN>
<!--Handle error-->
</THEN>
</IF>
Please I need some help. Thanks.
Tagged:
Answers
-
Hi,
The CALLJAVA tag is for XML elements, and the syntax of your element suggests that you are using an XML element, opposed to a jsp element. Can you verify that you element is of type xml or jsp?
If you are using a JSP element you can just call you java class directly, there is no need to implement a Seed interface. You can create a scriplet an do <% new timeexample().myMethod(session.getParameter("logintime"); etc. %>
If you are executing a XML element, the jar file needs to go into WEB-INF/lib of the Sites web application. You may need to redeploy the webapp, depending on how you configured weblogic.
Dolf -
Hi,
Thanks for the answer Dolf. I think that by JSP is a better solution. Is it possible to create a webservice client in a java class, deploy it in a jar file, put in WEB-INF/lib and use that WS client in a Webcenter site template?
That`s my inicial idea calling a java class.
Thanks.
This discussion has been closed.