Skip to Content
author's profile photo Former Member
Former Member

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


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:


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


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,


Add a comment
10|10000 characters needed characters exceeded

Related questions

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.


    Add a 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,


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.