answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: How do you Get value from one jsp page in to another jsp page?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How many page directive can use in a single JSP?

There is no limit as such. You can use one or more Page Directives in a JSP but you cannot have duplicates


What is the purpose of page directive in JSP?

The Page Directive is one of the important components of any JSP Page. It can help us define page specific properties like Buffer size or location of an error page etc A JSP page, and any files included via the include directive, can contain one or more page directives but no duplicates. The JSP container will apply all the attributes to the page. The position of these page directives is irrelevant, but it is good practice to keep them together at the top of the page. (So that we can identify them easily)


What is the difference between jsp forward and response sendRedirect?

The <jsp:forward ..> is actually a call to HttpServletRequest.forward(String url) which passes the request object within the server to either a servlet or to another JSP page. The new servlet or JSP page continues to process the same request and the browser is not aware of the fact that more than one servlet or page is involved. i.e., The client is not aware that the request is being forwarded somewhere else. The URL shown in the browser stays unchanged when you do this forward. The <jsp:forward> element forwards the request object containing the client request information from one JSP file to another file. The target file can be an HTML file, another JSP file, or a servlet, as long as it is in the same application context as the forwarding JSP file. The lines in the source JSP file after the <jsp:forward> element are not processed. The page invoked by the <jsp:forward> action has access to all the parameters in the original JSP page's request object. You can add new parameters to the request object to pass to the target page by using the <jsp:param name="..." value="..." />. Be careful when using <jsp:forward> with unbuffered output. If the JSP file has any data in the out object, using this forward action will cause an IllegalStateException to be thrown when the page is displayed. The response.sendRedirect() creates a new request object which doesn't carry any of old request information. The first request handler JSP page tells the browser to make a new request to the target servlet or JSP page. The URL shown in the browser therefore changes to the URL of the new page to which you redirect. A redirect is slower than a forward because the browser has to make a new request. Another difference is that request scope objects are no longer available after a redirect because it results in a new request. If you need to pass data to the page you redirect to, you have to use a query string and pass them as request parameters or save the data in the session or application scope objects Forward is faster than redirect but one disadvantage is that URL is not changed and also it works within the same web application. Also, when you choose to use forward, you need to think and confirm what must happen if the user reloads the page.


Which one is better from jsp and asp?

I would choose JSP because JSP is a open source technology and is free whereas ASP is a proprietary technology and is paid. Features wise, both JSP and ASP are equivalent and can compete with one another feature by feature.


What is difference between custom JSP tags and beans?

They are two totally different concepts and are entirely different when compared to one another. The similarity is that - they both are used by JSP Pages to enhance the features and functionality of the JSP Technology


How validate and retrieve data from database in jsp?

We can do validation by using JavaScript. Here we are using function Validate(). Iam creating one JSP name index.jsp & give a link to another JSP name basic.jsp. In that Jsp iam using Type 1 Jdbc Driver & giving a database connection


What are jsp actions?

JSP actions are XML tags that direct the server to use existing components or control the behavior of the JSP engine. JSP Actions consist of a typical (XML-based) prefix of "jsp" followed by a colon, followed by the action name followed by one or more attribute parameters. There are six JSP Actions: < jsp : include / > < jsp : forward / > < jsp : plugin / > < jsp : usebean / > < jsp : setProperty / > < jsp : getProperty / >


What is difference between requestprocessor and request dispatcher?

Request processor is a class which is responsible for handling request and response it is provided by struts framework if we want to customize our controller we can make in this class. Request Dispatcher is an interface which supports for dispatching request from one page to another page in a application(page may be a servlet file,JSP


How do you connect jsp and HTML?

JSP and HTML are similar in some way or other. JSP is one which has work on Java Programming as well.


Which is faster among servlets and jsp?

Both are similar to one another technology wise and finding out which is faster is not possible. Ideally speaking a JSP once compiled and deployed in a web server behaves like a servlet.


Why should you use PHP and not JSP?

Firstly, this is wrong question. The right one would be WHEN should you use PHP, not JSP? or, WHEN should you use PHP and WHEN JSP?


Why business logic written using servlets not in jsp?

It is usually done for two reasons: 1. For security purposes - No one can see the code inside a servlet but much of the code inside a JSP can be found out by right clicking on the web page and doing a "View Source" 2. There are only one or two Servlets in any application but there may be dozens of JSP's. if you code the business logic in a JSP, then you would have to replicate the same in all the JSP's where you want this feature. Instead if you place this logic inside the servlet, it is easier for re-use. Instead of copy pasting the code in multiple places, you can place the contents in one single place.