Found 177 Articles for JSP

What is a taglib directive in JSP?

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

96 Views

The JavaServer Pages API allow you to define custom JSP tags that look like HTML or XML tags and a tag library is a set of user-defined tags that implement custom behavior.The taglib directive declares that your JSP page uses a set of custom tags, identifies the location of the library, and provides means for identifying the custom tags in your JSP page.The taglib directive follows the syntax given below −Here, the uri attribute value resolves to a location the container understands and the prefix attribute informs a container what bits of markup are custom actions.You can write the XML ... Read More

How to read form data using JSP?

Arjun Thakur
Updated on 30-Jul-2019 22:30:25

2K+ Views

JSP handles requests using getParameter() method to read simple parameters and getInputStream() method to read binary data stream coming from the client.Reading Form Data using JSPJSP handles form data parsing automatically using the following methods depending on the situation −getParameter(): You call request.getParameter() method to get the value of a form parameter.getParameterValues(): Call this method if the parameter appears more than once and returns multiple values, for example, checkbox.getParameterNames(): Call this method if you want a complete list of all parameters in the current request.getInputStream(): Call this method to read binary data stream coming from the client.Read More

What is difference between GET and POST method in HTTP protocol?

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

353 Views

GET methodThe GET method sends the encoded user information appended to the page request. The page and the encoded information are separated by the ? character as follows −http://www.test.com/hello?key1=value1&key2=value2The GET method is the default method to pass information from the browser to the web server and it produces a long string that appears in your browser's Location:box. It is recommended that the GET method is better not used. if you have a password or other sensitive information to pass to the server.The GET method has size limitation: only 1024 characters can be in a request string.This information is passed using ... Read More

Please share a running example of include directive in JSP

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

46 Views

The include directive is used to include a file during the translation phase. This directive tells the container to merge the content of other external files with the current JSP during the translation phase. You may code include directives anywhere in your JSP page.The general usage form of this directive is as follows −The filename in the include directive is actually a relative URL. If you just specify a filename with no associated path, the JSP compiler assumes that the file is in the same directory as your JSP.You can write the XML equivalent of the above syntax as follows ... Read More

What is a include directive in JSP?

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

134 Views

The include directive is used to include a file during the translation phase. This directive tells the container to merge the content of other external files with the current JSP during the translation phase. You may code the include directives anywhere in your JSP page.The general usage form of this directive is as follows −

What is isScriptingEnabled Attribute in JSP?

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

206 Views

The isScriptingEnabled attribute determines if the scripting elements are allowed for use.The default value (true) enables scriptlets, expressions, and declarations. If the attribute's value is set to false, a translation-time error will be raised if the JSP uses any scriptlets, expressions (non-EL), or declarations.The attribute's value can be set to false if you want to restrict the usage of scriptlets, expressions (non-EL), or declarations −

What is isELIgnored Attribute in JSP?

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

5K+ Views

The isELIgnored attribute gives you the ability to disable the evaluation of Expression Language (EL) expressions which has been introduced in JSP 2.0.The default value of the attribute is true, meaning that expressions, ${...}, are evaluated as dictated by the JSP specification. If the attribute is set to false, then expressions are not evaluated but rather treated as static text.Following directive sets an expression not to be evaluated −

What is session attribute in JSP?

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

2K+ Views

The session attribute indicates whether or not the JSP page uses HTTP sessions. A value of true means that the JSP page has access to a builtin session object and a value of false means that the JSP page cannot access the builtin session object.Following directive allows the JSP page to use any of the builtin object session methods such as session.getCreationTime() or session.getLastAccessTime() −

What is language attribute in JSP?

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

329 Views

The language attribute indicates the programming language used in scripting the JSP page.For example, because you usually use Java as the scripting language, your language option looks like this −

What is isThreadSafe attribute in JSP?

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

1K+ Views

The isThreadSafe option marks a page as being thread-safe. By default, all JSPs are considered thread-safe. If you set the isThreadSafe option to false, the JSP engine makes sure that only one thread at a time is executing your JSP.The following page directive sets the isThreadSafe option to false −

Advertisements