Revanth Sharma

Greenhorn
+ Follow
since Jul 30, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Revanth Sharma

hi,

I have new portal 8.0 theme deployed and when ever I deploy the theme or restart the EAR I see these errors in my logs. Did you find any solution for this ?
10 years ago
I am trying to implement something similar to this. Does this work for xls files and doc files or does it mess the format.
11 years ago
Tim and Leo,

Thanks for the comments. I was unable to fix it and I used the bad practice to create a new connection everytime, but I have to finish my exercise on schedule so skipped using the pooled connections. But, yes I want to get involved to know the industry level practices. Lately I have been looking at setting up the tomcat and subscribing to the user and dev mailing list. Its little tough for me to understand which is quite complex for a newbie like me but I am pretty much interested to build my resume .

Coming to the pooled connection as suggested by Bear, java maintains a PooledConnection class which effectively utilizes the opened connections for various SQL calls instead of closing and opening new connections which can be expensive for a heavily loaded server. Correct me if I am wrong

Let me explain you the directories I have my tomcat and the mysql-connector.jar.

My webapp is in the eclipse workspace which is

c:\Documents And Settings\Administrator\workspace\UserRegistration.


I am not sure if my context.xml docBase is exactly looking at the UserRegistration folder in the workspace. As I have said my mysql-connector.jar is in the tomcat/lib directory.
For my exercise level proj I am working on MySQL but if I am working realtime I am not sure if the organization uses mysql or other databases that are available. So, my question is where exactly should the .jar file be placed if diff webapps use the same database or I might be wrong in the question.

I am really interested to know the realtime scenario.

Thank you very much for the comments.


12 years ago
This is a great opportunity for the people who are giving SCJP exam, I would count myself one among the people. It would be great.. if I win the book and score 100% in the certification exam
Hi,

I have been banging my head passing the variable value from one jsp page to other. I have one task, one page behaves as admin. I have a list of users in the database. in the admin.jsp, if the radio button is selected and the edit button is pressed it has to go to the edit.jsp page where we can edit the fields. I am not sure how to pass the selected radio button variable from admin.jsp to edit.jsp

This is the code i have:


In the edit.jsp I have the following code.



I really need some help how to transfer the variable from one jsp to other.

thanks in advance
12 years ago
JSP
Hi,

I have written a servlet code for checking if the username is already exists in the database for registering, however my sql query returns zero rows. I have no idea of what is happening in the query.



rs.getRow() returns value zero though there are 2 records in the database with the username I have given. I wanted to print the sql query to check if the query is working properly, i do not understand how to print the query because of the prepared statement. is there a possible way to print the sql query ?

thanks in advance!!
Yes, I have checked and everything seems right. I can't figure out any error.
Well, this has to be suggested for the tomcat group.
12 years ago

Revanth Sharma wrote:Now, I have a different error,


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'



I believe Tomcat is not able to recognize the path of the mysql-connector which is in the tomcat/lib/ directory. Do I have to add the path for the driver ? I am confused

12 years ago
Now, I have a different error,


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'



I believe Tomcat is not able to recognize the path of the mysql-connector which is in the tomcat/lib/ directory. Do I have to add the path for the driver ? I am confused
12 years ago
Thanks Tim..

I think the problem with the jndi error is because of my folders that are placed inappropriately. I am starting the tomcat from eclipse and my workspace is in "My Documents" instead of webapps folder in tomcat.
This following is the code i have put in context.xml


I would really appreciate if someone can help me getting off this burden. I am still learning stuff, so I have a lot ahead to do !

12 years ago
Thank you. I have read the documentation on connection pooling and also the container-managed pooling on tomcat website. I followed this link
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html

However, the documentation says I can write script in context.xml and I have trouble connecting. I get the error
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context. I am not sure what changes I have to make
12 years ago
Thank you very much Ryan and Bear, I have another question. The connection is successful, how to make the connection persistent or available to other classes. I have another file RegisterServlet which handles user registration. Will I be able to use the same connection I created earlier in other classes ?
12 years ago
I am a newbie, I am learning could you please elaborate on container-oriented connection pooling ?

I know that writing own connection code is a poor practice, those are the basic level examples that I found on roseindia.net/servlets.
12 years ago
Hello,

I am learning Servlets and JSP. I have trouble creating an object for the static factory method I had written for database connection. And I need some suggestions and helpful tips of developing my class in object oriented fashion.

The database connection code I had written:


I get an error when I call the instance method, and I need some help how after successful connection how do I use this connection to call the SQL query. I have the following code in AuthenticationServlet class which calls the static factory method: I get error at databaseConn dbconn = new databaseConn.getInstance().





I am not sure where my mistake is, I need some help. Thanks in advance !
12 years ago