Erevmax Technologies: Final Test On Java and Advanced Java
Erevmax Technologies: Final Test On Java and Advanced Java
in association with
InnoServ Solutions
Presents
Full Marks: 200 PASS MARKS: 100 TIME: 200 MIN NUMBER OF QUESTIONS: 121
All Questions are mandatory .Figures in right margin indicate marks for each question. There is no
negative marking. Answers should be written on question paper for Section 1 and 2 only. Overwriting
of answers will be deemed as a malicious practice. Hence be sure before answering the questions in
the answer sheet. Practical project needs to be compressed and sent to designated email. Adoption of
unfair means can lead to the cancellation of entire exam and reporting to appropriate authorities.
A) The init() method of the servlet runs for multiple times once the servlet has loaded in the Web
Server
B) The SYSTEM attribute within <!DOCTYPE> specifies that the DTD for an XML document is
present within the local machine.
C) All JavaScript functions has to be written within the <script></script> tag.
D) The DTD document itself is a non – XML document.
E) The XSL document itself is an XML document.
F) The CSS document itself is an XML document.
G) Statement class helps to pass parameters within an SQL query within a Java program.
H) The return type of the executeUpdate() method of the Statement object is double.
I) The return type of the execute() method of the Statement object is WebResult.
J) The finally method executed whether or not an exception occurs in a program
K) If you have to pick up values from multiple check boxes from an HTML file the names of the
checkboxes should be different.
L) The Session object gets destroyed once you close the browser.
M) The getParameterValue() method of the request object is required to pick multiple values from
CheckBoxes from an HTML File.
N) HTML code can be embedded within a Servlet.
O) The sendRedirect() method of the response object acts on the Web Browser.
P) The forward() method of the RequestDispatcher object acts on the Web Server.
Q) The destroy method executes whenever we close the browser.
R) Java code can be embedded within HTML in a JSP file.
S) The Math.random() method helps to return a double value between 0 to 1.
T) The getSession(false) method of the request object of servlet creates a new Session.
U) JavaScript can change HTML content.
V) Document.write() method does not delete the existing HTML content.
W) The keyword “var” is used to declare any variable in Javascript.
X) A JavaScript variable name can begin with a number.
Y) Any user-defined in JavaScript must be preceded with the keyword “function”
Z) Within JavaScript there can be ‘char’ datatype
AA) We can declare global variables in JavaScript
BB) XML was designed for both human-readable and machine-readable
CC) There can be duplicate attributes for an xml tag
DD) Xml is case-sensitive.
EE) Every opening tag must have an equivalent closing tag.
FF) Tags can be overlapped in XML
GG) Attribute values must be always quoted for an XML tag.
HH) Schema offers finer control over an XML document than a DTD.
II) XPath can be used to navigate through elements and attributes in an XML document
JJ) With XSLT you can transform an XML document into HTML.
KK) The #IMPLIED token makes an attribute mandatory
LL) Any unique value in the the attribute of an XML document can be specified by the token ID
MM) The IDREf token uses the value of an ID attribute.
NN) The JSP declaration tag helps to declare any fields as well as methods.
OO)The JSP expression tag helps to print the value of a variable.
PP) The JSP “include” directive can also include an HTML document within a JSP Page.
QQ) The JSP page does convert into a servlet before sending response to the client.
RR) We can do File Operations in both JSP and Servlets
SS) We can do database operations in both JSP and Servlets
TT) The mysql jar connector file is not required to be added with a Web Application dealing with
MYSQL database
UU) The Session variable in a servlet or JSP can die with the closing of the browser.
VV) We can use all sort of SQL statement in JDBC oriented programs.
WW) Servlets and JSP are used for creating Desktop applications in Java
XX) JavaScript is used for creating dymanic HTML pages.
YY) JavaSCript can be used for form validation in HTML.
ZZ) JSON can be an alternative to XML.
AAA) One servlet or JSP page can create multiple HTML pages
BBB) The IsErrorPage attribute prevent any JSP execeptions thrown in the current page.
CCC) The ASP and JSP technologies are quite similar in nature.
DDD) A JSP page can use only Java as its advanced programming language.
EEE) The “*” sign denotes one or more elements within a DTD for an XML document.
FFF) The “?” sign denotes zero or one element in a DTD for an XML document.
GGG) The “+” sign denotes zero or more elements for an XML document
HHH) Alternative elements can be used by using the “|” within a DTD for an XML document.
Create a table within mysql database called “TempRec” using the Services section of netbeans IDE. It
s which should have four columns called fno, sno, result, op with the datatypes of int, int, float, char
respectively. Create a Web Application using Net beans IDE called ErevWeb<Yourname>(eg. If your
name is “Raj” project name will be “ErevWebRaj”). Create a JSP page called Redirector.jsp with a
system of login and password. Create a new session which should store the “username” which
should be displayed in all the rest of servlet and jsp pages.It should also consist of the submit clear
and close button. Make the inputs of both the login and password as required. If the username and
password is “admin” and “admin” respectively it should redirect to another JSP page called
Tempcon.jsp which should have the facility to convert Celsius to Fahrenheit and vice-versa using a
Java Bean called TempCon.java within a package called tempack. If the username and password is
“user” and “user” it should be redirected to another HTML page called NumCal.html. For some other
username and password and error page should be displayed called DivideError.jsp which should be
invoked with the Error Page attribute of the JSP Page and by throwing a false exception within the
page. This web application should consist of a HTML Page (NumCal.html). It should have the facility
to add, subtract, multiply and divide two numbers. It should have three textboxes namely for two
inputs and one output. Proper javascript validation must be done for blank inputs and non numbers.
The selection of operations must be done using four radio buttons. All the HTML elements must be
nested within a form tag with the action attribute pointing towards a servlet called calculate.java.
The servlet should display the operands, operator and the result. It should again have a “Save” . The
Save button must redirect it to another Servlet called “DataSaver.java” which is going to save the
operands, operator and the result in a table within the mysql database. The servlet should display
the message of successful insertion of the records and also should display an hyperlink to a JSP page
called DataView.jsp using a hyperlink where all the records of the database table should get
displayed. Further it should have a “Export” button which should export all the records into an XML
page called DataView.xml and a “logout” button to invalidate the session.
A) FULL NAME__________________________________.
B) EMPNO.__________________________________.
C) DESIGNATION:_______________________________.
D) EMAIL ID_______________________________
E) SKYPE ID_________________________________
MARKS OBTAINED:
INVIGILATOR:
DATE:
COMMENTS: