JSPs and Servlets Tutorial 16 Part 2- Writing an MVC Application

preview_player
Показать описание
Calling a Business Service method from the controller.
Рекомендации по теме
Комментарии
Автор

My gosh!! That is the most beautiful, simplistic explanation I have ever seen!!
I struggled with this for about two years.
I eventually left my job because I didn't understand it.
You have just explained in 20 min, what no one taught me in 2012.
Thank you!!

mattanderson
Автор

You are so so so amazing tutor Koushik ! Lucky to watch you teaching the fundas....

rkb
Автор

I love it when a plan comes together. 

ChrisMcKennaCMK
Автор

response.sendRedirect() should be the last statement to be executed . if any code that tries to write to the output stream is executed after a call to response.sendRedirect(), will throw an illegalStateException. To avoid this we generally add a return statement as a practise

rohit
Автор

You are really awesome!!! Love to watch your videos!

sid
Автор

I think it should be "password.trim().equals("")", or you can use isEmpty(), instead of using == for string comparison.

wenhoujx
Автор

If you could mention what the return statement in the LoginServlet for. Thanks. Wonderful tutorials.

jayghoshal
Автор

@conorucd Of course, the only issue I was pointing out is that multiple return statements are "spaghetti-ish" and break execution instead on the spot. Any language features that jump to another point in the code (like goto) or break execution on the spot (unless using break in a switch/case chain) are generally bad practice and should be avoided.

NickEnchev
Автор

when iam submiting query its is not returning succes page

rahulponnala
Автор

@NickEnchev @conorucd The point this tutorial is trying to make is MVC using servlets and jsp not return statements or naming your variables.

recoveringheart
Автор

what is the difference between using html or jsp for view ? we could do it by html too

chg_m
Автор

hi..we can use Login.htm. Is there any need of using a JSP in this case ?

saurabhchaudhari
Автор

Isn't authentication supposed to be done by a Servlet Filter ?

malharjajoo
Автор

When i click the submit button . .. it says resource not found.. the url gets appended with the /login that we have specified and it says .. Requested resource not found!

GokulRG
Автор

Mr. Koushik (Java Brains) did not mention what the blank "return" in "LoginSerlet.java" was for, even in the following tuts. If someone could mention what its purpose was it would be helpful, thanks.

carlr
Автор

Great Work !!! many many thanks to you :)

ruchu
Автор

What if we make authenticate method static?

parasgoyal
Автор

Hello @Java Brains can i get your project files?

nilaypatel
Автор

above same i did in eclipse it does nt showing success.jsp page??
can u explain me

rahulponnala
Автор

Great videos, only two things I have a problem with (sorry).

1) Multiple return statements in a single function
2) Boolean variables named "result" if (result) just doesn't look good. if (authSuccess) or something looks MUCH better.

:)

NickEnchev