Re: Servlet deployment

From: Oliver Scheel (o..ebinspace.de)
Date: Mon Mar 29 2010 - 10:38:56 EDT


Hi,

what I did, that I changed my build.xml ssdd target to copy the
WebServerResources to the root directory of the resulting war like:

MyApp.war
        WEB-INF
        META-INF
        WebServerResources (<- here Tomcat can serve them)

Next is to provide your own ResourceManager and overload
urlForResourceNamed() that it returns in Servlet mode
(request.context() instanceof WOServletContext) the appropriate url
(for all other cases use "super"). I did it the quirky way and
replaced WOServletAdaptor path (normally "WebObjects") by the name of
the app and append the name from the parameters ;-). Voila.

Oliver

Am 18.03.2010 um 22:17 schrieb Anders Peterson:

> Chuck Hill wrote:
>> On Mar 18, 2010, at 1:41 PM, Anders Peterson wrote:
>>> Hi,
>>>
>>> I'm setting up a new Snow Leopard Client system to run WebObjects
>>> applications using Tomcat. (I'd like not to install WO.)
>>>
>>> I've done a basic Tomcat installation, checked Servlet Deployment
>>> & Autogenerate web.xml, built and deployed the war to Tomcat. The
>>> applications starts and I can use it. The only problem is that no
>>> web server resources are found/used/displayed. WOAppMode is set to
>>> Development.
>>
>> "WOAppMode is set to Development" sounds wrong?
>
> I've tried both alternatives; Development and Deployment. Neither
> works. I'm not surprised Deployment doesn't work as I assume there's
> some additional configuration that needs to be done.
>
> Running in Development is perhaps *wrong* but it should work. It
> should be the simplest way to run.
>
> When I switch from Development to Deployment the app runs much
> faster...
>
> /Anders
>
>> Chuck
>>> Guessing this is a configuration problem, but what?
>>>
>>> The url to one of the images that can't be displayed is:
>>>
>>> http://manta.local:8080/MyApp/WebObjects/MyApp.woa/_wr_/wodata=/Library/Tomcat/webapps/MyApp/WEB-INF/MyApp.woa/Contents/WebServerResources/On.gif
>>>
>>> This works fine, the image is there:
>>>
>>> file:///Library/Tomcat/webapps/MyApp/WEB-INF/MyApp.woa/Contents/WebServerResources/On.gif
>>>
>>>
>>>
>>> BTW, the web.xml defines WOROOT, LOCALROOT and others, but what if
>>> I don't have WebObjects installed. Doing servlet deployment I
>>> don't need it installed, right?
>>>
>>>
>>> /Anders
>>
>



This archive was generated by hypermail 2.0.0 : Mon Mar 29 2010 - 10:40:06 EDT