Solved

return codes from com.ibm.os390.security.PlatformReturned

Posted on 2004-08-24
1
465 Views
Last Modified: 2008-03-17
Hi,
   I need to use PlatformUser.authenticate method to authenticate users in RACF via a web page.  I need to display an error message when the userid or password is incorrect, and I also need to re-direct them to a different page when their password has expired.  I am trying to display the error codes from
PlatformReturned with the following simple code that I am using for testing:

String UserID = request.getParameter("UserID").trim().toUpperCase();
String Password = request.getParameter("PSWD").trim().toUpperCase();

PlatformReturned RACF_results = PlatformUser.authenticate(UserID, Password);
if (RACF_results == null) { out.println("Authentication successful"); }
else { out.println("RACF error = " + PlatformReturned.errno); }

but, I get the following error on the last line of code:

Can't make a static reference to nonstatic variable errno in class
com.ibm.os390.security.PlatformReturned.

Ultimately I just want to be able to determine if the userid or password is invalid and display a message, and redirect to a different page if the password has expired. Obviously I am going about this wrong and need help.

Thanks!



0
Comment
Question by:donz4
1 Comment
 
LVL 27

Accepted Solution

by:
rrz earned 200 total points
ID: 11882977
I don't know anything about   com.ibm.os390.security.PlatformReturned .
But, from the error message and the code you posted I will venture a guess.

>if (RACF_results == null) { out.println("Authentication successful"); }
Is that right ?  If success, then null is returned ?  So, if failure an object is returned ?
If, that is right then you should try  
else { out.println("RACF error = " + RACF_results.errno); }

rrz
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
decryption not working 5 80
ajax auto save 15 93
default methods vs abstract class 1 100
eclipse problems view not showing all the time 4 86
A Short Story about the Best File Recovery Software – Acronis True Image 2017
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now