• Post Reply Bookmark Topic Watch Topic
  • New Topic

messages in HTML pages  RSS feed

 
Sanz Joanne
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wondering i deveoping a shopping cart which uses a java bean. When the user goes to the Basket each item is fetched and displayed. The user can then delete each item. What i want is if there are no items left in the basket a message be displayed in the same page saying that the basket is empty. I've tried using
<jsp:forward page = "EmptyShoppingBasket.html"/>
instead so that it looks like that they are on the same page with the message displayed to them. But when i put this code in when the basket is empty i just get a completly blank page. I'd really appreciate if anyone could help me out with this problem.
Thanks a mill in advance,
Sanz
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there no way to say:
if(mybasket.size()==0) {
%>There are no items in your basket<%
} else {
Iterate through all the items
? yuo may not have provided enough information about how the user can delete items and how you know when the basket is empty plus what mechanism you have for showing the items and what type of object the basket is
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!