/impl/conf/WEB-INF/struts/tiles-events.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!DOCTYPE tiles-definitions PUBLIC |
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" |
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"> |
<!--<!DOCTYPE tiles-definitions PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"--> |
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">--> |
<tiles-definitions> |
/impl/conf/WEB-INF/struts/struts-courseunits.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!DOCTYPE struts-config PUBLIC |
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" |
"http://struts.apache.org/dtds/struts-config_1_3.dtd"> |
<!--<!DOCTYPE struts-config PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"--> |
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">--> |
<struts-config> |
/impl/conf/WEB-INF/struts/struts-default.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!DOCTYPE struts-config PUBLIC |
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" |
"http://struts.apache.org/dtds/struts-config_1_3.dtd"> |
<!--<!DOCTYPE struts-config PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"--> |
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">--> |
<struts-config> |
/impl/conf/WEB-INF/struts/tiles-processworkflow.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!DOCTYPE tiles-definitions PUBLIC |
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" |
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"> |
<!--<!DOCTYPE tiles-definitions PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"--> |
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">--> |
<tiles-definitions> |
/impl/conf/WEB-INF/struts/struts-searchusers.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!DOCTYPE struts-config PUBLIC |
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" |
"http://struts.apache.org/dtds/struts-config_1_3.dtd"> |
<!--<!DOCTYPE struts-config PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"--> |
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">--> |
<struts-config> |
/impl/conf/WEB-INF/struts/validation.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!DOCTYPE form-validation PUBLIC |
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN" |
"http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd"> |
<!--<!DOCTYPE form-validation PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"--> |
<!--"http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd">--> |
<form-validation> |
/impl/conf/WEB-INF/struts/struts-banners.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!DOCTYPE struts-config PUBLIC |
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" |
"http://struts.apache.org/dtds/struts-config_1_3.dtd"> |
<!--<!DOCTYPE struts-config PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"--> |
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">--> |
<struts-config> |
/impl/conf/WEB-INF/struts/struts-ftpclient.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!DOCTYPE struts-config PUBLIC |
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" |
"http://struts.apache.org/dtds/struts-config_1_3.dtd"> |
<!--<!DOCTYPE struts-config PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"--> |
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">--> |
<struts-config> |
/impl/conf/WEB-INF/struts/tiles-announcements.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!DOCTYPE tiles-definitions PUBLIC |
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" |
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"> |
<!--<!DOCTYPE tiles-definitions PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"--> |
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">--> |
<tiles-definitions> |
/impl/conf/WEB-INF/struts/tiles-courseunits.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!DOCTYPE tiles-definitions PUBLIC |
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" |
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"> |
<!--<!DOCTYPE tiles-definitions PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"--> |
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">--> |
<tiles-definitions> |
/impl/conf/WEB-INF/struts/tiles-default.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!DOCTYPE tiles-definitions PUBLIC |
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" |
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"> |
<!--<!DOCTYPE tiles-definitions PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"--> |
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">--> |
<tiles-definitions> |
/impl/conf/WEB-INF/struts/tiles-searchusers.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!DOCTYPE tiles-definitions PUBLIC |
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" |
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"> |
<!--<!DOCTYPE tiles-definitions PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"--> |
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">--> |
<tiles-definitions> |
/impl/conf/WEB-INF/struts/struts-events.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!DOCTYPE struts-config PUBLIC |
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" |
"http://struts.apache.org/dtds/struts-config_1_3.dtd"> |
<!--<!DOCTYPE struts-config PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"--> |
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">--> |
<struts-config> |
/impl/conf/WEB-INF/struts/tiles-banners.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!DOCTYPE tiles-definitions PUBLIC |
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" |
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"> |
<!--<!DOCTYPE tiles-definitions PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"--> |
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">--> |
<tiles-definitions> |
/impl/conf/WEB-INF/struts/tiles-ftpclient.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8" ?> |
<!DOCTYPE tiles-definitions PUBLIC |
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" |
"http://struts.apache.org/dtds/tiles-config_1_1.dtd"> |
<!--<!DOCTYPE tiles-definitions PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"--> |
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">--> |
<tiles-definitions> |
/impl/conf/WEB-INF/struts/struts-processworkflow.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!DOCTYPE struts-config PUBLIC |
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" |
"http://struts.apache.org/dtds/struts-config_1_3.dtd"> |
<!--<!DOCTYPE struts-config PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"--> |
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">--> |
<struts-config> |
/impl/conf/WEB-INF/struts/validator-rules.xml |
---|
1,6 → 1,6 |
<!DOCTYPE form-validation PUBLIC |
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN" |
"http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd"> |
<!--<!DOCTYPE form-validation PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"--> |
<!--"http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">--> |
<!-- |
This file contains the default Struts Validator pluggable validator |
/impl/conf/WEB-INF/struts/struts-announcements.xml |
---|
1,8 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!DOCTYPE struts-config PUBLIC |
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" |
"http://struts.apache.org/dtds/struts-config_1_3.dtd"> |
<!--<!DOCTYPE struts-config PUBLIC--> |
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"--> |
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">--> |
<struts-config> |
/impl/conf/WEB-INF/web.xml |
---|
169,7 → 169,6 |
<!--TLDS--> |
<jsp-config> |
<taglib> |
<taglib-uri>/WEB-INF/jomm.tld</taglib-uri> |
<taglib-location>/WEB-INF/tlds/jomm.tld</taglib-location> |
/impl/conf/app.properties |
---|
56,8 → 56,19 |
announcements.type.1=top.flash.news |
announcements.type.2=bottom.flash.news |
############### |
# Link Analisys |
# |
link.ignore.extension.1=.js |
link.ignore.extension.2=.css |
link.ignore.extension.3=.jpg |
link.ignore.extension.4=.gif |
link.ignore.extension.5=.png |
link.ignore.extension.6=.tif |
link.ignore.extension.7=.bmp |
/impl/src/java/pt/estgp/estgweb/services/urlstat/UrlStatService.java |
---|
73,7 → 73,7 |
setMonth(urlStatYear,urlStatMonth); |
DaoFactory.getUrlStatMonthDaoImpl().save(urlStatMonth); |
} |
urlStatMonth.setTotalClicks(urlStatMonth.getTotalClicks() + ic.getCount()); |
urlStatYear.setTotalClicks(urlStatYear.getTotalClicks() + ic.getCount()); |
urlStatMonth.setTotalClicks(urlStatMonth.getTotalClicks() + ic.getCount()); |
updateMonthClicks(urlStatYear,urlStatMonth); |
/impl/src/java/pt/estgp/estgweb/web/filters/UrlStatFilter.java |
---|
9,11 → 9,13 |
import java.util.HashMap; |
import java.util.Date; |
import java.util.Calendar; |
import java.util.List; |
import pt.estgp.estgweb.domain.UserSessionImpl; |
import pt.estgp.estgweb.domain.UserImpl; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.estgp.estgweb.web.exceptions.NoCookiesException; |
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
32,6 → 34,7 |
private static Logger logger = Logger.getLogger(UrlStatFilter.class); |
public static List<String> ignoreEstensions = ConfigProperties.getListValues("link.ignore.extension"); |
public static MyCalendar myCalendar = new MyCalendar(); |
public static int day = myCalendar.getDay(); |
public static int month = myCalendar.getMonth(); |
65,6 → 68,7 |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) |
throws IOException, ServletException |
{ |
HttpServletRequest hrequest = (HttpServletRequest) request; |
MyCalendar c = new MyCalendar(); |
int nowDay = c.getDay(); |
86,10 → 90,25 |
year = c.getYear(); |
String relativePath = hrequest.getPathInfo(); |
if(hrequest.getServletPath() != null) |
if(relativePath == null) |
relativePath = ""; |
if(hrequest.getServletPath() != null && hrequest.getServletPath().length() > 0) |
{ |
relativePath += hrequest.getServletPath(); |
} |
for(String ignore: ignoreEstensions) |
{ |
if(relativePath.endsWith(ignore)) |
{ |
chain.doFilter(request,response); |
return; |
} |
} |
if(hrequest.getQueryString() != null && hrequest.getQueryString().length() > 0) |
relativePath += "?" + hrequest.getQueryString(); |
logger.info("accessing " + relativePath); |
IntegerContainer count = urlStat.get(relativePath); |
/impl/src/java/pt/estgp/estgweb/web/filters/UserSessionFilter.java |
---|
66,7 → 66,7 |
return; |
} |
} |
if(userSession.getLanguage()!=null) |
if(userSession.getLanguage() != null) |
{ |
((HttpServletRequest)request).setAttribute(org.apache.struts.Globals.LOCALE_KEY, new Locale(userSession.getLanguage())); |
((HttpServletRequest)request).getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY, new Locale(userSession.getLanguage())); |
/impl/src/hbm/pt/estgp/estgweb/domain/UrlStat.hbm.xml |
---|
17,7 → 17,7 |
<property name="description" type="text"/> |
<property name="totalClicks" type="integer"/> |
<property name="status" type="boolean"/> |
<set name="years" order-by="year asc" lazy="true"> |
<set name="years" order-by="year asc" lazy="true" cascade="delete"> |
<key column="relativePathId"/> |
<one-to-many class="pt.estgp.estgweb.domain.UrlStatYear"/> |
</set> |
/impl/src/hbm/pt/estgp/estgweb/domain/UrlStatYear.hbm.xml |
---|
28,62 → 28,62 |
<property name="month10Clicks" type="integer"/> |
<property name="month11Clicks" type="integer"/> |
<property name="month12Clicks" type="integer"/> |
<many-to-one name="month1" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month1" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month1"/> |
<column name="yearId1"/> |
<column name="relativePathId1"/> |
</many-to-one> |
<many-to-one name="month2" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month2" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month2"/> |
<column name="yearId2"/> |
<column name="relativePathId2"/> |
</many-to-one> |
<many-to-one name="month3" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month3" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month3"/> |
<column name="yearId3"/> |
<column name="relativePathId3"/> |
</many-to-one> |
<many-to-one name="month4" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month4" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month4"/> |
<column name="yearId4"/> |
<column name="relativePathId4"/> |
</many-to-one> |
<many-to-one name="month5" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month5" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month5"/> |
<column name="yearId5"/> |
<column name="relativePathId5"/> |
</many-to-one> |
<many-to-one name="month6" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month6" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month6"/> |
<column name="yearId6"/> |
<column name="relativePathId6"/> |
</many-to-one> |
<many-to-one name="month7" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month7" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month7"/> |
<column name="yearId7"/> |
<column name="relativePathId7"/> |
</many-to-one> |
<many-to-one name="month8" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month8" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month8"/> |
<column name="yearId8"/> |
<column name="relativePathId8"/> |
</many-to-one> |
<many-to-one name="month9" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month9" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month9"/> |
<column name="yearId9"/> |
<column name="relativePathId9"/> |
</many-to-one> |
<many-to-one name="month10" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month10" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month10"/> |
<column name="yearId10"/> |
<column name="relativePathId10"/> |
</many-to-one> |
<many-to-one name="month11" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month11" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month11"/> |
<column name="yearId11"/> |
<column name="relativePathId11"/> |
</many-to-one> |
<many-to-one name="month12" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true"> |
<many-to-one name="month12" class="pt.estgp.estgweb.domain.UrlStatMonth" outer-join="true" cascade="delete"> |
<column name="month12"/> |
<column name="yearId12"/> |
<column name="relativePathId12"/> |
/impl/src/web/layout/header.jsp |
---|
9,27 → 9,6 |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<% |
String lang = request.getParameter("language"); |
if (lang != null) |
{ |
UserSessionImpl userSession = (UserSessionImpl) UserSessionProxy.loadUserSession(request); |
request.setAttribute(pt.estgp.estgweb.Globals.USER_SESSION_KEY,userSession); |
Locale l = new Locale(lang); |
userSession.put(Globals.LOCALE_KEY, l); |
try |
{ |
userSession.serialize(request); |
} |
catch (Throwable throwable) |
{ |
throwable.printStackTrace(); |
((HttpServletResponse)response).sendError(500); |
} |
request.getSession().setAttribute(Globals.LOCALE_KEY, l); |
} |
%> |
<table width="100%"> |
<tr> |
<td> |