Posts

Showing posts with the label jsp-servlet

Top 10 Servlet Interview Question Answers - J2EE

Image
This time its servlet interview questions, I was thinking what to pick for my interview series and then I thought about J2EE and Servlet is my favorite on that space. Servlet is an important part of any J2EE development and serves as Controller on many web MVC frameworks and that�s why it�s quite popular on J2EE interviews. These Servlet questions are based on my experience as well as collected by friends and colleague and they are not only good for interview practice but also shows a new direction of learning for anyone who is not very familiar with servlet technology. As said earlier this interview question article is part of my earlier series java interview questions , UNIX command interview questions and Java threading interview questions . You can find answers to all these questions on google but I have also listed my answers for quick reference. Read more �

5 JSTL Core IF Tag Examples in JSP - Tutorial

<c:if> or if tag of JSTL core tag library in JSP is one of the most versatile and useful tag. JSTL if tag allows you to test for a condition, like checking for a particular parameter in requestScope , sessionScope or pageScope . You can also check any parameter in request parameters and headers or can check for a variable in JSP page using <c:if> tag. JSTL if tag helps a lot to reduce amount of Java code from JSP page and if used, along with expression language JSTL core tag library, can remove almost all Java code from JSP files. Earlier we have seen examples o f JSTL foreach tag and JSTL core set tag an d this JSP JSTL tutorial is based on if tag of JSTL core tag library. We will, see how to use <core:if> tag inside JSP files and different example of <core:if> tag to get ourselves familiar with functionality and power offered by JSTL <c:if> tag. After seeing these examples of <core:if> tag along with expression language, You will be amazed...

How to disable submit button in HTML JavaScript to prevent multiple form submission

Avoiding multiple submission of HTML form or POST data is common requirement in Java web application. Thankfully, You can prevent multiple submission by disabling submit button in HTML and JavaScript itself, rather than handling it on server side. This is very common requirement while developing web application using Servlet and JSP or any other web technology. At same time there are lot of information and noise available in web and its very hard to find simple approach to disable submit button. When I search for simple way to disable submit button in HTML and JavaScript , I was overwhelmed by responses on forums and various online community. Those are good for intermediate HTML and JavaScript developer but a beginner might just get overwhelmed by amount of information presented and rather confused to use which approach will work, how exactly should I disable submit button to prevent multiple form submissions etc. That drives me to write this post and summarize the simplest possib...

Display Tag Export Example in JSP � Issue Fix Java Tutorial

Display tag provides export options to export page into PDF, CSV, Excel and XML in Java web application written using JSP, Servlet, Struts or Spring MVC framework. Display tag is a tag library and you just need to use it in your JSP page to display tabular data or generate HTML tables dynamically. Earlier we have se en 10 display tag tips for getting most out of display tag and in this JSP Servlet tutorial we will see one display tag export issue, which prevent display tag export functionality to work properly. Display tag experience is considered good in variou s JSP Interview and some questions related to sorting, paging, both internal paging and external paging and exporting on display tag also appear as various J2EE and Servlet Interview questions . In my opinion, after JSTL core tag library , d isplay tag is most popular tag library and every Servlet and JSP developer should familiar with display tag. Read more �

What is JSESSIONID in J2EE Web application - JSP Servlet?

What is JSESSIONID in JSP-Servlet JSESSIONID is a cookie generated by Servlet containers like Tomcat or Jetty and used for session management in J2EE web application for HTTP protocol. Since HTTP is a stateless protocol there is no way for Web Server to relate two separate requests coming from the same client and Session management is the process to track user session using different session management techniques like Cookies and URL Rewriting . If a Web server is using a cookie for session management it creates and sends JSESSIONID cookie to the client and then the client sends it back to the server in subsequent HTTP requests . JSESSIONID and session management is a not only a popular Servlet interview question but also appear in various JSP interviews . Along with What is JSESSIONID interviewer are also interested in when and how JSESSIONID is created in Servlet and JSP which we will see in next section. Read more �