You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Josh <jr...@yahoo.com> on 2001/02/06 13:32:34 UTC

More on Weblogic and Struts

Sorry to beat the dead horse, I have read through the archives and have found
them very useful.  Thanks to all who have submitted to the Weblogic/struts
thread. 

I have read what seems to be the now famous Oct. 10th 2000 post:

http://archive.covalent.net/jakarta/struts-user/2000/10/0009.xml

Before I went ahead and started implementing this approach I wanted to know if
there had been any more recent successful attempts.  I did read this post: 

http://archive.covalent.net/jakarta/struts-user/2000/12/0442.xml

Which stated that the Struts example nearly ran out of the box, with sp7.  I'm
running sp8 and before I go off writing code, I was wondering if anyone could
confirm Weblogic's current status on integrating with Struts.

btw - I didn't have 'any' luck running straight out of the box, but that's not
to say that I didn't get lost in weblogic.properties.  (I've been known to do
that before).

Thanks,
Josh

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

Re: More on Weblogic and Struts

Posted by Ted Husted <ne...@husted.com>.
On 2/6/2001 at 4:32 AM Josh wrote:
>Before I went ahead and started implementing this approach I wanted to
know if there had been any more recent successful attempts.  

This was just added to the installation page for 1.0. The instructions
were posted for this purpose by one user, and confirmed by another. If
these don't work for you, please let us know. 

Next on the agenda is something for JRun and Websphere. Any suggestions
from people using those products? (In a format we can paste into the
documentation.)

WEBLOGIC 5.1 (service pack 8)
-----------------------------

* Obtain and install the Xerces XML parser (problems have been reported
  with the Sun reference implementation). Put xerces.jar in your
WebLogic system
  path.

* Obtain and unpack the Struts binary distribution (this procedure
assumes
  it was extracted to C:\jakarta-struts).

* Add an entry to weblogic.properties for each of the Struts web
  applications that you would like to configure. For example, to make
the
  struts-example application available, add the following line to
  weblogic.properties:

	weblogic.httpd.webApp.strutsexample=c:/jakarta-struts/webapps/struts-ex
ample.war

* You do not need to include struts.jar or any of the application
specific
  classes in the WebLogic classpath, since this will be done
automatically
  (unless deploying an unpacked web archive- see below).

* Start WebLogic server and point your web browser to the struts
  application. For example, to connect to the example application added
in
  step 3:

	http://localhost:7001/strutsexample

* This example application depends on the Struts specific resource file
  ApplicationResources.properties to be present on the classpath.
However,
  WebLogic only extracts *.class files from the archive so this file
will not
  be found, resulting in an error the first time it is needed-
something
  similar to: javax.servlet.ServletException: runtime failure in custom
tag
  'message'. Steps 6 & 7 will need to be performed for this
application, and
  any other that relies on ApplicationResources.properties.

* Extract ApplicationResources.properties from the *.war file, and
  manually copy it to the respective package in the _tmp_war_ directory
  WebLogic created for this application. Again referring to the
struts-example
  application, this would be:

	c:\jakarta-struts\webapps\WEB-INF\_tmp_war_strutsexample

* Restart WebLogic. You will now be able to run the application:

	http://localhost:7001/strutsexample

* The above steps should be followed for applications deployed as *.war
  files. For unpacked web applications, configuration involves adding
both
  struts.jar and /WEB-INF/classes to the WebLogic classpath. For this
reason,
  I would suggest deploying applications as war files to WebLogic.
However,
  the same example application can be successfully deployed in
extracted
  format by modifying weblogic.properties (assuming the war was
extracted to
  directory webapps/struts-example):

	weblogic.httpd.webApp.strutsexample=c:/jakarta-struts/webapps/struts-ex
ample/

	And starting WebLogic with the updated WebLogic classpath. For
example:

	c:\jdk1.3\bin\java -ms16m -mx64m
		-classpath c:\weblogic\lib\weblogic510sp8boot.jar;
			c:\weblogic\classes\boot;
			c:\xerces\xerces.jar
-Dweblogic.class.path=c:\weblogic\lib\weblogic510sp8.jar;
			c:\weblogic\license;
			c:\weblogic\classes;
			c:\weblogic\myserver\serverclasses;
			c:\weblogic\lib\weblogicaux.jar;
			c:\jakarta-struts\lib\struts.jar;
			c:\jakarta-struts\webapps\struts-example\WEB-INF\classes
				-Dweblogic.system.home=c:\weblogic-Djava.security.manager
				-Djava.security.policy=c:\weblogic\weblogic.policyweblogic.Server


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/



Re: More on Weblogic and Struts

Posted by john d ware <jd...@frii.com>.
Well,
    My luck hasn't changed. I build struts from source this morning.
    I plopped the struts-example.war into my
wlserver6.0/config/mydomain/applications dir. WLS read the war file automatically
but this is what I get when accessing "localhost:7001/struts-example/index.jsp".

john




<Feb 6, 2001 10:54:28 AM MST> <Error> <HTTP>
<[WebAppServletContext(3003491,struts-example)] Could not deserialize context
attribute
java.io.NotSerializableException:
org.apache.struts.util.PropertyMessageResourcesFactory
        at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
        at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
        at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
        at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
        at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:71)
        at
weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletContext.java:211)

        at
weblogic.servlet.jsp.PageContextImpl.getAttribute(PageContextImpl.java:164)
        at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:229)
        at jsp_servlet._index._jspService(_index.java:107)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:244)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1127)

        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1529)

        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Feb 6, 2001 10:54:28 AM MST> <Error> <HTTP>
<[WebAppServletContext(3003491,struts-example)] Root cause of Ser
vletException
javax.servlet.jsp.JspException: Missing resources attribute
org.apache.struts.action.MESSAGE
        at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:232)
        at jsp_servlet._index._jspService(_index.java:107)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:244)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1127)

        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1529)

        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>


Carl Tallis wrote:

>         Thanks no doubt to Sun cracking the whip on J2EE licensees, the Struts
> example code runs *untouched* on WLS 6.0, providing you have a build that
> fixed the getter/setter method problems from ~ two weeks ago.  If possible,
> I'd upgrade.  Also among the many pleasant surprises in 6.0 are real support
> for the web.xml file, pre-loading, and not having to register all your
> servlets.
>
> Carl Tallis
> Director Of Products
> SupplyLinks, Inc.
> Tel: (703) 796-6010
> Fax: (703) 796-6014
> email: CTallis@SupplyLinks.com <ma...@SupplyLinks.com>
>
> ***************************************************************************
> This email message contains confidential information for the above addressee
> only. If you are not the intended addressee you must not disclose or use the
> information in any manner whatsoever.
> Any opinion or views contained in this email message are those of the
> sender, do not represent those of the Company in any way and reliance should
> not be placed upon its contents.
> Unless otherwise stated this email message is not intended to be
> contractually binding. Where an Agreement exists between our respective
> companies and there is conflict between the contents of this email message
> and the Agreement then the terms of that Agreement shall prevail.
> ***************************************************************************
>
> > -----Original Message-----
> > From: Josh [mailto:jrannis@yahoo.com]
> > Sent: Tuesday, February 06, 2001 7:33 AM
> > To: struts-user@jakarta.apache.org
> > Subject: More on Weblogic and Struts
> >
> >
> > Sorry to beat the dead horse, I have read through the archives
> > and have found
> > them very useful.  Thanks to all who have submitted to the Weblogic/struts
> > thread.
> >
> > I have read what seems to be the now famous Oct. 10th 2000 post:
> >
> > http://archive.covalent.net/jakarta/struts-user/2000/10/0009.xml
> >
> > Before I went ahead and started implementing this approach I
> > wanted to know if
> > there had been any more recent successful attempts.  I did read
> > this post:
> >
> > http://archive.covalent.net/jakarta/struts-user/2000/12/0442.xml
> >
> > Which stated that the Struts example nearly ran out of the box,
> > with sp7.  I'm
> > running sp8 and before I go off writing code, I was wondering if
> > anyone could
> > confirm Weblogic's current status on integrating with Struts.
> >
> > btw - I didn't have 'any' luck running straight out of the box,
> > but that's not
> > to say that I didn't get lost in weblogic.properties.  (I've been
> > known to do
> > that before).
> >
> > Thanks,
> > Josh
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - Buy the things you want at great prices.
> > http://auctions.yahoo.com/
> >
> >


RE: More on Weblogic and Struts

Posted by Carl Tallis <ct...@supplylinks.com>.

>
> On 2/6/2001 at 11:02 AM Carl Tallis wrote:
> >example code runs *untouched* on WLS 6.0,
>
> So, for WLS 6.0 are we talking an install like:
>
> * Copy "struts-documentation.war" and "struts-example.war"
>   to your $WLS6_HOME/webapps directory
>
> * Restart WLS if it is already running
>
Correct.  I noticed some odd behaviour initially.  Excerpts of a reply to
another user:

==================
The only issue I've had is a rather odd "feature" of WLS.  The initial
deployment did the standard expansion of the .war into the normal
subdirectory structure.  I ran the demo & tested that it all ran o.k.,
worked on some other apps, and had to reboot.  When my system came back up,
the subdirectory structure was gone!  Moreover, the app still ran!  WLS
apparently can, and does, run the application directly from the .war.  Why,
I don't know - I just expect that I can defeat this behaviour by manually
expanding the application.  The implications of this were that 1) the system
ran like molassas - nothing stayed compiled when I bounced the server, and
this server runs like poop on my laptop; and 2) the standard database .xml
file didn't get saved, so there was no persistent data storage.  I don't
expect a problem fixing this.

Oh, and the server doesn't seem to pick up the changes to .JSPs very well
(o.k., not at all), but that's no doubt some parameter I can tweak.
==================

I've since communicated with the BEA guys about the latter matter, and
they've only succeeded in pointing out the same settings that are detailed
in the on-line manuals (which didn't help).  However, having satisfied
myself that I can deploy Struts to run on WLS 6, I'm comfortable developing
on Tomcat.


> If so, I'll rework the package so that we can apply these for several
> of the containers (Tomcat 3.1+, Resin, and WLS 6.0+), and then focus on
> the exceptions (Orion, WLS51 SP8, et cetera).
>
> Anyone with notes on using a container with Apache is also welcome to
> contribute those.
>
> *********** REPLY SEPARATOR  ***********
>


RE: More on Weblogic and Struts

Posted by Ted Husted <ne...@husted.com>.
On 2/6/2001 at 11:02 AM Carl Tallis wrote:
>example code runs *untouched* on WLS 6.0, 

So, for WLS 6.0 are we talking an install like:

* Copy "struts-documentation.war" and "struts-example.war"
  to your $WLS6_HOME/webapps directory

* Restart WLS if it is already running

If so, I'll rework the package so that we can apply these for several
of the containers (Tomcat 3.1+, Resin, and WLS 6.0+), and then focus on
the exceptions (Orion, WLS51 SP8, et cetera). 

Anyone with notes on using a container with Apache is also welcome to
contribute those.

*********** REPLY SEPARATOR  ***********


>Thanks no doubt to Sun cracking the whip on J2EE licensees, the Struts
>example code runs *untouched* on WLS 6.0, providing you have a build
that
>fixed the getter/setter method problems from ~ two weeks ago.  If
possible,
>I'd upgrade.  Also among the many pleasant surprises in 6.0 are real
support
>for the web.xml file, pre-loading, and not having to register all your
>servlets.
>
>Carl Tallis
>Director Of Products
>SupplyLinks, Inc.
>Tel: (703) 796-6010
>Fax: (703) 796-6014
>email: CTallis@SupplyLinks.com <ma...@SupplyLinks.com>
>
>***********************************************************************
****
>This email message contains confidential information for the above
addressee
>only. If you are not the intended addressee you must not disclose or
use the
>information in any manner whatsoever.
>Any opinion or views contained in this email message are those of the
>sender, do not represent those of the Company in any way and reliance
should
>not be placed upon its contents.
>Unless otherwise stated this email message is not intended to be
>contractually binding. Where an Agreement exists between our
respective
>companies and there is conflict between the contents of this email
message
>and the Agreement then the terms of that Agreement shall prevail.
>***********************************************************************
****
>
>
>> -----Original Message-----
>> From: Josh [mailto:jrannis@yahoo.com]
>> Sent: Tuesday, February 06, 2001 7:33 AM
>> To: struts-user@jakarta.apache.org
>> Subject: More on Weblogic and Struts
>>
>>
>> Sorry to beat the dead horse, I have read through the archives
>> and have found
>> them very useful.  Thanks to all who have submitted to the
Weblogic/struts
>> thread.
>>
>> I have read what seems to be the now famous Oct. 10th 2000 post:
>>
>> http://archive.covalent.net/jakarta/struts-user/2000/10/0009.xml
>>
>> Before I went ahead and started implementing this approach I
>> wanted to know if
>> there had been any more recent successful attempts.  I did read
>> this post:
>>
>> http://archive.covalent.net/jakarta/struts-user/2000/12/0442.xml
>>
>> Which stated that the Struts example nearly ran out of the box,
>> with sp7.  I'm
>> running sp8 and before I go off writing code, I was wondering if
>> anyone could
>> confirm Weblogic's current status on integrating with Struts.
>>
>> btw - I didn't have 'any' luck running straight out of the box,
>> but that's not
>> to say that I didn't get lost in weblogic.properties.  (I've been
>> known to do
>> that before).
>>
>> Thanks,
>> Josh
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Yahoo! Auctions - Buy the things you want at great prices.
>> http://auctions.yahoo.com/
>>
>>



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/



RE: More on Weblogic and Struts

Posted by Josh <jr...@yahoo.com>.
Does anyone have an example weblogic.properties and startweblogic.cmd that
deploys the struts-example.war file properly, and who would be willing to
share.

I am getting closer, but I am now getting:

Loading database from '/WEB-INF/database.xml'
New org.apache.struts.example.User
Begin event threw exception
java.lang.ClassNotFoundException: org.apache.struts.example.User at
weblogic.boot.ServerClassLoader.findLocalClass(ServerClassLoader.java, Compiled
Code)

Any suggestions? (I can't go to wls 6.0, at least not yet, but I am begging)

Thanks,
Josh

--- Carl Tallis <ct...@supplylinks.com> wrote:
> 	Thanks no doubt to Sun cracking the whip on J2EE licensees, the Struts
> example code runs *untouched* on WLS 6.0, providing you have a build that
> fixed the getter/setter method problems from ~ two weeks ago.  If possible,
> I'd upgrade.  Also among the many pleasant surprises in 6.0 are real support
> for the web.xml file, pre-loading, and not having to register all your
> servlets.
> 
> Carl Tallis
> Director Of Products
> SupplyLinks, Inc.
> Tel: (703) 796-6010
> Fax: (703) 796-6014
> email: CTallis@SupplyLinks.com <ma...@SupplyLinks.com>
> 
> ***************************************************************************
> This email message contains confidential information for the above addressee
> only. If you are not the intended addressee you must not disclose or use the
> information in any manner whatsoever.
> Any opinion or views contained in this email message are those of the
> sender, do not represent those of the Company in any way and reliance should
> not be placed upon its contents.
> Unless otherwise stated this email message is not intended to be
> contractually binding. Where an Agreement exists between our respective
> companies and there is conflict between the contents of this email message
> and the Agreement then the terms of that Agreement shall prevail.
> ***************************************************************************
> 
> 
> > -----Original Message-----
> > From: Josh [mailto:jrannis@yahoo.com]
> > Sent: Tuesday, February 06, 2001 7:33 AM
> > To: struts-user@jakarta.apache.org
> > Subject: More on Weblogic and Struts
> >
> >
> > Sorry to beat the dead horse, I have read through the archives
> > and have found
> > them very useful.  Thanks to all who have submitted to the Weblogic/struts
> > thread.
> >
> > I have read what seems to be the now famous Oct. 10th 2000 post:
> >
> > http://archive.covalent.net/jakarta/struts-user/2000/10/0009.xml
> >
> > Before I went ahead and started implementing this approach I
> > wanted to know if
> > there had been any more recent successful attempts.  I did read
> > this post:
> >
> > http://archive.covalent.net/jakarta/struts-user/2000/12/0442.xml
> >
> > Which stated that the Struts example nearly ran out of the box,
> > with sp7.  I'm
> > running sp8 and before I go off writing code, I was wondering if
> > anyone could
> > confirm Weblogic's current status on integrating with Struts.
> >
> > btw - I didn't have 'any' luck running straight out of the box,
> > but that's not
> > to say that I didn't get lost in weblogic.properties.  (I've been
> > known to do
> > that before).
> >
> > Thanks,
> > Josh
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - Buy the things you want at great prices.
> > http://auctions.yahoo.com/
> >
> >
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

RE: More on Weblogic and Struts

Posted by Carl Tallis <ct...@supplylinks.com>.
	Thanks no doubt to Sun cracking the whip on J2EE licensees, the Struts
example code runs *untouched* on WLS 6.0, providing you have a build that
fixed the getter/setter method problems from ~ two weeks ago.  If possible,
I'd upgrade.  Also among the many pleasant surprises in 6.0 are real support
for the web.xml file, pre-loading, and not having to register all your
servlets.

Carl Tallis
Director Of Products
SupplyLinks, Inc.
Tel: (703) 796-6010
Fax: (703) 796-6014
email: CTallis@SupplyLinks.com <ma...@SupplyLinks.com>

***************************************************************************
This email message contains confidential information for the above addressee
only. If you are not the intended addressee you must not disclose or use the
information in any manner whatsoever.
Any opinion or views contained in this email message are those of the
sender, do not represent those of the Company in any way and reliance should
not be placed upon its contents.
Unless otherwise stated this email message is not intended to be
contractually binding. Where an Agreement exists between our respective
companies and there is conflict between the contents of this email message
and the Agreement then the terms of that Agreement shall prevail.
***************************************************************************


> -----Original Message-----
> From: Josh [mailto:jrannis@yahoo.com]
> Sent: Tuesday, February 06, 2001 7:33 AM
> To: struts-user@jakarta.apache.org
> Subject: More on Weblogic and Struts
>
>
> Sorry to beat the dead horse, I have read through the archives
> and have found
> them very useful.  Thanks to all who have submitted to the Weblogic/struts
> thread.
>
> I have read what seems to be the now famous Oct. 10th 2000 post:
>
> http://archive.covalent.net/jakarta/struts-user/2000/10/0009.xml
>
> Before I went ahead and started implementing this approach I
> wanted to know if
> there had been any more recent successful attempts.  I did read
> this post:
>
> http://archive.covalent.net/jakarta/struts-user/2000/12/0442.xml
>
> Which stated that the Struts example nearly ran out of the box,
> with sp7.  I'm
> running sp8 and before I go off writing code, I was wondering if
> anyone could
> confirm Weblogic's current status on integrating with Struts.
>
> btw - I didn't have 'any' luck running straight out of the box,
> but that's not
> to say that I didn't get lost in weblogic.properties.  (I've been
> known to do
> that before).
>
> Thanks,
> Josh
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>
>