Author |
Message
|
kotha |
Posted: Tue Jun 28, 2005 9:28 am Post subject: Webclient-Servlet |
|
|
Partisan
Joined: 12 Mar 2005 Posts: 333
|
I want to modify the webclient servlet to meet the needs of my application.
I have found the below code in web.xml file
<servlet-class>com.ibm.workflow.servlet.client.Main</servlet-class>
I made a search in WAS but not found any!!!.
Where exactly the servlet class and java located in the WAS?? |
|
Back to top |
|
 |
Ratan |
Posted: Tue Jun 28, 2005 10:08 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
to customize the WebClient, you have to customize the viewer and command handler depending on your needs.
com.ibm.workflow.servlet.client.Main would be in the fmcojcli.jar and I dont think you have to touch it. _________________ -Ratan |
|
Back to top |
|
 |
kotha |
Posted: Tue Jun 28, 2005 10:25 am Post subject: |
|
|
Partisan
Joined: 12 Mar 2005 Posts: 333
|
Thax Ratan,
The issue is:
I am using web client. When a form submitted, the response is going to a default JSP page saying that your request is submitted and etc....
I assume that whenever form is submitted, it is going to a servlet and after manipulations, the display going to JSP. My concern is to modify the url at response.sendRedirect("something.jsp....") in the servlet [as I am using IIS, I need to mention a asp page. I found help to modify the servlet in other forum to redirect to ASP from servlet.]
I checked the JSP files in forms folder(WAS) but they are for the webclient displya purpose.
the Basic question is: How does the webclient work??. Is webclient use servlet??.
I have no idea how the webclient works.
thx in advance |
|
Back to top |
|
 |
Ratan |
Posted: Tue Jun 28, 2005 10:32 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
Look at the MVC pattern for Web Applications. WF Webclient is implemented using MVC Patter.
I think you need to modify the JSPViewer class to redirect a response. _________________ -Ratan |
|
Back to top |
|
 |
kotha |
Posted: Tue Jun 28, 2005 10:41 am Post subject: |
|
|
Partisan
Joined: 12 Mar 2005 Posts: 333
|
Thank you. I will check JSPViewer. |
|
Back to top |
|
 |
kotha |
Posted: Wed Jun 29, 2005 11:21 am Post subject: |
|
|
Partisan
Joined: 12 Mar 2005 Posts: 333
|
I have got the solution. The page that displays after a new process instance created and started has to be modified as we dont have the access to the servlet.
UseRedirect should be set to true and the SuccessLocation can be any page on any server.
Code to be included:
Code: |
<input type="hidden" name="UseRedirect" value="true">
<input type="hidden" name="SuccessLocation" value="Anypage.asp"> |
|
|
Back to top |
|
 |
kotha |
Posted: Thu Jun 30, 2005 10:16 am Post subject: |
|
|
Partisan
Joined: 12 Mar 2005 Posts: 333
|
I am trying to get the input data structure member values into a Jsp page.
the code is given below:
Code: |
<%@ page language="java" info="'Your request is submitted' JSP" %>
<%@ page errorPage="/forms/ViewError.jsp" %>
<%@ page import="java.util.*,com.ibm.workflow.api.*,com.ibm.workflow.api.ProcessInstancePackage.*,
com.ibm.workflow.api.ItemPackage.*,com.ibm.workflow.servlet.client.*" %>
<jsp:useBean id="context" scope="request"
type="com.ibm.workflow.servlet.client.RequestContext"/>
<html>
<%
ReadOnlyContainer inData = context.getContainer();
WorkItem workItem = context.getWorkItem();
context.getprocessInstanceName();
String Jobname = context.getMemberValue(inData, "_PROCESS", "<notset>");
String user = context.getUserID();
//String serverid = context.getMemberValue(inData, "serverid", "<notset>");
%>
<head>
<title>Your request has been submitted</title>
<link rel="stylesheet" href="../jdrcss.css">
</head>
<body>
<input type="text" name="instance" value="<%=context.getInstance().name()%>">
<input type="text" name="starter" value="<%=user%>">
<input type="text" name="Jobname" value="<%=Jobname%>">
</body>
</html> |
Instance, starter values are fine but when I try to get Jobname, input data structure member, I am getting null pointer exception.
How can I get the data structure elements into a JSP page?? |
|
Back to top |
|
 |
jmac |
Posted: Thu Jun 30, 2005 11:46 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
It seems to me that the most likely cause for the null pointer would be if inData is null. Now I am not sure why that would be the case, but since you have the workitem anyway, why not try getting the input container with
Code: |
workItem.inContainer() |
_________________ John McDonald
RETIRED |
|
Back to top |
|
 |
|