Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Paolo Metafune

Ranch Hand
+ Follow
since Aug 22, 2005
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 Paolo Metafune

I would like starting exam preparation. I'm so looking for the right book. On Amazon i red good reviews about SCBCD Exam Study Kit by Paul Sanghera. Is someone of you using this book to prepare the exam ? Is therefore this book good and complete for exam preparation ?

Thank you.
[ March 23, 2006: Message edited by: Paolo Metafune ]
${mine:rollIt()} should be correct.
Try it so.

${mine.rollIt} works but you don't have any output because "mine" attribute is searched for in any scope but it doesn't exist and null value in output bacomes an empty string

Bye.
Yes you are right.
Another consideration:
<jsp:setProperty> as used in this example will never be executed, also if you put your bean in page scope. It is only executed when a bean isn't in scope and you use the class or beanName attribute to create or load an istance of the bean.

Bye.
Chad,
I used only manning's book and Servlet and jsp specification.
I also did some tests under tomcat and sometimes i red topics from this forum.
I also think that mock exama are very useful for preparation.

Good luck.
Read servlet specification
Spec
Today i passed my exam and i'm also happy of my score.
I also want to make some consideration about the exam end the preparation material i used.
Compared with the SCJP exam i think that scwcd questions may seem easier but you are required to remember more things( method names xml configuration tags and so on).
I studied on Manning's SCWCD exam study kit (second edition) but i'm not satisfied of this book.
I found many errors and not all topic are covered in deep. For instance i found questions on war file and on web.xml not covered in that book (Questions on welcome file, ejb reference, error page and so on).
I studied EL, JSTL, Security, TagFiles also on sun specification
JSP2.0 Spec.
Servlet2.4 Spec.
For exam training i used Enthuware simulator that is good but less than Whizlab's simulator that i used for my SCJP exam. (Whizlabs simulator is more expensive but thougher than real exam while Enthuware is closer to the real exam but i found some error.)
If you have any other question post me it and i'll answer you.
Finally i want to thank all of us because reading your topics improved my preparation.

Bye
14 years ago
Excuse me but i pressed the confirm button when i was still writing my considerations. I've posted another, complete, topic

Bye
Today i passed my exam and i'm also happy of my score.
I also want to make some consideration about the exam end the preparation material i used.
Compared with the SCJP exam i think that scwcd questions may seem easier but you are required to remember more things( method names xml configuration tags and so on).
I studied on Manning's SCWCD exam study kit (second edition) but i'm not satisfied of this book.
I found many errors and not all topic are covered in deep. For instance i found questions on war file and on web.xml not covered in that book (Questions on welcome file, ejb reference, error page and so on).
I studied EL, JSTL, Security, TagFiles also on sun specification
JSP 2.0 Spec.
Servlet2.4 Spec.
For exam training i used Enthuware simulator that is good but less than Whizlab's simulator that i used for my SCJP exam. (Whizlabs simulator is more expensive but thougher than real exam while Enthuware is closer to the real exam but i found some error.)
If you have any other question post me it and i'll answer you.
Finally i want to thank all of us because reading your topics improved my preparation.

Bye
Today i passed my exam and i'm also happy of my score.
I also want to make some consideration about the exam end the preparation material i used.
Compared with the SCJP exam i think that scwcd questions may seem easier but you are required to remember more things( method names xml configuration tags and so on).
I studied on Manning's SCWCD exam study kit (second edition) but i'm not satisfied of this book.
I found many errors and not all topic are covered in deep. For instance i found questions on war file and on web.xml not covered in that book (Questions on welcome file, ejb reference, error page and so on).
I studied EL, JSTL, Security, TagFiles also on sun specification
JSP2.0 Spec.
Servlet2.4 Spec.
For exam training i used Enthuware simulator that is good but less than Whizlab's simulator that i used for my SCJP exam. (Whizlabs simulator is more expensive but thougher than real exam while Enthuware is closer to the real exam but i found some error.)
If you have any other question post me it and i'll answer you.
Finally i want to thank all of us because reading your topics improved my preparation.

Bye
[ October 11, 2005: Message edited by: Paolo Metafune ]
I resolved my problem.
The error was a wrong configuration in server.xml. I didn' put the data source configurationt under the Context element for my web application. In addition to nesting Context elements inside a Host element in server.xml, is also possible to store them in individual files (with a ".xml" extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. This is recommended in Tomcat 5 and so i did.
Now myDataSource works.
Bye.
15 years ago
Classes12.zip is already in the classpath.
What i noted is that the datasource returned after lookup is not correct. I debugged my code and the datasource returned has all the properties = null.
If you look again at this error message "Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver", it seem that datasource can't load the driver because the driver to load is not configured (driver of class ''). So it is like if my servlet couldn't reach the datasource definition in server.xml.
I deleted the datasorce definition from this file (server.xml) and my code continue to run with the same error. I mean that i have the same result if i define the datasaource and if don't define.

Bye,
15 years ago
I've configured a datasource for oracle under tomcat 5, but when i try to get a connection i receive this error "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver".When i debug my code i note that the datasource returned after lookup has null properties (for instance the driver class property is null).

This is my web.xml:
************************
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/MyOracleDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

************************

This is my servlet code:
************************
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:comp/env");
String s = "jdbc/MyOracleDataSource";
DataSource ds = (DataSource)envContext.lookup(s);
System.out.println(s);
Connection conn = ds.getConnection();
************************

and this is my server.xml:
************************

<Resource name="jdbc/MyOracleDataSource" auth="Container" type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/MyOracleDataSource">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>4</value>
</parameter>
<parameter>
<name>password</name>
<value>pronto</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc racle:thin:@ihx0074:1521:INA</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
<parameter>
<name>username</name>
<value>cassa</value>
</parameter>
</ResourceParams>

************************

Can anyone tell me why it doesn't work ?
Thank you.
15 years ago
I wanted only to add that in my code
*********************
<myS:simpleTag>
<myS:complexTag>
<% out.println("OK"); %>
</myS:complexTag>
</myS:simpleTag>
**********************
nothing is displayed in the browser page because the engine doesn't evaluate the body of complex tag( because tagdependent) and sends it as it is to the browser that can't interpret it. So you see the string
"<% out.println("OK"); %>" in the source of html page but not in the page.

Bye
I red on manning book that a tld file, being a xml, must respect the order of tags.

I have this tld
***********************************+
<!DOCTYPE taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd">;

<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>2.0</jsp-version>
<uri>MyCustomTagKey</uri>
<tag>
<name>myCustom</name>
<tag-class>mypackage.MyCustomTag</tag-class>
<body-content>tagdependent</body-content>
</tag>
</taglib>
********************************
can you tell me why it works also if, for instance, i move the uri tag before tlib-version ?