I'm developing a web-application on my workstation
and testing it by going to localhost/whatever and when
I'm satisfied with results I copy it to the main server
where the application is accessible trough the internet
as a www.whatever.com. So my situation is similar to yours
and the way to make it happend is

a) to use "page" attribute for <html:link"
b) in struts-config.xml forward tag should have
path attribute starts with "/" - this will ensure relative path
(the same implies to "input" and "path" attributes of
action tag)

And whenever you see in your JSP, config or JAVA files a link
like "mycontext/page.jsp" where "mycontext" is the name
of your web-application (web-site), be careful because you may 
have problems moving the application to another location.
In another words, always use relative pathes for local links.

Best of luck,
Yuriy Zubarev


--- Rod Schmidt <[EMAIL PROTECTED]> wrote:
> I am using the "page" attribute. This also happens for forms that get
> posted.
> 
> If you look at the source that get's sent to the browser, /mycontext is
> getting inserted into the form actions and the URLs.
> 
> Rod
> 
> ----- Original Message -----
> From: "Yuriy Zubarev" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, June 25, 2001 11:43 AM
> Subject: Re: Struts with a domain name
> 
> 
> > Hello Rod,
> >
> > When you are working with <html:link> tag you can use
> > its "page" attribute instead of "href" to specify
> > context-relative URI.
> >
> > Best of luck,
> > Yuriy Zubarev
> >
> >
> >
> > --- Rod Schmidt <[EMAIL PROTECTED]> wrote:
> > > What do you need to do to get your struts link to work properly
> under a
> > > domain name?
> > >
> > > I'm using webappcabaret and my stuff worked fine under
> > > www.webappcabaret.com/mycontext. I then got a domain name and I'm
> trying
> > > to run under www.mydomainname.com and I keep getting errors because
> the
> > > links and actions are trying to go to
> > > www.mydomainname.com/mycontext/whatever
> > >
> > > Any ideas?
> > >
> > > Thanks,
> > >
> > > Rod Schmidt
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> >
> 


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to