[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
Get data from Login form on webpage  XML
Forum Index » J2EE Application Development
Author Message
hissimr

Newbie

Joined: 01/14/2010 10:14:15
Messages: 2
Offline

Hi guys, I'm using this guide and creating a login page for my site. I am using a jdbc-odbc bridge and have changed the connection. What I can't figure out is how to get the data from the bean to the login class (the class that connects to the database.

Whenever I try to run the site, I get the error message

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(DefaultErrorHandler.java:40)
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Can you post your version of loginbean.jsp? It sounds like it is a simple fix.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
hakz

Newbie

Joined: 01/14/2010 10:12:39
Messages: 1
Offline

deleted

This message was edited 2 times. Last update was at 01/14/2010 11:09:40

stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

The problem you're having is a common one - you've incorrectly nested your double quote characters. The code:



is actually invalid. Why? When you specified the "value" parameter you used double quotes to open the HTML value and then double quotes to open the Username parameter.

Instead, use something like:



The only change there is that I'm using single quotes around the "value" as opposed to double quotes.

Notice that even the code formatter in the forum highlights this differently.

This message was edited 1 time. Last update was at 01/14/2010 11:11:01


Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
hissimr

Newbie

Joined: 01/14/2010 10:14:15
Messages: 2
Offline

I did this, but I get this error message now



That class is the same as the website loginbean.java.



Even with this, I can't see where in the login.java file on the roseindia.net page that it takes the data from the above bean and uses it to check with the database.
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

You've got a case issue. Use



to set the property. JSP will be looking for "setUsername" with that call and that is what you want.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
 
Forum Index » J2EE Application Development
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle