• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: implementing HTTPServlet with WebObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: implementing HTTPServlet with WebObjects


  • Subject: Re: implementing HTTPServlet with WebObjects
  • From: John Huss <email@hidden>
  • Date: Tue, 27 May 2014 11:14:58 -0500

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 <email@hidden> 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 <email@hidden> 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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >implementing HTTPServlet with WebObjects (From: Butchi Reddy Velagala <email@hidden>)
 >Re: implementing HTTPServlet with WebObjects (From: John Huss <email@hidden>)

  • Prev by Date: Re: implementing HTTPServlet with WebObjects
  • Next by Date: Re: Retaining order of values in a url
  • Previous by thread: Re: implementing HTTPServlet with WebObjects
  • Next by thread: Performance problem - Apache?
  • Index(es):
    • Date
    • Thread