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

Getting current portal url and port no

Dear all,

Please let me know how to get the current portal hostname and port no . We are accessing the port thru <b>virtual hostname</b> and not by physical server name. We are using EP 7.0 SP10 . I need this virtual hostname and port no to build the url to access the images stored in server from Web Dynpro. I have created http alias for the images folder in the server. I need to build the url like <http>://<hostname>:<port>/<image alias name>/***.jpg to access the images from server.

Pls also share any other suggestions to access the images from the sever thru web dynpro

Thanks in Advance.

Regards

Vasudevan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 22, 2007 at 09:45 AM

    Hai,

    String hostName = TaskBinder.getCurrentTask().getProtocolAdapter().getServerName();

    int port = TaskBinder.getCurrentTask().getProtocolAdapter().getServerPort();

    Regards,

    Naga

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 22, 2007 at 09:36 AM

    Hi Vasudevan,

    Try using the inet6Adress class for this it will provide you the nessecary details

    Regards

    Amit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2008 at 12:04 PM

    Dear All,

    I need to access the portal through http://<hostname>:<port>/irj/portal instead of http://<companyname>.com. Can anybody help me on this.

    Also i need to know the port no. of my portal, how can i obtain this information through?

    Please Help.

    Regards,

    Vinayak

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You will be able to compile it with the new IDE but it will throw runtime exception if that implementation is not present on the server. If you have OS level access to the server then you could do a file system search to find if that class is present.

      I prefer DOS command over windows search options.

      eg:

      findstr /msi WDProtocolAdapter *.jar

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.