Home » Archives for July 2016
Posted by TechBlogger on 7:43 PM
Setting value to OD variables in Servlet node:
mySession.getVariableField(IProjectVariables.C__COUNTS,IProjectVariables.C__COUNTS_FIELD_MAXNI).setValue("");
Writing trace info
TraceInfo.trace(ITraceInfo.TRACE_LEVEL_INFO,this.getClass().getName() + " -> Value - " + mySession.getVariableField("OD", "OD_complex").getStringValue(), mySession);
Read more »
Posted by TechBlogger on 7:39 PM
Configure below properties to configure Rolling and set limit to file size and index limit of ddlog4j library properties
log4j.appender.Rapp=org.apache.log4j.RollingFileAppender
log4j.appender.Rapp.File=C:/xx/logs/app/data/log/report.log
log4j.appender.Rapp.MaxFileSize = 10MB
log4j.appender.Rapp.MaxBackupIndex = 5
log4j.appender.Rapp.DatePattern='.'yyyy-MM-dd
log4j.appender.Rapp.layout=org.apache.log4j.PatternLayout
log4j.appender.Rapp.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss:SSS} %5p - %m%n
log4j.appender.Rapp.Encoding=UTF-8
Read more »
Posted by TechBlogger on 4:37 PM
Making JDBC Query to database using code
Connection conn=null;
ResultSet rs1=null;
try
{
PreparedStatement ps1=null;
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection( "jdbc:oracle:thin:@127.0.0.1:1521:XE", "system", "manager");
Statement stmt = conn.createStatement();
rs1= stmt.executeQuery("select SUBJECT from HR.SUBJECT ");
}
catch(SQLException e)
{
while((e = e.getNextException()) != null) out.println(e.getMessage() + "");
}
catch(ClassNotFoundException e)
{
}
Reading the ResultSet
try{
while(rs1.next()){
String ComboBoxValue1=rs1.getString("SUBJECT") ;
}
catch(Exception exp){
out.println("exception in populating subjects");
}
Read more »
Posted by TechBlogger on 4:37 PM
Making JDBC Query to database using code
Connection conn=null;
ResultSet rs1=null;
try
{
PreparedStatement ps1=null;
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection( "jdbc:oracle:thin:@127.0.0.1:1521:XE", "system", "manager");
Statement stmt = conn.createStatement();
rs1= stmt.executeQuery("select SUBJECT from HR.SUBJECT ");
}
catch(SQLException e)
{
while((e = e.getNextException()) != null) out.println(e.getMessage() + "");
}
catch(ClassNotFoundException e)
{
}
Reading the ResultSet
try{
while(rs1.next()){
String ComboBoxValue1=rs1.getString("SUBJECT") ;
}
catch(Exception exp){
out.println("exception in populating subjects");
}
Read more »