How can I replace login portlet in Liferay 7.0? - liferay-7

First, I'm new to liferay.
I am using the example from writing-a-custom-login-portlet. There you can find a zip file with the portlet module.
I can successfully deploy it by draging the project in Eclipse to the server instance.
I have even added the portlet from the "add > applications > sample" section to the welcome page (the page that is shown when logging in) and it works as expected: I can log in using the portlet. But I keep having the default login link and modal at the top right corner.
So, the portlet works but hasn't replaced the default login.
I thought that just by deploying the login portlet, I would see it replacing the default login modal, but clearly that is not the case. I feel I'm missing some last steps.
Can I replace the default login modal with my custom login portlet? If so, how can I do this?
Facts:
I am using eclise neon 3, liferay-ce-portal-tomcat-7.0-ga4-20170613175008905.zip, jdk 8.
I have a liferay bundle outside eclipse and start it from the servers section.
I have successfully deployed some experimental portlets, including the login example, without issues.

It is possible to 'hide' the Liferay 'Sign In' element with some simple CSS
#p_p_id_com_liferay_product_navigation_user_personal_bar_web_portlet_ProductNavigationUserPersonalBarPortlet_ {
display: none;
}

Related

missing profile for a server adapter in Eclipse

I am trying to set up a dynamic web project in Eclipse 2018-12. Within the Java EE perspective, the lower panel is hosting several commonly used views (markers, console, snippets, search ), among which the Servers view offers the possibility to bind the current project to an already existing server.
If no such server is defined, this view is showing a quick link to "add new server. When one is about to define a new server, a creation wizard takes off, and the first window you get is the profile select window. I would like to set up a Tomcat server, but my initial list does not include Apache Tomcat at all.
Question: how am I supposed top populate the initial list with a desired web server profile template ?
I have searched for Eclipse download links and the first link (and the only one shown there) on the Eclipse Foundation page was Eclipse 2018-12. It seemed pretty good at the time. Now the same page shows Eclipse 2019-06 (64-bits).
Upgrading the current intallation with the JST Server Adapter Extensions did the job nicely. Thank you nitind !

how to make eclipse + tomcat instant deploy for webapps

I build a maven project and deploy this war into tomcat webapps folder then started tomcat, so that my app available in browser as localhost:8080/myApp
I can see myApp folder which was extracted from myApp.war under tomcat/webapps.
I can modify this app's UI by editing files undertomcat/webapps/myApp/.. using Notepad++.
I send this project to my co-worker, he also import this project in his eclipse and run this app.
He changed the jsp and js files from eclipse and the result will be reflected in browser, he never used separate editor to this modification.
If I change the files in eclipse then it is not reflected in browser.
What I need to do for the same to be working to me?
If you just want Hot deploy in Eclipse, please try to take following steps:
Double clicks on the Tomcat plugin, refer to publishing tab, make sure Automatically publish when resources change is selected. This should be the default option, to support “hot deploy” resources, for example : JSP, XML and properties files.
In the Tomcat Plugin page, clicks on the Module view, make sure Auto Reload is Disabled. Default is enabled.
Note:
This is an important step, failed to set the auto reload to disabled, the Tomcat server will be restarted every time you modified something!
Start Project in DEBUG mode. Hot Deploy is supported in DEBUG mode only.
Limitation
Hot deploy has supported the code changes in the method implementation only. If you add a new class or a new method, restart is still required.
To simulate it, try to add a new method, following pop up screen will be displayed, saying the code changes cannot be hot swapped in the JVM.

Debug Alfresco 4.2 Web scripts in Eclipse

Is there a way to debug Alfresco Web Scripts at runtime ? I am talking about webscripts server side. In particular I am developing an AMP for Alfresco 4.2 which make use of a WS in the classic form: .xml + .js + .ftl, therefore not a Java Backed Web Scripts.
The .js controller is developed as part of the AMP, and is placed in the relevant directory for being uploaded at AMP developing/run time.
I would like to put breakpoints in .js controller to use all facilities provided by the Eclipse debug perspective.
If you want to do this thing in eclipse below blow will help you in that case.
Details are on middle of blog.
http://axel-faust.de/?cat=3&lang=en
There is also debugger available in alfresco and share ,in webscript servuce page.
You will also find option for same in below url.
http://localhost:8080/alfresco/service/index
Click Refresh Web Scripts on the Web Scripts Home page to ensure the Web Script Framework has cleared its caches.
Click List Web Scripts.
Click Alfresco JavaScript Debugger.
Click Enable to launch the JavaScript Debugger in a separate window.

How to remove a configuration in Eclipse GWT

I have migrated my application development to a new PC and now when I run the application (Run > Run as > Web application). I get the "HTML Page Selection" popup in which I select my application. However, now I also get a "Choose a launch configuration:" popup which lists "AwardTracker" and "AwardTrackwer.html". They both do the same thing. How do I remove one of these please (this is more annoying than anything else)?
Regards,
Glyn
How to remove a configuration in Eclipse GWT
Simply select any Web Application and click on RED X icon displayed on top right of it to remove an existing configuration.
Once a Web Application is configured then there is no need to create it again. Just launch it from existing one to avoid it choosing a launch configuration again.
Once configured then don't run it again by RIGHT click on the project to run as Web Application. Simply select from the existing one form the tool bar as shown in below screenshots.
Click Run > Run Configurations > your configuration (typically, a name of your HTML or JSP file) > Arguments.
Make sure you only have the path that you want to launch.

Can't get a Static Web Project to be available in Servers 'Add and Remove' in SpringSource Tool Suite

I am trying to add a Static Web Site to my localhost server. But, I can't seem to get it to show up as a resource for me to add it to my server as a configured resource.
In the Eclipse project navigator, I select File-->New-->Project-->Web-->Static Web Project, I type in project 'XYZ', and click finish. Then, when I go to my servers view and click the localhost server, and click 'Add and Remove', my new project XYZ doesn't show up for me to select.
If I do a File-->New-->Project-->SpringSource Tool Suite-->Spring Template Project-->Spring MVC project, then STS creates the project and it shows up in the 'Add and Remove' window of the localhost server.
This little XYZ is a super simple site of one page and three graphics. I don't particularly want to have all the muss and fuss the fully dynamic Spring app involves.
But maybe I have to.
Thanks