如何将基于JavaScript的模板导入Java EE Eclipse?

huangapple go评论76阅读模式
英文:

How to import javascript based template into Java EE eclipse?

问题

I am a java developer and currently learning servlets. 我是一名Java开发者,目前正在学习Servlets。
I have downloaded a html template from colorlib and its hosted on my github. 我从colorlib下载了一个HTML模板,它托管在我的GitHub上。
That template contains javascript, html, bootstrap etc. 该模板包含JavaScript、HTML、Bootstrap等内容。
To handle registration and other work I want to use servlets. 为了处理注册和其他工作,我想要使用Servlets。
I tried to import project in Eclipse(Java EE edition). 我尝试在Eclipse(Java EE版)中导入项目。
Steps I did are 我所做的步骤如下:

  1. Went to File>Import>Project from GIT (not smart import, just simple one). 转到文件>导入>从GIT导入项目(不是智能导入,只是简单导入)。
  2. Then I choose clone URI, entered the required details like URI, repository path, authentication details etc. 然后我选择克隆URI,输入所需的详细信息,如URI、存储库路径、身份验证详细信息等。
  3. Now in new Window its asking me to choose a project, now I want guidance for further steps. 现在在新窗口中,它要求我选择一个项目,现在我想要进一步的指导。
    Which project type should I choose? 我应该选择哪种项目类型?

After choosing project type what name should I put inside project name as I am entering any name I am getting an error. 选择项目类型后,我应该在项目名称中输入什么名称,因为我输入任何名称都会出现错误。

> Error connecting project project_name, no Git repositories found. 错误连接项目项目名称,找不到Git存储库。

Thanks in advance!! 提前感谢!
P.S The server I am using is Tomcat 8.5 on localhost. 注:我正在使用的服务器是Tomcat 8.5在本地主机上。

英文:

hope you having a good day.
I am a java developer and currently learning servlets. I have downloaded a html template from colorlib and its hosted on my github. That template contains javascript, html, bootstrap etc.
To handle registration and other work I want to use servlets. I tried to import project in Eclipse(Java EE edition).
Steps I did are

  1. Went to File>Import>Project from GIT (not smart import, just simple one).
  2. Then I choose clone URI, entered the required details like URI, repository path, authentication details etc
  3. Now in new Window its asking me to choose a project, now I want guidance for futher steps.
    Which project type should I choose?

如何将基于JavaScript的模板导入Java EE Eclipse?

After choosing project type what name should I put inside project name as I am entering any name I am getting an error

> Error connecting project project_name, no Git repositories found

如何将基于JavaScript的模板导入Java EE Eclipse?

Thanks in advance!!

P.S The server I am using is Tomcat 8.5 on localhost.

答案1

得分: 0

导入项目使用智能Git导入。

步骤1
打开您的Java项目。

步骤2
右键单击您的项目 -> 属性

步骤3
从左侧菜单中点击“项目结构”,然后点击转换为结构化表单...

属性 - 点击项目结构

步骤4
点击动态Web项目Java

步骤5
点击应用和确定。

步骤6
点击“进一步可用配置...”链接。
选择您希望存储.html和.jsp文件的位置。
勾选生成web.xml

您的项目现在应该已转换为动态Web项目。

英文:

Import project using smart git import.

Step-1
Open your Java Project.

Step-2
Right Click on Your project -> Properties

Step-3
Click on “Project Facets” from left menu. Click on Convert to faceted form...

Properties - Click Project Facets

Step-4
Click Dynamic Web Project and Java.

Step-5
Click Apply and Ok.

Step-6
Clicks on the “further configuration available…” link.
Choose location where you want to store your .html, .jsp files.
Check generate web.xml

Your project should be converted to Dynamic Web Project now.

huangapple
  • 本文由 发表于 2020年8月12日 20:50:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/63376900.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定