Clark Bruce

Greenhorn
+ Follow
since Feb 27, 2002
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 Clark Bruce

Rick,
Be sure to close </web-app> in above example.
Sorry,
Clark
Rick,
The DD would look like this.
<web-app>
<context-param>
<param-name> TheParam </param-name>
<param-value> ParamValue </param-value>
</context-param>
<servlet>
<servlet-name> MyServlet </servlet-name>
<servlet-class> ServletOne </servlet-class>
<init-param>
<param-name> MyServletParam </param-name>
<param-value> ValueForMyServlet </param-value>
</init-param>
</servlet>
Regards,
Clark
Rick,
Sometimes if you go to Tools, Internet Options, and then click on delete files it will work without having to restart the browser.
Regards,
Clark
Rick,
The /ROOT/WEB-INF should work. Try just using an empty Deployment Descriptor first.
<web-app>
</web-app>
Make sure your compiled servlet class is placed in /ROOT/WEB-INF/classes directory. Once this is running then you can start to make changes in the web.xml file to see how it works.
Rick,
The initialization parameters are declared inside of the <servlet> tags of the deployment descriptor. An example:
<servlet>
<servlet-name>TheServlet</servlet-name>
<servlet-class> /MyServlet </servlet-class>
<init-param>
<param-name> firstParam </param-name>
<param-value> TheParam </param-value>
</init-param>
</servlet>
So now if you call getInitParam("firstParam"),
it should return "TheParam" as a string(no quotes). Be sure to restart the server after you change the deployment descriptor. Hope this helps.
Regards,
Clark
Hemant,
I did not have any questions on filters, but filters did show up as a possible answer to one of the questions. I would not spend any time on them if I were you. BTW, I took the test two days ago, so this is fairly current info.
Regards,
Clark
Hi all,
I passed it with a 79. Not a great score, but a pass nonetheless.
While it is fresh, here are my thoughts on the exam. It seemed to be pretty straightforward. Nothing real tricky. Easier than the SCJP test. Obviously, I missed some questions, but that was me, not the test. I had 5 fill-in type questions, three of which showed up in other questions so they were pretty easy. I got 100 on patterns and only used the four types mentioned in the requirements. I think I only used the exibit button on 3 questions, so most of the code was pretty short. Maybe 15 or 20 questions had code. The most confusing questions to me regarded session management and developing secure web applications.
I studied for about 6 weeks and had no experience with servlets or JSP. BTW, I am not working in the programming field at present, nor have I ever. I have taken 3 Java classes at the local Jr. College here, so I have no real experience. I used the following books:
Core Servlets & JSP by Hall
Java Servlet Programing by Hunter
Java Server Pages by Bergsten
Also, the Specs and Docs.
I read over Miftah's Notes about 25 times at least (no kidding). Thank you Miftah.
I read over Ken's notes several times. Thank you Ken.
Did all the free mocks (my thanks to Anand, Mika, Eduardo, and the JavaRanch folks). I also bought the Whiz Labs tests and did them.
Looking back, I should have written more JSP code. I think I would have done better on the test.
Lastly, but not leastly,
Thanks to all of you at this site. I hope to be of help to others as you all have been to me.
Regards,
Clark
Shan,
There can be no space between the % and the = . It must be <%= expression %>.
Regards,
Clark
Rick,
Also, make sure that you stop and restart Tomcat after you make any changes to the web.xml file.
Regards,
Clark
Rick,
Try placing the web.xml file in install_dir/webapps/Root/WEB-INF and placing your servlet class file in install_dir/webapps/Root/WEB-INF/classes
That works for me in TomCat 4.0. Hope this helps.
Regards,
Clark
Rick,
The web.xml file is the Deployment Descriptor file for the web application. It does reside in the WEB-INF (all caps) directory of your application. The init parameters are set up using the <init-param><param-name><param-value> and matching closing tags under the <servlet> element. I hope this helps. See page 42 of Marty Hall's Core Servlets and JavaServer Pages book for a better look at this file.
Regards,
Clark
Mark,
I just reviewed Ersin's info. It great! However, unless I'm missing something, it seems to be for setting up the web.xml Deployment Description.
What I am asking about is the DTD to set up the .tld file for a custom tag library.
Has the exam been updated to use the new hyphenated tags in the 1.2 DTD?
Regards,
Clark
I just noticed the difference in the element formation between the 1.1 and the 1.2 DTD for Tag Library Descriptors (tlibversion (1.1) vs tlib-version (1.2) etc.).
I would assume that the correct version to use is 1.2 DTD, but I cannot be sure from reading the exam requirements. Most of the study notes and books use the old version.
Could someone please let me know which one to study.
Thanks,
Clark