Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the entry-level development of JavaScript web web pages

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "how to understand JavaScript web page entry-level development", the explanation content in the article is simple and clear, easy to learn and understand, please follow the idea of Xiaobian slowly in-depth, together to study and learn "how to understand JavaScript web page entry-level development"!

I. Foreword

We learn about the web in advance, so we come to know this strange thing.

My idea is the Chinese version, but the difference is not big.

Step 1: First create a new project, follow the diagram

Step 2: Choose an arbitrary name, and then draw a diagram.

Step 3: This will pop up when you create a new project in the project, and a new window will pop up for suggestions.

Step 4: Click on the icon

Step 5: Notice that the circles are the same

Step 6: These two names are arbitrary

Step 7: Follow the diagram

Step 8: Just click to finish

Step 9: as shown in the figure

Step 10: Click the small triangle on the left of hello in turn, then click the small triangle of src, click on all the small triangles you see in turn, and find

The module name you just created, here I created hello.

Step 11: right-click hello, mouse move to new there, there are many, click left click package can be

Step 12: Hello is all generated by ourselves, we only need to add a controller

After the package is built, we have to configure the environment. Idea itself does not support jsp, but in order to learn the principles,

From the simple jsp we learn some of the principle things we need later, so we need to use jsp,

So we need to learn a jsp language. Idea itself does not support this language, so if we want to use jsp, we must import

Dependency.

Step 13: Right-click in main as shown in the figure

Step 14: Enter webapp and click Enter

Step 15: Under webapp, follow the operation as shown in the figure

Step 16: Enter WEB-INF in this directory

Step 17: Continue to right-click the newly created WEB-INF and press the icon

Step 18: Enter views

There is no jsp file we want under views, which means we haven't imported dependencies yet, before importing dependencies

We need to determine where the root directory is first.

Step 19: To find out where the root directory is, simply click on the file as shown, click on the project structure

Step 20: As shown in the figure, you don't have to panic, just click according to my mark number.

After setting this as the root directory, we can put all the jsp files in it and call him.

Step 21: After completing the above step, there will be a jsp file under views, click on it, as shown in the figure

Step 22: Pick a name, I'll call it a1, enter

Step 23: I draw red circle is casually written, there is no requirement for content, this is the page will be displayed later

Step 24: After completing the above step, double-click the part marked with red lines, and something on the right will appear. It doesn't matter what it is.

Step 25: To import the dependency of jsp, simply copy all of this code as shown in the figure

javax.servlet javax.servlet-api javax.servlet jstl org.springframework.boot spring-boot-starter-tomcat org.apache.tomcat.embed tomcat-embed-jasper

Copy the above code to the position shown below, between these two words, usually lines 18-19

Step 26: When you copy between these two words by pressing ctrl+v, the two words in the lower right corner will appear. In this case, we just need to choose the right.

Draw circles, automatic import is more convenient and quick

Step 27: After copying, click Edit Configuration

Step 28: Click on the icon

Select the third folder under the working directory, indicating that this folder is a module, and you can also see that there is a module

English words.

Step 29: click on the small triangle on the left from src until you find the conterller, right click, as shown in the figure,

Create a Demo class

Step 30: Enter @Con to complete package names and things like that

After completion, as shown in the figure:

This controller is equivalent to a controller. The controller is that all programs must go through this controller at the beginning. Controller.

is to process and receive data.

Step 31: Enter @Re at the position shown (Enter will be completed automatically)

After completion, as shown in the figure:

Step 32: Complete the rest according to the diagram.

where @RequestMapping indicates where from, and ("/") indicates from the current directory, return "a1", this is to be and

The jsp you started before should be consistent.

Step 33: Click Step 2 as shown in the figure to see the right.

Step 34: Copy the following code segment to the right

spring.mvc.view.prefix = /WEB-INF/views/spring.mvc.view.suffix = .jsp

Copy completed as shown in the figure:

Step 35: Click as shown to run

After running, you will see the figure below, indicating that the operation is successful.

Sometimes we get this picture:

Don't panic. In this case, the interface is occupied. To put it bluntly, if you use it before but don't turn it off, it will be like this.

It is also very easy to solve, just need to change 8080 to other numbers (arbitrary)

Step 36: We just need to search localhost:8081 on Baidu, as shown in the figure

And the sentence we typed earlier appears.

Thank you for reading, the above is "how to understand JavaScript web page entry-level development" content, after the study of this article, I believe that we have a deeper understanding of how to understand JavaScript web page entry-level development, the specific use of the situation also needs to be verified. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 201

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report