Passing parameters to JSP

Hello,

I have a jsp page that needs to receive parameters to look up an image. I pass the parameters in the url like so: <page url>?year=1974&month=01&day=01&hour=00&sattelite=GOES1&channel=IR . FYI <page url> is just a place holder for the url of the image page. The image page is a jsp page. I am trying to receive the parameters and display the image using this JavaScript code:

<script language="text/JavaScript">

<!--

var pic="ftp://eclipse.ncdc.noaa.gov/pub/isccp/b1/.D2790P/images/"+year+"/001/Img-"+year+"-"+month+"-"+day+"-"+hour+"-"+satellite+"-"+channel+".jpg"

document.write('<img src=pic style="border: 0px solid ; width:550px; height: 550px;">')

-->

</script>

However, when the page is displayed there is no image displayed. Does anyone have any ideas a to why the image isn't displaying? I am thinking that I cannot use JavaScript to receive parameters passed by the url. If that is the case then how would I get the parameters? I will be happy to provide any more information that you need to help me fix this problem.

Thank you in advance.

[1410 byte] By [jdub53a] at [2007-11-27 11:49:27]
# 1

Instead of src=pic, what if you put the image path directly here? Did you try it?

skp71a at 2007-7-29 18:25:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

> Instead of src=pic, what if you put the image path

> directly here? Did you try it?

That still doesn't work. Can you even receive parameters from the url using JavaScript?

jdub53a at 2007-7-29 18:25:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

In javascript, you can get values like this:

var thisValue = '<%= servervariable %>';

alert(thisValue);

skp71a at 2007-7-29 18:25:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

> In javascript, you can get values like this:

>

> var thisValue = '<%= servervariable %>';

> alert(thisValue);

So would I use alert(thisValue) in the path for my images?

jdub53a at 2007-7-29 18:25:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

check the alert, what path it gets.

skp71a at 2007-7-29 18:25:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

I'm sorry. I'm not following what you are saying.

jdub53a at 2007-7-29 18:25:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7

I said, if you're getting the path from jsp, assign that path value in the js and alert, so that you can verify whether it's right or wrong.

skp71a at 2007-7-29 18:25:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8

ok thanks

jdub53a at 2007-7-29 18:25:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...