•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 456,593 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,520 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1152 | Replies: 2 | Solved
![]() |
•
•
Join Date: Aug 2007
Posts: 184
Reputation:
Rep Power: 0
Solved Threads: 0
Could someone just look at this code and point out the obvious errors. It may or may not be obvious on what it is supposed to do. Never the less what I want it to do and the syntex are bad. Could someone just make observations on how to accomplish different aspects of common code practices.
<html>
<head>
<title>Account Number</title>
</head>
<body>
<jsp:include page="creditcardCascadeStyleSheet.css" flush="true"/>
<jsp:useBean id="fileBean" class="creditcardproject.FileBean"/>
<jsp:useBean id="creditcardBean" class="creditcardproject.CreditCard"/>
<h2>Account information</h2>
<form action="interface.jsp" method="post">
<input type="text" name="accttxtbox" value="Enter Account number">
<% if(request.getParameter("createacct" != null)){%>
<jsp:useBean id= "creditCardBean" class = "creditcardproject.CreditCard"/>
<%long AccountNo=getNewAccount();%>
<%accttxtbox.value(AccountNo;)%>
<% double CreditLimit =creditCardBean.CreditLimit; %>
<% double TotalCharges =creditCardBean.TotalCharges; %>
<% double TotalPayments =creditCardBean.TotalPayments; %>
<tr><th>Account</th><th>CreditLimit</th><th>TotalCharges</th><th>TotalPayments</th></tr>
<tr>
<td><%= AccountNo %></td>
<td><%= CreditLimit %></td>
<td><%= TotalCharges %></td>
<td><%= TotalPayments %></td>
</tr>
<%}%>
<% if(request.getParameter("existacct" != null && accttxtbox != null)){%>
<jsp:useBean id= "creditCardBean" class = "creditcardproject.CreditCard"/>
long AccountNo= <%= accttxtbox%>;
<jsp:setProperty name="creditCardBean" property="CreditCard" param="AccountNo"/>
<% long CreditLimit =creditCardBean.AccountNo; %>
<% double CreditLimit =creditCardBean.CreditLimit; %>
<% double TotalCharges =creditCardBean.TotalCharges; %>
<% double TotalPayments =creditCardBean.TotalPayments; %>
<tr><th>Account</th><th>CreditLimit</th><th>TotalCharges</th><th>TotalPayments</th></tr>
<tr>
<td><%= AccountNo %></td>
<td><%= CreditLimit %></td>
<td><%= TotalCharges %></td>
<td><%= TotalPayments %></td>
</tr>
<%}%>
<select name="action">
<option value="charge">New Charge</option>
<option value="payment">Make payment </option>
</select>
<br><br>
<input type="submit" name="number" value="Submit">
</form>
</body>
</html>
I don't accept change. I don't deserve to live.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- including java programs or code in jsp (JSP)
- Will the jsp code will change if we connected to the oracle database ? (JSP)
- jsp code to send values to database (JSP)
- jsp code for values from database to textbox (JSP)
- <jsp:include> Not Printing On Web Page, But In Source Code (JSP)
- need HELP .jpf/weblogic/jsp - with CODE (JSP)
- Help with 301 redirect code - jsp in url (JSP)
Other Threads in the JSP Forum
- Previous Thread: uploading
- Next Thread: problem in tomcat



Linear Mode