Below are the steps to add JSP page to Oracle Application
1. Upload the .jsp page to $OA_HTML top
2. Run " export PATH=$PATH:$FND_TOP/patch/115/bin "
3. Run " ojspCompile.pl --compile -s 'JSPFileName.jsp' --flush "
4. Create a form function with type "SSWA jsp function" and web call as "JSPFileName.jsp".
5. Bounce the server.
In R12 .class file is stored in $COMMON_TOP/_pages and in R11 is stored in $OA_HTML
Thursday, 27 December 2012
How to use FND_GLOBAL for SSWA jsp function
When you use FND_GLOBAL.USER_ID or FND_GLOBAL.RESP_ID for SSWA jsp function, it always returns -1.
To get the correct value of these functions you can use ICX_SEC.
procedure testing
IS
l_session boolean;
BEGIN
l_session := icx_sec.validateSession(c_update => FALSE);
htp.p('USER: ' || icx_sec.g_user_id );
htp.br;
htp.p('RESP: ' || icx_sec.g_responsibility_id );
END;
Results of launching the function I created referring to procedure testing is :
USER: 5008
RESP: 40398
To get the correct value of these functions you can use ICX_SEC.
procedure testing
IS
l_session boolean;
BEGIN
l_session := icx_sec.validateSession(c_update => FALSE);
htp.p('USER: ' || icx_sec.g_user_id );
htp.br;
htp.p('RESP: ' || icx_sec.g_responsibility_id );
END;
Results of launching the function I created referring to procedure testing is :
USER: 5008
RESP: 40398
Monday, 10 December 2012
Query to get the USER password
First compile the below package
create or replace
PACKAGE get_pwd
AS
FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
RETURN VARCHAR2;
end get_pwd;
/
create or replace
PACKAGE BODY get_pwd
AS
FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
RETURN VARCHAR2
AS
LANGUAGE JAVA
NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
END get_pwd;
Now run this query to get the password
SELECT usr.user_name,
get_pwd.decrypt
((SELECT (SELECT get_pwd.decrypt
(fnd_web_sec.get_guest_username_pwd,
usertable.encrypted_foundation_password
)
FROM DUAL) AS apps_password
FROM fnd_user usertable
WHERE usertable.user_name =
(SELECT SUBSTR
(fnd_web_sec.get_guest_username_pwd,
1,
INSTR
(fnd_web_sec.get_guest_username_pwd,
'/'
)
- 1
)
FROM DUAL)),
usr.encrypted_user_password
) PASSWORD
FROM fnd_user usr
WHERE usr.user_name = 'USER';
Subscribe to:
Posts (Atom)