Author |
Message
|
vennela |
Posted: Fri May 30, 2003 8:37 am Post subject: custom JSPViewer |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
I am trying to customize the web client. I have written another class that extends JSPViewer class. I have compile my class and it is in the directory called C:\samples
What is the value that I specify in the Webclient.properties file
Code: |
# JSPViewer uses JSPs instead of HTML template files
DefaultViewer=com.ibm.workflow.servlet.client.JSPViewer |
My class is in the directory C:\samples and is called MyJSPViewer.
Should I change the classpath value in WAS' webclient application server?
Thanks
-------
Venny
Last edited by vennela on Mon Jun 02, 2003 7:34 am; edited 1 time in total |
|
Back to top |
|
 |
slnelson76 |
Posted: Fri May 30, 2003 8:49 am Post subject: Yep |
|
|
Novice
Joined: 02 Apr 2003 Posts: 13 Location: Iowa
|
First I am going to assume you have the class compiled and that you have not specified a package for the class to belong to.....might want to do this, but for the simplicity I am going to assume you haven't
You need to add C:\samples to your WAS classpath
The value you would specify in the Webclient.properties is
DefaultViewer=MyJSPViewer
Make SURE you have extended JSPViewer and only overriddin the things you want to change or all heck will break loose.
-Steve |
|
Back to top |
|
 |
vennela |
Posted: Fri May 30, 2003 11:00 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Any idea how to set the CLASSPATH in WAS 5. I used to do it in WAS 4. I am struggling a lot with the new admin console in WAS 5 and I am having hard time finding the setting.
Thanks
-------
Venny |
|
Back to top |
|
 |
Prahasith |
Posted: Fri May 30, 2003 11:32 am Post subject: |
|
|
 Disciple
Joined: 16 May 2003 Posts: 184 Location: Kansas City
|
|
Back to top |
|
 |
vennela |
Posted: Mon Jun 02, 2003 7:23 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Now I have started working with WAS4 and MQWF332 to see if I will be comfortable there.
This is what I have done.
I have copied JSPViewer.java file. Named it MyJSPViewer.java.
I haven't changed anything in the file MyJSPViewer.java except
Code: |
public class MyJSPViewer extends JSPViewer |
In the webclient.properties file, I specified the DefaultViewer=MyJSPViewer
I have added the required CLASSPATH in the WAS Application Server's JVM settings. I have restarted the Application server.
The web browser's error is
HTTP 404 - File not found
Internet Explorer
In the servlet-out.log it says
Code: |
com.ibm.workflow.servlet.client.ClientException: j
ava.lang.NoClassDefFoundError: MyJSPViewer (wrong name: com/ibm/workflow/servlet/client/MyJSPViewer)
|
Is it because in the MyJSPViewer.java class the first line is
Code: |
package com.ibm.workflow.servlet.client; |
If I comment this line then I can't compile. If I compile without commenting this line and add it to the fmcohcli.jar file then I am getting a security exception (the web client doc warns about this one).
I think it is Java question rather than anything else. Is there a way for me to compile the source by commenting the package statement.
Thanks
-------
Venny |
|
Back to top |
|
 |
Ratan |
Posted: Mon Jun 02, 2003 8:43 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
Where are you putting your MyJSPViewer.java file. From what I understand your problem could be the location. Place it at defaultdir/com/ibm/workflow/servlet/client/ .
Or else you can add it to fmcohcli.jar at com/ibm/workflow/servlet/client location. _________________ -Ratan |
|
Back to top |
|
 |
vennela |
Posted: Mon Jun 02, 2003 12:59 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Looks like I have made very little progress. But this is what I did.
The java class I wrote is MyJSPViewer.java
Here is the code
Code: |
import com.ibm.workflow.api.*;
import java.util.*;
import java.io.File;
import javax.servlet.http.HttpServletRequest;
import com.ibm.workflow.servlet.client.*;
public class MyJSPViewer extends JSPViewer {
public MyJSPViewer () {
}
public ResponsePage logonResponse(RequestContext context) throws ClientException{
BuiltinHandler builtin = context.getBuiltinHandler();
builtin.queryProcessTemplateLists(context);
HttpServletRequest request = context.getRequest();
ResponsePage result = new ResponsePage(context, "/forms/ListViewer.jsp");
return result;
}
}
|
I have set the classpath and everything. Now WAS is able to find the class but I am getting an error when I logon to the client.
This is how the error looks like.
Code: |
com.ibm.workflow.servlet.client.ClientException: File Main not found.
at com.ibm.workflow.servlet.client.Main.sendResponse(Unknown Source)
at com.ibm.workflow.servlet.client.Main.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
|
From what it looks to me, the Main servlet is not being invoked when I Logon to Workflow. Not sure how to proceed from here.
Thanks
-------
Venny |
|
Back to top |
|
 |
slnelson76 |
Posted: Tue Jun 03, 2003 10:37 pm Post subject: Hrrmmmm |
|
|
Novice
Joined: 02 Apr 2003 Posts: 13 Location: Iowa
|
Generally the file Main not found indicates that the Main Servlet failed to initialise. Look further up in the Log file where the Context is being initialised and see if there is an error message there.
-Steve |
|
Back to top |
|
 |
|