1

I have an ADF project using jdeveloper with name ADF1 and has a self authentication with the welcome page login.jspx and its backing bean backing_login.java.

Now I need to use another application for authentication with name AUTH1.

The user will do the following:

  1. The user will request login to ADF1
  2. The user enters his username and password
  3. The form posts to AUTH1 and is redirected to ADF1 after successful authentication with a return URL. But it can't be the login.jspx because it will show again the login page.

Now this return URL must be what?

  1. A bean (I don't know how to do this I need suggestions)
  2. Another normal servlet in ADF1

I did the second option: but I can't seem to access the FacesContext because it's null in the servlet:

FacesContext ctx = FacesContext.getCurrentInstance();
ctx.getApplication().getNavigationHandler().handleNavigation(ctx, null, "accessDirectPageOnline");

How can I achieve this?

EDIT:

I created another page login-return.jspx and created a backing_bean bound to it and now the problem is that the first load of the page, whatever redirect I do even in a beforephase method, which runs it successfully, it always redirects to login.jspx I don't know why, but in the second try of redirect it succeeds!

But I need it from the first time.

I think the problem is coming from the ADF Security procedure which forces the user with an obligatory login page, I don't know how to bypass that . . .

pnuts
  • 58,317
  • 11
  • 87
  • 139
GingerHead
  • 8,130
  • 15
  • 59
  • 93
  • Are you using Tasks flow? – Salman Apr 28 '14 at 10:42
  • @Salman But I need to do some processes before going into the task flow. For that reason I needed some sort of bean or servlet to do the needed processes and then handleNavigation to the required task flow, Here it lies my problem . . . – GingerHead Apr 28 '14 at 11:46

2 Answers2

0

If you are using Task Flow then you can access any Bounded Task Flow by specifying the correct URL, then the default activity will be called for that Bounded Task Flow.

Check this link to know how form Bounded Task Flow URL: URL Task Flow Call with HTTP POST Method

Also, Checks this thread for more discussion: Access Bounded Flow Directly From URL

Salman
  • 1,236
  • 5
  • 30
  • 59
  • But I need to do some processes before going into the task flow. For that reason I needed some sort of bean or servlet to do the needed processes and then handleNavigation to the required task flow, Here it lies my problem . . . – GingerHead Apr 28 '14 at 11:45
  • you can make some bean class as default activity in the task flow using method call activity. check this link :https://blogs.oracle.com/aramamoo/entry/an_epic_question_how_to – Salman Apr 28 '14 at 11:50
  • simply go to the bean you want, then right click, select (Create Data Control). now you can see the bean's method in (Data Control) tab. After that you can drag and drop the method you want from the (Data Control) to the Task flow and mark it as default activity – Salman Apr 28 '14 at 11:54
  • But can I call a bounded task flow without passing through the default authentication? like the login page? will it permit? – GingerHead Apr 28 '14 at 13:30
  • Or an unbounded task flow? – GingerHead Apr 28 '14 at 19:29
  • I am not sure if you can access unbounded task flow in the same way, since there is now default activity in it. But, again I am not sure. you can ask in [Oracle Community OTN](https://community.oracle.com/community/developer/english) there are professionals who can help you more in your issue. – Salman Apr 29 '14 at 04:22
  • I created another page login-return.jspx and created a backing_bean, and now he problem is that first time whatever I do it always redirects to login.jspx I don't know why, in the second try of redirect it succeeds! – GingerHead Apr 29 '14 at 17:02
0

I managed this through creating a new view coming out from all star point of the flow.
I created a backing bean for it and calculated my operations there.

GingerHead
  • 8,130
  • 15
  • 59
  • 93