WSO2 Identity Server 5.1 management console customizing is not functioning - server

I tried to replace WSO2 Identity Server logo with my company logo in Main.Css file of corresponding jar.
But when I tried to restart the server the Jar file is not loading. Even if it is loading the logo is not getting displayed.
Any replies?

I believe you have changed the jar and replaced the existing one in repository/components/plugins folder. If so, this gets replaced by the original jars in repository/components/patches/patch0000 folder.
If this is the case what you can do is create a folder such as patch5000 in the patches folder and place the modified jar in it and restart. Let me know if this works.

Related

Where do I place my templates for Blog-related mail notifications in Liferay 7.0?

The documentation states that I can configure the liferay server to use my own templates for the email messages. Specifically, if I add these properties to a portal-ext-env.properties in $CATALINA_BASE/conf/liferay:
blogs.email.entry.added.enabled=true
blogs.email.entry.added.subject=${resource:com/liferay/portlet/blogs/dependencies/email_entry_added_subject.tmpl}
blogs.email.entry.added.body=${resource:com/liferay/portlet/blogs/dependencies/email_entry_added_body.tmpl}
Liferay will supposedly use the templates in the specified paths (com/liferay/portlet/blogs/dependencies/email_entry_added_subject.tmpl and com/liferay/portlet/blogs/dependencies/email_entry_added_body.tmpl). The thing is, it's not very clear what these paths are relative to. Are these files relative to $CATALINA_BASE? For example, would the above configuration result in Liferay looking up $CATALINA_BASE/com/liferay/portlet/blogs/dependencies/email_entry_added_body.tmpl for creating the body of an email message? If this is not the case, where does Liferay lookup templates for Blog-related email messages?
After some digging, I've found that you place the templates in the $CATALINA_BASE/webapps/ROOT/WEB-INF/classes folder. Paths that you reference in the properties (e.g. blogs.email.entry.added.body=${resource:com/liferay/portlet/blogs/dependencies/email_entry_added_body.tmpl}) are relative to the aforementioned classes folder.
So, if I wanted Liferay to use a template file in the ff. relative path: org/foo/my_email_entry_added_body.tmpl, I would do two things:
Place the file in $CATALINA_BASE/webapps/ROOT/WEB-INF/classes/org/foo/my_email_entry_added_body.tmpl.
Add the following line to $CATALINA_BASE/portal-ext-env.properties: blogs.email.entry.added.body=${resource:org/foo/my_email_entry_added_body.tmpl}.
I consulted my co-worker and got a better understanding of why this is. The architecture of a Liferay application is such that it comes bundled with a Tomcat server. According to the documentation, WEB-INF/classes is a directory that a web app deployed to a Tomcat server looks up for classes and resources:
A class loader is created for each web application that is deployed in a single Tomcat instance. All unpacked classes and resources in the /WEB-INF/classes directory of your web application, plus classes and resources in JAR files under the /WEB-INF/lib directory of your web application, are made visible to this web application, but not to other ones.
Specifically, this folder is high in priorty in the web app's classpath.
When you see Liferay code similar to ${resource:path/to/foo}, it's looking up resources in its classpath. One of the paths in that classpath is WEB-INF/classes. Hence, if path/to/foo is placed in WEB-INF/classes, Liferay will find path/to/foo there.

gwt images external to WAR file

I am working with GWT and I have some issues with the images. I need images outside my WAR file and, In order to make them visible in the application, I must put them inside the "target" folder ( I am using maven as well). The problem is that the target folder by definition is deleted every time recompile the project. This issue happens only in hosted mode, because when I deploy the application on Tomcat I can just change the server.xml adding the following statement
and it should read correctly images outside my WAR file(not tried yet due to another problem I have)
Can anybody give me some suggestions?
What is the directory structure of your maven project? Why is there a requirement for you to put the images in the target folder? Typically in a Maven project the items you put in the src/main/resources/static such as images end up in the built artifact.

how to download war files from wildfly 8

Wildfly 8:
Where are the deployed war files located on the server file system?
How do I download them? I tried using the JBoss CLI as well as the Web Interface.
Found the war files to be located here. In this directory I found several subdirectories. The war files were all named content and did not have an extension. I could figure out what they were based on file size and timestamp.
wildfly location\standalone\data\content
You want the files 'after' they have been deployed? This generally isn't a good idea as it isn't guaranteed to be exactly the same as the source archive.
The standard location for the deployment archives is ./standalone/deployments/ although this can be changed in the configuration.
After an archive is deployed you can see the exact location of there the deployed archive came from in the configuration, it will be written to the bottom of the xml file.
There is a download button to download the .war
in the management console localhost:9990
click the view button near your war
on top you will find a download icon
I found it in the %WILDFLY_HOME%\standalone\temp\ directory. If it is not present there then you can perform a search in all the subdirectories of the wildfly.

Where do you put server.xml in a tomcat eclipse project when checking into version control?

When you create a tomcat project in eclipse, it puts the server.xml file under Servers, which appears as a separate "Project" in the project explorer. My question is, how best to check this into source code control, so that when another user attempts to check out the project, the server.xml file is in the correct place.
I currently use the Perforce version control system, but I've experienced the same issue in the past with other systems.
It's been my experience that other users will end up creating their own tomcat server in eclipse, and then they will have to copy in the custom server.xml.
The best I've been able to do is save the server.xml into the WEB-INF or other directory inside the project, and then update that to source code control. However, this introduces risk, because you have to remember to save your server.xml changes back to WEB-INF. Not to mention that you have to document the copying of the server.xml as a setup step for users creating your project.
I would create a folder under the web app project like etc/ where I'd put a big README and a hard link to the server.xml. So anyone checking out the project would be instructed to do the same (in the README) - and all changes to the server.xml would be versioned. I would not mess with WEB-INF - the server.xml has no place there.

Where to put jar files for struts 2 in eclipse,giving error index.jsp(8,40) File "/struts-tags" not found

Eclipse is only giving me option to include jar files in Java Build Path->Libraries .In some tutorial sites they are showing to add jar files in WEb-INF/lib,but iam not able to add jar here.i tried importing files to WEB-INF/lib,jars were added but they did not had jar icon instead some weird icon ,and when i m trying to run my struts login page its giving me error
/index.jsp(8,40) File "/struts-tags" not found.Where to put jar to make it work,Also while learning struts sometime i get Http 404 error,but when i restart eclipse(I tried restarting server but it didnt help) the error is gone all of a sudden.why this is happening.Eclipse is so confusing.
Go to the your web-project folder outside the eclipse.Cope your jars (which are required for your project).
Than open-up Eclipse, follow these steps
Right Click on project(Project Explorer) choose -->Configure build path.
Go to Library tab and click on add jars, it will open this wizard
Add required jars and i hope this will solve your problem.
Make sure you have required jars in your class-path..
As jars are showing some weird icon, I would suggest you to change the jar files. Also, make sure your added jar contains struts-tags.tld file. This will resolve error on index.jsp.
sorry, system is not allowing me to put comment. So editing the same.
Follow below steps to check the jars are added to build path correctly -
switch to package explorer view.
check whether your jars are added under web app Libraries. If yes your jars are added properly.
Then check struts-tags.tld file is present inside struts2-core.jar. If not present then copy it or add new jar containing the same.