ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » custom JSPViewer

Post new topic  Reply to topic
 custom JSPViewer « View previous topic :: View next topic » 
Author Message
vennela
PostPosted: Fri May 30, 2003 8:37 am    Post subject: custom JSPViewer Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
slnelson76
PostPosted: Fri May 30, 2003 8:49 am    Post subject: Yep Reply with quote

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
View user's profile Send private message
vennela
PostPosted: Fri May 30, 2003 11:00 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Prahasith
PostPosted: Fri May 30, 2003 11:32 am    Post subject: Reply with quote

Disciple

Joined: 16 May 2003
Posts: 184
Location: Kansas City

vennela:

The following link might be useful to you

http://www-3.ibm.com/software/webservers/appserv/doc/v40/aee/wasa_content/060401.html


prahasith
Back to top
View user's profile Send private message Send e-mail
vennela
PostPosted: Mon Jun 02, 2003 7:23 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Ratan
PostPosted: Mon Jun 02, 2003 8:43 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vennela
PostPosted: Mon Jun 02, 2003 12:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
slnelson76
PostPosted: Tue Jun 03, 2003 10:37 pm    Post subject: Hrrmmmm Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » custom JSPViewer
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.