We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

JSP/HTML

Hi,

I am having trouble debugging this code.Please be kind enough to have a look.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Bogus Order Calculate</title>
</head>
<body>
<H1>Bogus Order Calculate</H1>
You ordered these items:
<form action="FinalizeOrder.jsp" METHOD="POST">
<%
if("Dictionary".equalsIgnoreCase(request.getParameter("book")))
{
%><input type="hidden" name="book" value="10.00">
	a Book<BR><%
	
}
if("Coffeecake".equalsIgnoreCase(request.getParameter("food")))
{
%><input type="hidden" name="food" value="2.00">
	some Food<BR><%
	}
if("Coffee".equalsIgnoreCase(request.getParameter("drink")))
{
%><input type="hidden" name="drink" value="1.00">
	a Drink<BR><%
	}
%>
<BR><BR>
<input type="submit" value="Finalize Order">
</form>
</body>
</html>
2
Contributors
2
Replies
15 Hours
Discussion Span
1 Year Ago
Last Updated
3
Views
jsp_novice
Newbie Poster
2 posts since Mar 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

and what problem are you having? since we don't know what you are passing to this jsp page, how do you want us to check if it works or not?

stultuske
Industrious Poster
4,489 posts since Jan 2007
Reputation Points: 1,377
Solved Threads: 627
Skill Endorsements: 25

and what problem are you having? since we don't know what you are passing to this jsp page, how do you want us to check if it works or not?

sorry here is my program sending arguments.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Insert title here</title>
</head>
<body>
<H3>Bogus company.Simple Old fashioned Order Form</H3>
<BR>
<form action="BogusOrderCalculate.jsp" METHOD="POST"> Please select what you want:
<BR><BR>
Dictionary 
<input type="checkbox" name="book" value="Dictionary">
<BR>
Coffee Cake
<input type="checkbox" name="book" value="Coffeecake">
<BR>
Coffee
<input type="checkbox" name="book" value="Coffee">
<BR>
<BR>
<input type="submit" value="Submit">
</form>

</body>
</html>
jsp_novice
Newbie Poster
2 posts since Mar 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0622 seconds using 2.68MB