Reputation: 144
Hi how can i include an external style sheet link in to my Struts2 jsp page.
here is my code.
<link href="css/style_inner.css" rel="stylesheet" type="text/css" />
Upvotes: 1
Views: 6176
Reputation: 87
Try this
<link href="<%=request.getContextPath()%>/css/alert-messages.css" rel="stylesheet" type="text/css">
Upvotes: 0
Reputation: 81
i was facing the same issue now i got fixed, see my code
<link href="../css/style_inner.css" rel="stylesheet" type="text/css" />
Upvotes: 0
Reputation: 24396
Using <s:url>
tag
<link rel="stylesheet" type="text/css" href="<s:url value="/css/style.css"/>">
Upvotes: 3
Reputation: 10017
try:
<link href="${pageContext.request.contextPath}/css/style_inner.css" rel="stylesheet" type="text/css"/>
${pageContext.request.contextPath}
points to your application root.
Upvotes: 8
Reputation: 1057
Like you did. And with your code you need to find the .css file under your webapp directory, on a directory named "css".
Upvotes: 0