This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all I am new to jsp and servlets i have doubt about the name display in URL.
When i am observing some websites the name of the page will not appears in the URL but when i am clicking links or buttons in my application my JSP page names displays in URL how to avoid it?
Basically, the former will send a response to the browser telling him to make a new request to that page. The browser will create a new request to the JSP you mentioned in your method call, and you have essentially used no controller to go to the page.
The latter will NOT send the response directly to the browser, but it will redirect your request to the jsp page, keeping all your request parameters and attributes, and not updating your url bar so the address you mapped your servlet to is used as the url in the browser bar.
I think you're confused as to what JSP actually is. A JSP is basically a servlet that writes HTML to its outputstream. What you actually is comprised of HTML, JSP is not a markup language, it's a server-side technology. Perhaps it is best to read a course book or follow some tutorials to learn how to work with JSP.