I have a ZK web project that had .zul files with corresponding composers.I am trying to remove .zul files and replacing them by .jsp files.
Please have a look at the following snippet of code and suggest if I can replace them with HttpSession ? Please also let me know if I need to provide further additional information. Any suggestions/feedbacks/guidance would be appreciated.Thanks in advance.
import org.zkoss.zk.ui.Session;
import org.zkoss.zk.ui.Sessions;
public static void loadUserCustomProperties(String userFolder){
// Create a properties object with system wide properties as defaults
Properties userCustomProperties = new Properties(CustomProperties);
Session session = Sessions.getCurrent(); //Line 5
session.setAttribute(Constants.USER_PROPERTIES, userCustomProperties); //Line 6
}
ZK just wraps the standard Java HTML/HTTP API.
Calling Sessions.getCurrent().getNativeSession()
should give you an instance of type HttpSession
.