Forums de discussion

[Liferay 6.0.5] Using custom Java Classes in JSP page

Christophe Schutz, modifié il y a 13 années.

[Liferay 6.0.5] Using custom Java Classes in JSP page

New Member Publications: 6 Date d'inscription: 10/11/10 Publications récentes
Hello everyone.

I'm working on the create account portlet, and I have to include some custom java code into the create_account.jsp page.

I've actually found no guide on how and where to put my custom classes in the ext plugin, to deploy them and how to link them in the jsp page.

I've tried to just put the 3 java classes in docroot\WEB-INF\ext-impl\src\com\liferay\portlet\login\action and to deploy, and in the JSP page, i just made a
<%@ page import="com.liferay.portlet.login.action.Controles" %>

Thing is i get 3 errors which are related to the ojdbc14.jar not being found. I've put it in C:\portail-6.0.5\liferay-portal-6.0.5\tomcat-6.0.26\lib and in my classes I do :
import oracle.jdbc.pool.OracleDataSource, but it can't find it. I've also tried import ojdbc14.oracle.jdbc.pool.OracleDataSource; since it's in the ojdbc14.jar, the the same problem occurs when I want to deploy the 3 classes.

Two questions :
- is the way I try to deploy the classes correct, i.e. adding them into the right folder and deploying them via ant deploy, or is there anything wrong with that process/did i forget anything ?
- how to get the import to actually found the classes in the ojdbc14.jar ?

Thanks
thumbnail
Apoorva Prakash, modifié il y a 13 années.

RE: [Liferay 6.0.5] Using custom Java Classes in JSP page

Liferay Master Publications: 658 Date d'inscription: 15/06/10 Publications récentes
Hello Schutz,
I hope you'll find this post helpful in this regards...

Thanks...