You can get the WOServletContext and the WOServletRequest from the userInfo
in the WORequest using these keys:

aRequest.userInfo().get("HttpServletRequest")
aRequest.userInfo().get("HttpServletResponse")
aRequest.userInfo().get("ServletConfig")
aRequest.userInfo().get("ServletContext")

While using strings in this way is somewhat questionable, at least you
don't have to worry about a future release of WO changing it.

If you just need the ServletContext you would be better off subclassing
ERXServletAdaptor and overriding init().  But if you do that you'll have to
change the web.xml file during the build process to reference your
subclass.  In the "ssdd" target add a line to do a string replace:

 <replace file="${dest.dir}/${build.app.name}/WEB-INF/web.xml" token="OLD"
value="NEW" />





On Tue, May 27, 2014 at 9:36 AM, John Huss <johnth...@gmail.com> wrote:

> Yes, WOServletAdaptor (or ERXServletAdaptor) is just an HttpServlet class
> that forwards to the regular WO stack.
>
> If you need to serve your static web server resources through the app
> also, or if you need to add other servlets or filters within the same app,
> then you have to change the build.xml a bit.
>
>
> On Tue, May 27, 2014 at 3:47 AM, Butchi Reddy Velagala <
> v.butchire...@gmail.com> wrote:
>
>> Hi All,
>>
>>      We have a requirement to implement the HttpServlet interface in
>> webobjects application. We all know that "WebObjects applications can be
>> deployed as servlets inside a servlet container". But our requirement is to 
>> *deploy
>> the servlet application in webobjects server*.
>>
>> Please clarify me on the following.
>>   * Do we have servlet container inside our webobjects server?
>>   * Can we implement HttpServlet interface in webobjects applications?
>>
>> Thanks in advance,
>> Butchi Reddy Velagala
>>
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>>
>> https://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com
>>
>> This email sent to johnth...@gmail.com
>>
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to