[midPoint] Deployment Information Logo on embedded Tomcat

Gómez Martínez, Elsa egomezm at minsait.com
Fri Oct 25 11:11:27 CEST 2019


I have tried on my midpoint in Dockers with embedded Tomcat and it worked with static-web folder.
I think that is because Dockers works in Linux and no Windows SO.

Thanks for all your solutions and help.
Elsa



De: Brad Firestone <bhotrock at gmail.com>
Enviado el: jueves, 24 de octubre de 2019 23:55
Para: midPoint General Discussion <midpoint at lists.evolveum.com>; Gómez Martínez, Elsa <egomezm at minsait.com>
Asunto: Re: [midPoint] Deployment Information Logo on embedded Tomcat

I'm watching this thread with interest because I wasn't ever able to get this to work either.  What I ended up doing was extracting the files from the WAR, replacing the logo file and then adding it back to the WAR.  I know this should probably be easier, and the "static-web" method appears to work fine for many people.  But for some reason, i could never make it work right.  I attributed it to an install that has been upgraded many times and moved from running under Tomcat to the Standalone method.

My notes below in case it helps.
Brad



Standalone UPDATE LOGOs
To replace in WAR:
Become root: su -
Move to folder that contains the WAR file. /opt/midpoint/lib/
List contents to a text file:

CODE: SELECT ALL<https://forum.globalnaz.org/viewtopic.php?f=36&t=110&p=285>

jar tvf midpoint.war > ./midpoint-contents.txt

Look for the midPoint logo:

CODE: SELECT ALL<https://forum.globalnaz.org/viewtopic.php?f=36&t=110&p=285>

grep white_180 midpoint-contents.txt

Extract the original logo file to get properties:

CODE: SELECT ALL<https://forum.globalnaz.org/viewtopic.php?f=36&t=110&p=285>

jar xvf midpoint.war WEB-INF/classes/static/img/midpoint_logo_white_180.png

Create the new logo file to match the same properties.  Transfer file to the midPoint server (I used a folder in my /home directory) and then replace the old logo file with the new file in the WEB-INF tree structure.

CODE: SELECT ALL<https://forum.globalnaz.org/viewtopic.php?f=36&t=110&p=285>

cp /home/myuser/midpoint-logos/midpoint_logo_white_180.png /opt/midpoint/lib/WEB-INF/classes/static/img/

Copy the existing WAR to midpoint.war.backup (this can be copied back if you mess something up).

CODE: SELECT ALL<https://forum.globalnaz.org/viewtopic.php?f=36&t=110&p=285>

cd /opt/midpoint/lib/

cp midpoint.war midpoint.war.backup

Replace the existing file with the new file:

CODE: SELECT ALL<https://forum.globalnaz.org/viewtopic.php?f=36&t=110&p=285>

jar uvf midpoint.war WEB-INF/classes/static/img/midpoint_logo_white_180.png

The Favicon is located in two places. Not sure which one is used. So I put it in both places and that worked.
WEB-INF/classes/favicon.ico and WEB-INF/classes/static/img/favicon.ico
Just use the same process as for the logo.


Gómez Martínez, Elsa wrote on 10/24/19 10:14 AM:

I notice that in my System Configuration XML I added the <defaultHostname> tag but when I save the changes and edit again the XML, it has been disappeared.

I tested with 127.0.0.1 and I’ve got the same result.

I tried too with relative path but nothing happens ☹.

Would you recommend to test it with midpoint 4.0.1 release?

Best Regards,
Elsa

De: midPoint <midpoint-bounces at lists.evolveum.com><mailto:midpoint-bounces at lists.evolveum.com> En nombre de Ivan Noris
Enviado el: jueves, 24 de octubre de 2019 16:46
Para: midpoint at lists.evolveum.com<mailto:midpoint at lists.evolveum.com>
Asunto: Re: [midPoint] Deployment Information Logo on embedded Tomcat


If you really insist on absolute url, then it should be: http://localhost:8080/midpoint/static-web/logo.jpg

But using just static-web/logo.jpg should be the same.

On some windows I needed to use 127.0.0.1 instead of localhost though...

Ivan


On 24. 10. 2019 16:21, Gómez Martínez, Elsa wrote:
I tried again in two ways:


·         http://localhost:8080/static-web/logo.jpg

Attached the log: complete.txt




·         /static-web/logo.jpg
Attached log: medium.txt


·         /static-web/logo.jpg
Attached log: simple.txt


Here is my folder directory:










I can’t find what i’m doing wrong…

Best Regards,
Elsa

De: midPoint <midpoint-bounces at lists.evolveum.com><mailto:midpoint-bounces at lists.evolveum.com> En nombre de Ivan Noris
Enviado el: jueves, 24 de octubre de 2019 15:33
Para: midpoint at lists.evolveum.com<mailto:midpoint at lists.evolveum.com>
Asunto: Re: [midPoint] Deployment Information Logo on embedded Tomcat


Hi,

it should with relative path as I stated, this is the same example as we use in the MidPoint Advanced Training with standalone midpoint (embedded Tomcat). Has worked two weeks ago and still should. (It works in 4.0.1-SNAPSHOT for sure, I just checked).

The key is the directory "static-web" created  in the midpoint.home directory.



Best regards,

Ivan


--

Ivan Noris

Senior Identity Engineer

evolveum.com

________________________________

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Si no es vd. el destinatario indicado, queda notificado que la lectura, utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) confidential information that is exclusively addressed to its recipient(s). If you are not the indicated recipient, you are informed that reading, using, disseminating and/or copying it without authorisation is forbidden in accordance with the legislation in effect. If you have received this email by mistake, please immediately notify the sender of the situation by resending it to their email address.
Avoid printing this message if it is not absolutely necessary.




_______________________________________________

midPoint mailing list

midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>

http://lists.evolveum.com/mailman/listinfo/midpoint


________________________________

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Si no es vd. el destinatario indicado, queda notificado que la lectura, utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) confidential information that is exclusively addressed to its recipient(s). If you are not the indicated recipient, you are informed that reading, using, disseminating and/or copying it without authorisation is forbidden in accordance with the legislation in effect. If you have received this email by mistake, please immediately notify the sender of the situation by resending it to their email address.
Avoid printing this message if it is not absolutely necessary.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20191025/348e7a62/attachment.htm>


More information about the midPoint mailing list