• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Runtime parameter?

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to pass a parameter to an applet, and this parameter must be set at runtime.

Can this be done, and if so, how?

I was thinking that you need to add something like this to the JSP that loads the applet:



Assuming that is correct, how do I set the "URL" parameter from within my backing bean of the JSP page?
[ May 09, 2005: Message edited by: Darrin Smith ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where are you getting the value for the URL parameter?
 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the parameter value will be determined by a user click.

This is actually inside of a JSF application that uses JSP. In fact, it is inside of a Java Studio Creator application that builds JSF that uses JSP.

In short, the user will select an image (which is on a preceding page), that relates to a servlet.

Does this make sense?


On further review...this question might best be asked in the JSF forum...

I'll post it there now.

Thanks.
[ May 09, 2005: Message edited by: Darrin Smith ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure I'm following you.
You can print the value of any bean property in a JSP with the jsp:getProperty tag.

<jsp:getProperty name="beanName" property="propertyName" />


OR if you're using the latest spec, you can use EL:
${beanName.propertyName}
 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:
I'm not sure I'm following you.



That's my fault.

Here is the scenario, and again, this may be more of a JSF question.

In JSF, you have backing beans for your pages (which is normally a JSP).

When you use JSF components, you have access to them to set their values.

For example, a 2D image component called my2DImage you can set the value just like you mention (my2DImage.value = ...".

For a parameter like this though (not a JSF component) there must be a way to "grab" it, but I saw no getParameter method. I was thinking that maybe there was some standard JSP thing (I'm not that familiar with JSP...obviously) that I could use.

BTW, all I have access to in the backing bean for the JSP I mention is the form.
 
reply
    Bookmark Topic Watch Topic
  • New Topic