Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

102
Views
to convert object to json to pass to controller but coming as obect to backend java

public class student implements Serializable{

private static final long serialVersionUID = 547610808289645609L;
private String strStudentNum;
private String strStudentName;
private String strStudentclass;
private String strCity;
}
JSP page:

<c:set var="StudentList" value="${mspSession.selectedProperty.STUDENTDetails.StudentStartStudentList}"></c:set>

function downloadCSTdetailsWithFileName()
{
    var stid = '${StudentList}';
    var reportType = 'confirmList';
    var startclassDate = '${param.startclassDate}';
    var pririotyadmission = '${param.pririotyadmission}';
    debugger;
    downloadconfirmCSV(stid, reportType,startclassDate,pririotyadmission);
}

JS:
function downloadconfirmCSV(stid, reportType,startclassDate,pririotyadmission){
    
    if(reportType.match("confirmList") && !downloadFlag)
{       
    var k;
            
    for(k=0;k<stid.length;k++)
        {
                  
                    stid[k].stid = "=\""+stid[k].stid+"\"";
                    
        }
    downloadFlag = true;
    }


var inpValues = {
        "jsonData" : JSON.stringify(stid)+','+pririotyadmission+','+startclassDate+','+reportType}
var url1 = "/stsapp/am/Stdownload.htm";
var data1 = inpValues;
var method1 = "post";
//jquery plugin -Download defined in commonutil.js
$.download(url1,data1,method1);
}

when we do json stringify it is coming as a object not a json ..I need to pass json from the JS iam not sure how do i get it. Inputs are as above

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!