Author Topic: ODWEK + servlet question  (Read 10623 times)

jkari

  • Guest
ODWEK + servlet question
« on: January 11, 2007, 01:20:16 AM »
Hello!
 
We are very interested to test ODWEK with servlets, and have been told that this needs WebSphere and some other stuff to run.
Servlet is a piece of software which is needed to be able to use yellow notes with pdf-documents via browser. We have upgraded to Ondemand v.8 (actually 7.1.2.8 on testbed, 7.1.2.3 on production) and have been told that all that stuff is now included with the license.
 
Has anybody here done the installation (of servlets) yet? How big work it is to install all the needed software to be able to test servlets?
 
Thanks in advance
 
Juha Kari
 
Juha Kari
Manager, Software Engineering
TietoEnator Processing & Network Oy
Global Operations
Direct +358 2072 69498
Mobile +358 50 564 0192
Fax +358 20 72 69400
Email:  Mailto:juha.kari@tietoenator.com
Aku Korhosen tie 2-4, P.O. Box 38
FIN-00441 Helsinki
www.tietoenator.com <http://www.tietoenator.com>

ElliottWadeADP

  • Guest
Re: ODWEK + servlet question
« Reply #1 on: February 09, 2007, 02:43:10 PM »
Hi, Juha-

We run a custom servlet in production that interfaces with OnDemand via the ODWEK java API.  We host WebSphere on Windows boxes.  I don't know how familiar you are with WebSphere or servlets in general, but installing the prerequisites for working with ODWEK using servlets should take you less than a day--its not "big work."

Let me try and give some detail about what you need to do.  You're going to need:
1) WebSphere or another Java application server
2) The ODWEK java API (JAR files)
3) A servlet with which to test, either the "out-of-box" one that comes with ODWEK or a custom one written by you. 
4) Since it sounds like you want to write a custom servlet, you'll want a development environment that can package your custom code for deployment to the application server.

As far as (1) installing WebSphere goes, it's a pretty simple process for a plain-vanilla setup.  Accept most of the defaults, and elect a local, one-instance installation, its less than an hour.

For (2) the ODWEK Java API, all you have to do is install ODWEK.  As you already know, it takes just a few minutes to install.

Now for the time-consuming details:
You'll need to reference ODWEK Java libaries in the classpath of your installed servlet's application context on the application server.  On Windows, by default you'll find the high-level library in C:\Program Files\IBM\OnDemand Web Enablement Kit\api\ODApi.jar.  You will also need to reference C:\Program Files\IBM\OnDemand Web Enablement Kit\servlets\ArsSVTInterface.class by including it's directory in the classpath.  Since ArsSVTInterface.class uses JNI to call native libraries (DLLs in Windows), you need the libraries referenced in the JVM library path.  In windows, you can simply copy all the DLL files in C:\Program Files\IBM\OnDemand Web Enablement Kit to your [windows system root]\system32 directory.  This is because the library path on Windows includes that directory by default.  On UNIX flavors, you'll want to set the JVM library path explicitly to include the location of the native libraries.

(3)
The ODWEK installation comes with a servlet (the so-called "out-of-box" servlet) that's ready-to-go and duplicates the behavior of the CGI interface.  The Servlet libraries are installed by default to C:\Program Files\IBM\OnDemand Web Enablement Kit\servlets\ArsWWWServlet.jar.  This is the library that you would "deploy" in order to use the out-of-box servlet.

Working with application servers such as WebSphere is famously complicated.  If you're not familiar with WebSphere (or at least familiar with Java application servers and servlets in general), packaging and deploying a custom servlet could be non-trivial for you.  I've been coding Java for 8+ years, and working with application servers off-and-on for maybe 3 years. I was new to WebSphere, and it took me a couple of days to figure out an appropriate deployment for our custom code.

For the IDE (4), although IBM would probably suggest using IBM's Rational Application Developer (which used to be called WebSphere Studio Application Developer) to develop and package your servlet for deployment, I've been using an open-source environment called Lomboz.  Both environments are based on Eclipse, so if you know Eclipse you'll be comfortable.

RAD is at http://www-306.ibm.com/software/awdtools/developer/application/
Lomboz is at http://forge.objectweb.org/projects/lomboz

Hope this helps,
Elliott

jkari

  • Guest
Re: ODWEK + servlet question
« Reply #2 on: March 27, 2007, 04:10:49 AM »
Elliot,

thank You for your (long) and good answer.
Since this feels quite complicated and also costfully (because there are some software components we have to buy from IBM), we have decided to try an other way: IBM succested that we install their new product called WEBI and test it first.

This is now in process, and I'll try to tell here our first expieriences.

There is more info about WEBI on IBM website:
http://www-1.ibm.com/support/docview.wss?uid=swg21188995

wbr.,
Juha Kari

steven

  • Guest
Re: ODWEK + servlet question
« Reply #3 on: August 27, 2010, 06:08:03 AM »
Relative to this same subject, I've got everything lined up nicely, ie, Windows 2003 server, Websphere 6.1, ODWEK 8.4.1, CMOD 8.4.1 and a customized servlet.  I've customized the web pages so when I open them up it shows our logo and easy exit from the pages.  Here's my challenges:  I've loaded a csv or xls document in CMOD.  When I try to view it, I get a box that gives me only two opportunities, save or cancel.  I'd really like to see an "open" in the box.  I've make changes to the arswww.ini, but to no avail.  As far as the second issue, when I open a folder to view, I can't backspace and get the page I want.  There must be some timing in code in Websphere I'm missing.  Can anyone help?  I'd be very appreciative!

javed.khan

  • Guest
Re: ODWEK + servlet question
« Reply #4 on: February 07, 2011, 02:23:53 AM »
Hi Steven,

Have you set the response attributes in the Servlet that displays the content? You will have to put the below statement before you display the content response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=\""+fileName+"\"");