• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic