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 I'm totally confused over this one.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "I Watch "I New topic
Author

I'm totally confused over this one....

Jack Davis
Greenhorn

Joined: Apr 07, 2003
Posts: 22
Sorry about the subject but I don't know how to sum this problem into a short sentence.
Basially I'm building a small ecommerce app and I'm using JSP. I want to make it as dynamic as possible and not have much static details.
I will be selling products and I want to categorise them. So I have dynamically generated a list of categories from my db...
String name = RS.getString("name");
I have "href" each category as so....
td><a href="<%= response.encodeURL("subcategory.jsp") %>"><%= name %></a></td>

The idea is that each category listed is linked to 1 template page rather then having a sepearte page for each category. However the problem is how can I ensure that the category I click on gives me the that category's subcategories.
Basically this is my problem. I'm a total newbie so any help is much appreciated.
Thanks in advance
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Originally posted by Jack Davis:
The idea is that each category listed is linked to 1 template page rather then having a sepearte page for each category. However the problem is how can I ensure that the category I click on gives me the that category's subcategories.
Basically this is my problem. I'm a total newbie so any help is much appreciated.
Thanks in advance

I'm not sure if I understand you.. but, what if you send your category as a parameter? something like...
www.yoursite.com/yourJSP.jsp?category=yourCategory
in this way you only display the subcategory you want for a particular category name.
Now, you only have ONE jsp, the difference is that you're displaying different content, depending on the value of the category parameter.


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I'm totally confused over this one....
 
Similar Threads
nested iterate-help
How to pass row id of colection to next JSP page for display using Struts
auto-generate new ticket on each page
Problem in hiding the row of data
Capturing the element in collection that was chosen