Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Design issue in JSP  RSS feed

 
Mani Narain
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am desiging a website for holding some daily news.I have designed a table having healines and content of the news as columns among others.I have stored headlines and
the content of the news in the table.I am reading the headlines from the table
and displaying them in my webpage as a link.

<headlines1>
<headlines2>
......
......

Now if the user clicks a particular headlines lick say headlines1,then the contents corresponding to the headlines should be displayed...how can i achieve this in JSP?...
the relation between the headines and content is stored only in table...
Assume that if i have cached the info of headlines and contents in a Map...
how to get to that Map?
 
Pankaj Narang
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Narain

It is not much difficult, you might be having some id for each headline and its content in the table ,with the link you can pass the id to your java class where you query for that id in the table and take the content out in a stringbuffer and keep it in request to show it on the other jsp,

i think this much will give you a rough idea how to achieve the solution

Best Regards
Pankaj
 
Mani Narain
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i pass the id:
Assume that i have a java bean table.jsp will gives me the content based on the healines input..now i have to pass the headlines to this javabean.is this possible..
<a href=table.jsp?id=123>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!