cancel
Showing results for 
Search instead for 
Did you mean: 

linkink applets and servlets

Former Member
0 Kudos

In a same page, how can i pass parameters from an applet to a servlet ? Thanks in advance

Regards,

Antonio

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Antonio,

As long as your web page ends with the .irpt file extension, you can add name/value pair to the servlet definition, for example,

<PARAM NAME="Param.1" VALUE="">.

The name value pair can be captured from the session properties or passed in the URL.

Kind Regards,

Diana Hoppe

Former Member
0 Kudos

Hi Diana,

In your example, the Category value comes from an URL or a session variable . In my case, I have an browse applet and a servlet definition in my .irpt file . I want to pass the getSelectedItem() from the browse applet to value pair in the servlet definition . How do I pass it ?

Best Regards,

Antonio R Rubalcaba

Former Member
0 Kudos

Hi Antonio,

You could use an iFrame on your page, the source of the iFrame would be a separate page containing the servlet. I'm sure others on the forum will suggest ways to do this, the iFrame is what I have seen used before.

Diana

Former Member
0 Kudos

Hi Diana,

Yes, I have used the iFrame solution in my past proyects . Anyway, it makes the application maintenance a little bit cumbersome . If there is no another solution , I will use it again .

For sure, an applet equivalent to the HTML input field would come very handful .

Kind Regards,

Antonio R. Rubalcaba

Former Member
0 Kudos

Antonio,

It looks like it is possible to reload the existing irpt page. In the javascript function, set the property value, and then call the javascript reload(true) function, for example:

document.BrowseCategory.setPropertyValue("Category", selCat);

location.reload(true);

- Diana

Answers (0)