error reporting within the same jsp page

Hi eperts...
I have a jsp with a form in it where the user enters his credentials.I wanted to know if the credentials can be checked on the same jsp page and error reporting can also be done on the same jsp page.
gaugetaAsked:
Who is Participating?
 
cmalakarConnect With a Mentor Commented:
>>You can do with help of scriplets .... but when you right click on the page and view soucres it will give your DB deatils ,user deatils  and more importtent that user password.

view source will not show the scriptlets.

Make sure you keep the jsp in WEB-INF and not directly accessible.
0
 
cmalakarCommented:
You can do it...

But It is not correct way of design to check the credentials on the same page.

Always do the credential verification in servlet/some other controller code..

you can display the error on the same page if any.
0
 
Sathish David Kumar NArchitectCommented:
>>>>>>>I have a jsp with a form in it where the user enters his credentials.I wanted to know if the credentials can be checked on the same jsp page

You can do with help of scriplets .... but when you right click on the page and view soucres it will give your DB deatils ,user deatils  and more importtent that user password.

so its very easy to hack (Not hacking mis use the user credentials).
0
 
Sathish David Kumar NArchitectCommented:
>>>>>error reporting can also be done on the same jsp page.

You can set the error or scueess message as request object in the Java calss and get it in your Jsp ....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.