no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@505 bb69d46d-e84e-40c8-a05a-06db0d633741
lxbfYeaa
Luis Flores 21 years ago
parent e02a91dbc5
commit 6fcc01bf6f

@ -33,12 +33,32 @@ public class NewsServlet extends HttpServlet
private SQLExecuter executer = null; private SQLExecuter executer = null;
private static boolean velocityInit = false;
public void init() public void init()
{ {
if( !velocityInit )
{
try
{
String TEMPLATE_DIR = this.getServletContext().getRealPath( "/" ) + "html/";
Properties props = new Properties();
props.setProperty( "file.resource.loader.path", TEMPLATE_DIR );
Velocity.init( props );
}
catch( Exception ex )
{
ex.printStackTrace();
}
velocityInit = true;
}
if( DBM != null ) if( DBM != null )
{ {
return; return;
} }
try try
{ {
DBM = new JDBCManager( bdUrl + "?prepareThreshold=1", DBM = new JDBCManager( bdUrl + "?prepareThreshold=1",

Loading…
Cancel
Save