掲示板

Forum Guidelines and FAQ - *Read before posting*

thumbnail
16年前 に JR Houn によって更新されました。

Forum Guidelines and FAQ - *Read before posting*

Expert 投稿: 488 参加年月日: 07/11/19 最新の投稿
I'd like to first give credit to forum user and moderator, Roman Hoyenko, for organizing and putting out the original FAQs on the forums. They are primarily his work and I am simply reorganizing them and combining the information.

BEFORE posting a new thread in the forums (especially if you are new to Liferay), please DO THE FOLLOWING:

1. Search the forum, wiki, or Google to find out if your question has already been answered here or elsewhere.

2. Check the official Liferay Documentation located here:

Liferay 6.2
Liferay 6.1
Liferay 6.0
Liferay Documentation for 5.2
Liferay Documentation for 5.1
Liferay End User Documentation 4.3
Liferay End User Documentation 4.2

Liferay Portal Administrators Guide for Liferay 6
Liferay Portal Administrators Guide for Liferay 5.2

3. Search the Liferay Wiki and JIRA:
Liferay Wiki and FAQ
Liferay JIRA

4. Check this post for updates to the FAQ in this post. The FAQs listed here are divided by their respective forum categories. (Note: If you feel something ought to be added to this post please feel free to post on this thread or email me directly james.falkner@liferay.com and I will promptly update it.)

Forum Do's and Don'ts

If you post...

DO post in an existing subcategory.
DO post as much relevant information as you can, including but not limited to: version of Liferay, app server, error logs, database, and detailed steps taken to reproduce your problem.
DO post Java stack traces, but if they are really long, please trim them down to only show the relevant bits.
DO feel free to post in other threads and encourage other users and help answer questions! emoticon
DO mark your post as a Question (using the "Mark as a Question" checkbox) when you are asking a question. If you are answering a thread that was marked as a question, mark your post as an answer.

emoticonDON'T post the same question multiple times. (AKA - Thread Spamming) emoticon
emoticonDON'T post questions in threads that are about different topics. (AKA - Thread Jacking, Thread Hijacking) emoticon
emoticonDON'T revive old, dead threads with only remotely relevant new questions or comments. Start a new thread, and if applicable, link to the old, dead one. emoticon
emoticonDON'T post complaints or bug reports that are not substantiated. emoticon
emoticonDON'T post in the Legacy Archive. emoticon
emoticonDON'T Post blatant advertising for you or your company, or post spam. emoticon
Failure to follow these guidelines will result in your post being moved or deleted without notice.

I can't access Liferay's SVN! What happened?
The following command should now be used for anonymous access to Liferay source code:

svn co svn://svn.liferay.com/repos/public/portal/trunk --username guest --password ""



Installation and Deployment FAQ

For questions concerning the Glassfish bundles please post here and also at the Glassfish Quality Community web site.

Looking for hosting?
Please refer to the Hosting Providers wiki

"I can't find the file I'm looking for for version x.xx!"
Please check Sourceforge.

SVN
Note:As of late 2011 Liferay is moving away from SVN and onto Git. The SVN repository is now a mirror of the primary Liferay Git repository.
SVN access rules have changed for 5.1.x and later branches (including 6.x) - To access SVN please login as user "guest" and no password (blank).


Using Liferay FAQ


  • How to redirect to a new page after user logged in successfully?
    Please look here Customizing the default page
  • I configured URL of the portal to be different from localhost:8080, but some of the links still go there (logo, home link). How to change it?
    Go to Enterprise Admin portlet -> Settings. You can change the host name there as well as some other things like logo, language, timezone, etc.
  • I have created a page, then i added a portlet. I can see all the icons(maximise,minimise, close etc ...) , but I want to disable them for some of the users.
    To disable icons you need to login as non-administrator user. Administrator by default has all the permissions - to maximize, configure, close, etc. If you create a new user and just add the user to community, the user by default can't change the portlets, it can just view.
  • How do I set session timeout?
    Read this wiki article: Session Timeout
  • Where do I find properties files (portal.properties, portal-ext.properties, system.properties)?
    You usually need to modify portal-ext.properties properties, but you might want to look at the default values in portal.properties.

    If you've downloaded and unzipped the portal-source you can find the portal.properties and system.properties file in
    ../source/portal-impl/classes folder

    Your portal-ext.properties file will usually be deployed to the Liferay Home Directory (one directory above your app server directory). Alternatively, it can be placed on the class path of the webapp, ../tomcat-5.5.23/webapps/ROOT/WEB-INF/classes .

    If you don't have the source you can look at the jar file - portal-impl.jar


Development FAQ

  • How to redirect to a new page after user logged in successfully?
    Please look here Customizing the default page
  • How to deploy a portlet or make sure it is deployed successfully?
    Read the wiki pages:
    Hot Deploy Troubleshooting
    Exceptions / Problems with deployment
  • How do I get user information about a user?
    The JSR-168 remote user is mapped to the user ID in Liferay. To obtain the User object (which holds the field for the screen name), you have to make a call once you've retrieved the JSR-168 remote user:
    
    String userId = renderRequest.getRemoteUser();
    User user = UserServiceUtil.getUserById(Long.parseLong(userId));

  • How do I develop a Portlet?
    [indent][/indent] Portlet Development
  • How do I work with the EXT environment?
    The Ext (Extension) Plugin is the preferred mechanism for extending and augmenting Liferay's core behavior. Ext plugins have been created as an evolution of the extension environment provided in Liferay 5.2 and previous versions of Liferay.
    [indent][/indent]Working with Ext Plugins
  • Where can I find documentation for Liferay version x.x.xx?

  • How do I add namespace to a javascript function or <div> id?

    You can use <portlet:namespace /> before function name ordiv id. If you want to use it in other places, CDATA section for example you can look at this post for more details:

    How to use namespaces
  • How do I add a connection pool or access LiferayPool from my app?

    In tomcat you have to place the pool in the global classloader...

    for example, add this to server.xml inside the "GlobalNamingResources":

      <!-- Global JNDI resources -->
      <globalnamingresources>
    
              ....
    
      	<resource name="LiferayPool" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8" username="xxx" password="xxx" maxActive="100" maxIdle="30" maxWait="10000" />
    
      	<resource name="LiferayMailSession" auth="Container" type="javax.mail.Session" mail.transport.protocol="smtp" mail.smtp.host="192.168.0.1" />
      </globalnamingresources>
    


    Then in all the webapps that want to use this pool, setup their
    context.xml (in the case of the portal webapp, in ROOT.xml) to contain
    the following:

    	<resourcelink name="jdbc/LiferayPool" global="LiferayPool" />
    	<resourcelink name="mail/MailSession" global="LiferayMailSession" />
    


    Don't forget the delete the other references having the same names...

    Now all your webapps can use the same pool.

    OR

    you can use com.liferay.portal.kernel.jndi.PortalJNDIUtil.getDataSource() from any portlet.
  • How do I get my current community name?

    long x = themeDisplay.getPortletGroupId()
    Group group = GroupLocalServiceUtil.getGroup(x);
    group.getDescriptiveName() or group.getName()