JMohasin
JMohasin

Reputation: 533

How to get base url in struts2

I am using struts2 framework & in struts1 we use to point it from base url

<html:rewrite page='/stylesheets/m.css'/>

Please tell me how to do the same in sturts2

Upvotes: 1

Views: 3239

Answers (1)

MohanaRao SV
MohanaRao SV

Reputation: 1125

As @Quaternion commented

<link rel="stylesheet" href="<s:url value="/stylesheets/m.css"/>" />

<link rel="stylesheet" href="${pageContext.request.contextPath}/stylesheets/m.css" type="text/css">

Strut2 UrlTag

Upvotes: 2

Related Questions