Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Servlets and the fly likes Forward servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Forward servlets" Watch "Forward servlets" New topic

Forward servlets

Joe Schaffer

Joined: Mar 24, 2004
Posts: 29
Hi there,

I have a question about forwarding a link to a servlet. My web page generates dynamically HTML code for servlets. My idea is to dynamically generate code to show all pictures in my tree.

I have no problems to figure out the pictures in the tree. I can dynamically generate them as a link.

My problem occurs, when I want to load them in a single window. I don't want to generate one html page for each picture to display. I want to call one servlet and just show this selected picture in it. Therfore I need to forward a value with the link in which I call the servlet. How is this possibile?

Rough: Servlet A has a link of Servlet B. The link in A is dynamic generated and unique. The unique value has to be transmitted to Servlet B. With this information I can then load the picture! How can I forward it?

Best regards and thanks in advance

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
How do normal HTML pages create multipl images in a page? Just think about it. Your IMG tag has to use a SRC that points to the servlet that will generate the picture with a parameter that indicates which picture to generate.
Joe Schaffer

Joined: Mar 24, 2004
Posts: 29
thx for the reply! I was standing in the middle of a forest and haven't seen a single tree

Best regards

I agree. Here's the link:
subject: Forward servlets
It's not a secret anymore!