Add framework support idea нет web application

Обновлено: 04.07.2024

Я открыл файл проекта Maven pom.xml, который описывает проект, создающий файл WAR.

Я хочу включить поддержку веб-приложений в надежде, что это поможет мне отредактировать JSPs.

Я следую инструкциям здесь , но у меня нет опции "Web Application". Вместо этого я вижу это:

enter image description here

Что я делаю не так?

1 ответ

Я использую Grails 3.1.7 с IntelliJ IDEA Ultimate 2016.1. В проекте несколько пользовательских taglibs. Теги работают так, как и ожидалось, но редактор представлений показывает ошибку при каждом использовании тегов: Есть ли способ настроить IntelliJ и / или Grails, чтобы это было правильно.

Я нахожусь на Ubuntu 14.04.4 LTS. Я только что установил Intellij IDEA 2016.1.3 и был разочарован тем, как отображаются мои обычные шрифты (Dialog - for dialog windows и Monospaced for editor). Они похожи на совершенно разные шрифты в этой новой версии. Это очень расстраивает, и мне пришлось.

Мне пришлось включить плагин "Java EE: EJB, JPA, Servlets". Я включил поддержку JSP, думая, что это включит все, что мне нужно для поддержки JSP - явно нет. Раздражающий

Похожие вопросы:

Я пытаюсь создать новый проект Maven, используя IntelliJ IDEA 2016.1. Я после поддерживает страницу справки Для справки. После шага 1 я нажимаю на File -> New -> Module , и мне показывают.

Начиная с IntelliJ IDEA 2016.1 , IDEA автоматически создает IntelliJ модулей из Gradle SourceSets ( ссылка ). хотя я признаю, что это был важный шаг вперед по многим причинам, это также является.

Я пытаюсь создать веб-проект JEE spring (+spring security, mvc, web flow), и это будет проект maven с IntelliJ IDE. Я пытался : 1) создайте проект как Spring, 2) дополнительные библиотеки и.

Я использую Grails 3.1.7 с IntelliJ IDEA Ultimate 2016.1. В проекте несколько пользовательских taglibs. Теги работают так, как и ожидалось, но редактор представлений показывает ошибку при каждом.

Я нахожусь на Ubuntu 14.04.4 LTS. Я только что установил Intellij IDEA 2016.1.3 и был разочарован тем, как отображаются мои обычные шрифты (Dialog - for dialog windows и Monospaced for editor). Они.

Я кодирую Android приложений, серверный код Python и использую фреймворк Spring. У меня есть студенческая лицензия на JetBrains. Мне нравится, когда все организовано, поэтому я должен использовать.

Я скачал Ultimate intelliJ на Linux, но не могу выбрать Java Entreprise при запуске проекта. Что я упускаю?

Я обновил свою IntelliJ IDEA Ultimate до версии 2016.2. У меня был проект Grails 3, и теперь, когда я открываю IDE, я получаю следующую ошибку при попытке запустить свой проект: Error running.

У меня небольшая проблема. Я скачал IntelliJ IDEA Ultimate для Java Web. Следующий мой шаг-загрузить и установить сервер TomCat . В учебниках они идут Run/Debug Configuration , нажимают add и.

У меня есть IntelliJ IDEA Ultimate Edition, и я хотел бы знать, можно ли закрыть окно, чтобы найти, я нигде не вижу кнопки закрытия

Knowledge required to understand the article: You've already more or less figured out Java Core and would like to look at JavaEE technologies and web programming. It would make the most sense for you to be currently studying the Java Collections quest, which deals with topics close to the article.

Creating the simplest web project in IntelliJ IDEA Enterprise. Step by step, with pictures - 1

Currently, I use IntelliJ IDEA Enterprise Edition (editor's note: this is a paid extended version of the IDE; it is usually used in professional development). It's much easier to work with web projects in it than in the free Community Edition. In the Enterprise Edition, literally one click of the mouse builds the project, drops it into a servlet container, starts the server, and even opens a webpage for the project in the browser. In the free version of IDEA, you would have to do much of this on your own, i.e. "manually". I use Apache Maven to build the project and manage its life cycle. I only used a small part of its capabilities (package/dependency management) in this project. As the servlet container/application server, I chose Apache Tomcat version 9.0.12.

Let's get started

Our project's structure

  • an .idea directory, which contains the current project's IDEA settings;
  • a src directory, where we create our source code;
  • a my-super-project.iml file, which is a project file created by IDEA;
  • the pom.xml file (the Maven project file that I mentioned earlier), which is now open. If I mention pom.xml somewhere, this is the file I'm talking about.
  • main — for our code;
  • test — for tests of our code.

Transforming it into a web project

A little bit about static and dynamic content

Static content is content that doesn't change over time. Everything that we write in an HTML file is displayed unchanged, just as it is written. If we write "hello world", this text will be displayed as soon as we open the page, and in 5 minutes, and tomorrow, and in a week, and in a year. It will not change. But what if we want to display the current date on the page? If we just write "October 27, 2017", then tomorrow we would see the same date, and a week later, and a year later. But we would like the date to be current. This is where the ability to execute code right on the page is helpful. We can get a date object, convert it to the desired format, and display it on the page. Then, each day when we open the page, the date will always be current. If we only need static content, then we just need a regular web server and HTML files. We don't need Java, Maven, or Tomcat. But if we want to use dynamic content, then we need all of those tools. But for now, let's return to our index.jsp .

Let's indicate something other than the standard title, for example, "My super web app!" Then, in the body, let's write "I'm alive!" We're almost ready to start our project! Unfortunately, the usual green triangle for starting the program is not active. Click on the button to the left of it (indicated on the screen with a red arrow) and select Edit configurations . That opens a window where we are invited to click on a green plus sign to add some configuration. Click on it (in the upper left corner of the window). Choose Tomcat Server > Local . A window with a lot of options will open, but the defaults suit us for almost everything. We can give our configuration a pretty name instead of the standard Unnamed (at the very top). We also need to verify that IDEA has successfully found Tomcat on our system (you've already downloaded and installed it, right?). If it wasn't found (which is unlikely), then press the down arrow and choose where it is installed. Or choose a different version, if you have more than one installed. I only have one and it's already installed. That's why it looks the way it does on my screen. And at the very bottom of the window, we see a warning, alerting us that so far no artifacts have been indicated for deployment to the server. To the right of this warning is a button suggesting we fix this. We click it and see that IDEA was able to find everything by itself, created everything that was missing by itself, and configured all the settings by itself. We can see that it moved us from the Server tab to the Deployment tab, under the Deploy at the server startup section, and we now have an artifact to be deployed. Click Apply and OK. And we first see that at the bottom of the window, a section has appeared with our local Tomcat server, where our artifact will be placed. Collapse this section by clicking the corresponding button on the right side of the window. Now we see that the green launch triangle is active. For those who like to double check everything, you can click on the project settings button (to the right of the launch buttons, indicated with a red arrow), go to the Artifacts section, and make sure that the artifact was really created. It wasn't there until we pressed that Fix button, but now everything is OK. And this configuration suits us perfectly. In a nutshell, the difference between my-super-project:war and my-super-project:war exploded is that my-super-project:war consists of only one war file (which is just an archive) and the version with exploded is simply the "unpacked" war . And personally, that's the option I find more convenient, because it lets you quickly debug minor changes on the server. In essence, the artifact is our project, just compiled—and where with a folder structure has been changed to allow Tomcat to access it directly. It will look something like this:

Creating the simplest web project in IntelliJ IDEA Enterprise. Step by step, with pictures - 17

Now everything is ready to launch our project. Press the precious green launch button and enjoy the result! :)

Читайте также: