www in docker support
This commit is contained in:
parent
539a848e95
commit
c227fce036
2145 changed files with 399596 additions and 58 deletions
|
|
@ -0,0 +1,47 @@
|
|||
package it.acxent.banner.servlet;
|
||||
|
||||
import it.acxent.banner.Banner;
|
||||
import it.acxent.servlet.AcServlet;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/Banner.abl"})
|
||||
public class BannerSvlt extends AcServlet {
|
||||
private static final long serialVersionUID = 6605089558224077770L;
|
||||
|
||||
protected long getId(HttpServletRequest req) {
|
||||
return getRequestLongParameter(req, "id");
|
||||
}
|
||||
|
||||
protected void go(HttpServletRequest req, HttpServletResponse res) {
|
||||
long l_id = getId(req);
|
||||
Banner bean = null;
|
||||
try {
|
||||
bean = new Banner(getApFull(req));
|
||||
bean.findByPrimaryKey(l_id);
|
||||
if (bean.getId_banner() > 0L) {
|
||||
bean.addClickThrough(req.getRemoteAddr(), req.getServletPath());
|
||||
res.sendRedirect(bean.getLink());
|
||||
} else {
|
||||
res.setStatus(301);
|
||||
res.setHeader("Location", "index.html");
|
||||
res.setHeader("Connection", "close");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isSecureServlet(HttpServletRequest req) {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void otherCommands(HttpServletRequest req, HttpServletResponse res) {
|
||||
go(req, res);
|
||||
}
|
||||
|
||||
protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
|
||||
go(req, res);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue