Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 724
  • Last Modified:

Java method .getLocale in Servlet returns an error on Domino Server

Hi there!

I finally got some servlets running on a Domino 6.5 Server and now it seems it's not allowed to use the .getLocale method (returning a java.util.Locale) on the HttpServletRequest variable.

Has anyone else had  similar problem?

All works fine when I run the Servlet on my local Tomcat Server, but when I run the Servlet on the Domino Server, it runs, but the following line retruns an error:

java.util.Locale clientLocale = request.getLocale();

(request is the HttpServletRequest var from the doGet method of my Servlet)

The error is:

HTTP JVM: java.lang.NoSuchMethodError: javax.servlet.ServletRequest: method getLocale()Ljava/util/Locale; not found: javax.servlet.ServletRequest: method getLocale()Ljava/util/Locale; not found

Any ideas?

0
prohacx
Asked:
prohacx
3 Solutions
 
qwaleteeCommented:
Have to be careful about JVM and servlet engine versions.  Domino 6.5 uses JDK 1.3 and JSDK 2.0.
0
 
HemanthaKumarCommented:
AS Domino supports jsdk 2.0.. I would suggest you to run your servlets on tomcat or most preferably websphere as it integrates with domino easily..

~Hemanth
0
 
pgloorCommented:
This is not an error. This is part of IBMs marketing strategies for WebSphere ;-).

JSDK 2.0 is so old you even can't find the API docs on Sun's web site anymore. javax.servlet.ServletRequest.getLocal() has been available at least since 2001 (JSDK 2.1 or 2.2).

This is from the Notes 6.0 designer help: "Sun periodically updates the JDK and JSDK. Lotus Domino Designer Release 6- supports JDK 1.3 and JSDK 2.0. Domino quarterly maintenance releases (QMRs) often incorporate Sun's upgrades, so you should check the QMR Release Notes to verify the supported JDK and JSDK versions". But where are the upgrades? I've been looking so often for nothing.

At the moment all you can do is either to change your servlet, probably loosing some functionality, or move to a J2EE compliant application server.

What about WebSphere Portal Server Express? With Domino it comes for free with a 20 user license.

Personally I'm using Tomcat and JBoss with SSO from keysolutions.com

Peter
0
 
prohacxAuthor Commented:
Yep, I noticed it myself, browsing through the JSDK on java.sun.com... The .getLocale() method is only available from version 2.3 onwards, so I guess I'll have to either not implement this functionality or use another Java server.

Thank you all for your help!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now