aspose file tools*
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
Author

Forward servlets

Joe Schaffer
Greenhorn

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

Joe
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
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.
src="/imageservlet?uniquevalue=xyz123"
Joe Schaffer
Greenhorn

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

Best regards

Joe
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Forward servlets