Focal Point
calling jsp from fex and vice versa

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6531081722

May 09, 2007, 05:36 AM
kummy
calling jsp from fex and vice versa
Hi all,

Is it possible to call a JSP from FEX and vice versa.

My requirement is

1. from an FEX i need to pass a value to jsp

2. jsp takes the parameter and executes a query to fetch some values.

3. I will edit those values and update the table

4. Once it is done i need to go back to the parent fex.

Thanks,
Kummy
May 09, 2007, 10:56 AM
Francis Mariani
You're asking for a lot!

Here is half the work - calling a JSP from a FEX:

1) calljsp1.fex runs a report with drill-down on COUNTRY column calling calljsp.fex

-*-- calljsp1.fex ----------------------

TABLE FILE CAR
SUM
SALES/D10
BY COUNTRY
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=COUNTRY, FOCEXEC=CALLJSP (COUNTRY=COUNTRY), $
ENDSTYLE
END
-RUN

2) calljsp.fex has HTML to call test1.jsp passing the selected COUNTRY

-*-- calljsp.fex -----------------------

-DEFAULT &COUNTRY = 'FRANCE';

-HTMLFORM BEGIN
<HTML>
<BODY OnLoad="document.forms[0].submit();">

<form method="post" action="/eqcontrol/jsp/test1.jsp">
<input type="hidden" name="PARM1" value="!IBI.AMP.COUNTRY;">
</form>

</BODY>
</HTML>
-HTMLFORM END

3) test1.jsp displays the value that was passed.

<!-- test1.jsp --------------------- -->
<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>

<HTML>
<BODY>
<head>
<c:set var="PARM1" scope="application" value="${param.PARM1}" />

<%
String vParm1 = (String)request.getParameter("PARM1");
out.println("Parm Name: PARM1: " + "/ Parm Value: " + vParm1);
%>

</BODY>
</HTML>



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 10, 2007, 01:59 AM
kummy
thank you francis,

can i know in which folder i should keep my JSP.

may i know the specific path and settings i need to take care to achieve this.
May 10, 2007, 10:07 AM
Francis Mariani
Now you are asking non-WebFOCUS questions. You have to add an alias of the folder you keep your JSP in to the Java container app (Tomcat, New Atlanta...). This is done differently depending on the Java container app.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server