cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro application needs to never expire.

Former Member
0 Kudos

Hi

I have a Web Dynpro application (NW2004 SP12) that displays spreadsheet like sales data to anyone who walks past the screen in a common area in the office/s. It should therefore run unattended. It refreshes the data on a timer. The data comes from a back-end aRFC. Everything works fine but about every 1.5 days the application times out (session expires) and needs to be re-opened (this seems to be a large administrative problem to re-login at all the deployment sites).

It gives an error ‘500…application has expired. Please restart with the refresh button…’

In testing/troubleshooting I used the direct URL to the application running on WAS and not through a Portal iView.

I also changed the System destination from using SSO to using a dedicated user to the back-end.

Does anyone have an idea on how to auto refresh a Web Dynpro application or auto-renew the session so that it can run ‘forever’ or a way to re-login automatically?

Thanks in advance,

Rick Viljoen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have a look at this thread,

Regards,

Saravanan K

Former Member
0 Kudos

Thanks for the reply.

What I ended up doing is:

- Wrote an HTML page with an iFrame that points to the WebDynpro Application.

- I also use the j_user and j_password in the URL Querystring to automatically log in on the WAS.

- I Then refresh the iFrame every 4 hours with a JavaScript function.

ExampleCode Line:

<iframe id="iframe1" src="http://<server>:50000/webdynpro/dispatcher/local/SalesD/SalesD?j_user=uuu&j_password=ppp"></iframe>

So hopefully this will keep the Web Dynpro application from expiring because I'm 'forcing' a new session every 4 hours. So far the application has been running for about 2 days without user intervention. I'll see how the next few days go.

Thanks!

Rick

Former Member
0 Kudos

Hi Rickus,

It's curious how things get repeated all around the world...

I had to develop the same application that you, so that it was exposed in a public screen and it never expired.

Could you please send me the HTML page you created? I'd really appreciate it, my email is gato_lopez76@yahoo.es

On the other hand, was it your final solution?

Thank you very much in advance, Rickus.

Best regards,

Isidro

Former Member
0 Kudos

Hi Isidro

Yes, this was my final solution. Here is the code for the htm page. It will refresh/reload every 6 hours. Hope it helps.

Regards,

Rickus

<html>

<head></head>

<body>

<div id = div1></div>

<script type="text/javascript">

function putIF(hldr,x,y,w,h,url) {

// Iframe

holder=document.getElementById(hldr);

holder.style.position ='absolute';

holder.style.left=x;

holder.style.top=y;

holder.style.width=w;

IF=document.createElement("iframe");

IF.setAttribute("height", h);

IF.setAttribute("width", w);

IF.setAttribute("src", url);

if (holder.hasChildNodes()) {

var oChild=holder.children(0);

holder.removeChild(oChild);

}

holder.appendChild(IF);

var myDate=new Date();

window.status="Last reload on: " + myDate;

}

function refreshiframe() {

myWidth = document.body.offsetWidth-21;

myHeight = document.body.offsetHeight-4;

putIF("div1","0px","0px",myWidth,myHeight,"http://<server>:<port>/webdynpro/dispatcher/local/SalesD/SalesD?j_user=xxx&j_password=ppp");

window.setTimeout(refreshiframe, 21600000);

}

refreshiframe();

</script>

</body></html>

Answers (2)

Answers (2)

former_member85655
Active Participant
0 Kudos

Hi,

I dont think this is a good solution. I would rather set the Expiration time for the WD Session as specified by someone.

Double click on the application. Go to application properties. Select new--> select Expiration Time. Set the time how much you want.

In addition you can specify a value of -1 to keep the session for ever. This comes with NY so I m not sure if this is something that is availalbe for you at SP12. But you can try the HIGH value stuff..

Regards,

Arun

Former Member
0 Kudos

Hi Arun,

Have you ever tried to set the ExpirationTime to -1? Whast it happens it that the application expires immediately (it happens with NW04' SP15 and all the previous versions).

On the other hand, that property sets the APPLICATION expiration, not the SESSION expiration.

And just for curiousity, what does NY stands for?

Any other idea would be really appreciated.

Greetings,

Isidro

Former Member
0 Kudos

There is a very interesting note about all this stuff:

Note 842635 (Session Management for Web Dynpro Applications).

Regards,

Isidro Lopez

saraswathi_d
Participant
0 Kudos

Hi,

Double click on the application. Go to application properties. Select new--> select Expiration Time. Set the time how much you want.

Regards,

Saraswathi.

Pls reward points for useful infomation.

Former Member
0 Kudos

Hi, Saraswathi

I'm afraid to tell you that it's not that easy

The ExpirationTime property sets the APPLICATION expiration time, but the problem is the SESSION expiration time. Even if you define that property with a value higher than one day and a half, it stills expires.

Regards,

Isidro