Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [skalli-dev] Submitted bug 343937: Using a web context path other that "/" does not work

Hi Jochen,

indeed, that hasn't been adressed yet, thanks for looking into this. I'd also go for a helper method, as having it only in a single place makes it easier if for whatever reason we have to change the mechanism later on. The Const class was introduced for the same reason, plus it's easier to find out where the links are used.

Simon


2011/4/27 Jochen Hiller <jo.hiller@xxxxxxxxxxxxxx>
Hi all,


I am using Skalli in an environment, where the web context path is not the root, but using a path like "/p" instead.

There is a lot of code, where it will be assumed that linking to servlets, JSPs, images, stylesheets etc. are located at "/".

I am just wondering what would be the best fix for it: a simple way would be to get the context path via

  request.getContextPath()

and prefix it in all code pieces where URIs will be generated.

Another option could be to add a helper method to ViewBundleUtil.java (http://git.eclipse.org/c/skalli/org.eclipse.skalli.git/tree/org.eclipse.skalli.view/src/main/java/org/eclipse/skalli/view/internal/ViewBundleUtil.java) to get a path for specific locations, e.g. VAADIN themes.

URLs to be called are implemented in org.eclipse.skalli.common.Consts. Probably we should provide a helper methods to make an URL based on the Consts too.


Any ideas about the best solution? I would be happy to contribute a patch which fixes the use of context paths.


Bye, Jochen

_______________________________________________
skalli-dev mailing list
skalli-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/skalli-dev



Back to the top