Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [WORKAROUND] Excel 2003 WFServlet already Open

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[WORKAROUND] Excel 2003 WFServlet already Open
 Login/Join
 
Expert
posted
Hi all,

FYI, in regards to this topic, Excel 2003 WFServlet already Open, dhagen has been providing a workaround for many of us. Instead of sending PMs to him and waiting for his responses, here I am attaching the workaround to the message board so it is easier for everyone to download. The attached zip file (please see below the message) has two files, one is the jar file, and the other is the explanation of the workaround in Word doc.

You will need to login to Focal Point in order to download the file. If you haven't done so, please register first.

Please note that, this is something that dhagen did, not Information Builders. As such, you are on your own for any problems that may result. Information Builders is not responsible for support of this etc. For the record from dhagen, there has not been any reported problems by any of the now 30+ implementations.

Please also note that, this is 7.6.x specific. If you plan on implementing this in a 7.1.x or sooner, then there are other changes that have to happen.

Many thanks to dhagen and those have helped on this issue. Good One Happy July 4th to all!!

Cheers,

Kerry

This message has been edited. Last edited by: Kerry,


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.


Zip/GZ archiveExcel_2003_WFServlet_already_Open.zip (10 Kb, 224 downloads) files for the issue: Excel 2003 WFServlet already Open
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Expert
posted Hide Post
Ms. Zhan,

Thank You, very much!!

Darryl, EXCELLENT!!!!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
For those that are using this, it appears that in Version 7.6.5 there has been a change in the post back URL for Excel formats. The URL now has a file with a .htm extension while in previous releases it was .xht. I you plan on using this method for 7.6.5, then the ENtemplate.xml and web.xml will have to be changed.

The web.xml should be changed to add a second filter-mapping tag. This can be added to the web.xml after the existing tag. It should be:
  
  <filter-mapping>
    <filter-name>ForwardExcelRequest</filter-name>
    <url-pattern>*.htm</url-pattern>
  </filter-mapping>


The ENtemplate.xml should then be changed to account for the new .htm extension thusly:
     if (url.indexOf(".xht") != -1 || url.indexOf(".htm") != -1) {
          var url0 = url.split("?");
          var urlHttp = url0[0].split("WFServlet");
          var urlQuery = url0[1].split("PG_File=");
          url = urlHttp[0] + urlQuery[1] + "?" + url0[1];
     } 


Also, there was someone looking to customize the name of a PDF document (for when the user would like to save the file locally on thier machine) a while back and I stated that this can also be done using this technique. To change the name of a downloaded PDF, you can add the following (third) filter-mapping to the web.xml file:
  <filter-mapping>
    <filter-name>ForwardExcelRequest</filter-name>
    <url-pattern>*.pdf</url-pattern>
  </filter-mapping>


Then if you have the final ENtemplate.xml look like this:
    <template name='message_viewer_redirect_body_default'>
        <![CDATA[
          <HTML>
               <Head>
                    <Title><inserttext txt_webfocus_report /></Title>
                    <insertvariable ADVISE_MESSAGEBOX />	                
                    <Script Language="JavaScript">                             
                    <!--                                                    
                    function getrep() {  
                         var url="<insertvariable GOTO_LOCATION />";
                         if (url.indexOf(".xht") != -1 || url.indexOf(".htm") != -1) {
                              var url0 = url.split("?");
                              var urlHttp = url0[0].split("WFServlet");
                              var urlQuery = url0[1].split("PG_File=");
                              url = urlHttp[0] + urlQuery[1] + "?" + url0[1];
                         } 
                         else if (url.indexOf(".pdf") != -1) {
                              var pdfName = "<insertvariable PDF_NAME />" == "" ? "ReportOutput.pdf" : "<insertvariable PDF_NAME />" + ".pdf";
                              var url0 = url.split("?");
                              var urlHttp = url0[0].split("WFServlet");
                              url = urlHttp[0] + pdfName + "?" + url0[1];
                         }
                         if(parseInt(window.navigator.appVersion,10)<4)          
                              location.assign(url);   
                         else                                                    
                              location.replace(url);   
                    } 
                    //-->                                                   
                    </Script>
               </Head>                                          
               <body onload="getrep()"></BODY>                           
          </HTML>
        ]]>
    </template>


Now, if you pass a parameter called PDF_NAME as part of the http request, then that value is used as the name of the pdf file in the user's browser. If none is passed, then the name ReportOutput.pdf is used.

Later


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Darryl,

Thanks for this information. We just upgraded to 765 on Tuesday evening and broke one of the user apps that was expected a .xht. I have opened a case with CSS.

It would be really nice if IBI doc'd stuff like this........

Can you explain more fully what the first part of your changes does? My developer would like the extension to be xht and not htm.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
No problem.

The post back process for retrieving pdf and excel files generates a html file that contains a url that is submitted *** soon as the html page loads. The url is parsed into the final html page with the tag. What the code above does is check the tag for the existance of either a .htm or .xht. If it exists, then it changes the url to the desired value. You should ask your developer to toss in a couple of alerts in the code to see what the original and final values of the url are. An example of the original url would be:
http://localhost/ibi_apps/WFServlet?PG_REQTYPE=REDIRECT...PG_File=mavxpcdj.htm  


The JavaScript would change the url to:
  
http://localhost/ibi_apps/mavxpcdj.htm?PG_REQTYPE=REDIR...PG_File=mavxpcdj.htm


So, if your developer would then to a split on urlQuery[1], then they could easily replace the .htm with .xht ... something like:
  
var fName = urlQuery[1].split(".");
url = urlHttp[0] + fName[0] + ".xht" + "?" + url0[1];


But I'm guessing by your message that you would like to reconstruct the url with a .xht at the end of the rather than a .htm. They should be able to do that very quickly by splitting the url on "PG_File", then splitting value [1] at the ".", then rebuilding the url with the ".xht" .... I think I'm rambling ... you get the idea.

I Hope this helped.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Thanks, D. I understand the basics but am not a javascript person so would have to severly diagnose your code to understand it. But I could, no doubt.

The issue I had was that this behaviour was not documented in the SofNF documents. This also happened between 5.3 and 7.6 and messed up this particular application.

Thanks again.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
What can we do to get a "New Feature" added that would allow an "AS" name to be used / appended to the ON TABLE command, something like this:

ON TABLE PCHOLD FORMAT EXL2K AS something

Where "something" is a unique file id computed / -SET as desired which would replace the WFservlet? … Wouldn’t that be nice?




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Silver Member
posted Hide Post
Doug,

To request a new feature for this or any other functionality, you can open a new case with IBI Customer Support.

I believe there is a new feature for this exact functionality already in the works. If you open a case under your site code, your case will be linked with the other cases requesting this new feature. As the feature is being developed and incorporated into the product, you will be informed of the status.

Hope this helps!
 
Posts: 22 | Location: Atlanta | Registered: January 19, 2007Report This Post
Member
posted Hide Post
Hi all,

If you guys have the solution for version 7.1, please post the instructions or email me at shane.tran@lmco.com.

Thanks a lot,

Shane Tran


7.1.6
 
Posts: 11 | Registered: March 09, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [WORKAROUND] Excel 2003 WFServlet already Open

Copyright © 1996-2020 Information Builders