Kanuri Phanibabu

+ Follow
since May 19, 2007
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kanuri Phanibabu

Thankyou Herman Scheltinga, for your reply and suggesions.
If you have any tips that increase the performance of the application / know any url's please suggest me.

Hi Friends,

Please send me your openion regarding this issue.

Actually i am using a DAOImpl class where i will get the data base connection. The code snippet for one method is like this...
And i am repeating the same procedure in each method like opening the connection and closing the connection in each method.

My problem is:

Is it right to open and closing connection in each method of DAO implementaton class?
and how can i alter the code if there exist any performance issue?

This application is a web based appliation using struts.

In the Action class i am calling each required implementation method.

public EmployeeDAOImpl(DataSource dataSource) {
this.dataSource = dataSource;

Checks if an employee is Admin for the specified module in RMS_MODULE_ADMINS table.

public boolean isAdmin(String employeeId, String moduleId) {

.debug("Entered - isAdmin() of EmployeeDAOIMPL with arguments EmployeeId:"
+ employeeId + "and ModuleId:" + moduleId + ".");

Connection conn_Admin = null;
PreparedStatement pst_Admin = null;
ResultSet rs_Admin = null;

boolean isAdmin = false;

try {
conn_Admin = dataSource.getConnection();
pst_Admin = conn_Admin
pst_Admin.setString(1, employeeId.toLowerCase());
pst_Admin.setString(2, moduleId);
rs_Admin = pst_Admin.executeQuery();

if (rs_Admin.next()) {

isAdmin = true;

} catch (Exception e) {
logger.error("Error in isAdmin() of EmployeeDAOIMPL:"
+ e.getMessage());
} finally {
Util.closeConnection(rs_Admin, pst_Admin, conn_Admin);
logger.debug("Exiting - isAdmin() of EmployeeDAOIMPL");
return isAdmin;
Hi Eric,

Thank you for moving this issue into Apache/Tomcat.
14 years ago
Hi Friends,

I am using Tomcat5.5.9 i am getting this error and i am unable to run the applicaitons. So please suggest me the solution for this.

Jun 12, 2007 7:35:30 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 12, 2007 7:35:30 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1719 ms
Jun 12, 2007 7:35:30 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 12, 2007 7:35:30 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
Jun 12, 2007 7:35:30 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.M
log4j:WARN Please initialize the log4j system properly.
[ INFO] 35:33 (DAOFactory.java:<init>:48)Inside the DAOFactory Class
Jun 12, 2007 7:35:33 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jun 12, 2007 7:35:33 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/LMS] startup failed due to previous errors
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.M
log4j:WARN Please initialize the log4j system properly.
Jun 12, 2007 7:35:36 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 12, 2007 7:35:36 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /
Jun 12, 2007 7:35:36 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/62 config=null
Jun 12, 2007 7:35:36 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 12, 2007 7:35:37 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6952 ms
14 years ago
Ok, i will follow the mentioned rules. Thank you for suggesting tips.
i have form like this here the issue is :

Dynamic population of second list box based on the selection of first list box.
how can i do this one. please tell me the solution.

<form name="questionForm" method="post" action="listQuestions.lgs">
<table bgcolor="F8D8D8" cellspacing="2" cellpadding="2" align="center"
style="margin-top: 100px">

<td><select name="topic" onChange="loadCategories()">
<c:forEach items="${model.topics}" var="topic">
<option value="<c ut value="${topic.topicId}" />">
<c ut value="${topic.topicName}" /></option>
<td><select name="category" onChange="loadQuestions()">
<c:forEach items="${model.categories}" var="category">
<option value="<c ut value="${category.categoryId}" />">
<c ut value="${category.categoryName}" /></option>
href="addQuestion.lgs?categoryId=2<c ut value="${category.categoryId}"/>">Add New Question</a></td>
<td>Questions under this Category:</td>
<td><c:if test="${model.questions} == null">
<c ut value="no questions found" />
</c:if> <c:if test="${model.questions} != null">
<c:forEach items="${model.questions}" var="question">
<c ut value="${question.questionDesc}" />
<td colspan="2"><input type="submit" /></td>
[ May 22, 2007: Message edited by: Bear Bibeault ]