cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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_cont...!

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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