Show me the code! – By Davanum Srinivas

May 6, 2012

Deploying a Scala based Servlet in Liberty

Filed under: websphere — Tags: , , — Davanum Srinivas @ 8:16 pm

Fetch the scala servlet sample using git:

dims@dims-laptop-520:~$ git clone git://

Take a peek at the servlet code:

package org.peat.scalaservlet

import javax.servlet.http._
import javax.servlet._

class Example extends HttpServlet {

  override def doGet(request: HttpServletRequest, response: HttpServletResponse) = response.getWriter().println( exampleContent )

  def exampleContent(): String = { "Hello world, from a Scala servlet!" }

Build the sample using maven:

dims@dims-laptop-520:~/scala-servlet$ mvn war:war

Follow instructions from the following url to deploy the ScalaServlet.war:

Don’t forget to enable the servlet feature in the defaultServer/server.xml. Once the server is started peek at the logs

dims@dims-laptop-520:~/wlp$ cat ./usr/servers/defaultServer/logs/trace_12.05.04_22.50.54.0.log
[04/May/2012 22:50:54:141 -0700]  00000001 * id= [AUDIT   ] CWWKE0001I: The kernel was launched.
[04/May/2012 22:50:55:645 -0700]  0000001d * id=            [AUDIT   ] CWWKF0007I: A feature update is starting after 1.735 seconds.
[04/May/2012 22:50:55:682 -0700]  00000001 * id= [AUDIT   ] CWWKE0002I: The kernel started after 1.774
[04/May/2012 22:50:56:263 -0700]  00000016 * id=       [AUDIT   ] CWWKZ0058I: Application monitor started after 2.353 seconds.
[04/May/2012 22:50:56:265 -0700]  0000001d * id=            [AUDIT   ] CWWKF0008I: The feature update is complete after 2.356 seconds.
[04/May/2012 22:50:56:314 -0700]  0000001f * id=                    [AUDIT   ] CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host localhost  (IPv4: port 9080.
[04/May/2012 22:50:56:805 -0700]  00000020 * id=                     [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/ScalaServlet/*
[04/May/2012 22:50:56:811 -0700]  00000020 * id=                    [AUDIT   ] SRVE9998A: Application ScalaServlet added to web container.
[04/May/2012 22:50:56:814 -0700]  00000020 * id=              [AUDIT   ] CWWKZ0001I: The application ScalaServlet has started successfully.

All’s well, now just point your browser to http://localhost:9080/ScalaServlet/


October 10, 2011

WAS 7.0 Eclipse plugin (IBM WebSphere Application Server 7.0)

Filed under: websphere — Davanum Srinivas @ 2:14 pm

You can install a Eclipse plugin that works with IBM WebSphere Application Server 7.0 from the Eclipse Marketplace. Yes, In addition to supporting WebSphere Application Server v8.5 Alpha Liberty Profile, v8.0, it also supports the v7.0.

If you don’t have Eclipse Marketplace installed, Add a new site/repository for software updates –

See screen shot below:
Eclipse Plugin for WebSphere 7.0

December 1, 2009

Webpshere XML Feature pack – Looking for a XSLT 2.0 implementation other than Saxon?

Filed under: websphere — Tags: — Davanum Srinivas @ 6:38 am

Details are here:

The thin client is pretty interesting as it can be used with non-IBM JDK’s and outside the Websphere environment. Also, don’t forget to poke around the samples in xmlfepsamples.ear.

If you want to try this out just get the free Websphere for developers:

and install the XML Feature Pack using instructions here:
Installing and uninstalling the XML feature pack on distributed operating systems

UPDATED : (11:30 AM EST) A colleague pointed out that customers should check their license for exact/specific scenarios that they are allowed to use the thin client for their production scenarios.

March 12, 2009

Technotes about Axis2 and IBM Websphere co-existence

Filed under: websphere — Tags: , , — Davanum Srinivas @ 8:01 am

If you are deploying Axis2 in a WAR/EAR under Websphere 6.1 with Web services feature pack or Websphere 7.0, please read the following tech notes:

You can search for newer technotes here:

Exceptions like the following:
SRVE0026E: [Servlet Error]-[javax.servlet.UnavailableException: SRVE0201E:
Servlet [org.apache.axis2.transport.http.AxisServlet]: not a servlet class

java.lang.ClassCastException: incompatible with

SRVE0100E: Did not realize init()
exception thrown by servlet AxisServlet: java.lang.StackOverflowError

December 13, 2008

[Websphere] Article on securing web services using ws-security and policies in WAS7

Filed under: websphere — Davanum Srinivas @ 11:21 pm

here’s the link:

here are the highlights:

  • Deploying and configuring a secure Web service using asymmetric
  • Using Rational Application Developer to import a sample EAR file and
    configure Web services security policies and binding attachments for a
    Web service Client
  • Using the WebSphere Application Server console to configure the Web
    service Security policies for a sample service
  • Preparing Java™ Cryptography Extension (JCE) and JCEKS
    security credentials.

Blog at