cancel
Showing results for 
Search instead for 
Did you mean: 

ITS Mobile - Session Time Out - http 400 URL redirection

Former Member
0 Kudos

Hi Guru,

We have created an ITS mobile service for LM t-codes which is working correctly for all task but the only problem we are facing with, is when a session timed out.

We are using ZEBRA hardware with a web browser where we removed the navigation bar to always direct the user where we want for the different navigation event ( log out, errors, etc). Unfortunately we cannot do it when a session timed out, because there is no error pages configuration for that case.

We looked for solutions, see the following thread, but it does not seem to apply to our case because we're not Webdyn pro application.

What we want to do, is to customize a new time-out URL page (http 400) to be able give to the user a link to load again a page where he can again authenticate on the network and use SAP. In our case, we cannot refresh directly the page because we  SSO authentification and we want the user to be authentified again by SSO before using SAP.

Here is the htlm page we get and want to change to a custom one. Also, this page is not adapted for mobile. The example of the page is taken from my standard web browser.

Thank you in advance for your anwers,

Best regards,

Michel

Accepted Solutions (1)

Accepted Solutions (1)

cris_hansen
Advisor
Advisor
0 Kudos

Hi Michel,

It seems that you can create a custom error page for this error, using the ICM capabilities.

Please check this help page, section "Setting up error handling".

I hope this helps,

Cris

Former Member
0 Kudos

Hi Cristiano,

We are currently validating that way of handling. But this will affect all http400 errors with any ITS service if we configure this as i read it i am correct? If yes, this will not work for us.

We want a custom HTTP400 only for my ITS Mobile service (which will be only for warehouse RF devices).

Regards,

Michel

cris_hansen
Advisor
Advisor
0 Kudos

Hi Michel,

In such case, maybe you would need to use something else... Maybe some header filter (also in ICM), to lead to a specific page... But I don't have much details, neither tested such approach (I don't have much free spare time nowadays).

Please test the custom error page and see whether it works.

If I can think of another alternative, I'll reply you again.

Regards,

Cris

Former Member
0 Kudos

Hi Cristiano,

Thank you very much, i will keep you posted of our tests.

Regards,

Michel

cris_hansen
Advisor
Advisor
0 Kudos

Hi Michel,

It might be possible to achieve what you want, but it seems to be a tricky thing... I didn't put in practice yet, but let me share what I found this far:

- you can create a dynamic error page. Here you are allowed to use SSI commands (Server Side Includes), which includes "if" statements (there are SSI tutorials in the internet);

- you can test whether the application path is from your custom ITSmobile application;

- writing the ICMERR-ENOSESSION.shtml file should enable you to have a custom 400 message for ITSmobile, or the generic response for other 400 errors.

I intend to play around this possibility, but only when I have more free time.

Kind regards,

Cris

PS: using ICM trace level 3 allows you to find more about what happens in the ICM requests/responses - just the file size will be HUGE...

cris_hansen
Advisor
Advisor
0 Kudos

Hi Michel,

The SSI "if" statement in ICM is not supported. I tried to use and got:

"...

*** ERROR => HttpHandleSSI: illegal SSI Tag <!--  #if

..."

So, more investigation is required...

Regards,

Cris

cris_hansen
Advisor
Advisor
0 Kudos

Hi Michel,

I think I have the solution now.

Using SSI will not help, as the "if" statement is not supported by ICM.

What I tested: following the help pages above, I created a page ICMERR-ENOSESSION.shtml, which is thrown when the session is no longer available.

The actual HTML code is:


<html>

    <head>

    </head>

    <body style="margin: 0; padding: 0">

        <iframe id="frame" src="" style="width: 100%; height: 100%;"></iframe>

    </body>

    <script type="text/javascript">

        var path = window.location.pathname;

                var spath = '/sap/public/icmandir/';

        if ( path.indexOf('/its/webgui') >= 0) {

            document.getElementById('frame').src = spath + '400.html';

        } else {

            document.getElementById('frame').src = spath + 'generic.html';

        }

    </script>

</html>

So, basically you will be using javascript to determine whether the path matches your service name. In the example above, I put "/its/webgui". If it was present in the URL, then the browser will call a file called 400.html, which was placed inside the "icmandir" of the application server. If the service is not webgui, then the generic.html file (also placed under "icmandir" directory) is called.

The actual content of "400.html" and "generic.html" is up to your own discretion. For the 400.html you can put a link to the service, so it can be called again.

I hope this helps.

Kind regards,

Cris

Answers (0)