Stephen Tallamy

Greenhorn
+ Follow
since Jan 08, 2002
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 Stephen Tallamy

Looks like a winner. Many thanks for your help.
18 years ago
Hi,
Can anyone help me solve the following problem:
I need to connect to a website, login using a username and password, and then perform a number of actions on the website - e.g. navigate to a page & post some information. How do I do this using Java classes?
Stephen
18 years ago
Hi,
Can anyone help me solve the following problem:
I need to connect to a website, login using a username and password, and then perform a number of actions on the website - e.g. navigate to a page & post some information. How do I do this using Java classes?
Stephen
Wooohooo! I passed the exam. Thanks to all you guys who have helped me out with this. Special thanks to those who have put together study guides and mocks. They were all very helpful!
Particularly pleasing for me is that I got 100% on both Custom Tag sections - if you look back in my posts you'll see that I was struggling with these.
The score I got was pretty much exactly what I got on my Programmer exam and also on the JWebPlus mock exam it took last night. I certainly would recommend JWebPlus as it is very similar to the real thing. I did all the tests quite a few times an it helped my identify my weak areas.
I would suggest the answer is b) the request object. This is because it is only valid for the scope of the request.
Storing in the ServletContext could mean that another servlet could over-write the data.
Storing in Cookies makes no sense - these are for passing data to the client.
Storing in a Session would work but it would mean that the data would persist for the duration of the session which is probably not appropriate.
I'm not sure if setContentType() HAS to be called, although it is preferrable. I've developed a Servlet without it and it runs in Tomcat fine. It does produce some rather odd results though, as sometimes it the font of the text changes.
I've been doing the JWebPlus mock exams and my weakest areas seems to be Custom Tags. I've read the pdf version of Core Servlets and JSPs, the Sun tutorial, the notes that are available in the links section but clearly this is not enough. Could anyone suggest other resources that might help me get my head around them?
Blimey that's a picky question!
Congratulations and thanks for the de-briefing. Hope I do as well when I take it!
Chintan.
Congratulations and thanks for your help. Hope I and many others here can follow in your footsteps!
What would the best way to do this (from a design point of view) be then?
I'm new to JSP but quite familiar with Servlets. I'm trying to understand how you would go about initialising a connection to a Database with JSP.
With a Servlet I would create a module levelConnection object in the init() method and then use this connection in the service() method.
How would I do this with JSP?
ServletConfig contains information specific to that servlet. ServletContext contains information about the web application the servlet is a member of.
Generally you use ServletContext to get global set-up parameters such as the webmaster's email addres or a central database. ServletConfig is used more for specific initalisation parameters for the servlet.
Here is an example web application descriptor:

In this example, param1 is available through the ServletContext of both MyServlet and MyOtherServlet. param2 is available through the ServletConfig of MyServlet only. param3 is available through the ServletConfig of MyOtherServlet only.
Hope this helps.
As far as I know there is no difference between the two statements.
application is the implicit object for the ServletContext of the JSP page. Hence your object sc is the same as the implicit object application.
[ January 09, 2002: Message edited by: Stephen Tallamy ]
Has anyone done the SL-314 course (Web Component Development with Java Technology)? Is it any good and would it be beneficial for getting the SCWCD?