• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A little competition

 
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am running a tiny competition at my site at

Take a look at the SCWCD resources at
http://www.examulator.com/moodle/course/view.php?id=5

Anyone who can point out an error or correction gets the key to the complete 69 question additional mock exam that is available and the end of the course. Take a look, its probably the biggest most concentrated resource currently freely available on this topic and I'm probably going to start charging at some time.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 1.1.) The Servlet Technology Model
http://www.examulator.com/moodle/mod/resource/view.php?id=429

1. The example for the deployment descriptor uses version 2.3.
I think it should be better to use 2.4, as the exam is for that version.

2. The same example uses the default package for the servlet, which should really be avoided. Let's put the servlet in a package. It will also make it clearer for beginners to distinguish between the servlet name and the servlet class name.

3. Some methods in the "javax.servlet interface" section start with upper-case (GetServletConfig and GetServletInfo)

4. Maybe it's only me, but I like HTTP methods' name in upper-case POST, GET, PUT...

5. Before "Testing your servlet", it would be clearer if there would be a description of the directory structure, under webapps.

6. "The javax.servlet interface". javax.servlet is a package. javax.servlet.GenericServlet or javax.servlet.http.HttpServlet ?

Typos

. "you don't kneed to worry" -> "you don't need to worry"
. "Note how the a servlet knows very little" -> "Note how a servlet knows very little"
. "Under Windows Tomcat is installed as a service" -> "Under Windows, Tomcat can be installed as a service"
. "Tomcat runs on Port 8080" -> "Tomcat runs on port 8080"
. "If you scroll down the screen to the right will be a link " -> "If you scroll down the screen, on the right, there is a link "
. "if you are creating a webapplication" -> "if you are creating a web application "
. "you might think that is all that is required to execute it was to place it in the correct directory and call it" -> "you might think that all that is required to execute it was to place it in the correct directory and call it"
. "Every servlet must have a matching file with the name WEB.XML which is known as the deployment descriptor." -> what is this ? maybe "Every servlet must be declared in a file called web.xml, which is known as the deployment descriptor. "
. "deployment descriptor (WEB.XML)" -> let's write "web.xml" in lower-case
. Servlet is sometimes spelled with an unnecessary capital letter
. http://localhost:/8080/yourdir/servlet/HelloWorldServlet -> extra "/" before the port number
. About the init() method : "This is called by the servlet container (Tomcat usually)" I feel that "usually" is unnecessary.
. "hyperlinkor types" -> "hyperlink or types"
. "without any body The head method" -> "without any body. The head method"
. HTTP POSTt -> HTTP POST

I'm not English native, but I think you should add some commas here and there.
[ May 08, 2007: Message edited by: Satou kurinosuke ]
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Satou,

You rock!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 1.2) The HttpServletRequest interface
http://www.examulator.com/moodle/mod/resource/view.php?id=431

. Javax.servlet.servletRequests -> javax.servlet.ServletRequest
. HTTPServletRequest -> HttpServletRequest
. "the parameter that returns a String array" -> "the method that returns a String array"
. GetParameter -> getParameter
. [url=http://localhost:8080/mg/servlet/HelloWorldServlet?username=%27joe%27]http://localhost:8080/mg/servlet/HelloWorldServlet?username='joe'[/url] : I'm not sure about the single quotations around joe
. public class processpost : coding conventions say to an upper-case letter for the classname. -> public class ProcessPost
. WEB.XML -> web.xml
. The "processpost" servlet declaration in web.xml : the </servlet> tag is missing
. outlook -> Microsoft Outlook
. JSPTM Pages1 ?? -> JSP Pages ?
. "what files are publicly visible and what are not" -> "which files are publicly visible and which are not"
. "An additional jar files" -> "Additional jar files"
. The following part : "WEB-INF/classes/com/examulator/scwcd/demofile" "By default JSP and HTML files a....descriptor (WEB.XML)" is written twice
. "The command line for the jar utility are very similar" -> "The command line parameters for the jar utility are very similar"
. "You can inspect the contents" -> "You can inspect the content"
. "jar-tvf" -> "jar -tvf"
. "table verbose files" -> "table verbose filename"
. "extract the content files into them" -> "extract the content of the WAR file into them"
. "all the content files" -> "all the files"
. "they are mainly for once an application is entirely finished" -> "this process is mainly used once an application is entirely finished"
. "public class myservlet" -> "public class MyServlet"
. In the "Retrieving Cookies" sample, the url variable is not used
. "you would probably write a method that accepted a parameter of the search term and the Cookie array and returned the cookie" -> "you would probably write a method that accepts a parameter of the searched term and the Cookie array, and returns the cookie"
 
Marcus Green
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Satou, you rock and you Roll!!!. Just the type of feedback I was looking for. I will get working on it (and of course send you the key)...
Marcus
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

and of course send you the key


I was not particularly looking for it because I already have the certification. I'd just like to help you make a great place to refer to for exam takers My English is not good, so please don't take everything I say for granted
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 1.3) Using HttpServletResponse
http://www.examulator.com/moodle/mod/resource/view.php?id=355

. used to return text HTML in the form of a web page-> used to output HTML
. Printwriter -> PrintWriter
. HelloWorld should appear in your browser -> "Hello world" should appear in your browser
. class myservlet -> class MyServlet
. HTTPServletResponse -> HttpServletResponse
. setResponseType -> setContentType
. indicate the contents of files -> indicate the content of files
. "The other point is that you cannot call perform a redirect is the response" -> "The other point is that you cannot perform a redirect if the response" (2 typos)
. outputstream -> output stream
. "i.e. After each request" -> "i.e. after each request"
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 1.4) The Servlet life cycle

The following is seen through different resource, so I won't point them out again :
. Servlet -> servlet
. WEB.XML -> web.xml

. The following part was not clear
"This is called automatically by the servlet container and as it causes the application context (WEB.XML) to be parsed and any initialization will be performed." (twice in the text)
. An example of how load-on-startup is used (and the meaning of its value) would be nice
.My previous comment about adding some commas still holds For example : "As it only makes sense to initialize a servlet once the specification ensures that init will only be called once." If you don't put a comma after "once", I think that it makes it a bit difficult to read.

Typos
. Where it finds a Servlet -> when it find a servlet
. HTTPServlet -> HttpServlet
. discriptor -> descriptor
. "without having them hard coded in with your Java" -> "without having them hard coded in your Java source"
. Servlet.service -> GenericServlet.service
. The Destroy Method -> The destroy Method
. This can happen where the container -> This can happen when the container
. a pool of instances of a Servlet -> a pool of instances of servlets
. it may destroy them -> it may destroy it
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Marcus,

I want to point out a very small error in section 8.1, for this statement:
The general syntax for the useBean tag is as follows.
<jsp:useBean id="myBean" type=�classtype� class="com.mydomain.ClassName" scope="session" />
The it attribute is mandatory . It should be
The id attribute is mandatory .

Also in section 8.2, the first statement says, "The <jsp:include and <jsp:forward tags dynamically include the content of another web resource"
As per my suggestion it should be,
"The <jsp:include> dynamically include the content of another web resource and <jsp:forward> is used for the runtime dispatch of the current request to a static resource or dynamic resource in the same context".
Because <jsp:forward> is not used for inclusion of contents.
[ May 08, 2007: Message edited by: Rancy Chadha ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 2.1) The file and directory structure of a web app
http://www.examulator.com/moodle/mod/resource/view.php?id=358

Comment
1. About "The webapps directory". I think that this is Tomcat dependent (this is not part of the specification), and might be out of scope here.
2. The part "WEB-INF/tld". This is not true, as the tag library descriptor files must always be in the WEB-INF directory, or some subdirectory of it (when not packaged in a JAR file)

Typos
. "and contain the minimum directory of WEB-INF" -> "and contains at least the WEB-INF directory"
. "from a visiting web browser and" -> the sentence is incomplete.
. The document root directory -> I'm not sure it should be called that way. The application root directory, or the context root directory
. "I could create a directory called chapter2 under the webapps directory. If I then access Tomcat with the URLl" -> "I could create a directory called chapter2 under the webapps directory and access it via the following URL:"
. you logos -> your logos
. C:\appps -> C:\apps maybe
. "where the deployment descriptor file (WEB.XML) is stored and the following three directories." -> "where the deployment descriptor file (web.xml) and the following three directories are stored." (note that WEB-INF/tld should be removed, so it should be "two directories")
. "represents you package structure" -> "represents your package structure"
. names space -> namespace
. jar files Because -> jar files. Because
. "deploy within applications" -> "deploy them within the container"
. "custom tag libraries ( taglibs) have a *.tld file." -> custom tag libraries have a descriptor whose extension is ".tld"
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 2.2) The deployment descriptor (web.xml)
http://www.examulator.com/moodle/mod/resource/view.php?id=359

Comment
1. contains information on the configuration of servlets in a web application.
I would say "contains information on the configuration of the web application, including the configuration of servlets"
2. is used in such diverse tools as the RSS feeds that allow content aggregation from web sites to the new file format for an upcoming version of Microsoft Office.
I would say "is used in diverse tools such as RSS feeds that allow content aggregation from web sites, or such as an upcoming version of Microsoft Office
3. deployment descriptor (WEB.XML) for my simple HelloWorldServlet was
a deployment descriptor is not for a servlet, but for an application. Note that the DTD shown is for version 2.3. That would be better to use 2.4 instead.

Typos
. i.e. A language -> i.e. a language
. "you are observing.," -> "you are observing."
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 2.3) The Deployment Descriptor structure
http://www.examulator.com/moodle/mod/resource/view.php?id=360

Comment
1. My previous comment about using version 2.4 still holds I won't point it out anymore.
2. Let's use your own advice in section 2.2, and not put servlets right under classes. Let's put them in packages. I won't point it out anymore either.
3. servlet-class is not mandatory. jsp-file can be used instead to redirect to a jsp file.
4. The page that this attribute points to must have the isErrorPage=true attribute set : this is not true, as an error page can leave this attribute to false. This attribute is used to access the "exception" implicit object. So I would say "may" instead of "must".

Typos
. undcer -> under
. serlvet -> servlet
. /errorPage.jsp -> /errorpage.jsp
. com.examulator.backupservlet -> com.examulator.BackupServlet
. contents of file -> content of file
. Mapping between -> mapping between
. the browser is informed type of the file -> the browser is informed of the type of the file
. how to handle, the types -> how to handle the types
. Welcome-file -> welcome-file
. The welcome-file tag can be used to mark a servlet -> The welcome-file tag can be used to mark a servlet or a JSP file
. vistior -> visitor
. mightexpect -> might expect
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Satou,

You are really amazing...
 
Marcus Green
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, many thanks for your updates Satou, they are excellent. I have been studying Spanish for about 5 years and it is a bout 0.00000000001% as good as your english There will be a delay before I start doing the fixes as I have a deadline for some other work coming up but they will all be addressed.

And for other students of the exam, note I will be making the course a commercial charged for resource at some point in the future so might like to take advantage of it before I make that change. However even when I go commercial won't be very expensive.
 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
about satou..

he did certification.... he is in constant touch with the subject...
tell him to appear for the exam now.. i bet he will score highest...

unlike others (including me) he doesnt loose the habit of reading and ansering the queries posted here,,

cheers satou
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the kind words everyone.

About 2.4) War files
http://www.examulator.com/moodle/mod/resource/view.php?id=361

Comment : the content looks like the part about packing files in a JAR file, so comments there still hold.

. you are center to copy -> you need to copy
. web-application -> web application
. A war file is merely set -> A war file is merely a set
. The command line for the jar utility -> The command line parameters for the jar utility
. jar-tvf -> jar -tvf
. "table verbose files" -> "table verbose filename"
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 3.1) The Web container model
http://www.examulator.com/moodle/mod/resource/view.php?id=362

. param value tag. -> param-value tag.
. parameter called name -> parameter called username

About 3.2) Servlet Scopes and attributes
http://www.examulator.com/moodle/mod/resource/view.php?id=363

Comment :
1. it would be cool to have the full methods signature (getAttribute, setAttribute) instead of just the mehotd name.
2. about the "atrribute scope" table. I'd make a three column table instead, with "scope, class, lifetime"
For example : request - ServletRequest - Duration of the request
3. You should mention that SingleThreadModel is deprecated and should not be used anymore

. For example it you might have a login servlet that hands off to other servlets for the actual processing, or they can be used with the session mechanism to preserve data between requests.
-> For example you might set some attributes in a login servlet that hands off to other servlets for the actual processing. Attributes can also be used with the session mechanism to preserve data between requests.
. to retrieve it it -> to retrieve it
. The three attribute scopes (request,session,and context) different -> The three attribute scopes (request,session,and context) represent different
. This depends on using a system of a unique identifier -> This depends on using a unique identifier
. i.e. One thread sets a variable value, it is modified by another and the first one accesses it again on the assumption it is in the same state as when it center it
-> For example, if thread T1 sets an attribute A, and thread T2 sets the same attribute A, there might be unpredictable results if thread T1 reads attribute A back again.
. i.e. It has no methods -> i.e. it has no methods
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
3.3) Requests and filters
http://www.examulator.com/moodle/mod/resource/view.php?id=427

Comment
1. The order filters are called : The order in the descriptor is also important. An example would be nice.
2. The part "Mapping filters to dispatchers" is not clear and might be out of place
3. The example uses EL, although EL has not been covered yet. Might be confusing.
4. About the deprecation warning, this is related to the following bug : (5086088)
http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=74e90533989c93f70227633b46db:YfiG?bug_id=5086088
(It was fixed in 1.6)

. e.g. You might -> e.g. y
. Filters : filters. Like servlets, they don't need a
. chaining together of Unix command -> chaining together Unix command
. init(), -> init()
. The doFilter method takes parameter of -> The doFilter method takes the following parameters
. requires the user -> requires the use
. As the name implies these classes wrap by taking a request or response object as a constructor parameter.
-> As the name implies, these classes wrap a request or a response, by taking respectively the request or response object as a constructor parameter.
. pefform -> perform
. importance -> impotence
. and custom version -> and provide a custom version
. "The form that generates the parameter" -> "The form that generates the parameter (sourceform.jsp)"
. "The form that shows the filtered output" -> "The form that shows the filtered output (output.jsp)"
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 3.4) Container life cycles and listeners
http://www.examulator.com/moodle/mod/resource/view.php?id=367

Comment
1. mapping the listener to a servlet -> there's no mapping for listeners
2. I'm not sure about the example MyContextAttributeListener.java. If the attribute has been removed, why calling getAttribute ?

. Examples of application events are where -> Examples of application events are when
. create a class that generated a database connection -> create a class that generates a database connection
. Ge.g. -> e.g
. listener class-tags -> listener-class tags
. i.e. It -> i.e. it
. getAttributeName -> getAttributeNames
. Don't forget you can think of ServletContext as Application Context) -> missing parenthesis
. for The servlet containe -> for the servlet container
. context.getAttribute("sUserName"); -> context.getAttribute("username"); (in two places)
. HTTPSerssion -> HttpSession
. codeshows -> code shows
. javax.servlet.Http.HttpServletRequest -> javax.servlet.http.HttpServletRequest
. SerlvetRequest -> ServletRequest
. i.e. The -> i.e. the
. the requestInitialised method -> the requestInitialized method (it's named that way in the source sample)
. For an attributes to be migrated between distributed JVM's any attributes must implement the java.io.Serializable interface.
-> For attributes to be migrated between distributed JVM's, they must implement the java.io.Serializable interface.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 6.1) JSP Elementshttp://www.examulator.com/moodle/mod/resource/view.php?id=377

Under the heading "The include directive"
1. <% @include file=�menu.jsp� %>
There should not be any space bet <% and @

2. <jsp: include page=�menu.jsp� />
There should not be any space bet <jsp: and include


3. The include directive happens at translation time (i.e. The very first time your jsp page is called the code gets written to a servlet) and the include directive happens each time at runtime.

include directive happens each time at runtime -> include action happens each time at runtime

4. Under the heading �JSP Declarations
If you want to create new methods within the output service or to create fields (class level variables) you add an exclamation mark (!) after the percentage symbol and that acts as what is called a declaration.

�within the output service� that part is not clear.
 
Priya Viswam
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 6.2) JSP Directives

http://www.examulator.com/moodle/mod/resource/view.php?id=378

1. The headings �Import�, �IsELIgnored�, �Include� and �Taglib� starts with capital letters, where as �session� and �contentType� starts with small letters.

2. <%@ page import=�java.util.*,java.io.*� %>
The xml equivalent tag is
<jsp:directive.page language="java.util.*"/>

xml equivalent should be
<jsp:directive.page import="java.util.*,java.io.*"/>

3. MIME originally stood for Multipurpose Internet mail extensions ->
MIME originally stood for Multipurpose Internet Mail Extensions

4. Java Standard Tag Library (JSTL) --> JSP Standard Tag Library (JSTL)

[ May 10, 2007: Message edited by: Priya Viswam ]

[ May 10, 2007: Message edited by: Priya Viswam ]

[ May 10, 2007: Message edited by: Priya Viswam ]
[ May 10, 2007: Message edited by: Priya Viswam ]
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marcus,

You owe a lot to these guys!
 
Priya Viswam
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 6.3) JSP with XML tags
http://www.examulator.com/moodle/mod/resource/view.php?id=379

1. <%@ page import=�java.util.*,java.io.*� %>
The xml equivalent tag is
<jsp:directive.page language="java.util.*"/>

->
The xml equivalent tag is
<jsp:directive.page import="java.util.*, java.io.*"/>

2. <:jsp:expression
remove the colon before jsp

3. The reason for this is so that the less than symbol < does not get interpreted as the start of the closure of the <js:scriptlet tag
The letter p is missing in <jsp:scriplet tag

4. <jsp:directive.directive
Either remove the second directive or change it to directivetext

5. <%@ page errorPage="errorPage" %>
-> <%@ page errorPage="errorPage.jsp" %>

6. Unfortunately it does not quite work quite correctly -> an extra �quite�
 
Rancy Chadha
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Section 7.1

<${param.tag}>Hello</${param.tag}
should be
<${param.tag}>Hello</${param.tag}>
 
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yo Priya comeon you can beat Satou!!
 
Marcus Green
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You owe a lot to these guys!

I do, I do, this is amazing. Many thanks
 
Rancy Chadha
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
7.2) EL Arrays and collections

1)
${paramValues.productid[0]}
${paramValues.productid[1]}
or the equivalent
${paramValues['productid'][0]}
${paramValues['productid'][0]}
Should be
${paramValues.productid[0]}
${paramValues.productid[1]}
or the equivalent
${paramValues['productid'][0]}
${paramValues['productid'][1]}

2)
The output from this code will be the string Marcus output three times.
Can be
The output of this code will be the string Marcus displayed three times.

7.3) EL Operators
Suggestion: It would be great if it is also mentioned in the book, that division by 0 will display result as infinity and modulus division by 0 will cause an exception
 
Priya Viswam
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 6.5) JSP implicit objects
http://www.examulator.com/moodle/mod/resource/view.php?id=381

1. The request implicit object is an instance of HTTPServletRequest, and response is an instance of HTTPServletResponse objects.
It should be
The request implicit object is an instance of HttpServletRequest, and response is an instance of HttpServletResponse objects.

2. <% request.getQueryString() %>
It should be
<%= request.getQueryString() %>

3. The exception implicit object is of type
java.langThrowable
- Dot missing. java.lang.Throwable
 
Priya Viswam
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About 6.6) Configuring to use tag libraries
http://www.examulator.com/moodle/mod/resource/view.php?id=382

1. Compile this class and place it in the directory
WEB-INF\classes\com.examulator
It should be
WEB-INF\classes\com\examulator

2. When you request this page it should generate the output
HelloWorld
-> it should be Hello, world.

3. <%@ taglib uri="WEB-INF/taglib.tld" prefix="h" %>
-> <%@ taglib uri="WEB-INF/TagDemo.tld" prefix="h" %>

4. The javax.servlet.jsp.tagext.TagSupport allows the creation of custom tags
-> The javax.servlet.jsp.tagext.BodyTagSupport allows the creation of custom tags

5. If el-ignored was set to true in web.xml but isElIgnored was true in the jsp
-> If el-ignored was set to true in web.xml but isELIgnored was true in the jsp
[ May 10, 2007: Message edited by: Priya Viswam ]
 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. The pdf file purchased contain more info and there are errors, of course, typos.
2. Page 15. Chapter 1. Objective 1.
The term HTTP stands for Hyper Text Transfer Protocol and not Transport protocol as mentioned.
3. Page 29. Chapter 2. Objective 3.
Setting Headers
setHeader("content-type"),"text/html"); and not content-type".
4. Page 51. Chapter 3. Objective 2.
Attributes are stored using ( not using using )
5. Page 51. Chapter 3. Objective 2.
To retirve it ( not To retirve it it )
6. Page 51. Chapter 3. Objective 2.
The three attribute scopes(request,session and context) differ in visibility and availability. ( not The three attribute scopes different visibility and availability as the sentence is not formed correctly )
7. Page 88. Chapter 5. Objective 2.
<form-login-page>/loginform.html</form-login-page>
and not <form-login-page>/loginform.html<form-login-page>
 
Sunder Ganapathy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Objective 3) JSP with XML tags it is mentioned as follows.

The root tag
One of the key differences between a JSP page and a (XML) JSP documents is that a JSP document must start and end with the <root tag

As per JSP 2.0 specifications,

JSP.6.3.2 The jsp:root Element
The jsp:root element can only appear as the root element in a JSP document
or in a tag file in XMLsyntax; otherwise a translation error shall occur.
JSP documents and tag files in XML syntax need not have a jsp:root element as its root element.
 
Marcus Green
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sunder, I have been very busy working on all this feedback and so far I am about half way through it. It is very helpful. Will post again here soon.
 
We begin by testing your absorbancy by exposing you to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic