Migrate weblogic to tomcat
From PTAGISWiki
Our environment in weblogic consists of a few war files and a few expanded directories. Moving the expanded directories is only slightly more difficult than moving the wars. First create a war in the source directory like this:
cd /dsk2/ptagis-1.0/web/ptagis jar -cvf ptagis.war *
Then copy the ptagis.war to the tomcat webapps directory (/var/lib/tomcat5/webapps). It will be expanded by tomcat, so there is no need to unzip the files unless you want to modify the configuration.
The configuration will need to be modified since there are some hard-coded links to resources in the ptagis directory that break when moved to a new environment.
Contents |
What immediately breaks
- Data > Reports (SREE interaction) File "/rptcommon.jspx" not found
- Data > Sites > Reports File "/rptcommon.jspx" not found
- Logon (LDAP interaction) An error occurred at line: 32 in the jsp file: /loginAction.jsp
- I know there are db objects that rely on weblogic methods
What works
- flash
- jsp
- pojos
- html
Fixing LDAP realms for Tomcat
It looks like the best documentation for configuring tomcat for this task is here: http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JNDIRealm
Alternately, that same page has instructions on how to use a JDBC table of users and passwords as the realm authority. We'll get back to that later perhaps.
Here is a good HOWTO: http://www.simplified-tech.com/website/webapp.nsf/webpages/ArticleTomcatLDAP
Need to identify all our code that uses weblogic sql objects
Any of our pojos that use WLCachedRowSet need to be rewritten to use vanilla SQL objects. It should be a fairly simple task to grep for this:
find /usr/local/pitweb/ptagis-1.0/src -type f | xargs grep -l WLCachedRowSet
./db/TagProjData.java ./db/RegisteredTagAction.java ./db/DBConnection.java ./db/ClipFiles.java ./db/DataSubSetting.java ./db/TestTags.java ./db/TagDistribution.java ./db/RegisteredTags.java ./db/QueryBuilder.java ./db/MyMessages.java ./sites/SiteConfig.java ./util/xmlparser.java ./util/queryRunner.java
That doesn't look like too much work.
Ah, but then there is the code embedded in the JSPs that use WLCachedRowSet as well:
ptagis/home/
./regTagDisplay.jsp ./regTagList.jsp ./mymessages/action.jsp ./mymessages/display.jsp ./mymessages/list.jsp ./regTagDownload.jsp
sree/
runquery.jsp
