Browsed by
Tag: tutorials on advance java in java

What is session tracking and how do you track a user session in servlets?-

What is session tracking and how do you track a user session in servlets?-

  Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time. The methods used for session tracking are: a) User Authentication – occurs when a web server restricts access to some of its resources to only those clients that log in using a recognized username and password. b) Hidden form fields – fields are added to an HTML form that are not displayed in the client’s…

Read More Read More

What do you Understand by Context Initialization Parameters

What do you Understand by Context Initialization Parameters

The context-param element contains the declaration of a web application’s servlet context initialization parameters. Namevalue The Context Parameters page lets you manage parameters that are accessed through the ServletContext.getInitParameterNames and ServletContext.getInitParameter methods. In the context of Java web applications, context initialization parameters refer to the configuration settings that are defined at the level of a web application’s ServletContext. The ServletContext is an interface in the Java Servlet API that provides a way for servlets to interact with their web application…

Read More Read More

Is JSP Technology Extensible

Is JSP Technology Extensible

YES. JSP technology is extensible through the development of custom actions, or tags, which are encapsulated in tag libraries. Yes, JavaServer Pages (JSP) technology is extensible. JSP allows developers to create custom tags, known as JSP custom tags or simply custom tags, to encapsulate reusable functionality. This extensibility enables developers to extend the standard JSP functionality and create modular and maintainable web applications. Custom tags in JSP provide a way to separate the logic of a web application into reusable…

Read More Read More

How do you Pass Control From One JSP Page to Another

How do you Pass Control From One JSP Page to Another

Use the following ways to pass control of a request from one servlet to another or one jsp to another. First is RequestDispatcher object‘s forward method to pass the control. Second is response.sendRedirect method. In Advanced Java, when you want to pass control from one JSP (JavaServer Pages) page to another, you typically use mechanisms like: Request Dispatching: You can use RequestDispatcher to forward or include the content of another JSP page. The RequestDispatcher is obtained from the ServletRequest object….

Read More Read More

Can You Make Use of a ServletOutputStream Object From within a JSP Page

Can You Make Use of a ServletOutputStream Object From within a JSP Page

No. You are supposed to make use of only a JSPWriter object (given to you in the form of the implicit object out) for replying to clients. A JSPWriter can be viewed as a buffered version of the stream object returned by response.getWriter(), although from an implementational perspective, it is not. In general, it is not recommended to use a ServletOutputStream directly from within a JSP page. The JSP (JavaServer Pages) technology is designed to separate presentation logic from business…

Read More Read More

How is JSP Include Directive Different From JSP Include Action.

How is JSP Include Directive Different From JSP Include Action.

When a JSP include directive is used, the included file’s code is added into the added JSP page at page translation time, this happens before the JSP page is translated into a servlet. While if any page is included using action tag, the page’s output is returned back to the added page. This happens at runtime.

Write your own Strategy with Interceptor.isUnsaved()

Write your own Strategy with Interceptor.isUnsaved()

When you reattach detached objects, you need to make sure that the dependent objects are reattached as well. It appears that you are asking about using an interceptor in the context of advanced Java programming, and specifically, you want to know about a strategy involving the Interceptor.isUnsaved() method. However, the provided information is not sufficient to give a specific and accurate answer. The Interceptor.isUnsaved() method seems to be a custom or context-specific method, and its behavior or purpose is not…

Read More Read More