One way to validate OAF session in custom jsp/servlet in Oracle applications. Method will return "INVALID" if the current session is invalid, "EXPIRED" if current session is expired and "VALID" if current session is valid.
You can also create new session if current session is invalid, wiill post detail in some other post. But, usually if Functionality is part of existing oracle application module, then you will just want to validate if current session is valid or not. If not, you may want to redirect to /OA_HTML/AppsLocalLogin.jsp page.
public static String validateOAFSession(HttpServletRequest request, HttpServletResponse response) {
WebAppsContext appsContext = null;
try {
appsContext = WebRequestUtil.createWebAppsContext(request, response);
if (appsContext != null) {
String sessionCookie = WebRequestUtil.getSessionCookie(request, response, appsContext);
if (sessionCookie == null) {
return "INVALID";
}
if (!appsContext.validateSession(sessionCookie, true)) {
return "EXPIRED";
}
}
} catch (IOException ioe) {
return "INVALID";
} finally {
if (appsContext != null) {
appsContext.freeWebAppsContext();
}
}
return "VALID";
}
You can also create new session if current session is invalid, wiill post detail in some other post. But, usually if Functionality is part of existing oracle application module, then you will just want to validate if current session is valid or not. If not, you may want to redirect to /OA_HTML/AppsLocalLogin.jsp page.
public static String validateOAFSession(HttpServletRequest request, HttpServletResponse response) {
WebAppsContext appsContext = null;
try {
appsContext = WebRequestUtil.createWebAppsContext(request, response);
if (appsContext != null) {
String sessionCookie = WebRequestUtil.getSessionCookie(request, response, appsContext);
if (sessionCookie == null) {
return "INVALID";
}
if (!appsContext.validateSession(sessionCookie, true)) {
return "EXPIRED";
}
}
} catch (IOException ioe) {
return "INVALID";
} finally {
if (appsContext != null) {
appsContext.freeWebAppsContext();
}
}
return "VALID";
}
This applies not only during the IQ, OQ and PQ validation phases, but far earlier,
ReplyDeletebeginning with the first meeting, and continuing through analysis of your process.
Software validation is a part of the design validation for a finished device,
but is not separately defined in the Quality System regulation.
software validation
Very good post!!! I am always like your blog and nice concept of this post. Excellent and great information. Thank you for your good effort with sharing us.
ReplyDeleteTOEFL Coaching in Chennai
TOEFL Training in Chennai
IELTS Coaching in Chennai
Spoken English Classes in Chennai
Ethical Hacking Course in Chennai
Japanese Classes in Chennai
TOEFL Coaching in Adyar
TOEFL Coaching in Porur
I liked your blog.Thanks for your interest in sharing the information.keep updating.
ReplyDeleteEnglish Speaking Classes in Mumbai
English Speaking Course in Mumbai
Best English Speaking Classes in Mumbai
Spoken English Classes in Mumbai
English Classes in Mumbai
Spoken English in Chennai
Spoken English Class in Chennai
english to bengali typing
ReplyDeleteimo for pc
ReplyDelete