• Post Reply Bookmark Topic Watch Topic
  • New Topic

Runtime parameter?  RSS feed

 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!