User Comments on 'ID Verification using JSP'
|
|
|
Posted by :
Archive Import (Charles) at 21:15 on Friday, March 07, 2003
|
The jspin.com newsletter said that:
This script uses JSP pages to validate a user ID and password from a MS Access database.
The article did not show how to retrieve any thing from a MS Access database.
Since I know of no open source Type 4 jdbc drivers for the MS Access database,
connecting to a MS Access database is prevented from a java server side jsp.
I was hoping to see if you knew something that a lot of developers are wondering about.
Also, your script sends password in the open on an http connection. This is not a good idea. It might be more secure to send a secure hash of the username and pasword combination. Otherwise the history in a users browser is vulnaerable to expose the passwords. Look for urls which contain a string password="ceab". A secure hash of the passord and user name cannot be reverse engineered to get their values.
| |
Posted by :
Archive Import (nouman rashid) at 03:00 on Saturday, March 08, 2003
|
this article does not need to show how
to retrive any thing from database.
it shows the sql statements needed
to check the userid and password from
a database.abt security,it can be
incorporated.
public boolean authenticate(String username2,
String password2) {
String query="select * from Registration;";
String DbUserName="";
String DbPassword="";
String finalUser="";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection
con=DriverManager.getConnection("jdbc:odbc:register");
Statement stat=con.createStatement();
ResultSet rst=stat.executeQuery(query);
while(rst.next())
{
DbUserName=rst.getString("UserName");
DbPassword=rst.getString("password");
| |
Posted by :
Archive Import (Mohammed Aslam Hussain.) at 01:07 on Wednesday, March 26, 2003
|
This coding is nice,but what i want to know for a New user. and in this article Retry.jsp and success.jsp are missing. How to connect DB2 Database.
Aslam.
| |
Posted by :
Archive Import (Jason) at 09:27 on Friday, March 28, 2003
|
Doesn't the call to authenticate() in process2.jsp require that you pass the user and pass?
| |
Posted by :
Archive Import (Laila Mac) at 07:57 on Saturday, April 05, 2003
|
hello
i am using oracle http server powered by apache.
i am using your code but getting the following error.
oracle.jsp.pars.JspParsaException: Line # 1, Error: Unable to find class for bean: idHandler defined by tag with class: beans.Login
Please help me solve this problem.
i am using oracle database not the access
regards
Laila
| |
Posted by :
Archive Import (hira) at 08:27 on Saturday, April 12, 2003
|
Erm.. Jason,
You are right, i felt the same way too.
But do you know how to debug it?
Don't mind showing me?
Anyone?
Thanks alot!
| |
Posted by :
Archive Import (Brid ) at 11:49 on Monday, April 14, 2003
|
Please could someone sort this error Excellent code otherwise An error occurred between lines: 6 and 8 in the jsp file: /jsp/process2.jsp
Generated servlet error:
C:\tomcat\work\Standalone\localhost\examples\jsp\process2$jsp.java:100: Method validate() not found in class foo.Login.
if (idHandler.validate()) {
^
1 error, 1 warning
| |
Posted by :
Archive Import (Javed) at 19:21 on Tuesday, April 15, 2003
|
How do you allow different users to enter the site and enter there different details in a JSP platform?
| |
Posted by :
Archive Import (Nouman Rashid(author)) at 15:40 on Thursday, April 17, 2003
|
Friends,plz use read the validate
method as authenticate or vice versa.
this is a mistake on my part while
submitting.there is only one method
either use authenticate or validate.
| |
Posted by :
Archive Import (hardik) at 17:31 on Friday, April 18, 2003
|
i am getting error as follows:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
An error occurred between lines: 6 and 8 in the jsp file: /jsp/process2.jsp
Generated servlet error:
C:\Apache Tomcat 4.0\work\Standalone\localhost\examples\jsp\process2$jsp.java:100: Method validate() not found in class foo.Login.
if (idHandler.validate()) {
^
1 error, 1 warning
anybody got a clue on how to fix this
i am runnig tomcat 4.0 on windows 2000
the login page loads up and then when i press submit, i get this error.
| |
Posted by :
Archive Import (Niall Magner) at 13:31 on Sunday, April 27, 2003
|
Excellent piece of coding. Could you post up or email me the code for retry.jsp and success.jsp plaese?
Thanks,
Niall
| |
Posted by :
Archive Import (Justin) at 23:22 on Tuesday, April 29, 2003
|
Excellent article
Only thing is I cant seem to see where to put the Access table ?
I know you say to register it with ODBC Data Source Administrator in the control panel which would presumably take care of this only I dont see that anywhere in the control panel, what are the options on getting around this or what do I need to do to be able to get the data source administrator?
Cheers
Justin
| |
Posted by :
Archive Import (Vales) at 09:17 on Thursday, May 01, 2003
|
I am getting this error
org.apache.jasper.JasperException: /login1.jsp(4,0) SetProperty: Mandatory attribute name missing
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94 etc etc
| |
Posted by :
Archive Import (chuk) at 15:09 on Thursday, May 01, 2003
|
hi friends!!
for a very long time i was having this doubt,
how do we determine the database URL?
i was just wonderin if someone could help me!
thanks
chuk
| |
Posted by :
Archive Import (Fly) at 19:32 on Thursday, May 01, 2003
|
nice to visit this website!
this is my 1st time to post msg.
i would like to ask where i put the MS ACCESS databas "registration" for the above examples?
And i want to ask how i need to configure with the datasource in the admin?
Thank you very much
| |
Posted by :
Archive Import (nouman_rashid(author)) at 17:15 on Tuesday, May 06, 2003
|
For Neill Magner
friend they r just simple html/jsp pages
with the msg u want the user to read when they see the page.
| |
Posted by :
Archive Import (chris) at 20:44 on Tuesday, May 06, 2003
|
did you know if you right click on the page and view source you could get the password and username...?
well just letting you know,
| |
Posted by :
Archive Import (nouman) at 03:34 on Sunday, May 11, 2003
|
so what if u can see the user id and pass if u check the source code,the user
has already been authenticated.this code was never meant to be 100 percent
fool proof.it was just a simple exercide
on which further advancements can be made.
feel free to make any changed and let me know.iam a student just like u guys.
| |
Posted by :
Archive Import (Piotr Puszkiewicz) at 10:54 on Wednesday, May 14, 2003
|
This is a great example of a password authentication System.
It looks to be secure from anyone but a hacker who can sniff passwords.
I would like to see someone add password encryption to this to make it
even more secure.
| |
Posted by :
Archive Import (Pavitar) at 03:57 on Friday, May 16, 2003
|
this code is nice but think if i pass the sql query as
String sql="select * from registeration where id='"+username2+"' and password='"+password2+"';
and then check if database had returned any record and we just check thatif it had returned a record then user is correct else uer is fake.
will it be fast or not
pls reply
| |
Posted by :
Archive Import (DckrApoc) at 17:45 on Saturday, May 24, 2003
|
In windows 2k it ODCB Manager is hidden unless you specificaly Enable it. It is how ever in the Adminstrative Tools called "Data Sources (OCDB)"
Or you can simply enable it in the control pannle like the rest of us.
And I got the code to work fine. Although its not what I would use, it does work. Check for Copy Paste Errors, and make sure you are saving them in the correct directories, with the correct names. You May wish to consider that when you copy some one elses code - make it work before you modify it :)
| |
Posted by :
Archive Import (kaz) at 01:10 on Monday, May 26, 2003
|
sallam:
Excellent work
i have geting a error
"method authenticate(boolean)is no found"
this error cme on both method validate()/ autheticate.
plz give the solution
| |
Posted by :
Archive Import (yanie) at 11:46 on Monday, May 26, 2003
|
Please help me..
I got this error
process2.jsp Line 4: Unable to load class "foo.Login" for useBean id "idHandler"
| |
Posted by :
Archive Import (kok fung) at 05:56 on Thursday, May 29, 2003
|
i am getting this message
"No method matching validate() found in class foo.login.if (idHandler.validate()) {"
^
can some body pls help me to solve the problem.I already change the "public boolean authenticate(***)" to "public boolean validate(***)" but i still getting the same error.
| |
Posted by :
Archive Import (khalass) at 08:18 on Monday, June 02, 2003
|
Hi Nouman,
I wrote my own jsp for logging in. I connect to MySQL database and verify the username and password. The problem I have is that you can manually type in the file name of the following pages in url and get to the page with out logging in.
Do you know how to implement cookies, i.e. when you enter username and password it verifies them with the database and stores a cookie, so any othere pages you try to acess it checks to ensure that you have logged in and if you have not it diverts you to the login page.
Would this be done in java script or jsp and have you implemented any thing similar before or have you an idea of how to implement it.
Thanks,
Khalass.
| |
Posted by :
Archive Import (MJ) at 20:54 on Thursday, June 05, 2003
|
I am wondering how can i make connectivity of Access database from JSP
I will appreciate you help!!
MJ
| |
Posted by :
Archive Import (AC) at 00:29 on Friday, June 06, 2003
|
How do I validate password on the client-side?
| |
Posted by :
Archive Import (jek) at 03:35 on Monday, June 09, 2003
|
why do i have this type of error when i used this code :-
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\jsp\process2_jsp.java:62: cannot resolve symbol
symbol : method validate ()location: class foo.Login
if (idHandler.validate()) {
^
could someone plz help me
| |
Posted by :
Archive Import (Tracer) at 10:31 on Monday, June 09, 2003
|
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
why do i recieved this error. i user j2ee server, what should i do?
| |
|
|
Posted by :
Archive Import (shintoj joseph) at 12:26 on Monday, June 16, 2003
|
please give me the code to find an authorised user from mysql database.using jsp as front end
| |
Posted by :
Archive Import (hrm) at 15:37 on Tuesday, July 01, 2003
|
This is a good read for beginners, although I wouldn't recommend using this method to protect anything sensitive....
Also, MS Access? I wasn't aware you could connect to Access with java unless there is some new third party driver out there somewhere I don't know about, which I would definitely like to know about, as using an Access DB would be quite convienent.
Anyway, thanks for the contribution.
| |
Posted by :
Archive Import (TicklyTigger) at 03:39 on Tuesday, July 08, 2003
|
Question:
The login is fine using the above method, but does it also stop people from accessing the closed pages directly?
I.e. could you go directly to success.jsp if entered the complete address in the browser or does the user have to be validated?
Thanks for comments ...
| |
Posted by :
Archive Import (TIM) at 15:14 on Friday, July 18, 2003
|
I compiled the login.java fine and apache finds the foo.login class but insists there is no method called validate. The process2.jsp file is calling the validate method from the login class file but the error says there is no such class file. I already made sure the methods were named correctly in both files. Can you help me?
| |
Posted by :
Archive Import (Dahmen Ahmed) at 07:00 on Tuesday, July 29, 2003
|
Salam
I need jsp sources code to be able to connect to an Oracle Data Base
Thanks
| |
Posted by :
Archive Import (Help for finding where problems caused this error) at 09:39 on Tuesday, July 29, 2003
|
thanks for your providing these codes,Nouman Rashid.
I have changed authenticate to validate in class, I use Linux+JSDK+RESIN+MYSQL,
=======================================
500 Servlet Exception
Note: sun.tools.javac.Main has been deprecated.
/plaza/process2.jsp:8: No method matching validate() found in class store.Login.
if (idHandler.validate()) {
^
1 error, 1 warning
--------------------------------------------------------------------------------
Resin 2.1.10 (built Wed Jun 18 09:16:53 PDT 2003)
=====================================
Joseph
| |
Posted by :
Archive Import (Amy) at 22:42 on Friday, August 08, 2003
|
why do i have this type of error when i used this code :-
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\jsp\process2_jsp.java:62: cannot resolve symbol
symbol : method validate ()location: class foo.Login
if (idHandler.validate()) {
^
Please help.....
| |
Posted by :
Archive Import (Jessica) at 01:12 on Sunday, August 10, 2003
|
Hi,
I am making a webpage that will end up on a free angelfire.com page and I am using Microsoft Front Page 2002 to make it. I need to have a secure page with at least 30 different user names. I am not good at JAVA, but HTML works fine for me. Is there anyway that you could help? I don't have this MS Access thing that you are talking about, at least I don't think so.
Please reply to jandtrabbits@hotmail.com
Thanks,
~Jessica
| |
Posted by :
Archive Import (Abdelghafour Dahmani) at 21:49 on Wednesday, August 13, 2003
|
ihave used read the validate
method as authenticate or vice versa
but i got this
C:\Apache Tomcat 4.0\work\Standalone\localhost\examples\jsp\process2$jsp.java:100: No method matching validate() found in class foo.Login.
if (idHandler.validate()) {
^
1 error
plz can someone helpe me to resolve this!
| |
Posted by :
Archive Import (thujone) at 15:37 on Thursday, August 14, 2003
|
The code is haphazardly thrown together, with typos, poor naming, poor spacing, variables that are defined but never used.
| |
Posted by :
Archive Import (Jeremy) at 06:25 on Monday, September 01, 2003
|
Hi can anybody help me..?
Is it possible to war the files together and get it to work together as a whole instead of putting the files in a foo folder and the rest in the webapps\examples\jsp folder? i am taught to put the war file in the webapps folder and restart tomcat..
Can anybody help?
Thanks
| |
Posted by :
longg at 16:48 on Friday, October 10, 2003
|
You people are amazing. You ask the same stupid questions without reading the comments! Yes, this code works in theory but he left out the coding part. Nothing is passed and the boolean authenticate takes 2 arguments (did you forget about arguments?). Meanwhile nothing is passed and you'll never get logged in anyway. Also, this is largely overkill, I can accomplish the same code in 10 lines right in my jsp page and never leave the page. Leave the beans for the farting business layer.
| |
Posted by :
joacc1980 at 04:25 on Thursday, October 16, 2003
|
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\jsp\LIYUAN\process2_jsp.java:62: cannot resolve symbol
[javac] symbol : method validate ()
[javac] location: class foo.Login
[javac] if (idHandler.validate()) {
[javac] ^
[javac] 1 error
i got this problem
how to change it??
i use JSP+Mysql+Tomcat
| |
Posted by :
nilupa at 03:43 on Wednesday, October 29, 2003
|
I have this error
Internal Servlet Error
C:\tomcat\work\Standalone\localhost\examples\jsp\process2$jsp.java:100: Method validate() not found in class foo.Login.
if (idHandler.validate()) {
^
1 error,
Please reply me how to correct this error
| |
Posted by :
aby at 00:52 on Wednesday, December 10, 2003
|
my problem is can i have the code to login with the username and password using JSP and JavaBean/Servlets from mySQL database.When the user enters the username and password in the login page then it will go to the requested site.How to do it
I have tried the above code using jsp ,jrun,mysql and getting the following error
archiving/jsp/process2.jsp:
Compilation error occured:
Found 1 errors in JSP file:
C:\\JRun\\servers\\default\\archiving\\jsp\\process2.jsp:7: Error: No match was found for method "validate()".
allaire.jrun.scripting.DefaultCFE:
Errors reported by compiler:C:/JRun/servers/default/archiving/WEB-INF/jsp/jrun__jsp__process22ejsp11.java:59:5:59:24: Error: No match was found for method "validate()".
please send the cure
where is the solution tothe above mentioned question can any body mail me the solution at abhinav@acslink.net.au
| |
Posted by :
owendodd at 08:53 on Tuesday, March 02, 2004
|
hello there i am currently suffering from the following error
Internal Servlet Error
C:\tomcat\work\Standalone\localhost\examples\jsp\process2$jsp.java:100: Method validate() not found in class foo.Login.
if (idHandler.validate()) {
^
i was wondering if any could b of assistance to me please, it is essential
| |
Posted by :
owendodd at 09:23 on Tuesday, March 02, 2004
|
If any1 manages to get past this error could u b much obliged to email me at owendodd@eircom.net
| |
Posted by :
joyceroh at 15:35 on Friday, March 05, 2004
|
Hello
I'm getting error that said can't find folder class foo package.
Could you tell me how can I add the class foo file?
Also, if you have retry.jsp and success.jsp, could send them to me?
Thanks
| |
Posted by :
Latifah at 05:38 on Friday, May 28, 2004
|
Currently doing the validate now.But currently i m doing just a simple login.My problem now is i m not connectingg to the database.I just want to validate.Done this exactly the same way.Since this jsp and java is new to me it is giving me an error.My method to validate i think it is the problem.It is not returning the value.Plz help!
| |
Posted by :
larric_1983 at 03:00 on Saturday, September 04, 2004
|
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 5 in the jsp file: /process2.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\jsp\process2_jsp.java:62: cannot resolve symbol
symbol : method validate ()
location: class foo.Login
if (idHandler.validate()) {
^
1 error
_____________________________________________________________________________________
Please help me ...i got the same error as most of the people here have....somebody help me....
| |
Posted by :
va at 07:47 on Saturday, September 04, 2004
|
hi ppl can anyone show me how to verify user particulars and then retrieve everything about the user and display it out in jsp page. err will be using it on mvc model using jsp, servlet and bean. thanks.
| |
Posted by :
iqueen at 23:05 on Sunday, September 12, 2004
|
better code:
public boolean authenticate(String username2,
String password2) {
String query="select * from Registration";
String DbUserName="";
String DbPassword="";
String finalUser="";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection
con=DriverManager.getConnection("jdbc:odbc:register");
Statement stat=con.createStatement();
///////////////////////////
query += " where UserName = '"+DbUserName+"' and password = '"+dbPassword+"'";
///////////////////////////
ResultSet rst=stat.executeQuery(query);
if (rst.next()){
return true;
}
return false;
}catch(Exception e){
e.printStackTrace();
}
}
| |
Posted by :
sreyas at 02:47 on Wednesday, October 13, 2004
|
i am getting error.
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\jsp\process2_jsp.java:62: cannot resolve symbol
symbol : method validate ()
location: class foo.Login
if (idHandler.validate()) {
^
1 error
plzz help me fast
| |
Posted by :
preet_jy at 09:21 on Saturday, October 16, 2004
|
I'm making an eforum myself in jsp & servlets..i want email support for my members so that i can send newletters to them..can i get code to it...
Also i've a FAQ section in it where in i've various topics listed..clicking on anyone of the topic would take me to another jsp page which has faq's related to that topic & answers along with them...How do i do the database connectivity,my database is MS Access...do i need to hardcode questions & answers into the database or is there any other method..how do i display then data from my database on my jsp page.server that i'm using is Apache Tomcat 5.0..please help me fast...
| |
Posted by :
jsp_dude at 21:03 on Friday, October 22, 2004
|
Change process2.jsp to read ...
<%
// get the username and password strings passed to this page
String username = request.getParameter("username");
String password = request.getParameter("password");
// use the javabean to validate the user. If authenticated
// pass control to success.jsp
if (idHandler.authenticate(username, password))
this code will pass the username and password entered in
main.jsp to the Login javabean.
| |
Posted by :
saxena_manish23 at 04:18 on Friday, January 07, 2005
|
The script is too good. but I'm getting a error.
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 6 in the jsp file: /process2.jsp
Generated servlet error:
C:\jboss-3.2.5\server\default\work\jboss.web\localhost\manish\org\apache\jsp\process2_jsp.java:61: cannot find symbol
symbol : method validate()
location: class foo.Login
if (idHandler.validate()) {
^
1 error
plz help me to find out this error.and Also, if you have retry.jsp and success.jsp, could send them to me?
THANKS
| |
Posted by :
vijaydaniel at 07:42 on Sunday, March 20, 2005
|
hi all,
i wat the remedy!!!!!
we can get values viewed but..
Wat should i do if i want to get values from tables(MSaccess) in to a jsp page on a select/listbox/textarea. i dont get it right.
thank u all
kindly solve me
| |
Posted by :
satish1983 at 21:40 on Tuesday, April 12, 2005
|
hi,i am getting error: idHandler.validate() method not found in foo.Login. I changed the method name authenticate to validate but it didnt work.
Can you please help me?
| |
Posted by :
jsp_dude at 14:15 on Friday, June 24, 2005
|
Look at the example code provided. The idHandler method you are trying to call (validate) has to match the class method listed in the foo package (authenticate). The names don't match, do they? That is why you are getting the "method not found" error. Either change your code in process2.jsp from "if (idHandler.validate())" to "if (idHandler.authenticate())" or change the code in Login.java from "public boolean authenticate(String username2, String password2)" to "public boolean validate(String username2, String password2)" and recompile. You will need to make some small, addtional modifications to the code to get things to work, but the framework for login validation using this method is sound.
| |
Posted by :
sidd at 03:06 on Friday, August 05, 2005
|
hi jsp_dude,
i made the changes but still i am getting error. my database is in MSAccess. plz reply in sidd_bhushan@indiatimes.com
| |
Posted by :
java_jspman at 21:53 on Wednesday, October 26, 2005
|
I have the validate method in the Login.java file, so I am not getting "cannot find symbol" eror message, but instead i am getting this " authenticate in foo.Login cannot be applied to () if(idHandler.authenticate() ) ) { "
can someone please shed light on this...as I need to use this urgently...
thanks alot!!!
regards
java_jspman
| |