- Type
- Quiz
- Course
- CS311 Introduction to Web Services Development
- Size
- PDF 98 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 4. Download the file for all 4 pages.
Long Question
Q Suppose you are working on servlet that required user.write input form HTML code for log in
Password
And sent by post method to loginservlet
Answer: <form action=" LoginServlet" method="post">
Name:<input type="text" name="name"> <br> Password:<input type="password" name="password"> <br> <input type="submit" value="login">
</form>
Q Write XML code for this
1. Load "books.xml" into xmlDoc
2. Get the text node of the first <title> element node
- Use the replaceData method to replace the eight first characters from the text node with " Easy"
xmlDoc=loadXMLDoc("books.xml"); x=xmlDoc.getElementsByTagName("title")[0].childNodes[0]
x.replaceData(0,8," Easy");
Q write code to set the first element of given code category to “available”
<bookstore> <book category="cooking"><title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author><year>2005</year><price>30.00</price ></book>
</bookstore>
x.setAttribute("status", "available");
Short
Q Write methods of ServletContext interface
public String getInitParameter(String name): Returns the parameter value for the specified parameter name
public Enumeration getInitParameterNames(): Returns the names of the context's initialization parameters.
Highlight jo kiya wo nam likhany thy Description likhi thi
Q How many ways to develop JAX-WS write there names?
Answer: 2 ways to develop JAX-WS example. RPC style Document style.
Q the given code is write in JDOM you are required to right code to get attruibte
Answer: getAttribute("attributeName");
Q code removes the "category" attribute in the first <book> element: category ki jaga kuch aur likha tha
x[0].removeAttribute("category");
MCQS
- The insertData() method has two method hoty
- Ek insert data ma ya mcqs bi tha (starts at zero)
- Element - Represents an XML element. Element object
- Avoid navigating to empty text nodes spaces
- Empty Text Nodes function that checks the node type
- The replaceData() method has three parameters:
- The createComment() method creates a new comment node.
8. SOAP stand for
- WSDl Exposed by Webservices
- Soap ki all baat likhi thi all the given answer tha
Related CS311 files
All CS311 files →Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.