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.
First of all thanks for reading this, and sorry if it turns into a long post.
I have written a very basic custom wfext in Java which extends ibi.webfoc.WFEXTDefault. Eventually the class will decrypt an encrypted cookie and set variables in the variable table for my reports based on the value of the cookie. Right now I'm just checking for the cookie's existence, and setting a WebFOCUS variable in either case.
The class is compiled and sitting in what I think is the classpath (ibi\WebFOCUS77\webapps\webfocus\WEB-INF\classes). I updated Site.wfs through the administration console to call the class's main function. Although the documentation I'm reading (WebFocus 7 Security and Administration) doesn't seem to mention it, I saw in another post here that I needed to edit ibi\WebFOCUS77\webapps\webfocus\WEB-INF\web.xml to tell it to load my class.
The documentation says that if my deployment is open-directory based this should be enough, but I don't know how to check if it is, or if it's .war based. I'm assuming .war based (and therefore I have to rebuild the .war as so far nothing has changed and my reports do not have access to the parameter I set in the wfext).
I am hoping that someone will be kind enough to help me answer the following questions: 1) Which .war file needs rebuilding for my class to be recognised by WebFOCUS (so far I haven't experimented as others are using the reporting server. I assume it's this one ibi\WebFOCUS77\webapps\webfocus.war)? 2) My class includes a number of system.out.println statements for debugging but I have no idea how I turn on tracing or where I would see the output. I do not have much experience with Tomcat or with Java servlets.
Please see relevant code extracts below:
wfext class
public class cookieInterpreter extends ibi.webfoc.WFEXTDefault
{
public cookieInterpreter() {
super();
System.out.println("[WFEXT] cookieInterpreter");
}
public long setAuthCookie(String[] NewVars, HttpServletRequest req) {
...
if(hasAuthCookie) {
NewVars[0] = "ROLE=Administrator";
return 0;
} else {
NewVars[0] = "ROLE=None";
return 1;
}
...
}
}
Sayed thanks for your response. However I'm still unsure on two things: 1) Is it the webfocus.war archive that I need? 2) Once the .war is re-deployed I understand it will be unpacked into a directory structure - is there any danger of this overwriting currently configuration files? I didn't deploy the current system and don't know what could break from the re-deploy.
WebFocus 7.7 Windows Server 2008 R2 HTML Reporting
After re-deploying the .war and figuring out how to enable tracing I see the following in my trace:
ibi.webfoc.wfutil.WFAction_CALL.Invoke(WFScriptAction.java:1523):Could not load user class: my.namespace.wfservlet.cookieInterpreter
Since re-deploying the updated .war I can see my class in ibi\WebFOCUS77\webapps\webfocus\WEB-INF\classes. Can anyone confirm that this is the correct location?
Is it possible that I'm having a namespacing problem? The namespace of my class's package matches the fully-qualified path I used in the Administration Console's Configuration -> Plugin -> WFEXT value.
I have no idea where to go next and unfortunately the documentation is not helping. Any assistance would be greatly appreciated.
WebFocus 7.7 Windows Server 2008 R2 HTML Reporting
ibi.webfoc.wfutil.WFAction_CALL.Invoke(WFScriptAction.java:1523):Could not load user class: my.namespace.wfservlet.cookieInterpreter
Since re-deploying the updated .war I can see my class in ibi\WebFOCUS77\webapps\webfocus\WEB-INF\classes. Can anyone confirm that this is the correct location?
If you are deploying this as a class, then it should be in ibi\WebFOCUS77\webapps\webfocus\WEB-INF\classes\my\namespace\wfservlet. classes must be deployed in a directory structure that matches the package name.
p.s. You should change your return types to a long ... 0L instead of 0, and 1L instead of 1.This message has been edited. Last edited by: dhagen,
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott