This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!

Sen George

Ranch Hand
+ Follow
since Sep 21, 2005
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 Sen George


Thanks for the tip. When I added the jstl library to the project and rebuilt the project, it all worked fine. Thanks for the help.

6 years ago
I am using NetBeans IDE 7.0.1 and the Tomcat server version is 7.0. I am trying to run a simple jsp which is given below.

<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="" %>
<title> JSP is easy</title>
<%-- Calculate the sum of 1+2+3+4 dynamically --%>

1 + 2 + 3 + 4 = <c:out value="${1+2+3+4}" />

In the IDE, against the taglib line, the error "The absolute uri: cannot be resolved in either web.xml or the jar files deployed with this application" is shown. The jar file jstl-api-1.2.jar is present under WEB-INF/lib directory.

And, while trying to run the file, the error "org.apache.taglibs.standard.tag.rt.core does not exist" is shown in the log.

Please advise how this error can be rectified.
6 years ago
I got it to work finally. As per the Tomcat documentation, the jar file-ojdbc6.jar-needs to be present only in $CATALINA_HOME/common/lib directory. I had the jar file in this directory earlier also, but don't know why it threw up errors. The only concrete thing which comes to my mind is that while trying different options, I had changed the value for the type attribute from "javax.sql.DataSource" to ""javax.jsp.jstl.sql.DataSource" in the context.xml file. Think I didn't change it back after copying the jar file. Anyways, it works now.

I was almost giving up. Thank you all for the tips and help.
8 years ago
Placed the jar file under server/lib instead of common/lib and also added the entry of the jar file in PATH variable-still no luck. The database indeed works with tools like Oracle SQL*Plus and JDeveloper.

Also, I am wondering about the significance of the string value in the entry driverClassName="oracle.jdbc.OracleDriver" in the file context.xml. Shouldn't the driverClassName should be just 'OracleDriver'? Does the path to the class file be identical to the one in the definition above? Please advise.
8 years ago
I have removed the ojdbc6.jar file from the WEB-INF/lib directory and still the same results. I have verified that the jar file has the file OracleDriver.class. Here is the code I am using to test the database connectivity issue.

Please advise.
8 years ago
I am running Tomcat 5.5 and Java JDK 1.6. I am facing a jdbc connectivity issue while trying to connect to a local Oracle database (version 11.1.0) installed on my laptop. The required changes-I trust-have been made in the files context.xml and web.xml. The relevant listings from both files are as follows:


<!-- The contents of this file will be loaded for each web application -->

<!-- Default set of monitored resources -->

<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<Manager pathname="" />

<!-- Oracle DB Connection Pool -->
<Resource name="jdbc/myOracle" auth="Container"
type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
username="hr" password="hr" maxActive="20" maxIdle="10"




<description>DB Connection</description>


I have placed the relevant jar file ojdbc6.jar in the directories CATALINA_HOME/common/lib as well as [web app name]/WEB-INF/lib. In spite of all this, the error message received is as follows (partial listing):

org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/myOracle"

root cause

javax.servlet.ServletException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/myOracle"

Please advise what is being missed out here.

8 years ago
With reference to the following code,

I know that HttpServletRequest interface extends javax.servlet.ServletRequest interface and the implementing class for ServletRequest interface is the ServletRequestWrapper class. My doubt is that how is a call like 'request.getParameter', for example, resolved at runtime. Is this something done by a container?
9 years ago
The following code

compiles and runs fine.

Program produces an output of 'match' found in positions 0, 1, 2, 3, 4, 5, 6, 7, and 8. But no data groups. How is this explained-matches found but no data groups?

9 years ago
The following code does not seem to create a new text box as intended. Please help.

Trust that is what lines 12 through 14 does. Please clarify.
I have the following code:

The 2 stylesheets referred are:


p.text {font-family:arial; font-color:#FF66FF; font-weight:bold; font-stretch:ultra-expanded; text-align:center}

p.text {font-family:arial; font-color:#FF00CC; font-size:28; font-weight:bold; text-align:center}

On running the program, the page appears fine and there are no errors. But the stylesheet is not getting applied. On switching between the radio buttons, the title shows the correct stylesheet being referenced.

Please help.

Thanks for pointing out the scoping issue. I fixed that and the program compiles fine now. However, I had to change the

Does this imply that if I were to add integers to the list variable brands, the code should be changed to:

I was under the impression that without generics, the ArrayList object would take an object of any type.
9 years ago
I doubt the class file is getting created. By the way, I am using Java version 1.6
9 years ago
The following code does not compile

On compiling with -Xlint option, the errors displayed are: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List
^ warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List
^ warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List
brands.add("light brown");
^ warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List
brands.add("light red");
^ cannot find symbol
symbol : variable brands
location: class test_list
return (brands);
^ illegal start of type
return (brands);

Please help.
9 years ago
In the following code,

the output got is 'In doIt method' followed by ' Thread is running.'

I was expecting the output in reverse- ' Thread is running.' followed by ' In doIt method'. Could someone please clarify this behavior?
9 years ago