dcsimg
A way to handle really long URLs in the SRC attribute of the IMG tag
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mani_Iyer
Posted On:   Wednesday, October 31, 2001 01:57 PM

In one of my JSPs I have an IMG tag whose SRC attribute consists of a very long URL (more than 10000 characters). The URL consists of a servlet name followed by a string of name value pairs. The servlet is supposed to return a jpeg image, but for the long URLs it fails to do so. Does anybody know a way of accomplishing this?

Re: A way to handle really long URLs in the SRC attribute of the IMG tag

Posted By:   Alex_Chaffee  
Posted On:   Saturday, November 3, 2001 08:51 PM

I assume the image is being generated by a servlet -- otherwise, why would you need such an ungodly long URL? It sounds like you've made a really bad design decision somewhere along the line. You should think about using an id-based indexing scheme, so that instead of SRC="buildimage?a=2&b=5&c=7&...zzz=999" you can use SRC="buildimage?id=123456"


If the images need to be built dynamically, you can assign the id "on the fly" to a given set of image attributes when you build the JSP.


See What is the difference between POST and GET method...

About | Sitemap | Contact