You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Erik Pearson <er...@cariboulake.com> on 2000/10/13 18:59:59 UTC
RE: struts and weblogic
No prob. I'm currently working through these difficulties myself, so I
can't lay out a whole roadmap. I believe the e-mail you're refering to was
the one posted on Tue 10/3/2000 9:19 GMT-0600. Here are the basics:
- Weblogic 5.1 with at least SP5 installed
- 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)
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
- 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).
- Start Weblogic and go! (for example, the struts example would be accessed
via http://localhost:7001/strutsExample/).
One last caveat: I think there are problems with different classloaders
conflicting class definitions relating to the bean cookie test in
strutsTest. There was some mention of JSESSIONID on the struts user list,
but it seemed like a peripherial topic. Anyways, I haven't been able to get
it working, and have largely given up. The rest of the tests work fine,
along with the examples.
Good luck! Weblogic is a minefield of bugs concerning their classloaders,
as I've found. Please be active on the struts-user list! Any help/insight
would be appreciated!
-- Erik
> -----Original Message-----
> From: nena [mailto:ngonzale@earthlink.net]
> Sent: Saturday, October 14, 2000 4:59 AM
> To: Erik Pearson
> Subject: struts and weblogic
>
>
> Hello Erik,
>
> I was reading the struts e-mail and read your message about working the
> example with weblogic. I need to run the struts example with weblogic. I
> don't know much about weblogic at this point but could you please tell
> me what is all that I need to do make the example work.
> Please reply at the e-mail below .:-)
>
> c-nina.gonzalez@wcom.com
>
> Thanks for your time and help,
>
> Nilsa
>
>
Re: struts and weblogic
Posted by Wong Kok Wai <wo...@pacific.net.sg>.
Just did a quick test with Weblogic 6.0 beta 1 and the same problem persists.
Have not tried your workaround yet.
Erik Pearson wrote:
> No prob. I'm currently working through these difficulties myself, so I
> can't lay out a whole roadmap. I believe the e-mail you're refering to was
> the one posted on Tue 10/3/2000 9:19 GMT-0600. Here are the basics:
>
> - Weblogic 5.1 with at least SP5 installed
>
> - 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)
>
> 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
>
> - 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).
>
> - Start Weblogic and go! (for example, the struts example would be accessed
> via http://localhost:7001/strutsExample/).
>
> One last caveat: I think there are problems with different classloaders
> conflicting class definitions relating to the bean cookie test in
> strutsTest. There was some mention of JSESSIONID on the struts user list,
> but it seemed like a peripherial topic. Anyways, I haven't been able to get
> it working, and have largely given up. The rest of the tests work fine,
> along with the examples.
>
> Good luck! Weblogic is a minefield of bugs concerning their classloaders,
> as I've found. Please be active on the struts-user list! Any help/insight
> would be appreciated!
>
> -- Erik
>
> > -----Original Message-----
> > From: nena [mailto:ngonzale@earthlink.net]
> > Sent: Saturday, October 14, 2000 4:59 AM
> > To: Erik Pearson
> > Subject: struts and weblogic
> >
> >
> > Hello Erik,
> >
> > I was reading the struts e-mail and read your message about working the
> > example with weblogic. I need to run the struts example with weblogic. I
> > don't know much about weblogic at this point but could you please tell
> > me what is all that I need to do make the example work.
> > Please reply at the e-mail below .:-)
> >
> > c-nina.gonzalez@wcom.com
> >
> > Thanks for your time and help,
> >
> > Nilsa
> >
> >
>
> ------------------------------------------------------------------------
> Name: WebAppStartup.java
> WebAppStartup.java Type: unspecified type (application/octet-stream)
> Encoding: 7bit
>
> Part 1.3 Type: message/rfc822
> Encoding: 7bit
Re[2]: struts and weblogic
Posted by Matthias Kerkhoff <ma...@BESToffers.de>.
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)