Topic
4 replies Latest Post - ‏2013-02-27T14:28:59Z by SystemAdmin
rakkatak
rakkatak
10 Posts
ACCEPTED ANSWER

Pinned topic Custom Login Portlet Not Displaying on default Login (wps.Login) page

‏2011-11-11T15:59:23Z |
Hello,

I've copied over the files from /wp_profile/installedApps/<my_node>/PA_Login_Portlet_App.ear/login.war to create my own custom.login.war.

I modified WEB-INF/jsp/LoginView.jsp to have some test text next to the user id field, so I can identify it as the custom login.

I deployed custom.login.war as a portlet using WebSphere Portal 7 admin:

Portlet Management -> Web Modules -> Install

The application was successfully installed. Following this, I've attempted to add this portlet to the Login page (wps.Login):

Portal User Interface -> Manage Pages -> Content Root -> Hidden Pages -> Login -> Edit Page Layout

Note: I didn't remove the default login, just in case


Desired Behaviour:


I would like see my custom login beside the default login, on the Login (wps.login) page.


Actual Behaviour:

The default login does not display, but my custom login does not.

Additional Notes:

The structure of my application within /wp_profile/installedApps/<my_node>/ is as follows:

PA_CustomLoginPortApp.ear/META-INF
PA_CustomLoginPortApp.ear/META-INF/application.xml
PA_CustomLoginPortApp.ear/META-INF/MANIFEST.MF
PA_CustomLoginPortApp.ear/META-INF/was.policy
PA_CustomLoginPortApp.ear/META-INF/was.webmodule
PA_CustomLoginPortApp.ear/custom-login.war
PA_CustomLoginPortApp.ear/custom-login.war/META-INF
PA_CustomLoginPortApp.ear/custom-login.war/META-INF/MANIFEST.MF
PA_CustomLoginPortApp.ear/custom-login.war/META-INF/was.policy
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/classes
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/classes/nls
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/classes/nls/loginportlet*.properties
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/jsp
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/jsp/html
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/jsp/html/*/loginHelp.jsp
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/jsp/BidiInclude.jspf
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/jsp/LoggedInView.jsp
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/jsp/LoginView.jsp
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/jsp/StatusMessageInclude.jspf
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/lib/
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/lib/login.jar <- using websphere login.jar
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/portlet.xml
PA_CustomLoginPortApp.ear/custom-login.war/WEB-INF/web.xml

portlet.xml:

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">

<portlet>
<description xml:lang="ar">portlet ????? ??????</description>
<description xml:lang="ca">Portlet d'autenticació d'usuaris</description>
...
<description xml:lang="zh-TW">????? Portlet</description>

<portlet-name>Custom Login Portlet</portlet-name>
<portlet-class>com.ibm.wps.portlets.login.Login</portlet-class>
<expiration-cache>0</expiration-cache>

<supports>
<mime-type>text/html</mime-type>
<portlet-mode>HELP</portlet-mode>
</supports>

<supported-locale>en</supported-locale>
...
<supported-locale>zh_TW</supported-locale>

<resource-bundle>nls.loginportlet</resource-bundle>

<portlet-info>
<title>Custom Login Portlet</title>
<keywords>login</keywords>
</portlet-info>

<portlet-preferences>
<preference>
<name>helpjsp</name>
<value>/WEB-INF/jsp/html/loginHelp.jsp</value>
</preference>
...
<preference>
<name>com.ibm.portal.preventRenderType</name>
<value>iwidget</value>
</preference>
</portlet-preferences>
</portlet>
</portlet-app>
web.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="CustomLoginPortletWebApp">
<display-name>Custom Login Portlet Application</display-name>
</web-app>


Summary:

If anyone can spot a problem with the login war or perhaps suggest configuration so that it will appear on the login page (wps.Login), it would be greatly appreciated. Thank you.
Updated on 2013-02-27T14:28:59Z at 2013-02-27T14:28:59Z by SystemAdmin
  • rakkatak
    rakkatak
    10 Posts
    ACCEPTED ANSWER

    Re: Custom Login Portlet Not Displaying on default Login (wps.Login) page

    ‏2011-11-11T16:10:06Z  in response to rakkatak

    Additional Note:


    I was able to successfully see my custom login portlet deployed on a test page. The catch is that this test page is viewable (*after authentication*) - leading me to believe that there must be some special configuration to be able to see this same portlet on the default Login (wps.Login) page (*before authentication*). Thank you.
  • rakkatak
    rakkatak
    10 Posts
    ACCEPTED ANSWER

    Re: Custom Login Portlet Not Displaying on default Login (wps.Login) page

    ‏2011-11-11T16:27:26Z  in response to rakkatak

    Solution

    Hello all, I figured it out :D

    I needed to set user permissions on the portlet. i.e.

    Portlets -> Custom Login -> "Assign access to the portlet":

    Click on "edit role" for User

    Add "Anonymous Portal User"

    Now I can see my custom login and make changes as necessary to the LoginView.jsp. Hopefully someone else will see this, that may have had a similar goal. Thank you.
    • SystemAdmin
      SystemAdmin
      30899 Posts
      ACCEPTED ANSWER

      Re: Custom Login Portlet Not Displaying on default Login (wps.Login) page

      ‏2012-11-17T11:42:34Z  in response to rakkatak
      rakkatak ,Thank You.Your post helped me a great service.
  • SystemAdmin
    SystemAdmin
    30899 Posts
    ACCEPTED ANSWER

    Re: Custom Login Portlet Not Displaying on default Login (wps.Login) page

    ‏2013-02-27T14:28:59Z  in response to rakkatak
    rakkatak, your solution also help me. Thanks a lot

    Josivan