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
posted
0
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.