In , usually have to deal with URL manipulation importing URL, to another URL...JSTL provides several useful URL-relatedactions to simplify URL manipulation.
action enables you to retrieve the an URL and then process it within JSP page. The syntax of the action is as follows:
The only attribute url is mandatory. The URL could be in absolute or relative form. If it is in relative form, the resource you refer must be inside the . Inside the body of the
action, you can also has parameter which specify by the
In the example, we use the
action to retrieve the content of an XML file resided in the web application. Then we output the content of the XML file into the textarea. Later on if you learn how to process XML, you can parse this XML content to extract data inside it.
simply to redirect the current page to another page or URL. The syntax of the is as follows:
You can put any URL in the url attribute of the
action. Let's take a look at an example of using the action:
In the above example, you choose a search engine and click Go button, the page will beredirect to the corresponding URL.