sukhavasi vasavi

Ranch Hand
+ Follow
since Jul 18, 2007
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 sukhavasi vasavi

<%{%
<jsp:useBean id="buffer" class="java.lang.String.Buffer"/>
<%buffer.append("xyz");%>
<%}%>
buffer is:<%=buffer%>

what appears on the stream?
a)an error occurs at compilation time
b)an eror occurs at translation time
c)the string "buffer is xyz" appears in the response stream
d)the string "buffer is null " appears in the response stream

Given ans:a
Please explian why the compilation error occurs?
This is the question from MarusGreen MockTest
This is the question from MarusGreen MockTest
1)which two locations can library dependencies bs defined for a web 1)application(choose two)

a)Web application DD
b)/META-INF/dependencies.xml file
c)/META-INF/MANIFEST.MF manifest file
d)/META-INF/MANIFEST.MF manifest of a JAR in the web application classpath

Actualluy libraries should be in WEB-INF/lib directory.
But what is library dependencies and please tell me the answers for this question


2)A developper is designing a web application that makes many finegrainedremote data requests for each client request.During testing the developper discovers that the volume of requests significantly degardes performance of the application.
Which design pattern provides a solution for this problem?


According the design pattern notes given for the ranchers I thought that the pattern is BusinnessDelegate.But it was showing as wrong answer.Please give me the answer

3)A company hired an outside consultant to develop the web application.To fininsh the job quickly the consultant creted several dozen JSp pages that diractly communicate with the database.The company business team has since purchased a set of business objects to model their system and the developper charged with maintaining web application must now refactor all the JSPs to work with the new system
Which pattern can the developper use to solve this problem?

Please give me the answer?
<%
request.setAttribute("vals",new Sring[]{"1","2","3","4"});
request.setAttribute("index","2");
%>
<%-- insert code here --%>
Which three EL expressions inserted at line 15,are valid and evaluate to "3"?(Choose three)

a)${vals.2}
b)${vals["2"]}
c)${vals.index}
d)${vals[index]}
e)${vals}[index]
f)${vals.(vals.index)}
g)${vals[vals[index-1]]}

I have seen this qestion in the mock exam
I have confusion on these types of question.
Could you explain this question clearly.
The implicit objects are param,paramValues,header,headerValues,pageContext,......
But here we are not using any implicit object.Please explain clearly
Assume the tag library in the exhibit is placed in a web application in the path /WEB-INF/TLD/example.tld.

1.
2.<ex:hello/>
which jsp code inserted at line 1,completes the jsp code to invoke the hellotag?

<%@taglib prefix="ex" uri="http://example.com/tld/example"%>
or
<%@taglib prefix="ex" uri="/WEB-INF/tld"%>

whichone is correct please exlain?
A web application contains a tag file called bea.tag in /WEB-INF/tags/alpha.
A jsp page called sort.jsp exists in the web application and contains only this JSP code
1:<%@taglib prefix="x"
2:tagdir="/WEB-INF/tags/alpha"%>
3:<x:beta/>
the sort.jsp page is requested
Which two are true?

a)Tag files can only be accessed using a tagdir attribte
b)The sort.jsp page translates successfully and invokes the tag defined by beta.tag
c)the sort.jsp page produces a translation error because a taglib directive must always have a uri attribute
d)Tag files can only be placed in /WEB-INF/tags and not in any sub directory of /WEB-INF/tags
e)The tagdir attribute in line 2 can be replaced by a uri attribute if a tld reffering to beta.tag is created and added to web application.

Please give me the answer with explanation
1)Which three are true about HttpServletRequestWrapper class?
a)HttpServletequest is an example of DecoratorPattern
b)this can be used to extend the functionality of servletRequest.
c)A subclass of HttpServletRequestWrapper can not modify the behaviour
of getReader method
d)An HttpServletRequestWrapper may be used only by a class implementing the javax.servlet.Filter interface
e)An HttpServletrequestWrapper can not be used on the request passed to the RequestDispatcher.include method
f)An HttpServletRequestWrapperWrapper may modify the header of a request within an object implementing the javax.servlet.Filter interface.

Iam thinking that the answers are a,b,d but in Mocktest they given as a,b,f.Please tell me the correct answer?
Sorry Iam looking for the answers.Please tell me
1)which path is required to be present within WAR file?
a)/classes
b)/index.html
c)/MANIFES-INF
d)/WEB-INF/web.xml
e)/WEB-INF/classes
f)/META-INF/index.html

2)which three are described in the standard web applicaton DD?
a)Session configuration
b)MIME type mappings
c)Context root for the application
d)Servlet insance pool configuration
e)web container default port bindings
f)Servlet context initialization parameters
Iam thinking that answers are a,b,c,f
But we have to choose only 3.Please correct me?

3)In which two locations can library dependencies be defined for a web application
a)the web application DD
b)/META-INF/dependencies.xml file
c)/META-INF/MANIFEST.MF manifest file
d)/META-INF/MANIFEST.MF manifest of a JAR in the web application classpath
A JSP page needs to instantiate a java bean to be used by only that page.
Which two jsp:useBean attributes must be used to access this attribute in JSP page?

a)id
b)type
c)name
d)class
e)scope

I have confusion in this qn that in one mock test the answer gave as class and in another mock test it given as type.
Please explain?
while creating tld file it is showing "The project should contain at least one Struts module to be imported" Is it necessary to import?Please tell me
Please help me to solve this simple program

How can we create the tld files using new->file or using new->xml and how these header contents
<?xml version="1.0"............ came?

Iam unable to create this tld file.For this Iam struggling from 2 days.Please Explain