Forward, redirect and download

 Exampe of forwarding, redirecting and download example. On developing web based software, you often use them.

Access this example

 To access this example, please access the url below or "Forward, redirect and download" link from the toppage.


Then the page below will appear.

forward example page

After access this page, you can try next operations.

forward url

 Select "by returning value, the page will forwarded." and push the "Submit" button. The contents shown in the browser is changed into the top page's one. But the url in the web browser's url is unchanged. This is forwarding.

Redirect url

 Select "Redirect to the top page." and push the "Submit" button. The web browser go to the top page and the url shown in the browser changes.

Download file

 Select "Download file." and push the "Submit" button. Then the browser download java script file.


 The source code of this example is in "ALINOUS_HOME/samples/forward/" folder.


 The implementation of "index.alns" in this folder is below.

forward url

 To forward url, you should return thhe path to forward.

Redirect url

 In order to redirect, use redirect sentence and target url. You can write internet url including other server or domain into this target url.

Download file

 In order to download file, You have to

  • Copy or make file in the "/tmp/" folder
  • Call download sentence.

After download sentence called and download was done, the download sentence automatically delete the downloaded file.

Testing automation

 This example is testable code, there is more example to do testing automation. Please take a look at Testing Forward, download.

Go to Top