[Spring] shopping mall Create (1) / Bootstrap / webapp and web-INF folders

0719 Now I’m going to build a shopping mall, but I expect it to be a pretty long series… but I’ll still learn a lot of functions! 1. Data linkage 2. Understand the characteristics of directory folders and put files in appropriate locations 3. Share administrator/user functions while creating a shopping mall 0719 Now I’m going to build a shopping mall, but I expect it to be a pretty long series… but I’ll still learn a lot of functions! 1. Data linkage 2. Understand the characteristics of directory folders and put files in appropriate locations 3. Share administrator/user functions while creating a shopping mall

 

Link data to data-only views – Web server OR remote data link provided by public data portal or – data itself link (local, remote) Link data to data-only views – Web server OR remote data link provided by public data portal or – data itself link (local, remote)

If I do this, can I access it? http://localhost:8888/WEB-INF/views/home.jsp Now, if I do this, will I be able to access and get in well? The answer is X. WEB-INF is a security folder, so you can’t access it that much from the outside. You can only access (server program) on the server! If I do this, can I access it? http://localhost:8888/WEB-INF/views/home.jsp Now, if I do this, will I be able to access and get in well? The answer is X. WEB-INF is a security folder, so you can’t access it that much from the outside. You can only access (server program) on the server!

Let’s look at other folders. webapp > Put static resources other than jsp in the resources folder. (ex.Image, CSS, HTML, js file)webapp > Where class comes to the java folder. From now on, the jsp file will be webapp Enter the > WEB-INF > views folder. = Use views as the root folder. = You don’t need to specify the views part!! Let’s look at other folders. webapp > Put static resources other than jsp in the resources folder. (ex.Image, CSS, HTML, js file)webapp > Where class comes to the java folder. From now on, the jsp file will be webapp Enter the > WEB-INF > views folder. = Use views as the root folder. = You don’t need to specify the views part!!

Oh, and!! Due to Spring Legacy Spring Legacy, the Java version is very low at 1.6. Upgrade to 1.8 or higher. =You can fix it and use it Oh, and!! Due to Spring Legacy Spring Legacy, the Java version is very low at 1.6. Upgrade to 1.8 or higher. =You can fix it and use it

 

 

We’re going to use the static resources that we have here to create the static resources that we have here

Move it here! As it says above, webapp > resources Move here! Webapp as written above > resources

As shown in servlet-context.xml, static resources can be accessed by “/resources/+ desired filename”, so to access index.html in resources, enter http://localhost:8888/resources/index.html. As shown in servlet-context.xml, static resources can be accessed by “/resources/+ desired filename”, so to access index.html in resources, enter http://localhost:8888/resources/index.html.

Verified that it floats well. From now on, I will not use html very much (as you can think of it as a preview) and will develop it only with jsp. Bootstrap will also be used in the future. Bootstrap has all the design codes installed, which can shorten development time and improve efficiency by using it. It is very good(?) Korean is strange What is Bootstrap? Think of it as a reactive web template, a library. That is, the CSS framework. Verified that it floats well. From now on, I will not use html very much (as you can think of it as a preview) and will develop it only with jsp. Bootstrap will also be used in the future. Bootstrap has all the design codes installed, which can shorten development time and improve efficiency by using it. It is very good(?) Korean is strange What is Bootstrap? Think of it as a reactive web template, a library. That is, the CSS framework.

In shopping malls, AdminLTE will be used because almost 80% of the administrator modes allow product registration and management. AdminLTE is actually a solution for developing administrator modes made from bootstrap. In shopping malls, AdminLTE will be used because almost 80% of the administrator modes allow product registration and management. AdminLTE is actually a solution for developing administrator modes made from bootstrap.

When you enter the top page and press the DOWNLOAD button, you will be transferred to the gihab page. When you enter the top page and press the DOWNLOAD button, you will be transferred to the gihab page.

Scroll down to download the zip file of the source code attached to the 3.1.0 statement. When I uncompressed the downloaded compressed file and tried to put all the files in the Copy Resources folder, I almost collided with the resources on the user page that I had already created. In that sense, create a new folder for users and administrators one by one in eclipse. Scroll down to download the zip file of the source code attached to the 3.1.0 statement. When I uncompressed the downloaded compressed file and tried to put all the files in the Copy Resources folder, I almost collided with the resources on the user page that I had already created. In that sense, create a new folder for users and administrators one by one in eclipse.

The names should be client and admin, respectively. Move the resources from the existing user page into the client folder, copy the resources you just received, and put them in the admin folder. The names should be client and admin, respectively. Move the resources from the existing user page into the client folder, copy the resources you just received, and put them in the admin folder.

Now, let’s check if index.html (adminLTE) in the Admin folder is displayed well. This is an html file after creating a subfolder in the resources folder, so don’t forget to put it in the directory. Now, let’s check if index.html (adminLTE) in the Admin folder is displayed well. This is an html file after creating a subfolder in the resources folder, so don’t forget to put it in the directory.

Make sure it’s coming out well! Make sure it’s coming out well!

 

Connect to DD (web.xml) and exit Servlet setting to see why the color is displayed like this. Here, after completing the setup by adding both client and admin, copy and paste servlet-context.xml of appServlet in the web-INF to make admin-context.xml. Connect to DD (web.xml) and exit Servlet setting to see why the color is displayed like this. Here, after completing the setup by adding both client and admin, copy and paste servlet-context.xml of appServlet in the web-INF to make admin-context.xml.

Change the original package name, ctrl c+v for client, and then admin. Then it will be com.koreait.controller.admin, right? Change the middle class from HomeController.java to AdminController and ClientController.java! Change the original package name, ctrl c+v for client, and then admin. Then it will be com.koreait.controller.admin, right? Change the middle class from HomeController.java to AdminController and ClientController.java!

It leaves only the necessary content from the original content, and adds model.addAttribute to show that the administrator is being called. And the semicircular type is WEB-INF > views >Return “admin_result” to admin_result.jsp (because it is a .jsp file in the web-INF/views/folder, as set in servlet_context.xml) and the ClientClientController is also matched in the above way, and the return is called “home”. It leaves only the necessary content from the original content, and adds model.addAttribute to show that the administrator is being called. And the semicircular type is WEB-INF > views >Return “admin_result” to admin_result.jsp (because it is a .jsp file in the web-INF/views/folder, as set in servlet_context.xml) and the ClientClientController is also matched in the above way, and the return is called “home”.

Oh, there was a mistake in writing, so I took it again··· Oh, there was a mistake in writing, so I took it again···

The client controller is connected via home.jsp, so you can receive messages from it. Add msg instead of ${serverTime}. Starting with $, this is used by outputting data in a shortened form. You can think of it as a shortened expression. The client controller is connected via home.jsp, so you can receive messages from it. Add msg instead of ${serverTime}. Starting with $, this is used by outputting data in a shortened form. You can think of it as a shortened expression.

 

The Login Form-making shopping mall requires My Page, which requires a login form. I decided to divide it into admin and client, so they will create a folder directory for me. The Login Form-making shopping mall requires My Page, which requires a login form. I decided to divide it into admin and client, so they will create a folder directory for me.

I don’t have time to create a login form from the beginning, so I’ll bring the login form for w3 schools. I don’t have enough time to create a https://www.w3schools.com/howto/howto_css_form_icon.asp login form from the beginning, so I’ll bring the w3 schools login form. https://www.w3schools.com/howto/howto_css_form_icon.asp

[HOW TO – Form with Icons] [HOW TO – Form with Icons] [❮ Previous Next] ❯ Describes how to create a form with icons. Register Try it » How to Create Icon Forms Step 1) Add HTML: Use the <form> element to process input. You can learn more about this in the PHP tutorial. Then add the input to each field. 例 < …www.w3schools.com [HOW TO – Form with Icons] [HOW TO – Form with Icons] [❮ Previous Next] ❯ Describes how to create a form with icons. Register Try it » How to Create Icon Forms Step 1) Add HTML: Use the <form> element to process input. You can learn more about this in the PHP tutorial. Then add the input to each field. 例 < …www.w3schools.com

Paste as loginform.jsp. Create this in the login folder. Oh, I will also put the meta tag so that it cannot be converted into characters. Paste as loginform.jsp. Create this in the login folder. Oh, I will also put the meta tag so that it cannot be converted into characters.

<!!! charset=”UTF-8″> <!!! charset=”UTF-8″>

Right now, this file is not directly accessible from the web. Because of the security of the WEB-INF! Because of this, I put in @RequestMapping so that AdminController can handle requests from the login form.Get it and return “admin/login/loginform”; Right now, this file is not directly accessible from the web. Because of the security of the WEB-INF! Because of this, I put in @RequestMapping so that AdminController can handle requests from the login form.Get it and return “admin/login/loginform”;

Hmm…….. I ran it and it’s getting an error. I don’t know why, but I’m confused, so it clearly specifies the client as the client.ex) I found out why I changed it from servlet-context.xml to client-context.xml!! It crashed because the base package was the same in the context files…admin changes controller.admin. Hmm…….. I ran it and it’s getting an error. I don’t know why, but I’m confused, so it clearly specifies the client as the client.ex) I found out why I changed it from servlet-context.xml to client-context.xml!! It crashed because the base package was the same in the context files…admin changes controller.admin.

지금 돌려보니까 잘 떠요, 지금 돌려보니까 잘 떠요.

이번에 계속 사용할 데이터에 대해 mysql을 켜서 데이터베이스 만들기 이번에 계속 사용할 데이터에 대해 mysql을 켜서 데이터베이스 만들기

Create database shopping; create database shopping;

ERD를 사용하려면 DBever를 사용합니다. 그렇지 않은 경우 Marketplace에서 다운로드하고 Windows > Show View로 Database Navigator를 엽니다. ERD를 사용하려면 DBever를 사용하고 그렇지 않은 경우 Marketplace에서 다운로드하고 Windows > Show View로 Database Navigator를 엽니다.

플러그 모양 아이콘을 클릭하여 새 데이터베이스를 mysql에 연결합니다. 플러그 모양 아이콘을 클릭하여 새 데이터베이스를 mysql에 연결합니다.

DB명이 쇼핑이므로 여기에 동일하게 입력하시고 아래에 Test Connection을 누르시면 됩니다. DB명이 쇼핑이므로 여기에 동일하게 입력하시고 아래에 Test Connection을 누르시면 됩니다.

그것은 잘 나타납니다. [마침]을 클릭합니다! 다가오는 쿼리문을 [SQL]이라는 폴더에 저장하고 거기에 적으십시오. 만약을 대비하여 저장하는 것이 중요합니다!! 잘 나타납니다. [마침]을 클릭합니다! 다가오는 쿼리문을 [SQL]이라는 폴더에 저장하고 거기에 적으십시오. 만약을 대비하여 저장하는 것이 중요합니다!!

Distinguish between what to write and what not to write in the login form. I decided to take out the email (comment). At the end, just change the Submit button to a button (because I’m testing it for now) Distinguish between what to write and what not to write in the login form. I decided to take out the email (comment). At the end, just change the Submit button to a button (because I’m testing it for now)

다음은 jQuery CDN. w3schools.com 을 받아서 긁어서 loginform.jsp에 넣을 차례입니다. 다음은 jQuery CDN. w3schools.com 을 받아서 긁어서 loginform.jsp에 넣을 차례입니다.

CDN을 입력하고 폼태그 내용을 전송하는 로그인 요청을 작성합니다. 비밀번호 때문에 POST합니다. CDN을 입력하고 폼태그 내용을 전송하는 로그인 요청을 작성합니다. 비밀번호 때문에 POST합니다.

When you finish typing in loginform.jsp, you come to the AdminController, which handles login requests. Under Loginform Request Processing, you put login request processing. In this case, you can put the parameters like that in the login method, When you finish typing in loginform.jsp, you come to the AdminController, which handles login requests. Under Loginform Request Processing, you put login request processing. In this case, you can put the parameters like that in the login method,

차라리 Admin이라는 이름으로 DAO를 만들어서 거기서 처리하는 게 낫겠어요, 그래서 다음 게시물에는 Admin 파일로 할게요! Admin이라는 이름으로 DAO를 만들어서 거기서 처리하는 게 낫겠어요, 그래서 다음 게시물에는 Admin 파일로 할게요!

error: Content is protected !!