RUVIDEO
Поделитесь видео 🙏

Simple React application making HTTP Get and Post requests to Java Servlet

Please consider helping me provide new content by donating to my new Patreon account https://www.patreon.com/durancoding

This is a basic React app (which only does a simple Get and Post request) that interfaces with a Java servlet running on payara server.

To see more about the code about the payara please see my last two videos about that.

----------------------------------------------------------------------------
Here's some affiliate links:
For screen Recording, I use Bandicam: https://shareasale.com/r.cfm?b=1688203&u=3005391&m=103076&urllink=&afftrack=
----------------------------------------------------------------------------


Overview:
1) Demo the React code making HTTP requests to Java servlet.
2) Experience CORS issue (and resolve it).
3) Brief explanation of the React code.
4) Brief explanation of linux commands to install React on your PC.

Linux terminal commands to get react installed on PC (also mentioned in the video)
1) sudo apt update
2) sudo apt install nodejs npm
3) npx create-react-app my-app

At this point you have your first React application created with "my-app" being your project name. To have a different name just replace "my-app" on step 3 with the name you prefer.

To get jQuery installed and use in your code type this command on your linux terminal:
1) npm install jquery

If you have an issue doing step 3 (creating your react app) do the following command:
1) sudo npm i -g npx
You'll have to enter the root password before it installs, but after thats done you should be able to redo step 3.

After you create your react app you can start your app by entering on the terminal:
1) npm start

You'll see your React code on the web browser.

Time line of video
0:00 - Recap of what we did before (servlet handling get and post requests from Postmap app)
0:40 - Discuss React briefly
1:18 - Show React code running on browser
1:48 - Show Java Web servlet running on local payara server
2:00 - Make Post and Get Request from React app (and get CORS response)
3:25 - Servlet code to allow CORS response from React app
4:08 - Show successful Post and Get Request from React app (with no CORS response)
4:55 - Commands to install React on PC
6:35 - Brief overview of my React code
7:15 - Show React code that has HTML output you see on browser
8:15 - Show React constructor code with class variables and methods
9:45 - Show React HTML code that links a button press with React methods I have for the HTTP Get and Post requests
20:07 - Show React methods that contains the actual jQuery Post and Get code that communicates with Java servlet.
12:00 - Traces path that code goes through when doing a Post or Get
12:55 - Additional commands to install jquery on your pc

For more information on React documentation go to this link:
https://reactjs.org/docs/getting-started.html

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Simple React application making HTTP Get and Post requests to Java Servlet», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.