Prev Next

Web / JSP interview questions

1. How do I find or compare collection size using JSTL?

JSTL functions library (fn) could be used to find the size or compare size of the collection. for e.g.

Items found.

Read full answer

2. if-else option in JSTL.

 tag does not have else tag. So we can use as illustrated below for if-else if- else scenario. ... ... ...

Read full answer

3. How do I test if a string contains the given value in EL?

Use the fn:contains() or fn:containsIgnoreCase() function.

${eachItem} doesn't contain 'Egg'

Read full answer

4. How do I access session scoped attributes in JSP?

Using the below scriptlet in JSP, the session attributes can be accessed. < %=request.getSession().getAttribute("sessionVariable")%> Also the session attributes could be accessed using JSTL and Expression Language tag as shown below. or using,

Read full answer

5. What is Java Server Page (JSP)?

A Java Server Page (JSP) is a web page that contains two types of text: static data and JSP elements. Static data can be expressed in any text-based format, such as HTML or XML. JSP is a technology that mixes static content with dynamically-generated content.

Read full answer

6. Are JSP expressions evaluated inside a HTML comment on JSP page?

Yes, the JSP expressions will be resolved.

Read full answer

«
»

Comments & Discussions