Resurrecting the WLP Data Sync Web Application in 10.3.2

In WLP 10.3.2, the datasync web application has been deprecated. This makes sense if you consider the recommended approach is to test all of your Datasync Project work in DEV mode and then propagate up once you have everything the way you want. However, if you are upgrading or have a development process where this is not the easiest policy to implement, you may wish to bring back the datasync.war. If that is you, fear not! Blogging to the rescue!

While in previous versions of WLP it was automatically added to a portal EAR project, in 10.3.2 you must manually add the dataync.war.

The documented  approach (How To Import and Add the Deprecated ‘Datasync.war’ to the WebLogic Portal Application (Doc ID 1268447.1)) to add it is to use OEPE, right-click on the EAR project, select Import War, and import [WLP_HOME]p13ndeprecatedlibdatasync.war. Doing so creates a datasync project in your workspace.

The documentation goes on to describe an edit to the MANIFEST.MF to include the classes from ImportedClasses on the classpath. When I tried it, I could get to the data sync application index page, but would get a 500 error past that.

Digging through the logs, I found class not found exceptions. I eventually fixed this by moving the jsp folder under/datasync/ImportedClasses/WEB-INF/classes/com/bea/p13n/management/data to /datasync/ImportedClasses/com/bea/p13n/management/data, re-building and re-deploying.

If you found this interesting, please share.

© Scott S. Nelson

Creating SAML Token Tip for Non-WLS Admins

The documentation for setting up SAML for WLP WSRP is very straight-forward except for one small item that us non-admins may not think of: Once you have your command window open, you need to run the setDomainEnv script in that window before calling the keytool. Otherwise, you get a nice response from the commands, but the domain is not configured to use the results!

If you found this interesting, please share.

© Scott S. Nelson

Useful Eclipse Update Sites for WLP Developers

Two handy plug-ins with the update URLs that work with OEPE:

SQL Explorer –  http://eclipsesql.sourceforge.net/

Subversion for Eclipse –  http://www.polarion.org/projects/subversive/download/1.1/update-site/  http://www.eclipse.org/subversive/downloads.php

If you found this interesting, please share.

© Scott S. Nelson

Banishing Browser Caching in WebLogic Portal 10.3.2

I had a problem the other day where a user that was logged out still had their name showing on the screen. I thought the session wasn’t being invalidated, but it was actually a case of the browser caching the page. Digging around, I found a solution that, when added to a backing file for the desktop to run during pre-render did the trick:

import com.bea.netuix.servlets.controls.content.backing
               .JspBacking;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class NoCacheBacking implements JspBacking

{
   public void dispose(){}
   public boolean handlePostbackData(HttpServletRequest request,
      HttpServletResponse response)
   {

      return false;
   }

   public void init(HttpServletRequest request,
      HttpServletResponse response){}
   public boolean preRender(HttpServletRequest request,
      HttpServletResponse response)
   {
      response.setHeader("Cache-Control" ,
                   "no-cache, must-revalidate");
      response.setHeader("Pragma", "no-cache");
      response.setHeader("Cache-Control","no-store");
      response.setDateHeader ("Expires", 0);

      return false;
   }
}
If you found this interesting, please share.

© Scott S. Nelson