Results 1 to 4 of 4
  1. #1
    proksy is offline Member
    Join Date
    Jun 2012
    Rep Power

    Question Login Authentication Using Bean and Servlet in JSP

    I am going through a tutorial I found on, which can be found here login Authentication using Bean and Servlet In JSP following the tutorial I found there was a small syntax error in the file loginbean.jsp causing the error:

    org.apache.jasper.JasperException: /jspbeanlogin/loginbean.jsp(9,57) Attribute value request.getParameter("userName") is quoted with " which must be escaped when used within the value
    org.apache.jasper.compiler.DefaultErrorHandler.jsp Error(

    to be thrown. I have replaced the double quotes with single quotes and have resolved this syntax issue. I have now run into another problem. The loginbean.jsp is throwing the error:

    org.apache.jasper.JasperException: /jspbeanlogin/loginbean.jsp(7,0) The value for the useBean class attribute logbean.LoginBean is invalid.

    I have recompiled the file a few different times in both the /WEB-INF/classes and /WEB-INF/classes/logbean folders and am still having this error. Here is the contents of my loginbean.jsp file which is throwing the error:

    Java Code:
    <HEAD><TITLE>DataBase Search</TITLE></HEAD>  
    <%@ page language="Java" import="java.sql.*" %>  
    <jsp:useBean id="db" scope="request" class="logbean.LoginBean" >
    <jsp:setProperty name="db" property="userName" 
    <jsp:setProperty name="db" property="password" 
    <jsp:forward page="hello">
    <jsp:param name="username" value='<%=db.getUserName()%>' />
    <jsp:param name="password" value='<%=db.getPassword()%>' />
    and here is the contents of the file the javabean.jsp file is trying to resolve:

    Java Code:
    package logbean;  
    //<---I have commented this out and recompiled outside of the logbean folder 
    // and changed class="logbean.LoginBean" to class="LoginBean" with no success
    public class LoginBean {
            String userName="";
    	    String password="";
            public String getUserName() {
                return userName;
            public void setUserName(String userName) {
                this.userName = userName;
            public String getPassword() {
                return password;
            public void setPassword(String password) {
                this.password = password;
    Thank you all so much for the help with this. I am ready to have fun with this stuff
    Last edited by proksy; 06-11-2012 at 01:45 AM.

  2. #2
    proksy is offline Member
    Join Date
    Jun 2012
    Rep Power

    Default Re: Login Authentication Using Bean and Servlet in JSP

    I have been told from a reputable professional that this tutorial or example is of poor quality and is terribly outdated. I guess this thread can be deleted as I am abandoning this tutorial and will do some more reading on jsp and servlets before attempting another post. Thanks

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

    Default Re: Login Authentication Using Bean and Servlet in JSP

    I have noticed that your tutorial link was to roseindia, and yes, that site has a reputation for spotty quality. Please read BalusC blog on the site: What is it with RoseIdia for a little more detail on this.

  4. #4
    fufransas is offline Member
    Join Date
    Aug 2014
    Rep Power

    Default Ray Ban Sunglasses Outlet

    <a href="" title="Ray Ban Outlet"><strong>Ray Ban Outlet</strong></a> Ray Ban Outlet Ray Ban Outlet
    <a href="" title="Cheap Ray Bans"><strong>Cheap Ray Bans</strong></a> Cheap Ray Bans Cheap Ray Bans
    <a href="" title="Ray Ban Sunglasses Outlet"><strong>Ray Ban Sunglasses Outlet</strong></a> Ray Ban Sunglasses Outlet Ray Ban Sunglasses Outlet
    <a href="" title="Cheap Ray Ban Sunglasses"><strong>Cheap Ray Ban Sunglasses</strong></a> Cheap Ray Ban Sunglasses Cheap Ray Ban Sunglasses
    <a href="" title="Ray Ban Sunglasses Discount"><strong>Ray Ban Sunglasses Discount</strong></a> Ray Ban Sunglasses Discount Ray Ban Sunglasses Discount
    <a href="" title="Ray Ban Sunglasses"><strong>Ray Ban Sunglasses</strong></a> Ray Ban Sunglasses Ray Ban Sunglasses

Similar Threads

  1. Replies: 1
    Last Post: 03-23-2011, 08:55 AM
  2. Single user Login authentication
    By vinoopraj in forum Web Frameworks
    Replies: 0
    Last Post: 07-20-2010, 09:19 AM
  3. Replies: 2
    Last Post: 05-18-2010, 04:12 PM
  4. Biometric Thumb Impression Authentication for login in jsp
    By kishore rajkumar in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-12-2009, 03:30 PM
  5. Replies: 1
    Last Post: 08-05-2008, 11:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts