| |
| | Very nice Santh,
Keep up the good work! Posted on 3/23/09 11:56 AM. |
| |
| |
| | This is very good stuff Chetan! Posted on 3/25/09 5:02 PM. |
| |
| |
| | I have just tried to use the JSP hook facility, and nothing much happened. Has anyone else tried this?
My instance is 5.2.2 in Tomcat 5.5. I created web projects using both the default JEE5 and JEE4, although I didn't change the source level from 1.6.
I created a JSP for portal/login, modified the open_id.jsp to include a legend in the fieldset, and deployed. The following output was in NB
23:35:32,052 INFO [AutoDeployDir:183] Processing LifeRayTest-hook.xml 23:35:32,053 INFO [PortletAutoDeployListener:67] Deploying package as a web application 23:35:32,053 INFO [PortletAutoDeployListener:77] Copying portlets for /opt/nb/liferay/liferay-portal-tomcat-5.5-5.2.2/deploy/LifeRayTest-hook.xml 23:35:32,054 INFO [PortletAutoDeployListener:87] Portlets for /opt/nb/liferay/liferay-portal-tomcat-5.5-5.2.2/deploy/LifeRayTest-hook.xml copied successfully. Deployment will start in a few seconds. /home/pbw/NetBeansProjects/LifeRayTest-hook/build/web updated successfully. Time taken for massaging : 22sec. PortalPack Message : Deployed Successfully.
When I try to access the JSP (by attempting to login with OpenID) my changes are not visible. Searching the tomcat tree for files named open_id.* yields two versions, including the original of the one I modified.
The file that gets deployed is LifeRayTest-hook.xml (my project name is LifeRayTest-hook). It's contents are: <Context docBase="/home/pbw/NetBeansProjects/LifeRayTest-hook/build/web"> </Context>
What am I doing wrong? Posted on 4/13/09 6:23 PM. |
| |
| |
| | Peter,
I guess you are using "Directory Deployment Enabled" on the server properties. Hooks type application does not work with Directory Deployment as it has to go through proper war deployment. So workaround is to
1. Goto Server config panel. 2. Uncheck and disable "Directory Deployment Enabled" and click on Apply. 3. Undeploy the application and then redeploy again. This case was taken care in Glassfish bundle where it does regular deployment for hook application even if Directory Deployment is selected. So we have to handle the same case for tomcat too.
Thanks for bringing this up. Please let us know if you are still facing the issue.
Chetan |
| |
| |
| | Chetan,
That worked like a charm. Many thanks. I'll let you know if anything else crops up.
Peter |
| |
| |
| | Chetan,
I now have a related problem, based on my ignorance of Tomcat. I have been deploying my JSP hook from NetbBeans - it's as simple as making sure mysql and the liferay server are running, then invoking Deploy on the menu of the project I have created.
Now I need to deploy on a remote server. I construct the .war file, but what do I have to do to get it recognised and acted upon?
The deployment from my NetBeans project seem to invoke a NetBeans internally defined target called nbjpdaappreloaded.
Peter |
| |
| |
| | It seems to work if I simply explode the JSP-hook.war into tomcat.../webapps/JSP-hook.
Is this all I need to do?
Peter |
| |
| |
| | Curiously, this seems to work on mu local system, but no on the server. Are there properties which must be set to enable hooks?
Peter |
| |
| |
| | Peter, if I understand correctly ur query, you want to deploy the JSP-hook.war in a remote server rt?
You can just upload the war file to your server's autodeploy location. for ex: liferay-portal-5.2.2\deploy. You don't need to explicitly explode it into webapps dir.
I don't think you need to make any changes to war unless the portal versions are way too different AFAIK. |
| |
| |
| | Thanks Chetan. That works, and I see in the log that the:
Hook for JSP-hook is available for use
However, the jsp is not being activated. It is possible that the login.jsp has been overridden be something else on the server. I don't know how to check this readily.
One other interesting point: I cannot see the hook in the Control Panel Plugins Installation page, either on my local system, where it works, or on the server, where it does not.
Peter |
| |
| |
| | >>However, the jsp is not being activated. It is possible that the login.jsp has been overridden be something else on the server. I don't know how to check this readily.
You can go to the following location and check the content of login.jsp to see your hook login.jsp content are there or not.
$liferay-portal-5.2.2\tomcat-5.5.27\webapps\ROOT\html\portlet\login
During jsp hook deployment, the liferay server basically copies the jsps in your hook application to the core portal deployed location and takes backup of orignal jsps. So whenever you undeploy your hook application, the original jsps get back to their original location. |
| |
| |
| | Hmm. It's not there. On my local system, I do have login.jsp and login.portal.jsp. etc.
Peter |
| |
| |
| | Peter, you said you exploded the war previously in the webapps dir. That could have messed up something, not sure. Try undeploying/remove the jsp-hook folder the webapp, restart the server and redeploy again by copying the hook war in deploy location and see if it comes up.
Chetan |
| |
| |
| | I'll see if I can get the server restarted later this evening.
Peter |
| |
| |
| | I removed JSP-hook from webapps, restarted the server, dropped the war file in deploy, saw the appropriate message about the hook being available, and the situation is the same. The contents of ROOT/html/portlets/login is unchanged.
Any other suggestions? |
| |
| |
| | Whats the server version(OS + liferay version)? Does you hook application have any portlet? Is the same hook app working on local machine?
If its not a big task, could you create a new hook application and copy all those changes you have to make and then use Netbeans "build" to build the war get the war and deploy it in server. |
| |
| |
| | I created a new hook application and tested it locally. It works. I then tried deploying it on the remote server. Again it didn't work. |
| |
| |
| | I'm running 5.2.2 on OpenSuSE locally. The remote system is SUSE Linux Enterprise Server 10 (i586) VERSION = 10 PATCHLEVEL = 2
I think the LifeRay version is 5.2.1. |
| |
| |
| | I want to create a auto-login hook. Is that possible using portal pack and net beans? Similar to the one here:
http://wikis.sun.com/display/websynergy/AutoLogin+Hook+for+OpenSSO+Agent?focusedCommentId=92143831
Except I'll be using a different SSO. |
| |
| |
| | It is very much possible. Portal Pack provides you the basic infrastructure for your hook plugin. Posted on 4/21/09 6:56 AM in reply to Tony Lim. |
| |
| |
| | I cannot create a Jsp Hook with the 3.0.2 plugin and NB 6.7
When I select a "normal" Tomcat as the runtime, I do get the dialog where I can select the hook type, but after selecting the JspHook I'm presented with a selection from my userhome(?) and the error message that this can only be used when the runtime is a Liferay Portal server.
So I created a Liferay Portal Server in the Servers tab pointing to my Tomcat directory. When I now select "New -> Other -> PortalHook" I get a very simply dialog that asks for the location of a .java file. I cannot select any Hook type.
What am I missing? Posted on 7/14/09 3:08 AM. |
| |
| |
| | Hi Thomas, Hooks works fine with the 3.0.2 plugin and NB 6.7. You can use Hooks plugin only with Liferay Portal Server/ Wespace Server runtime i.e you need to add Liferay Portal Server which is pointing to a valid Liferay Home directory.
Once you do that. Create a new Web Project -> Right click on the project -> Other -> WebSpace/Liferay Plugins -> Hook Plugin and then you should be able to see the hook wizard screen.
If anything goes wrong with the steps above then please check your Liferay installation.
Let us know if the issue is solved. |
| |
| |
| | Hi, I wanted to create a ModelListener, that fires, when there is a new order in the shop. So the code looks like this: public void onAfterCreate(Object arg0) throws ModelListenerException {
com.liferay.portlet.shopping.model.ShoppingOrder mdlObj = (com.liferay.portlet.shopping.model.ShoppingOrder) arg0;
}
But it returns error after the address input portlet: java.lang.UnsupportedOperationException: Not supported yet. at com.test.NewHookAction.onBeforeUpdate(NewHookAction.java:76)
Did I do anything wrong, ore is this really not yet supported? Posted on 9/30/09 5:52 AM. |
| |
| |
| | Hi Dennis, which version of liferay and Netbeans Portal Pack are you using? http://portalpack.netbeans.org/pp30/download302.html Is the latest with some bug fixes. |
| |
| |
| | Anyone here who can send me the Plugins please  http://portalpack.netbeans.org/ is currently not available I have installed my OS new and now i am missing the plugins :/ webaster {a} virtualizing.org Posted on 11/4/09 8:04 PM. |
| |
| |
| | ^^ ups webmaster {a} virtualizing.org ;) |
| |
| |
| | http://blogs.sun.com/lukas/entry/page_not_found_at_netbeans |