3
3

More than 5 years have passed since last update.

JSPでコンテキストパスを取得する方法

Posted at

これ以外でいい方法はやはりないのだろうか…(長い)

<s:property value="#request['javax.servlet.forward.context_path']"/>

例えばインポートするCSS定義は次のようになります。

<link rel="stylesheet" type="text/css" 
  href="<s:property value="#request['javax.servlet.forward.context_path']"/>/css/common.css">
3
3
5

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3