Skip to Content
avatar image
Former Member

Accessing ressources (css,images, scripts...) in portal archive via URL?

Hello!

I have created a par file with the following PAR-Archive:

*.par

¦

+---meta-inf Automatically generated.

¦

¦ All files and folders in the root folder are deployed as public. This usually includes resources,

+---images images,

+---css css,

+---scripts JavaScripts etc.

According to the documentation, you can access all folders in the archive. But in which way??? The URL looks like this:

http://bbmag34.bbmag.aldi.com:50000/irj/servlet/prt/portal/prtmode/preview/prtroot/pcd!3aportal_content!2fALDI!2fcom.aldi.extranet!2fcom.aldi.iviews!

2fcom.aldi.extranet.iview.flex-integrator-text <- i tried to add !2fscripts!2fhallo.txt (which i copied to the scripts directory) but nothing happened.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 19, 2008 at 12:43 AM

    Hi Björn,

    maybe this will help...

    public static String getImageUrl(IPortalComponentRequest request) {

    HttpServletRequest httpRequest = request.getServletRequest();

    StringBuffer buf = new StringBuffer(1024);

    String prot = (httpRequest.isSecure()) ? "https://" : "http://";

    buf.append(prot)

    .append(httpRequest.getServerName())

    .append(":")

    .append(httpRequest.getServerPort())

    .append(request.getWebResourcePath())

    .append("/images/");

    return buf.toString();

    }

    Regards,

    Jens

    Add comment
    10|10000 characters needed characters exceeded