Max Cooper wrote:
It sounds like your main challenge is that you have requests to a web
server that look like http://web.domain.com/foo/bar/me mapped to an app
deployed on an app server that you might access directly as
http://app.domain.com/me. The app will make site-root relative URLs
like /me
directly as
http://app.domain.com/me. The app will make site-root relative URLs
like /me/foo.html, and the browser will them make a request to the web
server like http://web.domain.com/me/foo.html which is not what you
want.
That is correct.
What is stopping you from deploying the app
relative URLs
like /me/foo.html, and the browser will them make a request to the web
server like http://web.domain.com/me/foo.html which is not what you
want.
That is correct.
What is stopping you from deploying the app with a /foo/bar/me
context, so that it matches the public context on the web
Note that Struts isn't writing absolute URLs. As a webapp developer, you
use context-relative references that Struts turns into site-root
relative URLs. Here are examples of each type of reference, just so we
are all on the same page:
Relative: foo.html
Site-root relative: /myapp/foo.html
Laurie Harper wrote:
Because if they were relative Struts would have no way to know what they
were relative *to*?
But why does it need to know? I have links in sites that I look after like
foo/bar/bash.html
If I access this via http://mybox.com/, then the browser does the right
thing. If
Michael Jouravlev wrote:
Links to what? To action or to JSP page?
A form action, primarily.
I don't think that references below answer your question, but they
contain valuable info anyway:
No, I'm afraid that they don't. I don't need a tag lib to put a base
tag in the html, but that won't
Michael P. Soulier wrote:
Michael Jouravlev wrote:
Links to what? To action or to JSP page?
A form action, primarily.
I don't think that references below answer your question, but they
contain valuable info anyway:
No, I'm afraid that they don't. I don't need a tag lib to put a base
tag
Hello,
I didn't find this in the archives, so I'll ask.
I have a tomcat app deployed via proxypass from apache (2 in fact, a
double-proxy through 2 servers). It needs to use relative paths in its
links to ensure that the composed path is correct. Unfortunately struts
doesn't seem to want to
Subject: RE: REPOST: Relative URLs
Dear Tarek,
Action example URL:
http://server/my-application/my-module/doSomething.do
Resulting JSP's image example UR:
http://server/my-application/images/some-image.gif
What happens when you use html:img with (depending on your version of
Struts
using the EL?
-Original Message-
From: Benedict, Paul C [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 6:26 PM
To: 'Struts Users Mailing List'
Subject: RE: REPOST: Relative URLs
Erik,
The problem may be that you are using JSP Tags, which are commonly
written to only output links
:
Thanks Erik. I guess when you get into the tags mood, you forget there's
something called scriptlets :)
-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 30, 2005 5:06 PM
To: Struts Users Mailing List
Subject: Re: REPOST: Relative URLs
How
Hi everyone,
I still can not find an answer to my question, so I thought I'd repost
this and try to make it clearer. I really apreciate any help.
How can I refer to resources that are outside my module in a way that
will not mandate rewriting all the URLs in case I change the location of
my
Can't you embed a ServletContext attribute (variable) in your links
using the EL? The attribute value could come from an init param and get
set at app startup.
Erik
tarek.nabil wrote:
Hi everyone,
I still can not find an answer to my question, so I thought I'd repost
this and try to make it
: Tuesday, March 29, 2005 9:18 AM
To: Struts Users Mailing List
Subject: Re: REPOST: Relative URLs
Can't you embed a ServletContext attribute (variable) in your links
using the EL? The attribute value could come from an init param and get
set at app startup.
Erik
tarek.nabil wrote:
Hi
Dear Tarek,
Action example URL:
http://server/my-application/my-module/doSomething.do
Resulting JSP's image example UR:
http://server/my-application/images/some-image.gif
What happens when you use html:img with (depending on your version of
Struts):
a) contextRelative=false[for 1.1 or
List'
Subject: RE: REPOST: Relative URLs
Erik,
The problem may be that you are using JSP Tags, which are commonly
written to only output links to resources within your context. You may
want to simply think of writing plain old a and img tags and do it
yourself.
-Original Message-
From
Hi everyone,
Can someone please explain how to build relative URLs that are higher in
the file hierarchy than the module. For example
/
/images/some-image.gif
/some-action.do
/folder/some-jsp.jsp
I'm building this application inside an existing application that does
not use Struts. I can
Hello,
I have been building a fairly large Java webapp for 3 years now, and
it was originally using Struts 1.0. Due to search engine
optimization, we ended up doing lots or URL manipulation via
mod_rewrite. But then the problem was that when the user submitted
the struts form, it would lose
Hello,
I have been building a fairly large Java webapp for 3 years now, and
it was originally using Struts 1.0. Due to search engine
optimization, we ended up doing lots or URL manipulation via
mod_rewrite. But then the problem was that when the user submitted
the struts form, it would lose
19 matches
Mail list logo