Arno
Arno

Reputation: 559

Open jsp in a new window in Spring project

I have a table created with jquery DataTables in my JSP file.

function initTable(){

    if (${isExternal}){
        tableObject  = {
            "paging": true,
            "ordering": true,
            "order": [[1, "asc"]],
            "info": false,
            language: {
                search: "_INPUT_",
                searchPlaceholder: "Filter"
            },
            "pageLength": 50,
            "retrieve": true
        };
    }else{
       tableObject = {
            "paging": true,
            "ordering": true,
            "info": false,
            language: {
                search: "_INPUT_",
                searchPlaceholder: "Filter"
            },
            "pageLength": 50,
            "retrieve": true
        };
    }
    return  $("#Mytable").DataTable(tableObject);
};
var myTable = initTable();

I want to pass this table object from Javascript file trough controller to open a JSP which will start download process with a download progress bar (using Akamai manager). The Question is how to open that JSP in a new window and pass that table object. This is the controller, very simple one. It just opens the JSP now. I don't know how to pass the object and open it in a new window.

@RequestMapping(value = {"/akamai"}, method = RequestMethod.POST)
public String getAkamaiDownloadPage() {
    System.out.println("getAkamaiDownloadPage Works");
      return  "/download_window/akamai_download";
}

Upvotes: 0

Views: 428

Answers (1)

dillius
dillius

Reputation: 516

You can use window.open to ask the browser to open a given URL in a new window/tab (browser controls which).

If you open a URL which is on the same domain you can pass whatever you need to that newly opened page.

Upvotes: 1

Related Questions