Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Joaquín Fernández
HOOK deploy
January 10, 2013 1:06 AM
Answer

Joaquín Fernández

Rank: Junior Member

Posts: 93

Join Date: January 2, 2012

Recent Posts

Hi,

I'm modifying a JSP file with a HOOK, but i don't see this file modified in the application.

that is my liferay-hook.xml
<?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.1.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_1_0.dtd">
<hook><custom-jsp-dir>/META-INF</custom-jsp-dir>
</hook>


I don't know why i don't find the modified jsp file in ../tomcat-7.0.27/webapps/ROOT/ but i found it here:../tomcat-7.0.27/webapps/my-proyect-hook/

Any help?

Thanks!
Tejas Kanani
RE: HOOK deploy
January 10, 2013 1:48 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

Hi Joaquín,

Are you getting error while deploying your hook ?
Make sure you are following the proper path(inside your hook) of jsp which you want to modify.
And also create folder inside META-INF for your all custom jsps in your hook.
1<custom-jsp-dir>/META-INF/custom_jsps</custom-jsp-dir>


For more details on that refer documentation.
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/overriding-a-j-4

Thanks,
Tejas
Joaquín Fernández
RE: HOOK deploy
January 10, 2013 3:44 AM
Answer

Joaquín Fernández

Rank: Junior Member

Posts: 93

Join Date: January 2, 2012

Recent Posts

I'm not getting error while deploying.

When I execute the direct-deploy ant, i can see the new file in tomcat-7.0.27/webapps/my-project-hook/META-INF/custom_jsps/html/portlet/login.
But i don`t have any trail into the console and i don't see the change in localhots:8080...
Tejas Kanani
RE: HOOK deploy
January 10, 2013 4:15 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

Ideally it should work as per you've mentioned so far.
Would it be possible for you to share your hook so that one can look into more deep to find the exact issue ?
Joaquín Fernández
RE: HOOK deploy
January 10, 2013 4:47 AM
Answer

Joaquín Fernández

Rank: Junior Member

Posts: 93

Join Date: January 2, 2012

Recent Posts

Here you have my hook.

I have written into the 123 line in login.js and into the line 62 in the init.jsp file.

Thanks.
Attachments: My-project-hook.rar (16.5k)
Tejas Kanani
RE: HOOK deploy
January 10, 2013 6:06 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

It worked for me without any changes. Its also modify init.jsp & login.jsp in my liferay tomcat at tomcat-7.0.27\webapps\ROOT\html\portlet\login
Try removing already deployed hook by deleting it from webapps and restart the server and try again.
Joaquín Fernández
RE: HOOK deploy
January 10, 2013 7:03 AM
Answer

Joaquín Fernández

Rank: Junior Member

Posts: 93

Join Date: January 2, 2012

Recent Posts

've just removed and redeplyed the hook, but i have the same result.
I have the files into tomcat-7.0.27\webapps\my-project-hook\META-INF\custom_jsps\html\portlet\login\ and not in tomcat-7.0.27\webapps\ROOT\html\portlet\login\

Is there any property in portal.properties that i may change??

I don't understand what is happening...
Joaquín Fernández
RE: HOOK deploy
January 15, 2013 1:32 AM
Answer

Joaquín Fernández

Rank: Junior Member

Posts: 93

Join Date: January 2, 2012

Recent Posts

Any help?
I don't know what i'm not doing correctly
Tejas Kanani
RE: HOOK deploy
January 15, 2013 2:00 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

At the moment,
Try modifying other jsp using hook just to confirm whether you are getting any issue with modifying jsps using hook.
Joaquín Fernández
RE: HOOK deploy
January 15, 2013 5:37 AM
Answer

Joaquín Fernández

Rank: Junior Member

Posts: 93

Join Date: January 2, 2012

Recent Posts

I'll try removing the actual hook and creating a new one, without modifying any property.
I'll write here later
Joaquín Fernández
RE: HOOK deploy
January 15, 2013 7:29 AM
Answer

Joaquín Fernández

Rank: Junior Member

Posts: 93

Join Date: January 2, 2012

Recent Posts

Hi,

I give you the image of my workspace.
I haven't changed any property.
I've just created the hook, as a new liferay proyect, with the hook pluging type. Then i've created a new custom JSP hook, select the jsp (the one that is indicated in the eclipse image). When I create de JSP, in the liferay-hook.xml appeared this new file: <custom-jsp-dir>/custom_jsps</custom-jsp-dir>

Then I execute a direct-deploy task with ant, but I don't see this file into the ROOT directory in the webapps. It appears in the new "MyProject-hook" directory, so i don't see the changes in my localhost...

Thanks...
Attachment

Attachments: Hook.jpg (313.5k)