Step by step creating a Portal filter


Following are the simple steps for creating a Portal Filter.
  1. Using your preferred IDE, create a simple java project named portalFilterProject.
  2. In this project, create a simple java class which will act as a filter class with below line of code. System.out.println("My First Portal Filter");
  3. Export the new created filter project as .jar file.
  4. Copy the exported portal .jar file to following location  \IBM\WebSphere\PortalServer\shared\app
  5. Now, navigate to following directory \IBM\WebSphere\wp_profile\config\cells\DefaultNode\applications\wps.ear\deployments\wps\wps.war\WEB-INF
  6. Add the following entries to the web.xml at the end of all filter entries in the file. Filters take precedence as the order they are added. It is advisable to keep the backup of web.xml before making these changes.
<filter-name>Portal Filter</filter-name>

<filter-name>Portal Filter</filter-name>

<filter-name>Portal Filter</filter-name>

Now restart the portal server, you will see the message "My First Portal Filter" you placed in the portal filter class for the each request in logs. If the message is coming that means you have successfully implemented the Portal Filter.

Useful links:

No comments:

Post a Comment

Recent Posts

Popular Posts

© 2011-2019 Web Portal Club