Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
JSP
how can i compare a session parameter value with variable value?
Agnit Chatterjee
Greenhorn
Posts: 24
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
how can i compare a session parameter value with variable value? will this code work? It doesn't give the correct result.........please help
useraccount.jsp
<%@ page import= "ac.Account" %> <% String username=(String) session.getAttribute("username"); if(username==null) username=""; %> <jsp:useBean id= "ac" scope= "application" class= "ac.Account" /> <jsp:setProperty name="ac" property= "*" /> <html> <body background="juric 2.jpg"> <br> <div align="right"><h4><font face="Lucida Console"><font face="Times New Roman" style="font-weight: normal;">Welcome back,</font> </font><%=username%> <center><h1><font color="#4d4d4d" face="Calibri">WELCOME TO THE ACCOUNT CREATION SECTION<br></font></h1></center> <br><br> <br> <table border="0" width="994" height="566"> <tr> <td width="50"> <br></td> <td width="450"> <form method="get"> <h3><font size="3" color="#000000"><font size="4"> Account Type:</font> </font><font face="Calibri" size="3" color="#800080"><font color="#000000"> </font> <select name="type"> <option value="fixed deposit">fixed deposit</option> <option value="current">current</option> <option value="savings">savings</option> </select> </font></h3> <h3><font size="4" color="#800080"> <font color="#000000">Account Type Description:</font> </font><font face="Calibri" size="3" color="#800080"> <input type="text" name="desc" size="25"></font></h3> <h3><font face="Calibri" size="4" color="#800080"> </font><font color="#000000"><strong><font size="4">Customer ID</font></strong></font><font face="Calibri" size="3" color="#800080"><font color="#000000"> </font> <input type="text" name="id" size="25"></font></h3> <h3><font color="#800080" face="Calibri" size="3"> <font size="4"><font color="#000000">Amount:</font> </font> <input type="text" name="amount" size="25"> <br></font></h3> <h3><font face="Calibri" size="5" color="#800080"> </font><font size="3" color="#800080"><font size="4" color="#000000">Transaction Password:</font> </font><font face="Calibri" size="3" color="#800080"> <input type="text" name="trpass" size="25"> <br></font></h3> <h3><font color="#800080" face="Calibri" size="3"> <font size="4"><font color="#000000">Time in Years (only for fixed deposit):</font> </font> <input type="text" name="timespan" size="25"> <br></font></h3> <br> <input type="submit" value="SUBMIT"> <input type="reset" value="RESET"> </form> </td> </tr> </table> <% if (request.getParameter("id") == username){ %> <%@ include file="accountprops.jsp" %> <% } %> </body> </html>
[Edit by Dave - removed the shouting]
Agnit Chatterjee
Greenhorn
Posts: 24
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Sorry......it's resolved .equals method was required!!!
Whatever. Here's a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Question on jQuery ajax functionality & troubleshooting called bean in JSF page
doubt in Session parameters
JSP Help Regarding the Radio Button
when i retrive data from access it showing empty page in tomcat
logout.jsp not working
More...