?
Solved

error reporting within the same jsp page

Posted on 2011-04-19
4
Medium Priority
?
294 Views
Last Modified: 2012-08-14
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.
0
Comment
Question by:gaugeta
  • 2
  • 2
4 Comments
 
LVL 23

Expert Comment

by:cmalakar
ID: 35429680
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
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 35430708
>>>>>>>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
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 35430715
>>>>>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
 
LVL 23

Accepted Solution

by:
cmalakar earned 2000 total points
ID: 35432805
>>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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question