Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Java servlet user authentication

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Java servlet user authentication

    Okay, I found that the problem is the following, from the log: java.lang.ClassNotFoundException: com.ibm.as400.access.AS400 But I don't understand this, because WebSphere is set to use the system classpath, which is as follows: '.:/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar:/home/liam/html:/home/liam/myjsps:/home/ITSupportRota:/home/EmailEngine/mail.jar:/home/EmailEngine/activation.jar:/home/EmailEngine/pop3.jar:/home/CCSInquiry:/home/CCSInquiry/servlet.jar' And it runs okay if invoked from the Qshell command line using a caller, so that tells me the system classpath is finding all the classes it needs when the code is run interactively. Am I missing something obvious here? Any help is much appreciated - I've been trying to sort this out for most of the day! And it's Friday and I want to go home! Thanks, Liam.

  • #2
    Java servlet user authentication

    Hi, I have a Java servlet that presents a login/password form. The user needs to enter their AS/400 user id and password, and then I call a helper class that uses the authenticate() method of the AS400 class to verify that the user and pwd are valid. The authentication routine works if I call it from the QShell command line, but doesn't work if called from the Java servlet. The code I'm using to authenticate is attached. Can anyone shed any light on this problem? Or is there another way that I should be doing this? Thanks for your help, Liam.
    Code

    Comment


    • #3
      Java servlet user authentication

      Okay, found the problem. The system classpath used by WebSphere does not appear to be the same classpath that I set for the CLASSPATH envvar - I thought it should be. So in Websphere I had to say don't use system classpath, then specify my own classpath to jt400.jar, then checked the box to say use the system classpath. End result is the jt400 class path gets appended to the Websphere system classpath, and now everything's working as it should. Best regards, Liam.

      Comment

      Working...
      X