cancel
Showing results for 
Search instead for 
Did you mean: 

XMII Servlet Parameter

Former Member
0 Kudos

Hello,

I have a query which I want to call from a servlet. I have a parameter in the query Equipment = '[Param.1]'

I tried using the following code for the servlet page, but it did not return anyting from the query even though xyz was a valid equipment number.

<html>

<body>

<SERVLET NAME="Illuminator">

<PARAM name="QueryTemplate" value="UserTemplates/TESTSQL">

<PARAM NAME="Content-Type" VALUE="text/xml">

<PARAM NAME="StyleSheet"

VALUE="http://localhost/Illuminator/StyleSheets/IllumRowsetHTML.xsl">

<PARAM name="Param.1" value="xyz">

</SERVLET>

</body>

</html>

Also, how can I call the servlet page from an html webpage and pass the Param.1 in a url. I have a simple webpage which has a text box and a button, on click I want to open the servlet webpage and pass it the value from the text box.

Thanks,

Mahwish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Add in the body of your irpt page the text {Param.1}.

What shows up?

What is the actual URL for the page?

It should be something like http://servername/MyPage.irpt?Param.1=xyz

Former Member
0 Kudos

Hi Mahwish,

I think it is better to create a variable which doesn't have any special character like dot(.)

Thanks,

Rajesh

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Mahwish,

If you still can't get it to work - post the query template's xml code so that I can take a look.

Joe

Former Member
0 Kudos

Thank you all for your help, finnaly got it working with the help of one of our java guys.

Thanks!

Mahwish

Former Member
0 Kudos

Perhaps you can help me out since you worked it out with your Java guys. I have a servlet like you that has 3 parameters. I have a form that is calling the servlet page. How do I send the values from the form to the servlet?

Page 1 form has 3 elements:

<p>Customer Number:&nbsp;&nbsp; <input type="text" name="txtCustomer" size="20"></p>

<p>Sales Organization:&nbsp;&nbsp; <input type="text" name="txtSalesOrg" size="20"></p>

<p>Material:&nbsp;&nbsp;&nbsp; <input type="text" name="txtMaterial" size="20"></p>

Page 2 is an .irpt with servlet:

<SERVLET NAME="Illuminator">

<PARAM NAME="QueryTemplate" VALUE="Aware/SalesOrderQuery">

<PARAM NAME="StyleSheet" VALUE="http://localhost/Illuminator/StyleSheets/IllumRowsetTinyHTML.xsl">

<PARAM NAME="Content-Type" VALUE="text/xml">

<PARAM NAME="MappedParamTarget.1" VALUE="Customer=''">

<PARAM NAME="MappedParamTarget.2" VALUE="SalesOrganization=''">

<PARAM NAME="MappedParamTarget.3" VALUE="Material=''">

Thanks for your assistance.

Kim

Former Member
0 Kudos

Kim,

Try this:

On the form have an action which calls the irpt page, such as:

<form name = "form1" action="Page1.irpt" method="post">

<input type="text" name = "txtCustomer">

<input type="text" name = "txtSalesOrg">

<input type="text" name = "txtMaterial">

</form>

On the irpt page make sure the txt element name matches your variable name as such, assuming that on your query Param.1 = Customer, Param.2 = Sales Org, Param.3 = Material

<SERVLET NAME="Illuminator">

<PARAM name="QueryTemplate" value="UserTemplates/Query1">

<PARAM NAME="Content-Type" VALUE="text/xml">

<PARAM NAME="StyleSheet" VALUE="http://localhost/Illuminator/StyleSheets/IllumRowsetHTML.xsl">

<PARAM name="Param.1" VALUE=''>

<PARAM name="Param.2" VALUE=''>

<PARAM name="Param.3" VALUE=''>

</SERVLET>

Let me know if this works for you.

Mahwish

Former Member
0 Kudos

In your query template if you set Param.1 = xyz on the Parameters tab - do you get results?

Joe

Former Member
0 Kudos

Yes, if I set the first parameter in the query iteself then the results are coming through fine.

Former Member
0 Kudos

Does your irpt page return the column headings with no data or just nothing on the page? Are there any errors in the Java Console?

Joe

Former Member
0 Kudos

The irpt returns the column headings but with no data. Don't see any errors on the console. Is there any log I can look at on the xmii side to see the values coming through, or put some sort of a trace on the servlet.

Former Member
0 Kudos

Hi Mahwish,

I think for this question you can get answer from the other one which yu have a thread.

Thanks,

Rajesh.