Using Eclipse - Dynamic Web Project. I am basically showing page "Home.jsp" via this code in servlet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
request.getRequestDispatcher("/WEB-INF/Home.jsp").forward(request, response);
}
But styles are not applied this way like they are when directly showing page via url (or just opening html file directly in file system). Is there some way how to apply them in doGet method (or somewhere else) ?
jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>System</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<button type="button" class="homebutt">Concerts</button>
<button type="button" class="loginbutt">Login</button>
<button type="button" class="registrationbutt">Registration</button>
<hr>
<div>
<select id="artistcombo">
<option value="">Artist:</option>
</select>
<select id="countrycombo">
<option value="">Country:</option>
</select>
<select id="genrecombo">
<option value="">Genre:</option>
</select>
</div>
<hr>
</body>
</html>
css:
button
{
font-family: Helvetica, sans-serif;
}
button.homebutt
{
font-size: 30px;
text-align: left;
background: none;
border: none;
color: indigo;
}
button.loginbutt
{
color: black;
background: none;
border: none;
font-size: 24px;
float: right;
text-align: right;
}
button.registrationbutt
{
color: black;
background: none;
border: none;
font-size: 24px;
float: right;
text-align: right;
}