如何在Eclipse中将Bootstrap Web应用程序导入Google Web应用程序(How to import a Bootstrap Web Application into a Google Web Application in Eclipse)

我在Eclipse中设置了一个Google Web应用程序,它连接到与Java Servlet连接的Google App Engine后端(使用数据存储来存储信息)。

我还有一个包含HTML,CSS和javascript文件的现有Bootstrap Web应用程序。 我想知道是否有任何方法可以将此现有项目导入我的Google Web App,如果是这样,我在哪里放这些文件? 这是我在Eclipse中的Google Web App的布局。

我知道对于动态Web项目,这些文件会进入“Web内容”,但Google Web应用程序不存在此文件。

I have a Google Web Application set up in Eclipse and it is connected to a Google App Engine back-end (using datastore to store information) connected with a Java Servlet.

I also have an existing Bootstrap Web Application that contains HTML, CSS, and javascript files. I was wondering if there is any way to import this existing project into my Google Web App and if so, where do I put these files? This is the layout of my Google Web App in Eclipse..

I know that for a Dynamic web project these files go into "Web Content" but this file does not exist for Google Web Applications.

最满意答案

Java EE Web模块的顶级目录被视为应用程序的文档根目录。 文档根目录是存储JSP页面,客户端类和归档以及静态Web资源(如HTML / CSS / JS文件)的位置。

因此将这些文件放入war目录或任何子目录(例如静态)。

但是, 不要将它们放入WEB-INF目录中 。 它是Web应用程序的私有区域,WEB-INF目录下的所有文件都无法从外部访问(例如浏览器)。

The top-level directory of a Java EE web module is considered the document root of the application. The document root is where JSP pages, client-side classes and archives, and static web resources, such as HTML/CSS/JS files, are stored.

Hence put such files into your war directory or any subdirectory (e.g. static).

However, do not put them into WEB-INF directory. It is a private area of the web application and all files under WEB-INF directory are not accessible from outside (e.g. browser).

更多推荐