You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matthias Kerkhoff <ma...@BESToffers.de> on 2000/10/23 15:27:03 UTC

Re[2]: struts and weblogic

Here are some additional informations on WLS (SP6) + Struts. (Please
follow Eric's steps too except where otherwise noted, they're still
necessary.)

> - Weblogic 5.1 with at least SP5 installed

Use SP6 instead of SP5.

> - Struts 0.5 release (I grabbed the latest from the STRUTS_PRE_1_0 branch on
> CVS and built from there)

> - The file I pasted into my e-mail (attached here: WebAppStartup.java)

(His original mail with the attachement was posted 10/13/2000 to the list.
 You can also check my mail "Re: Weblogic SP6" from 10/20/2000 for a
 startup-class taking a slightly different approach)

> Here's the procedure in a nutshell:

> - unjar the war files (java.util.Resource* has trouble reading properties
> files from the wars because of the classloader that
>   handles them, I think

It's only necessary to unjar struts-example.war for deploying, the other
war's should work fine as they are. (There is a bug in struts-example that
prevents it's deployment as unxepanded war file. It's not WebLogic
related.)

> - Add the lines as I mentioned in my e-mail to the weblogic.properties file
> (I'll also attach the e-mail -- you'll find more detail there).  These lines
> register the war directories (struts-example, struts-test, struts-doc).


To use cookie-tracked sessions with Struts, change (or add) the following
lines in your weblogic.properties:

weblogic.httpd.session.enable=true
weblogic.httpd.session.cookies.enable=true
weblogic.httpd.session.cookie.name=JSESSIONID
weblogic.httpd.session.URLRewriting.enable=false

You may also want to remove or change the lines defining the cookie path and
domain (weblogic.httpd.session.cookie.path=... and
weblogic.httpd.session.cookie.domain=...).


If you plan to use URLRewriting for session tracking, make sure your
weblogic.properties contains the lines:

weblogic.httpd.session.enable=true
weblogic.httpd.session.cookies.enable=false
weblogic.httpd.session.cookie.name=jsessionid
weblogic.httpd.session.URLRewriting.enable=true

(struts-test:bean-cookie will fail with this configuration, because the
 JSP assumes cookie-based session-tracking.
 struts-test:Presence Tags will show a difference between expected and
 actual values for cookies for the same reason)

 
Before you restart the server, make sure that you have a XML-Parser in
your server-classpath. I've had various problems with Sun's Reference
implementation, JDK1.3 and WLS 5.1. They vanished after I switched to
Xerces 1.20D2. (To make xerces accessible for your WebApps, place
xerces.jar into your serverclasses directory - usually found at
myserver/serverclasses - and add the jar to PRE_CLASSPATH in your
startWeblogic script).

> - Start Weblogic and go!  (for example, the struts example would be accessed
> via http://localhost:7001/strutsExample/).


There are some additional problems with WLS, that should hopefully be
resolved in/with the next service pack (SP7). These problems prevent manifest as
JSPException's, whenever a tag defines a scripting variable, that is later
accessed via jsp:getProperty or jsp:setProperty. One example for such a
scenario is struts-test:bean-cookie.jsp.

If you need a quick workaround: Manually declare such tag-defined
scripting variables with a jsp:useBean to make them visible to WebLogic.
If you don't want to change your JSPs and have some experience with decompilers,
you may contact me for further information on how to fix the bugs instead of
working around them.

Matthias                        (mailto:make@BESToffers.de)