cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Resources From Other Development Tracks Dynamically

Former Member
0 Kudos

Hi,

- Saying I have 2 tracks (NWDI Track):

First track TRACK1_DEV has, a Software Component with a Development Component (of type Web Module), that contains a CSS file, file.css.

> TRACK1_DEV

     > SC_1

          > DC1_web_module

               > Web Content

                    > css

                         > file.css

Second track TRACK2_DEV has, a Software Component with a Development Component (of type Web Module), that contains a JSP file, index.jsp.

> TRACK2_DEV

     > SC_2

          > DC2_web_module

               > Web Content

                    > index.jsp

- Via NWDI, I add SC_1 as a dependency of SC_2.

- I also added DC1 as a dependency of DC2.

So my question is, is there a way to "link" file.css from TRACK1_DEV to the index.jsp from TRACK2_DEV?

What we're currently doing is to deploy the DC1_web_module via an EAR file, and hard code the URL to the

<link rel="stylesheet" href="192.168.1.1/TRACK1_DEV~DC1_web_module~sample.com/css/file.css" /> of index.jsp in DC2_web_module.

Is there a way to make this more dynamic? What should I put in href to be able to make it more dynamic?

<link rel="stylesheet" href="?????" />

Thanks in advance!

Regards,

John

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi John,

Well you can always use a relative URL e.g.

<link rel="stylesheet" href="/TRACK1_DEV~DC1_web_module~sample.com/css/file.css" />

This should try to resolve the location from the root of the application (so you don't need to include the hostname (or IP).

Hope this helps,
Simon

Former Member
0 Kudos

Hi Simon,

Thanks for your reply!

Answers (1)

Answers (1)

anja_engelhardt2
Active Contributor
0 Kudos