cancel
Showing results for 
Search instead for 
Did you mean: 

Server Side Includes

former_member67937
Participant
0 Kudos

Normally, a server side include uses the .shtml extension, but since xMII uses .irpt, the includes are not working. How can I do a server side include using an .irpt extension? If I cannot do this, does anyone have an option for doing this?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member67937
Participant
0 Kudos

I understand what you are doing; however, let me explain our situation a little further. Say you have five .irpts. Each .irpt is a simple Servlet with an XSL stylesheet that transforms the data into HTML. Some users will load all five pages, and other users will only load maybe two or three, so the inclusions are dynamic. It would then put each of the results into it's own DIV or SPAN. The result is similar to a dynamic dashboard such as iGoogle.

I'm leaning towards having one Xacute routine that combines the results of the HTML into one, and then pass it back to the page, but I was hoping to do it w/o Xacute.

Former Member
0 Kudos

Interesting problem Todd

Just off the cuff... Use AJAX to create the DIVs based on session parameters?

--Amy Smith

--Haworth

jcgood25
Active Contributor
0 Kudos

iFrames (can be borderless too if the container aspects of your chunk of stuff is all rendered by your xslt and css) would work great for the holes on your display that simply call the irpt pages.

What dictates the layout of the page? Is it the same for all users, meaning the 5 irpt calling areas will only fill in when relevant (leaving holes) or will it always be squeezed together?

If you already have the 5 irpts pages done, each having their own <SERVLET/> + xsl for html transformation then it really just boils down to how to formulate the page itself. What dictates that User1 sees all 5 irpts, but User2 only sees irpt 1,3, and 5?

jcgood25
Active Contributor
0 Kudos

As you have found, the shtml concept will not work in conjunction with irpt pages. When this file extension is found the page is opened, all of the SERVLET sections are rendered, the and {##token} replacements happen and the page is streamed to the client browser. The ReportServlet that processes the irpt pages doesn't do anything with the include .shtml files like you are trying (probably worked with IIS on your 11.5 though).

Amy's creative example is one way to have it push content into the page on the server side, but it is just leveraging the built-in SERVLET mechanism for irpts.

Another option would be just to include a js file script block and in your js file do all of the

document.writeln("xxx");

statements in your js file.

Former Member
0 Kudos

Hi Todd,

I had exactly the same question about how to do includes. There is no such animal in MII. However...

I did the following, creating xsl to generate the "include". Note the use of Simulator and the parameter displayname that is passed to the xsl.


<!-- Title bar -->
	<SERVLET NAME="Illuminator">
		<PARAM NAME="Server" VALUE="Simulator"/>
		<PARAM NAME="Mode" VALUE="ModeList"/>
		<PARAM NAME="Content-Type" VALUE="text/xml"/>
		<PARAM NAME="StyleSheet" VALUE="/XMII/CM/APEX/xsl/titleBar.xsl"/>
		<PARAM NAME="displayname" VALUE="{displayname}"/>
	</SERVLET>

--Amy Smith

--Haworth