2015-07-19 22:49 GMT+03:00 Hartmut Honisch <hartmut.honi...@gmail.com>:
> Hi everyone,
>
> I'm using Tomcat's parallel deployment feature, and I wonder whether
> there's a way to request a specific version of my webapp.
>
> Let's say I have a WAR named myapp##001.war deployed on my server and just
> deployed a new WAR myapp##002.war.
> Requests to http:/myserver/myapp/.. are transparently mapped by Tomcat to
> version 001 for existing sessions and to version 002 for new sessions.
>
> Is there a way to explicitly request version 001, like
> http://myserver/myapp##001/...? That specific syntax obviously doesn't
> work, otherwise I wouldn't be asking :)

No.

Routing (mapping) is based on session identifier. If you can supply a
valid session identifier (cookie) for an older version of web
application, you will be routed to the old version. Otherwise, you get
the latest version of the web application.

> BTW: The reason I'm asking is because that transparent shift from one app
> release to the next doesn't play along well with any caches (browser,
> caching proxies, CDNs etc.):
> When a shift to the next app release occurs, I generally need the client
> browsers to fetch a fresh copy of all files belonging to that release. And
> the only way to force them to do that is by having them use a different URL
> than for the old app release files..
>
> So my idea is to have the browser make an initial request to
> http://myserver/myapp/redir.do, when launching the app, which
> instantaneously redirects to the actual release-specifc URL
> http://myserver/myapp##00x/... , thereby having the browser use
> release-specific URLs for all application files.

http://www.w3.org/Provider/Style/URI.html
Cool URIs don't change

If you need to force reload of a script of a css, a usual trick is to
append a query (with some app version token calculated at build time)
to the file path. I mean, the path to CSS / JS file in HTML text
produced by your web application.

There may be also some other schemes to embed version token in path to
those files and use RewriteValve or similar solution to strip away the
version token.

http://tomcat.apache.org/tomcat-8.0-doc/rewrite.html

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to