Do not load me the Bootstrap styles

1

good morning,

I have an HTML template that uses bootstrap, but I do not load the styles I'm using NetBeans 8 and the App Engine server. So I am creating the references:

<link href="../src/java/font-awesome/font-awesome.css" rel="stylesheet" type="text/css"/>
<link href="../src/java/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="../src/java/css/animate.css" rel="stylesheet" type="text/css"/>
<link href="../src/java/css/style.css" rel="stylesheet" type="text/css"/>

Files are found on those routes.

This is the error I get:

 [java] dic 19, 2017 10:57:32 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet
 [java] ADVERTENCIA: No file found for: /src/java/font-awesome/font-awesome.css
 [java] dic 19, 2017 10:57:32 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet
 [java] ADVERTENCIA: No file found for: /src/java/css/bootstrap.min.css
 [java] dic 19, 2017 10:57:32 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet
 [java] ADVERTENCIA: No file found for: /src/java/css/style.css
 [java] dic 19, 2017 10:57:32 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet
 [java] ADVERTENCIA: No file found for: /src/java/css/animate.css

Someone knows what may be happening, problem with the App Engine server.

    
asked by afar1793 19.12.2017 в 16:48
source

2 answers

2

I assume you're making an application and you use Maven (or maybe Gradle) to build it:

The / src / java folder is where the Java source code should be, only .java files. Maven will compile those files and dump the results (with .class extension) to WEB-INF / classes, which will not be accessible from outside the server.

The / src / resources folder is where the "static" resources of the application should be, but which are private. These are also copied to WEB-INF / classes and are usually .properties or spring-context.xml files, for example.

The / src / webapp folder is where you should put your CSS, HTML, JSP or Javascript files. The route will be the root of your application. Therefore, if you put something in / src / webapp / css, the browser can access with the URL type / css

You can see the details here

    
answered by 19.12.2017 в 18:10
0

When working on an App Engine project, web resources should be located within the webapp folder. The src / java folder is dedicated to the Java source code.

    
answered by 23.07.2018 в 20:52