Skip to Content
author's profile photo
Former Member

how use .getServerName() and .getProtocoll() Method

Hello,

i have an easy question, but i cant solve it.

For an iView i need the Server name and Protokoll. Normaly(in JSP) in i would use the implicit request object for it.

But in the Javadoc i found this:

getServletRequest

public javax.servlet.http.HttpServletRequest getServletRequest()Gets the actual servlet request. Note: It is recommended not to access the servlet request if possible.

Returns:

The actual servlet request

When it is not recommended i think i better didnt do it. What is a nice way to get the webservers name and the protocoll in an iView?

Best Regards,

Patrick

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Posted on Oct 09, 2003 at 06:27 PM

    I think its no problem to access the ServletRequest and pull information out it. But you shouldnt change it, because this would also affect other Portal Components.

    The corresponding Portal Object is ComponentRequest like in nearly all PDK samples shown. It contains some aditional information from the portal runtime.

    thats all.

    Oliver

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Oliver,

      thanks for the Answer. I ask this because the Object from IPortalComponentRequest has no getServerName method. But when it is not problem to read from the "normal" request object i do it this way.

      Best Regards,

      Patick