Skip to Content
0
Former Member
Jun 21, 2010 at 10:33 AM

Webi Reports

18 Views

one.jsp

<html>

<body>

<!--

change the localhost and application directory as per your use

as per your use method=post or method=get

-->

<form name=form1 action="http://localhost:8080/testingapplet/two.jsp" method=post>

<b>Enter Param1:</b><input type=text name=param1 value="">

<b>Enter Param2:</b><input type=text name=param2 value="">

<input type=submit value=Okey>

</form>

</body>

</html>

two.jsp

<html>

<body>

<%

String pValue1=request.getParameter("param1");

String pValue2=request.getParameter("param2");

out.println("Checking param1 and param2 values:" + pValue1 + pValue2);

//use the parmeter values in the URL

IEnterpriseSession sess = CrystalEnterprise.getSessionMgr().logon ("username", "password", "<cms>:</port>","secEnterprise");

String token = sess.getLogonTokenMgr().createLogonToken("",120,100);

response.sendRedirect("http://<server>:<port>/OpenDocument/opendoc/openDocument.jsp?iDocID=docid&sDocName=Salesin2003&sIDType=CUID&token=" + token);

%>

</body>

</html>

Edited by: Jonathan Roy 5 on Jun 21, 2010 2:54 PM