Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts:: want to display full url for certain resources

 
Shin Hashitani
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat 4.0.4
Struts 1.1-b2
/--situation--/
The site contains several sections, and most of them are available only thru logon. One section is to display articles, and they are intended for everyone to see. those articles are split into parts and reassembled at runtime by JavaBean. Each article has its own unique numeric id.

Hi everybody,
It would be nicer if a visitor copy url for a certian article, and pasting to that url in the address field of a browser displays the exact same page for everyone.
http//mysite.com/view?articleid=8798764
Or something like that.
Pages will be added automatically and not known at compile time.
I am still trying to figure out Struts, and I am still not so sure about what I don't know. This could be a general servlet issue, but I post it here because I am just not sure.
If you know how to do what I am trying to do,
please teach me. Or please redirect me to some good resources if you know.
Thank you.
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess it depends on your articles. Are they stored in a database or as part of a content management system or are they HTML files?
 
Shin Hashitani
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi adam,
thank you for the reply.
The article is saved on the database: they are divided into some parts when saved, and regenerated as one article on request. (I cannot change that part. I am just not powerful enough to do that.)
When the user doesn't accept cookies, the session ids will be displayed, won't they? I thought that I could just ignore the session id part in URL for publicly displayed articles, but still the session id will be visible and that's something I want to avoid if I can.
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm really not sure if you can disable the session id url rewriting.
Have you tried destroying the session before you forward to the JSP?
 
Shin Hashitani
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Adam,
thanks for the reply.

I have been digging around for a while, and I haven't able to find a solution that I am looking for. Also, I have learned a bit about Struts in general. I'll leave this problem alone for a while.
I was also surprised to find that using html:rewrite for images as Ted Husted suggests also shows the session id after the file name. (My friend tells me that it just should, but I am still having trouble understanding why, though.)
It's has been such a fun ride.
But it took me quite a while to get the general idea of Struts.
I will post here if I find something to solve this one.

Thank you,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic