Use the SESSION correction in the APC

xiaoxiao2021-03-06  114

Since I owe it, it causes an error in the tool class that uses the session, and the corrected code is retorked (apologize here):

Package com.fujitsu.eframe.eftool;

Import javax.servlet.http.httpsession;

Import com.fujitsu.uji.dispatchContext;

Import com.fujitsu.uji.http.httpsessionprofile;

Public class sessionutil {

Private static httpsession getsession (DispatchContext context) {

Return ((httpsessionprofile) context.getationsProfile ()). getsession ();

}

Public Static Object GetaTribute (DispatchContext Context, String Name) {

Try {

Return getsession (context) .GetaTribute (name);

} catch (IllegalStateException ex) {

Return NULL;

}

}

Public Static Void SetAttribute (DispatchContext Context, String Name, Object Value) {

GetSession (Context) .SetaTRibute (name, value);

}

Public Static Void Settimeout (DispatchContext Context, Int Seconds) {

GetSession (Context) .SetMaxInactiveInterVal (Seconds);

}

}

转载请注明原文地址:https://www.9cbs.com/read-99148.html

New Post(0)