Found 178 Articles for JSP

Difference Between JSP and PHP

Shriansh Kumar
Updated on 21-Jul-2023 22:26:19

378 Views

Both JSP and PHP are two popular technologies that serve to create dynamic web pages. Both are similar in the ways that they allow developers to embed code within an HTML document that can interact with databases, sessions, cookies, and other web features. However, they also have some significant differences that may affect the choice of which one to use for a web project. In this article, we will try to find the difference between JSP and PHP in terms of their syntax, performance, scalability, security, and compatibility. JSP vs PHP JSP It is an acronym that stands for Java ... Read More

Difference between JSP and ASP

Kiran Kumar Panigrahi
Updated on 27-Jul-2022 09:44:13

3K+ Views

JSP and ASP are both server-side scripting languages. JSP is Java based and is developed by Sun Microsystems, whereas ASP is developed by Microsoft and is also referred as Classic ASP. Whenever a browser requests a JSP or ASP page, the server engine reads the file, executes the code in file and returns the HTML output to the browser.JSP is compiled, whereas ASP is interpreted. ASP.NET is a .NET based variant of ASP where the codes are compiled to improve the performance.What is ASP?ASP is a server-side scripting engine, which means the code that is written gets sent to the ... Read More

Difference between Servlet and JSP

Nitin Sharma
Updated on 18-Sep-2019 14:23:53

5K+ Views

In brief, it can be defined as Servlet are the java programs that run on a Web server and act as a middle layer between a request coming from HTTP client and databases or applications on the HTTP server.While JSP is simply a text document that contains two types of text: static text which is predefined and dynamic text which is rendered after server response is received.The following are the important differences between ArrayList and HashSet.Sr. No.KeyServletJSP1ImplementationServlet is developed on Java language.JSP is primarily written in HTML language although Java code could also be written on it but for it, ... Read More

How to check index within a string of a specified substring in JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

306 Views

The fn:indexOf() function returns the index within a string of a specified substring.SyntaxThe fn:indexOf() function has the following syntax −int indexOf(java.lang.String, java.lang.String)ExampleFollowing is the example to explain the functionality of the fn:indexOf() function − Using JSTL Functions Index (1) : ${fn:indexOf(string1, "first")} Index (2) : ${fn:indexOf(string2, "second")} You will receive the following result −Index (1) : 8 Index (2) : 13

How to escape characters that can be interpreted as XML markup in JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

728 Views

The fn:escapeXml() function escapes characters that can be interpreted as XML markup.SyntaxThe fn:escapeXml() function has the following syntax −java.lang.String escapeXml(java.lang.String)ExampleFollowing is the example to explain the functionality of the fn:escapeXml() function − Using JSTL Functions With escapeXml() Function: string (1) : ${fn:escapeXml(string1)} string (2) : ${fn:escapeXml(string2)} Without escapeXml() Function: string (1) : ${string1} string (2) : ${string2} You will receive the following result −With escapeXml() Function: string (1) : This is first String. string (2) : This is second String. Without escapeXml() Function − string (1) : This is first String. string (2) : This is second String.

How to determine if an input string ends with a specified suffix in JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

194 Views

The fn:endsWith() function determines if an input string ends with a specified suffix.SyntaxThe fn:endsWith() function has the following syntax −boolean endsWith(java.lang.String, java.lang.String)ExampleFollowing example explains the functionality of the fn:substring function −           Using JSTL Functions                              String ends with 123                      String ends with TEST       You will receive the following result −String ends with 123

How to check whether an input string contains a specified substring ignoring the case using JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

227 Views

The fn:containsIgnoreCase() function determines whether an input string contains a specified substring. While doing search it ignores the case.SyntaxThe fn:containsIgnoreCase() function has the following syntax −boolean containsIgnoreCase(java.lang.String, java.lang.String)ExampleFollowing is the example to explain the functionality of the fn:containsIgnoreCase() function −           Using JSTL Functions                              Found test string                      Found TEST string         You will receive the following result −Found test string Found TEST string

How to check if an input string contains a specified substring in JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

2K+ Views

The fn:contains() function determines whether an input string contains a specified substring.SyntaxThe fn:contains() function has the following syntax −boolean contains(java.lang.String, java.lang.String)ExampleFollowing example explains the functionality of fn:contains() function −           Using JSTL Functions     Found test string Found TEST string You will receive the following result −Found test string

How to apply XSL transformation on an XML document?

Samual Sam
Updated on 30-Jul-2019 22:30:25

350 Views

The tag applies an XSL transformation on an XML document.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultdocSource XML document for the XSLT transformationNoBodydocSystemIdURI of the original XML documentNoNonexsltXSLT stylesheet providing transformation instructionsYesNonexsltSystemIdURI of the original XSLT documentNoNoneresultResult object to accept the transformation's resultNoPrint to pagevarVariable that is set to the transformed XML documentNoPrint to pagescopeScope of the variable to expose the transformation's resultNoNoneExampleConsider the following XSLT stylesheet style.xsl −                                                                                                                                                                                                                                                                     Now consider the following JSP file −           JSTL x:transform Tags               Books Info:                                                 Padam History                 ZARA                 100                                             Great Mistry                 NUHA                 2000                                 You will receive the following result −Books InfoPadam HistoryZARA100Great MistryNUHA2000

Can we have a switch statement in JSP for XPath expression?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

241 Views

The tag works like a Java switch statement. With this, you can choose between a number of alternatives. Where the switch statement has the case statements, the tag has the tags. In a similar way, a switch statement has the default clause to specify a default action and the tag has the tag as the default clause.AttributeThe tag does not have any attribute.The tag has one attributes which is listed below.The tag does not have any attribute.The tag has the following attributes −AttributeDescriptionRequiredDefaultselectCondition to evaluateYesNoneExample         ... Read More

1 2 3 4 5 ... 18 Next
Advertisements