cancel
Showing results for 
Search instead for 
Did you mean: 

What is the lifetime of a IWDCachedWebResource?

Former Member
0 Kudos

I am creating a dynamic HTML file in web dynpro java, it seems that no matter what type of WDScopeType I use, the actual HTML file is still on the server long after the user logs off! How and when do these resources get deleted??

If i access the url of this resource after i log off the portal, it is still there...

WDDeployableObjectPart dop = wdThis.wdGetAPI().getComponent().getDeployableObjectPart();
			IWDCachedWebResource resource = WDWebResource.getPublicCachedWebResource(inString.getBytes("UTF-8"), WDWebResourceType.HTML, WDScopeType.SERVERSESSION_SCOPE, dop, "testhtmlfile");

The above code generates this URL with resource.getAbsoluteURL();:


http://servername:port/webdynpro/resources/cg.com/apinv/Components/com.cg.app.ApprovalComp/MyFile46379.html

Accepted Solutions (1)

Accepted Solutions (1)

former_member192434
Active Contributor
0 Kudos

HI

Try to set

setReadOnce : It defines that the element is read once and directly removed from the cache after the first time, it is read

public void setReadOnce(boolean isReadOnce).

Thanks

Anup

Answers (1)

Answers (1)

Former Member
0 Kudos

Anup,

Thanks I actually tried this setreadonce(true) before, and the resource remains on the server as i can access the html file directly.

Perhaps this is because i was in debug mode? I am not sure why it remains ?