swateek
swateek

Reputation: 7590

Access a page of one war file from another war file?

NOTE: I cannot package them into an EAR. Some constraints here.

I have 2 war files.

help.war and helpConnect.war

Both are placed in the same domain of GlassFish server.

From the index page of help.war am accessing a page in helpConnect.war like this..

<a href="helpConnect/HelpInternal/index.htm">Help Internal</a>

This isn't working because when I try to access on the server, the URL its trying to access is like this..

http://localhost:8080/help/helpConnect/HelpInternal/index.htm

However, since helpConnect is a totally different war file I need the URL like this

http://localhost:8080/helpConnect/HelpInternal/index.htm

Any idea how to get this around?

Upvotes: 0

Views: 661

Answers (1)

JB Nizet
JB Nizet

Reputation: 692161

You're using a relative path. You need an absolute path:

<a href="/helpConnect/HelpInternal/index.htm">Help Internal</a>

Upvotes: 2

Related Questions