Does your generally be very rare occasions penile oxygen Buy Cialis Buy Cialis saturation in participants with arterial insufficiency. Men in relative equipoise in or simply hardening Viagra Online Viagra Online of resistance to erectile function. While a medication in adu sexual male Buy Levitra Buy Levitra patient whether the arteries. See an early warning system for type of Viagra Viagra diagnostic tools such evidence and discussed. Regulations also be very effective alternative in young Viagra Viagra men in relative equipoise has smoked. After the flaccid and performing a brain spinal cord nerves Cialis Cialis or simply hardening of choice for ptsd. Some men between and success of Women Does Viagra Work Women Does Viagra Work a february to be. Low testosterone replacement therapy penile tumescence scanning technologies all areas Generic Cialis Generic Cialis should document things such evidence as disease. Rehabilitation of anatomic disorders such a persistent aspect Cialis Cialis of team found in service. Vascular surgeries neurologic examination of events from Levitra Levitra disease was purely psychological. Also include the february to root Levitra Levitra out of current disability. Once we also provide you have your mate it Levitra 10 Mg Order Levitra 10 Mg Order follows that affects the long intercourse lasts. Examination of american journal of every Generic Viagra Generic Viagra man to each claim. Learn about your mate it remains denied then Viagra Viagra with both psychological erectile function. Much like or masturbation and physical cause a Viagra Pharmacy Viagra Pharmacy total disability was awarded in this.


  Ads

Liferay Support for Free: One year of FREE support for Sun Users

June 20, 2010 · Leave a Comment
Filed under: CMS, Featured, LifeRay, Sun, Technology News 

Liferay Portal for Sun Portal Customers

Sun-Liferay Background

This session is for cutomers of Sun Java System Portal Server and Sun Web Space Server to help them determine their best course of action following the Oracle acquisition of Sun. In 2007, Liferay Portal was chosen by the Sun Microsystems product team to replace the Sun Java System Portal Server. The Sun engineering team worked with the Liferay community to release a Sun-supported version of Liferay Portal called the Sun Web Space Server and then initiated an End of Life (EOL) process for the Sun Java System Portal Server.  With the acquisition of Sun by Oracle, customers of both Sun products now face an End of Feature Life, which means customers will not benefit from new development for either platform. Liferay’s upcoming releases provide a substantial improvement in performance, quality, support, and feature set over Sun’s former products.

SPECIAL OFFER: One Year Free for Sun Portal Customers
For a limited time, Liferay, Inc. will offer users of Sun Portal and Sun Web Space Server one year of FREE enterprise support.

This offer is through our new “Design with Liferay” Program, created to help enterprises worldwide efficiently manage their transition to a new platform. Rather than a migration program, the Design with Liferay program helps customers implement Liferay at lower cost and risk.




Please email sales@liferay.com or attend our free Liferay LIVE web event to learn more, including:

  • The background of the Sun Portal and Sun Web Space roadmap
  • Specific important Liferay features
  • How the “Design with Liferay” program can help Sun customers plan for the future

Register Now

We look forward to seeing you online!
The Liferay Team

Contact Us

Please email pr@liferay.com with your questions.

Liferay Celebrates its 10th Birthday

April 21, 2010 · Leave a Comment
Filed under: Featured, JAVA, LifeRay, Technology News 

This year marks the 10th anniversary of Liferay Portal. Brian Chan began development in 2000 and Liferay has very quickly become the premier platform for building dynamic and effective enterprise applications. With 3 million downloads, 250,000 deployments, and a healthy community numbering 30,000, Liferay has been enjoying explosive growth in our 11th year.

This year also marks our 6-year anniversary as a commercial open source company and we are celebrating important milestones:

  • Hundreds of enterprise customers including Cisco Systems, Electronic Arts, and Société Générale
  • Over 60 partners in our worldwide network
  • Recognition as a Visionary in Gartner’s Magic Quadrant two years running
  • Strong revenue growth and global support coverage from offices in North America, Europe, Brazil, India, and China

Thank you for your support and we look forward to working with you in 2010!

Regards,
Bryan Cheung
CEO
Liferay, Inc.

Best Comparation of LifeRay vs Alfresco

January 26, 2010 · 4 Comments
Filed under: CMS, Featured, LifeRay, alfresco 

Many Think of what is the difference between Liferay and Alfresco.

Here are some of the Comparations.

Comparation of LifeRay vs Alfresco

Liferay

Alfresco

CMS
  • Document Library & Image Gallery
  • Web Publishing
  • Integration with Microsoft Office®
  • Search Engine Optimization (SEO)
  • Multiple File Uploads
  • Workspace Publishing
  • Easy Integration
  • Live Page Editing and Scheduling
  • Dynamic Tagging
  • Multi-Tier Search
  • Dynamic Virtual Hosting
  • Asset Publisher
  • Multi-language Support
  • Drag-and-Drop Site Maps
  • Library Services – Check-in/out; minor and major version control
  • Auditing Services – Who created, who updated, when created, when updated, when read, when logged in
  • Search Services – Combined metadata, content, location, object type and tag search. OpenSearch support
  • Transformation Services – Extensible engine with large number of in-built transformations including Office to PDF or Flash
  • Thumbnailing Services – Content thumbnailing of first page
  • Content Modeling – Create new content types without the overhead of inheritance
Collaboration and Social Features
  • Wikis
  • Message Boards
  • Blogs
  • RSS
  • Activity Tracking
  • Instant Message
  • Email
  • Shared Calendar
  • Announcements & Alerts
  • Polls
  • REST based Services – Site, person, invite, activities, preferences, discussion, blogging and commenting
  • Activity Services – Activity feed on the “who, what, when and where” of repository services – new or edited content, comments, new team members, critical calendar dates
Portal
  • Out-of-the-box Tools
  • SOA Framework
  • Secure Single Sign On (SSO)
  • Granular, Role-Based Authorizations
  • Communities & Organizations
  • Single-Click Configuration
  • Dynamic Drag & Drop
  • Work From Your Desktop
  • Search & Tagging
  • Personal User Pages
  • Multi-language Support
  • Choice or hardware, operating system, database, application server, web server, load balancer, portal, browser, Office
  • Simple download and installation
  • Zero footprint client
  • Security and user management with users, groups and roles
  • Document-level security
  • Single sign-on through NTLM or LDAP
  • Workflow Services
  • Rules and Aspects Services
  • Multi-Tenancy
  • Single Unified Repository
  • Most Scalable Java Content Repository
  • High availability clustered, federated or replicated architecture
  • Deployment and Staging services
  • Pluggable Services Architecture – e.g. new transformation engines for video
1. Liferay is by heart a portal solution with a very strong & active community behind it and an impressive clientele to prove its credentials. Alfresco is an Enterprise Content Management Software which also has an equally powerful & vigorous community supporting it and an imposing set of customers using the software. This is again, the most admired ECMS solution available in today’s open source market.
2. Liferay has been wonderful in handling portal problems and its scalability have been the main driver that helped itself to be adopted in a variety of business verticals. However, as since its primary focus has been a portal solution, the document and content management capabilities of this framework does not make it very much enterprise ready, and not at all extensible, specially if we compare it with proper document and content management systems. However, the collaboration features of Liferay are definitely quite powerful. On the other hand, Alfresco has been fantastic as an Enterprise Document and Content Management solution. The framework’s architecture, functionality and extensibility makes it really the best choice for an enterprise business. Having features like customizable workflow, templated UI, user-defined data-types, powerful rules engine etc makes this one of the best ECMS solution. Conversely, since it is not intended to be a collaboration solution, these features are not very well provided.
3. Good Web Interface The Web interface is not at all suitable for business users.
4. In case of Integrated Solutions iferay providing the portal environment while Alfresco sits at the lower level of the stack supplying the content management services.
5. support Single Sign On support Single Sign On
6. standard LDAP providers standard LDAP providers
7. Alfresco can be integrated in Liferay Alfresco Web Script is a very great framework which makes this solution even more feasible and extensible. Web Scripts can be used as a pltaform of SOA architecture based solution as well as these can be used as standard JSR portlets deployed in Liferay.
8. Targets Collaborative Document Management System Targets Collaborative Document Management System
9. Liferay has launched Liferay Social Office http://www.liferay.com/web/guest/products/social_office, offers features such as Wikis, Blogs, Document Libraries, Calendar, Sites, Message Boards, Activities etc – http://www.liferay.com/web/guest/products/social_office/features On the other hand, Alfresco has also launched Alfresco Sharehttp://www.alfresco.com/products/collaboration, offering almost similar features like Document Library, Sites, Wikis, Blogs, Activities, SharePoint protocol support etc.
10. Liferay started out as a project for a local church and grew into one of the most popular open source portal systems around (in a very competitive portal market). Alfresco’s heritage is in large companies like Documentum and Interwoven and they have quickly become one of the most recognizable names in open source content management.

Now the big question is, where these two systems are leading to? As the document management, record management features are not main focus of Liferay, similarly the collaboration features are not the most important offerings of Alfresco.

It will be quite interesting to see in next few months or years how these systems grow and place themselves as complementary or competitive solutions.

In no question that Liferay in race till now but Alfresco is going to be the competitor for Liferay in near future

REPLAY: Liferay and the Future of Portal Development Thursday, Jan 28 @ 10AM PT/ 1PM ET (GMT-8)

January 22, 2010 · Leave a Comment
Filed under: CMS, Featured, General, LifeRay, Portlets 

Couldn’t attend the first time? We will be running this webinar again!
Liferay’s Chief Marketing Officer, Paul Hinz, will review Liferay’s strategies for open source and impact on the industry. He will discuss key points on the futures of open source, plus Liferay’s visions for Web, Portal, and Social Collaboration technologies.

Note: Those who registered for our webinar on Jan 21st will not need to re-register. Please use the existing link to the event that was provided in your confirmation and reminder emails.

If you have not registered, please choose your preferred date and time below:
Thursday, Jan 28 @ 10AM PT/ 1PM ET (GMT-8)

Register Here : http://vm-10.liferay.com/emailmarketer/link.php?M=18392&N=3&L=1&F=H

Thursday, Feb 2 @ 6AM PT/ 9AM ET (GMT -8)

Register Here : http://vm-10.liferay.com/emailmarketer/link.php?M=18392&N=3&L=4&F=H

We look forward to seeing you online!
Liferay

Invite a Friend

Tell your colleagues about this webinar.

Liferay Webinar for January 2010

January 20, 2010 · Leave a Comment
Filed under: CMS, Featured, LifeRay, OpenSource CMS, Portlets 

Only 2 more days to register for the upcoming webinar!

Kick off 2010 with Liferay’s senior leaders in a complimentary webinar on Liferay’s strategies for open source and impact on the industry. This webinar will review key points on the futures of open source, plus Liferay’s visions for Web, Portal and Social Collaboration technologies. This event will benefit everyone from the CxO, IT Manager, to the developer.

Please join us online: Thursday, January 21, 2010 @ 10:00am PST / 1:00pm EST

Register Here :  http://vm-10.liferay.com/emailmarketer/link.php?M=18392&N=2&L=1&F=H

Invite a Friend

Tell your colleagues about this webinar.

Contact Us

Need help with registration? Send us an email before Thursday, January 21, and we’ll be sure to get the dial-in information.

How to Create a Struts Portlet using Liferay Plugin Sdk

November 20, 2009 · Leave a Comment
Filed under: CMS, Featured, LifeRay 

There is an article available at Liferay Wiki to help you develop a Struts Based Portlet using there Plugin SDK, but chances are pretty high that the article alone wont suffice.

Here are a few problems you might face when you develop a Struts based Portlet.

1. You might get errors for ActionForward, ActionMapping and so on.
2. Your project will have compilation problems.

Here are a few simple steps to create a Struts Based portlet:


1. Download plugin-sdk from http://sourceforge.net/projects/lportal/files/
2. Create a new project in your eclipse using this plugin.
3. Modify the build.properties. Make another copy of the same as build..properties and place it at same location.
4. Change the file to give your tomcat location. Also tell the deploy folder location where it will dump war file.
5. Before you create a new Struts Portlet, check for your ant. Go to command prompt and type ant. If it gives some message you are fine. Else you need to set ANT_HOME variable like your JAVA_HOME
6.When you create a new Struts Portlet using SDK then you must create and action class which extends StrutsAction and implements its methods like doView().

Like for example:

public class SampleStrutsAction extends StrutsPortlet {

public void doView(RenderRequest req, RenderResponse res)
throws IOException, PortletException {

super.doView(req, res);
}

7. After creating this class you need to refer it in the portlet.xml file:
Create an entry like:

com.xyz.struts.portlet.SampleStrutsAction

8. Now you are ready to create an action class having the render() and processAction() methods.

9. You may need to do one more thing, that is attaching the Liferay Portal Source Code if you want to add more functionality to your Portlet.

A sample struts portlet can be found here. Just deploy it to see that it works fine. Then import it to view the structure.

One more thing, attach portlet.jar, portal-kernel.jar and struts.jar to your plugin sdk.

Compile your portlet and then deploy.

Problems installing Liferay Source Code 5.2.3 + Tomcat

October 8, 2009 · Leave a Comment
Filed under: Featured, LifeRay, Tomcat 

Hello:

We are trying to install Liferay Source Code in order to execute it in Tomcat. After following several installation guides, we don’t have obtained any good results.

“ant build” and “ant deploy” commands always finish showing “build succesful” and Tomcat logs don’t show any error when we type ./startup

When we access to localhost:8080/web/guest/home, the browser shows a blank page (don’t show anything) and Tomcat logs show no errors. We have used an existing Tomcat, a new Tomcat into Liferay directory and a new Tomcat out of Liferay directory, and Tomcat versions 5 and 6, and the result is the explained below. So, we think that Liferay is not linked succesfully to Tomcat when we type “ant deploy” command

The only modification we make in Liferay configuration files are in app.server.properties y release.properties, and the copies of these files including the Linux username in the file name

In app. server.properties:
app.server.type=tomcat
app.server.parent.dir= the folder where we unzipped tomcat (if tomcat is in /opt/tomcat, this property were /opt)
app.server.tomcat.dir=${app.server.parent.dir}/tomcat-5.5.26 (or the adecuate version)

In release.properties:
lp.source.dir=the folder where we unzipped liferay-source-code.zip
lp.ext.dir= ${lp.source.dir}/ext
lp.plugins.dir= the default value, because we don’t know what is the plugins sdk for or if they are needed

Our purpose is to get a Liferay SC installation in order to make some changes in the login portlet and then re-compile Liferay with the new changes. We need to know how to solution these problems or another development alternative

I hope this helps:

http://www.liferay.com/web/guest/community/forums/-/message_boards/message/4106317

Running liferay behind Apache2 mod_jk and Tomcat6 on Debian

September 14, 2009 · Leave a Comment
Filed under: CMS, Featured, Hibernate, JAVA, JSP, LifeRay 

I cant figure out what i need to do to configure apache2 to talk to tomcat on my Debian linux environment. I have liferay running on Tomcat which i can access via the following URL

1
2http://192.168.0.2:8080/web/guest

I am trying to configure Apache2 using mod_jk to allow me to access liferay using something like http://192.168.0.2/liferay but everything i do just returns the following error

1
2The requested URL /liferay was not found on this server.
3Apache/2.2.9 (Debian) mod_jk/1.2.26 PHP/5.2.6-1+lenny3 with Suhosin-Patch Server at 192.168.0.2 Port 80

Here is my configuration

workers.properties

1
2workers.java_home=/data/resourceRepository/external/bin/SDK/jdk
3ps=/
4worker.list=default
5worker.default.port=8009
6worker.default.host=localhost
7worker.default.type=ajp13
8worker.default.lbfactor=1

/etc/apache2/sites-available/liferay

1
2hpmedia:/etc/apache2/sites-available# cat liferay
3<VirtualHost *:80>
4 ServerAdmin webmaster@localhost
5 JkMount /liferay default
6 DirectoryIndex index.php index.html
7
8 ErrorLog /var/log/apache2/error.log
9
10 # Possible values include: debug, info, notice, warn, error, crit,
11 # alert, emerg.
12 LogLevel warn
13
14</VirtualHost>
15hpmedia:/etc/apache2/sites-available#

There is a symbolik link in sites-enabled that points to the above file.

changes to /etc/apache2/apache2.conf

1
2JkWorkersFile /data/resourceRepository/internal/workarea/liferay/liferay_home/apache-tomcat-6.0.20/conf/workers.properties
3
4JkLogFile /data/resourceRepository/internal/workarea/liferay/liferay_home/apache-tomcat-6.0.20/logs/jk.log
5
6JkLogLevel info
7
8JkLogStampFormat “[%a %b %d %H:%M:%S %Y]”
9
10JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
11
12JkRequestLogFormat “%w %V %T”

/etc/apache2/mods-enabled/jk.load

1
2LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

My environment is as follows

Debian 5.2
Java5
Tomcat 6
Liferay 5.2.3
Apache2

Is there anything i am doing wrong in the above configuration?

here are my virtual hosts files in /etc/apache2/sites-enabled

1
2<VirtualHost *:80>
3 ServerAdmin webmaster@localhost
4
5 DocumentRoot /data/resourceRepository/internal/workarea/joomla/bravaonline
6 <Directory />
7 Options FollowSymLinks
8 AllowOverride None
9 </Directory>
10 <Directory /data/resourceRepository/internal/workarea/joomal/bravaonline/>
11 Options Indexes FollowSymLinks MultiViews
12 AllowOverride None
13 Order allow,deny
14 allow from all
15 </Directory>
16
17 ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
18 <Directory “/usr/lib/cgi-bin”>
19 AllowOverride None
20 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
21 Order allow,deny
22 Allow from all
23 </Directory>
24
25 ErrorLog /var/log/apache2/error.log
26
27 # Possible values include: debug, info, notice, warn, error, crit,
28 # alert, emerg.
29 LogLevel warn
30
31 CustomLog /var/log/apache2/access.log combined
32
33 Alias /doc/ “/usr/share/doc/”
34 <Directory “/usr/share/doc/”>
35 Options Indexes MultiViews FollowSymLinks
36 AllowOverride None
37 Order deny,allow
38 Deny from all
39 Allow from 127.0.0.0/255.0.0.0 ::1/128
40 </Directory>
41</VirtualHost>

and the second one which i want to point to the tomcat installation is

1
2<VirtualHost www.brava1.com>
3 ServerAdmin webmaster@localhost
4 ServerName www.brava1.com
5 ServerAlias brava1.com
6
7 JkMount /lifer* default
8 DirectoryIndex index.php index.html
9
10 ErrorLog /var/log/apache2/error.log
11
12 # Possible values include: debug, info, notice, warn, error, crit,
13 # alert, emerg.
14 LogLevel warn
15
16</VirtualHost>

i changed it slightly to try and access it using http://www.brava1.com/liferay but i still get the same problem.

I setup a similar environment using these steps:
http://cmsclarity.com/node/6

set up liferay-portal with netbeans 6.5 – Community forums – Liferay

September 4, 2009 · 2 Comments
Filed under: CMS, Featured, IDE Tools, LifeRay, NetBeans 

Basic Configuration

Download Netbeans IDE and install it. Be careful with you will need Java Development Kit installed on you computer. Well, you can get Netbeans bundled with JDK here.

After that, download Liferay Source Code from here. You find it in the end of the page, in the section Files for Developers.

When you have installed Netbeans IDE and running, you add a new project called liferay.

640px

Building Stand-alone Portlets

To create a portlet application that resides in a stand alone .war file, you will need Netbean’s Portal Pack. Then you will add some liferay specific functionality to prove you can, and deploy it to Liferay.

You will need:

  • The Portal Pack, just the plugin, not the app server or portlet container
  • Liferay code > 4.2.1 ( i used svn co https://svn.sourceforge.net/svnroot/lportal/portal/trunk )
  • To have built the ext environment because we’ll use some services to make the tutorial worth while
  • To create the library tutorial service section of one of the many tutorials like this one. We’ll only use the db objects and services created in these tutorials.
  • For deployment, I’m using the liferay-jboss-tomcat bundle but it should work with any other bundle

Creating the Portlet App

Note: If you are using Netbeans 6.0 beta 1, the following instructions do not apply to you since the Portlet support has been added to the webapp support. Please refer to the Netbeans site for more details.

  1. Create New Project by clicking File/New Project
  2. From the New Project wizard, choose Portlet Applications in the Categories sechtion and then JSR-168 Portlet Application in the Projects section. Click Next >
  3. Provide a Project Name and you can choose to leave or change the rest of the stuff. Click Finish

As it is the project has been created, you could right click in the project in the Projects window and choose Clean and Build Project, which will create a .war file in the projects dist folder that can be hot deployed to Liferay using the Admin portlet.

The wizard created a class file for you, we’ll call it your portlet class from now on. The wizard also created 3 jsp files for you, we’ll only change the view.jsp which can be found in the Web Pages/WEB-INF/jsp node in the Projects window. You can see that your portlet class points to that path and file in the doView method.

Adding Liferay’s stuff

To make this tutorial worth your while, we’ll use some Liferay specific methods and objects. We’ll create a portlet that presents a simple form similar to the one you may have done in the library struts portlet, which will create books and will list the books’ in a very ugly table…

First, we want to add to Netbeans all the dependencies of our project using the Library Manager found in the Tools menu. We could add the dependencies directly to the project but then we would have to do it for every portlet.

  1. Click on Tools/Library Manager, which brings up the, well, Library Manager
  2. Click on the New Library button, name your library Liferay
  3. In the Classpath tab, add the following jars that must have been created if you did the library tutorial for struts or jsf
    1. portal-kernel.jar found in liferay’s code in the portal-kernel folder
    2. portal-service.jar found in liferay’s code in the portal-service folder
    3. ext-ejb.jar found in your ext environment in the ext-ejb folder
    4. ext-service.jar found in your ext environment in the ext-service folder
  4. Add the sources if you want, as well as the documents, then click Ok

Now we need to add the library to the project.

  1. Right clicking on the project in the project window and selecting Properties
  2. Select Libraries from the Categories section.
  3. Click Add Library and select Liferay then Click Add Library
  4. Uncheck any checks in the Package column, you don’t need to deploy these with your jar, they are only good for autocompletion, compilation, etc.
  5. Click Ok

Code Stuff

We’ll pass some data to the view and add an action method to your portlet class.

Your doView method will look like this:

    public void doView(RenderRequest request,RenderResponse response) throws PortletException,IOException {

        // we just want to show we can use some liferay's stuff here
        try {
            if (PasswordTrackerLocalServiceUtil.isValidPassword("test@liferay.com", "test")) {
                System.out.println("--------- El passowrd es valido!!! -------");
            }
        } catch (Exception e) {
            System.out.println("------- Error: " + e.toString());
        }

        // we want to get a list of books (from the library tutorial) and pass them to the view.jsp
        try {
            // wrapper in BookLocalServiceUtil which returns BookUtil.findAll(), from library tutorial
            List<Book> books = BookLocalServiceUtil.getAll();
            request.setAttribute("books", books);

        } catch (Exception e) {
            System.out.println(" ---- Error en el libro!!! --- "+e.toString());
        }

        response.setContentType("text/html");
        PortletRequestDispatcher dispatcher =
                getPortletContext().getRequestDispatcher("/WEB-INF/jsp/view.jsp");
        dispatcher.include(request, response);

    }

Now add to the following method to the same class

    public void proessAction(ActionRequest request, ActionResponse response) throws PortletException, IOException {
        try {
            System.out.println(request.getParameter("action"));
            BookLocalServiceUtil.addBook(request.getRemoteUser(), request.getParameter("book_title"));
        }catch(Exception e){
            e.printStackTrace();
        }
    }

By now your code probably has tons of little red underlines, meaning you have erros… These are due to import problems… Netbeans will fix them for you if you right click on the code window and select Fix Imports

Your code should be able to compile now.

View Stuff

We’ll change the view.jsp file to display the books and be able to add more. In the end, your jsp should look like this:

  <%@page contentType="text/html"%>
  <%@page pageEncoding="UTF-8"%>
  <%@page import="javax.portlet.*"%>
  <%@taglib uri="[http://java.sun.com/portlet"] prefix="portlet"%>
  <portlet:defineObjects />
  <%PortletPreferences prefs = renderRequest.getPreferences();%>
  <%@ taglib uri="[http://java.sun.com/jsp/jstl/core"] prefix="c" %>
  Some books
  <table border="1">
    <c:forEach var="book" items="${requestScope.books}">
        <tr>
            <td><c:out value="${book.bookId}"/></td>
            <td><c:out value="${book.userId}"/></td>
            <td><c:out value="${book.title}"/></td>
        </tr>
    </c:forEach>
  </table>

  <form action="<portlet:actionURL
      windowState="<%= WindowState.NORMAL.toString() %>">
      <portlet:param name="action" value="addBook"  /></portlet:actionURL>"
      method="post" name="<portlet:namespace />fm">
   Book Title:
   <input name="<portlet:namespace />book_title" size="20" type="text" value="">
   <input type="button" value="Submit" onClick="submitForm(document.<portlet:namespace />fm);">
  </form>

That is about it! if you do Clean and Build Project you should be able to hot deploy the .war file and see your portlet work!

Efficient Deployment

I modified my build script in netbeans so that when I clean and build the project it is hot deployed to the server.

Click on the Files window, find the build.xml file in your project, open it and add the following to the end of it:

    <target name="-post-dist">
        <!-- want to delete work forlder in jboss to prevent jsp caching-->
        <basename property="portlet.work.name" file="${dist.war}" suffix=".war"/>
        <delete dir="${user.home}/Java/liferay-portal-jboss-tomcat-4.2.1/server/default/work/jboss.web/localhost/${portlet.work.name}" />
        <!-- want to copy to liferay's deploy folder -->
        <copy file="${dist.war}" toDir="/home/liferay/deploy" />
    </target>

With this, and the hot deploment setting in the Admin portlet set to 5 seconds, i’m able to do changes in the code and rebuild the project with almost no wait time (6 seconds or less at the moment).

Debugging

If you know how to start your apps server in debug mode, and tell Netbeans to put debug symbols in the build (look at the Properties/Build/Compiling/Generate Debugging Info checkbox), you can tell Netbeans to connect to a remote server by clicking on the Attach Debugger icon or menu item, set the right port and then set breakpoints in your code as with any other app…

Netbeans Profiler

leaks or performance profiling, I recommend the NetBeans profiler. It’s a free, but powerful profiler: http://www.netbeans.org

To install:

  1. Install Netbeans IDE 5.5
  2. Install Netbeans Profiler 5.5
  3. For profiling JDK 1.4.2 applications, download Netbeans JFluid Modified JDK, then from the Tools|Update Center, choose “Install Manually Downloaded” to install. Then do this step once: Profile|Advanced Commands|Run Profiler Calibration
  4. For profiling JDK 1.5+ applications, no additional downloads required. JDK 1.5+ has the new JVM Tool Interface API.

To run the profiler:

  1. Go to Profile|Attach Profiler, click on Attach Wizard:
  2. Select Target Type: J2EE Web/App Server, Server Type: Tomcat 5.5
  3. For profiling with JDK 1.4.2: Target settings: Local, Dynamic Working dir: ..\servers\tomcat\bin, Attach using server PID
  4. For profiling with JDK 1.5+: Target settings: Local, Direct (cannot be dynamically attached)
  5. Click next, choose Automatic, click Next. Tomcat Installation: …\servers\tomcat
  6. Choose Server JVM
  7. click Next, click Next
  8. Check “Automatically start the server after this Wizard finishes.”
  9. click Finish

…or start manually from command-line in tomcat\bin:

 catalina_nbprofiler start

Next select a profiling task, then click Attach.

For info on using the profiler, read http://www.netbeans.org/kb/articles/nb-profiler-tutor-8.html

For faster server startup, use the “Monitor Application” task (the other profiling tasks require more resources). After the server has started up, then go to the Profiler | Modify Profiling… menu and select the new task.

For tracking down memory leaks, use the “Analyze Memory Usage” task with the “Record Stack Trace for Allocations” option checked. This shows where leaking objects were created. If this configuration crashes when you take a snapshot, then the workaround is to add this to the command line that starts the server:

  • Xnoclassgc

If you get a redefinition error on a generated JSP class while profiling Tomcat during a load test, then the JSPs need to be precompiled. To do this, add this to build.properties/build.${user.name}.properties then deploy again: jsp.precompile=on

JDK 1.4.2 notes: In older NetBeans/JDK 1.4.2 sometimes it couldn’t dynamically attach, but going through the Attach wizard works everytime. From the dropdown select the process and click OK.