AW: Application Context URL ?

"Meißner, Heinz" <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <728F78EF578EC749A51CD4A9CFEE35E01C9D8F@ex-wi-s1.internal.dgverlag.de>
hi jason,
your timekeeping has no suffix ?
your main file in this folder has a suffix ?
no ? --> no help frmo mine
yes --> config your apache ...
        set the DirectoryIndex aaa.bbb
i hope it will help a little
greetz
heinz

> -----Ursprüngliche Nachricht-----
> Von: Jason Johnston [mailto:[email protected]]
> Gesendet: Montag, 12. Juli 2004 22:15
> An: [email protected]
> Betreff: Application Context URL ?
> 
> 
> Ok, if anyone has any insight or the URL's of some good websites on
> Webapp portability, I would greatly appreciate it.  I'm running into a
> problem where relative URL's are breaking and I can't keep all of them
> working.
> 
> I have an app deployed at:
> 
> http://somewhere.com/app1/
> 
> Now my mapping for an application has
> 
> /timekeeping/*    going to a specific ctlTime servlet.
> 
> This means that both request http://somewhere.com/app1/timekeeping/
> and http://somwhere.com/app1/timekeeping will take you to the same
> place.  However, depending which one is used the client URL is
> different.
> 
> When I attempt to reference pictures that are in the app 
> base, graphics
> directory  I'm also running into a snafu.
> 
> If I set the URL as '../graphics/g1.jpg' then it works most of the
> time.  But I can't always guarantee how many directories levels will
> exist on the client URL since I'm doing all kinds of server-side
> forwarding.  I would like to be able to use the '/graphics/g1.jpg' but
> that only works when the app is redeployed at ROOT.
> 
> So I've decided that I'll just start setting my <BASE > in the jsp and
> set the value in my control servlet so that when the page is called it
> can use a <BASE href="<%=base.toString()%>" > .  Now I'm running into
> all kinds of issues.
> 
> Essentially, in my mind, tomcat should know that my host name is X and
> that my web-app context is Y and that a valid URL to my base 
> context is
> http://X/Y/  However, no manipulation of the ServletContext or
> ServletContextConfig is getting me this information.
> 
> The request object has the URL used to get to the servlet, but that's
> rather cloogey to me.  Plus there's the chance that's simply wrong and
> has gotten to my servlet via mappings.  Setting a document 
> base based on
> that is not very reliable.  So if anyone has solved this 
> problem or got
> information on keeping a web-app portable with relative URL's, let me
> know.
> 
> Thanks.
> 
> ______________________________________________________________
> _____________
> To unsubscribe, send email to [email protected] and 
> include in the body
> of the message "signoff SERVLET-INTEREST".
> 
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: 
> http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> 

___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.