Don't keep your CSS or JavaScript files inside the WEB-INF directory. According to this StackOverflow thread, "WEB-INF resources are accessible to the resource loader of your Web-Application and not directly visible to the public".

Instead of that create your project files structure like below,

Later your can use/refer your CSS files like below.

<!DOCTYPE html>
<html > 
  <head> 
    <meta charset="UTF-8"> 
    <title>Tennis</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
  </head> 
  <body>
  ...
  </body>
</html>
Answer from Shashanth on Stack Overflow
🌐
Stack Overflow
stackoverflow.com › questions › 17760812 › how-to-use-html-and-or-css-styles-in-netbeans-servlet-jsp-project
java - How to use html and/or css styles in NetBeans servlet/jsp project? - Stack Overflow
I am afraid, that server doesnot get, that there is some html and jsp file loaded from some reason, because mentioned redirection to jsp works and to html doesn't, although they are in same location and they have same name (without sufix). 2013-07-20T10:20:53.52Z+00:00 ... I had similar issues when I started trying to figure this stuff out with netbeans haha - I hope the edits help! if the most recent do not, I'm afraid I may have wasted your time and sincerely apologize! I went into netbeans and made a new web-project and added a simple css file to change the background color.
🌐
YouTube
youtube.com › watch
linking css in JSP page - YouTube
Creating JSP Application with netbeans
Published   April 17, 2017
🌐
BlogsOfRaghs
blogsofraghs.wordpress.com › 2007 › 07 › 25 › referring-the-css-files-for-webpages-inside-netbeans-ide
referring the css files for webpages inside Netbeans IDE | BlogsOfRaghs
July 25, 2007 - Is this a bug in Netbeans? Yet to find out that 🙂 · But somehow found this to get the css effects on pages with an overhead towards portability! If at all, i need to take the .war file and place it normal Tomcat itself, i may need to change the reference to the .css files referred everywhere right. Just to avoid that , i have made one common .jsp file where i have put this .css reference in <link> element and included this .jsp file in all the other .jsp files through include directive!
🌐
Oracle
docs.oracle.com › javafx › 2 › get_started › css.htm
Getting Started with JavaFX: Fancy Forms with JavaFX CSS | JavaFX 2 Tutorials and Documentation
In the NetBeans IDE Projects window, expand the Login project node and then the Source Packages directory node. Right-click the login folder under the Source Packages directory and choose New, then Other. In the New File dialog box, choose Other, then Cascading Style Sheet, and click Next.
🌐
Apache NetBeans
netbeans.apache.org › tutorial › main › kb › docs › javaee › ecommerce › page-views-controller
The NetBeans E-commerce Tutorial - Preparing the Page Views and Controller Servlet
Repeat steps 1 - 4 above to create the remaining cart.jsp, checkout.jsp, confirmation.jsp pages. When you finish, your Projects window will look as follows: Figure 2. Views are contained in the 'WEB-INF/view/' folder · Create a CSS file to contain all styles specific to the application.
🌐
YouTube
youtube.com › nextlvlprogramming
How To Add CSS File In NetBeans? - Next LVL Programming - YouTube
How To Add CSS File In NetBeans? In this video, we will walk you through the process of adding a CSS file to your project in NetBeans. Understanding how to p...
Published   March 22, 2025
Views   4
🌐
Quora
quora.com › How-do-I-link-HTML-with-CSS-using-NetBeans
How to link HTML with CSS using NetBeans - Quora
Answer: This is done the same, irrespective of the IDE being used. Depending on the number of stylesheets you’re using, it’s just a single HTML line (by convention, it should go in the You’re linking the stylesheet, as you said, so do this: [code]
Find elsewhere
🌐
CopyProgramming
copyprogramming.com › howto › how-to-apply-external-html-or-css-templating-to-jsp-pages-netbeans
Java: Applying HTML or CSS templates externally to JSP pages using NetBeans: A Guide
March 29, 2023 - To edit these files, I am using ... server. To access the style.css file located in /resources/static/css/style.css through thymeleaf, add it to the html head section....
🌐
Stack Overflow
stackoverflow.com › questions › 21522491 › css-using-with-java-application-in-netbeans
CSS using with java application in NetBeans - Stack Overflow
i build an desktop application java using NetBeans IDE 7.4 ,add CSS file from file->new file->other->Cascading Style Sheet . iam write a css : JPanel{ background: red ; } but there is no effect on
🌐
YouTube
youtube.com › maxsoas concept
How to link CSS File to HTML,PHP USING NETBEANS - YouTube
How to links CSS to HTML, PHP File
Published   August 4, 2017
Views   24K
🌐
Stack Overflow
stackoverflow.com › questions › 21340823 › how-to-apply-external-html-or-css-templating-to-jsp-pages-netbeans
java - How to apply external HTML or CSS templating to jsp pages (NetBeans) - Stack Overflow
January 24, 2014 - you can either put CSS code directly in your JSP, or link to it, as usual, the real difference is where to put resources, and how to link to theme, I refer you to this page https://stackoverflow.com/a/14571407/1951298 for external HTML file, ...
🌐
tutorialpedia
tutorialpedia.org › blog › add-html-javascript-and-css-to-netbeans
Adding HTML, JavaScript, and CSS to NetBeans — tutorialpedia.org
NetBeans is a popular integrated development environment (IDE) that provides a wide - range of features to support web development. When working on web projects, it is common to use HTML for structuring the web page, CSS for styling, and JavaScript for adding interactivity. This blog will guide you through the process of adding and working with HTML, JavaScript, and CSS files in NetBeans, covering fundamental concepts, usage methods, common practices, and best practices.
🌐
Medium
medium.com › @raaechelb › sass-installing-on-netbeans-and-getting-started-2b5ce99d985c
Sass: Installing on NetBeans and Getting Started | by Rachel Bautista | Medium
January 27, 2017 - Next you wanna open up your NetBeans and create a new web project. Once you have created your new project, add a folder under the Web Pages folder and name it css. Add another folder under the Web Pages folder and name it scss.
🌐
YouTube
youtube.com › nextlvlprogramming
How To Create CSS File In NetBeans? - Next LVL Programming - YouTube
How To Create CSS File In NetBeans? Are you ready to take your web development skills to the next level? In this video, we guide you through the process of c...
Published   March 29, 2025
Views   0