Getting server info in custom processor

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting server info in custom processor

Merin Shaji
Hi,
 
Is there a way to get the server name and server port info in my custom processor, which extends Orbeon's SimpleProcessor?
 
Thanks & Regards
Merin


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Getting server info in custom processor

Erik Bruchez
Administrator
Merin,

Yes, this is easy:

   ExternalContext externalContext
     = (ExternalContext)
context.getAttribute(PipelineContext.EXTERNAL_CONTEXT);
   String serverName = externalContext.getRequest().getServerName();
   int serverPort = externalContext.getRequest().getServerPort();

-Erik

Merin Shaji wrote:
> Hi,
>  
> Is there a way to get the server name and server port info in my custom
> processor, which extends Orbeon's SimpleProcessor?
>  
> Thanks & Regards
> Merin

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Getting server info in custom processor

Merin Shaji
Thanks Erik.
 


 
On 8/28/06, Erik Bruchez <[hidden email]> wrote:
Merin,

Yes, this is easy:

  ExternalContext externalContext
    = (ExternalContext)
context.getAttribute (PipelineContext.EXTERNAL_CONTEXT);
  String serverName = externalContext.getRequest().getServerName();
  int serverPort = externalContext.getRequest().getServerPort();

-Erik

Merin Shaji wrote:
> Hi,
>
> Is there a way to get the server name and server port info in my custom
> processor, which extends Orbeon's SimpleProcessor?
>
> Thanks & Regards
> Merin

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws