File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes messages in HTML pages Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "messages in HTML pages" Watch "messages in HTML pages" New topic
Author

messages in HTML pages

Sanz Joanne
Greenhorn

Joined: Feb 24, 2003
Posts: 8
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

Joined: May 24, 2001
Posts: 245
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


chanoch<p><a href="http://www.amazon.com/exec/obidos/ASIN/1861007736/" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a>
 
 
subject: messages in HTML pages
 
Threads others viewed
j2eecertficate.com question
Session info getting lost between servlets.
HELP jsp:forward page = ""
Paging through a db
Sessions... confused
IntelliJ Java IDE