Message Boards
Extend Password Update Page
Dennis Schilakowski, modified 5 Years ago.
Extend Password Update Page
New Member Posts: 15 Join Date: 2/15/19 Recent Posts
Hello,
we would like to display the current password strength on the update password page.
Is there a way to extend the JSP file here without having to rebuild it completely.
Best regards
we would like to display the current password strength on the update password page.
Is there a way to extend the JSP file here without having to rebuild it completely.
Best regards
Christoph Rabel, modified 5 Years ago.
RE: Extend Password Update Page
Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent Posts
I am not sure, which page you exactly want to change, but you probably need to create a module fragment to do what you want to achieve.
Assuming 7.0:
https://dev.liferay.com/de/develop/reference/-/knowledge_base/7-0/module-jsp-override
The tricky part is to find the correct module and jsp to override.
In 6.2 you would create a hook to achieve essentially the same.
Assuming 7.0:
https://dev.liferay.com/de/develop/reference/-/knowledge_base/7-0/module-jsp-override
The tricky part is to find the correct module and jsp to override.
In 6.2 you would create a hook to achieve essentially the same.
Dennis Schilakowski, modified 5 Years ago.
RE: Extend Password Update Page
New Member Posts: 15 Join Date: 2/15/19 Recent Posts
Thanks for the hint, very interesting. Unfortunately I could not find the page http://.../c/portal/update_password there. Does it mean this is a core page, which makes things a little harder. Is there a similar possibility to integrate the original page and then expand it? I would not like to "copy" the page.
I'm using CE 7.1.2-GA3
I'm using CE 7.1.2-GA3
Christoph Rabel, modified 5 Years ago.
RE: Extend Password Update Page
Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent Posts
Ha. You are right, update_password is not there.
It's here:
/html/portal/update_password.jsp
You need to do this:
https://dev.liferay.com/de/develop/tutorials/-/knowledge_base/7-1/jsp-overrides-using-custom-jsp-bag
It's here:
/html/portal/update_password.jsp
You need to do this:
https://dev.liferay.com/de/develop/tutorials/-/knowledge_base/7-1/jsp-overrides-using-custom-jsp-bag
Dennis Schilakowski, modified 5 Years ago.
RE: Extend Password Update Page
New Member Posts: 15 Join Date: 2/15/19 Recent Posts
Thanks a lot!
That means but I can only overwrite the update_password.jsp completely, because there is no -ext.jsp file to it. what a trouble.
A kind <liferay-util: include page = "/html/portal/update_password.original.jsp" /> or does not exist either?
That means but I can only overwrite the update_password.jsp completely, because there is no -ext.jsp file to it. what a trouble.
A kind <liferay-util: include page = "/html/portal/update_password.original.jsp" /> or does not exist either?
Christoph Rabel, modified 5 Years ago.
RE: Extend Password Update Page
Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent PostsDennis SchilakowskiThanks a lot!
That means but I can only overwrite the update_password.jsp completely, because there is no -ext.jsp file to it. what a trouble.
A kind <liferay-util: include page = "/html/portal/update_password.original.jsp" /> or does not exist either?
Well, the old jsp stays there, with renamed to update_password.portal.jsp
So, you can do two things
1) Put the jsp content in a string and do something with the string.
CharArrayWriterResponse customResponse = new CharArrayWriterResponse(response);
request.getRequestDispatcher("/html/portal/update_password.portal.jsp").forward(request, customResponse);
content = customResponse.getOutput();
// Do something with the content
out.write(content);
If you just want to append something, you can simply include it and add your own code before/after it.
// Your code here
<%@ include file="/html/portal/update_password.portal.jsp" %>
// Your code here
When I really have to replace it, I usually commit the original too as an extra file and when Liferay updates it, I diff it to know, what was changed. And then I replace the original with the "new original".
Dennis Schilakowski, modified 5 Years ago.
RE: Extend Password Update Page
New Member Posts: 15 Join Date: 2/15/19 Recent Posts
Christoph, many thanks you have saved my day. That's exactly what I was looking for !!!
Thank you so much! :-)
Thank you so much! :-)