this url redirect to some specific page where some topic related to permgen discussed.
How this type of things achieve in servlet. Based on title or some specific line of page we fetch data from database and will show in jsp. I want data come from database not static html page.
Use a URL mapping to map everything inside the "folder" to your servlet. I'm not sure but I think here the URL mapping is for /forums/*.
Then retrieve the full URL from the HttpServletRequest, and use its contents to determine what to display.
But for that my page and topic i have to put predefine. That is not possible in case where some new topic is add. Every time i cant add mapping for each topic .It should be dynamic.
You take example of coderanch, where for every topic, url is changing and its showing topic name in url. that i want in my site.
Please EaseUp. There is no such thing as urgent around here.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
2
How can something that came up yesterday already be urgent today? That's a ridiculous schedule for a new feature.
I'm not sure what the problem is - as I said, the part behind the ID is completely ignored, so you can put anything you want there, including the post's title. What problem are you having implementing that, specifically?
Ramesh Sengani
Ranch Hand
Joined: Nov 23, 2011
Posts: 36
posted
0
Extremely apologize for my mistake.
Ok i will give brief description what is my requirement ..
I am working in a one website which i want to make SEO friendly....
as you said i am using id for retrieve topic from database but parallely i also want to cancat title of the topic in that url .
www.gooe.com/forum/1234
this type of request is coming from browser but while showing i want to show
www.gooe.com/forum/1234/title_of_topic
For that i made front controller, which accept all request and based on id fetch title of page,and redirecting to respective action class.
but i am not getting ,how i will cancat title with result url in browser.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
Still not following - are you asking how to transform the string "/forum/1234 " into "/forum/1234/title_of_topic"? If so, you have the ID of the post , so you can look up the subject, and then append it to the string before you do the redirect. And, of course, wherever the URL is used in your web pages, you'd append the subject to begin with.