嗨,我在 jsp 中有一些代码,我正在使用 liferay。我有下一个代码:
<aui:form>
<aui:input label="user" name="user" type="text"
showRequiredLabel="<%=false%>" value="<%=correo%>">
<aui:validator name="email" />
<aui:validator name="required" />
</aui:input>
<br>
<aui:input label="password" name="password" type="password"
showRequiredLabel="<%=false%>" value="<%=password%>">
<aui:validator name="required" />
</aui:input>
<br>`<aui:button-row>
<aui:button type="submit" value="update" />
</aui:button-row>
</aui:form>
`
<%ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
ExchangeCredentials credentials = new WebCredentials(user, pass);
service.setCredentials(credentials);
service.setUrl(new java.net.URI(server));
service.setTraceEnabled(true);
CalendarFolder cf=CalendarFolder.bind(service, WellKnownFolderName.Calendar);
FindItemsResults<Appointment> findResults = cf.findAppointments(
new CalendarView(startDate, endDate));
for (Appointment appt : findResults.getItems())
{
appt.load();
appt.getSubject().toString();
appt.getStart();
appt.getEnd();
appt.getLocation();
}
%>`
问题是当我刷新页面时执行“一些代码行”并且速度太慢,我想在 5 分钟后执行这个“一些代码行”,不管页面是否刷新了一些想法?我想每五分钟执行一次,而不是每次刷新