#9 Servlet and JSP Tutorial |  sendRedirect | URL Rewriting

#9 Servlet and JSP Tutorial | sendRedirect | URL Rewriting

Telusko

6 лет назад

188,211 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@tekina4493
@tekina4493 - 23.11.2022 01:08

what if it was a doPost in servlet1? then using URL rewrite wouldn't work right?

Ответить
@sharathlingam3444
@sharathlingam3444 - 20.09.2022 21:35

Sir, why aren't you using doPost method anywhere. If I use dopost why do I get an error.

Ответить
@blagovestkabov3685
@blagovestkabov3685 - 04.09.2022 00:26

But what happens when we use doPost method and we can not see the values in the URL?

Ответить
@Saiyam28521
@Saiyam28521 - 18.08.2022 10:14

can anyone help me ... after using setattribute in AddServlet i got an error coz it is saying that k is not an int type..convert into object..but after making it as object i get an error in ...int k = i + j;..
how to resolve it?

Ответить
@PROMAN8625
@PROMAN8625 - 12.03.2022 16:54

no theories pl pl

Ответить
@rudratiwari7082
@rudratiwari7082 - 27.06.2021 16:13

For this always use get method because with post it is not going to work

Ответить
@MrRaghavsaxena
@MrRaghavsaxena - 14.06.2021 06:28

Hi Navin, Firstly I would like to thank you for this wonderfull series.I have one doubt i.e. sendRequest can be use only with get method ?

Ответить
@smiley-wu1kn
@smiley-wu1kn - 30.04.2021 16:43

THANKYOUVERYMUCHHHHH!!!!!!!!!!!!!!!!!!!

Ответить
@preethidonthu2433
@preethidonthu2433 - 14.02.2021 16:30

thanks a lot

Ответить
@harshithas747
@harshithas747 - 08.02.2021 10:06

In web.xml we have mentioned sq in servlet-mapping how can it map the same after using sq?k= in send redirect.

Ответить
@amitkumar8396
@amitkumar8396 - 11.01.2021 14:55

sir how send multiple data via sendRedirect() like we did in RequestDispatcher ?

Ответить
@prabhabaskar1985
@prabhabaskar1985 - 15.12.2020 21:32

Doubt :
res.sendRedirect("sq"); & res.sendRedirect("sq?k=");
"sq" & "sq?k=" is different right ??
While configuring at web.xml
<url-pattern > /sq </url-pattern>

The actual pattern mentioned at url pattern is /sq right ??
Then how it correctly run instead showing err ??

Ответить
@prabhabaskar1985
@prabhabaskar1985 - 15.12.2020 21:14

how did you comment and uncomment by selecting certain portion ???
Let us know the shortcuts too..

Ответить
@cricketwithpranay7759
@cricketwithpranay7759 - 10.12.2020 19:38

Great sir thanku so much

Ответить
@bhavaniyallavula2575
@bhavaniyallavula2575 - 27.11.2020 17:17

Great teaching sir. Thanks for ur videos.
I have a small doubt in this concept. Please clarify sir.
In the URL Rewriting, we actually changed the url pattern the client should call the sq servlet, but that same url pattern is not configured in web.xml.
Then, how do the server know to call the same sq servlet?
Thanks in advance.

Ответить
@chirayujoshi1189
@chirayujoshi1189 - 29.10.2020 19:41

If we want to attach token or password in sendRedirect (so that user can give information to payment gateway), then we won't do it in URL. User will send POST request to payment gateway. How can we do that?

Ответить
@wpatyune1631
@wpatyune1631 - 02.09.2020 16:16

These two looks like similar purpose. Are these function doing the same purpose or depending on a certain occasion?

Ответить
@patyue5012
@patyue5012 - 30.08.2020 06:51

But why response dispatcher is used instead of this redirect method? Which one is common to use? Or in what circumstances we should use either one? Any practical example(s)? Thanks.

Ответить
@maksimus.ssirotkin1124
@maksimus.ssirotkin1124 - 29.08.2020 11:54

Отличное видео Perfect

Ответить
@TruongNguyen-lr2jf
@TruongNguyen-lr2jf - 10.08.2020 14:57

So do we should use sendRedirect or Dispatcher ?

Ответить
@lovesonkar3020
@lovesonkar3020 - 31.07.2020 11:23

what if we are sending post req, then also we use req.sendRedirect("sq?k=" + k );

Ответить
@Moe_Mega
@Moe_Mega - 10.06.2020 04:12

Thank you so much Navin.

Ответить
@sankalparora9261
@sankalparora9261 - 29.05.2020 16:32

The tutorials are great. This is my first tutorial series on the channel. Navin Sir is amazing at Java and on the concepts. Recommended to all Java lovers or better be learners.

Ответить
@akarshgupta5550
@akarshgupta5550 - 22.05.2020 14:29

when we change url from sq to "sq?k=" , doesn't the web.xml file plays a role in executing the url mapped in servlet mapping

Ответить
@kreenu5035
@kreenu5035 - 17.05.2020 19:09

Hi
If I use dopost ...then url rewriting is possible

Ответить
@elmokhliss4852
@elmokhliss4852 - 14.04.2020 02:51

Thanks

Ответить
@Rahulkumar-dp6nb
@Rahulkumar-dp6nb - 20.03.2020 11:26

Just superb

Ответить
@swapnilsapkal2108
@swapnilsapkal2108 - 24.02.2020 09:47

We have already call servlet using servlet using RequestDispacher so why we need sendRedirect.

Ответить
@pradeeppal8472
@pradeeppal8472 - 25.01.2020 07:10

sir if have use post method then what comes??

Ответить
@franciscasimirs839
@franciscasimirs839 - 16.10.2019 10:46

Thanks a lot. It really helped me to prepare for my practical examination

Ответить
@unnatijain1939
@unnatijain1939 - 02.09.2019 10:46

What abt doing with dopost

Ответить
@prof_as
@prof_as - 31.08.2019 22:50

how to send the value k from the addservelt to SqServlet by not sending it in url?

Ответить
@rizwancreations5620
@rizwancreations5620 - 31.08.2019 07:37

Sir what is the use of "?" this symbol please tell me

Ответить
@manideep_talampally
@manideep_talampally - 18.08.2019 20:00

What if we want to send redirect with 2 values ? ... can anyone send me code

Ответить
@kousikdinesh6015
@kousikdinesh6015 - 14.08.2019 12:33

Why didt you used WenAnnotation here

Ответить
@greeshmats9889
@greeshmats9889 - 11.08.2019 10:01

Can we use both sendRedirect and req dispatcher together?

Ответить
@simbol5638
@simbol5638 - 03.07.2019 15:56

Great tutorial, We enjoyed it sir. God bless You

Ответить
@shivanshuvyas1744
@shivanshuvyas1744 - 30.06.2019 08:45

What if we want to send the data using post method in sendredirect() ,would we able to do so?

Ответить
@agustdik3696
@agustdik3696 - 06.06.2019 10:53

RIP eyes
Please make your videos more clear

Ответить
@gayathrialluri7923
@gayathrialluri7923 - 17.04.2019 19:25

telusukunna sir

Ответить
@bhavanireddyboosa423
@bhavanireddyboosa423 - 09.04.2019 10:12

Thanku navin garu🙂

Ответить
@abhisekmishra5245
@abhisekmishra5245 - 29.03.2019 11:25

Sir is sendRedirect() method has any advantage over RequestDispatcher ??

Ответить
@mickykumar7573
@mickykumar7573 - 23.01.2019 08:37

sir can call servlet page without clicking submit button in html

Ответить
@kartik_2501
@kartik_2501 - 20.01.2019 15:17

hello sir, since we're modifying the url from res.sendRedirect("sq") to res.sendRedirect("sq?k="+k), how the compiler is looking this new url-pattern in web.xml? since we've defined url-parttern for only "sq" not "sq?k=".

Ответить
@purehustler1536
@purehustler1536 - 27.12.2018 08:47

Does anyone know what shortcut key he used to comment out multiple lines at the same time?

Ответить
@purehustler1536
@purehustler1536 - 27.12.2018 08:44

Would changing the intro music be a good idea? Cuz it's like as if I'm about to watch a comedy film when I heard it, lol

Ответить
@sagarmeena0210
@sagarmeena0210 - 13.12.2018 02:58

great

Ответить
@VinodKumar-zx5lk
@VinodKumar-zx5lk - 21.11.2018 20:30

sir , in res.sendRedirect() method u have passed a single value k , but how can i pass more than one value so that i can send two values to SqServlet...

Ответить