Sign in to follow this  
Rudy Tanaga

Cannot pass more than 1 parameter using query string

Recommended Posts

Please help, i cannot pass more than 1 parameter in setDataURL. Please help me, asap.

 

 

 

This is my code on JSP page :

 

 

 

<%

 

strDataURL="";

 

//strDataURL ="data_provider.do?doAction=viewchart";

 

strDataURL = encodeDataURL("data_provider.do?doAction=viewchart&kpiID=10000002","false",response);

 

String chartCode2= createChart("../charts/Pie3D.swf",strDataURL, "", "chart2", 600, 300, false, false);

 

%>

 

<%=chartCode2 %>

 

 

 

And this is my java class :

 

 

 

public ActionForward viewchart(ActionMapping mapping, ActionForm form,

 

HttpServletRequest request, HttpServletResponse response) {

 

 

 

BaseDynaForm frm = (BaseDynaForm) form;

 

HttpSession session = request.getSession();

 

System.out.println(frm.get("kpiID")); //--> i got null in this statement

 

System.out.println(request.getQueryString()); // --> and i got "doAction=viewchart" it should be "doAction=viewchart&kpiID=10000002"

 

 

 

}

 

 

 

And i've register my parameter into my bean as below :

 

 

 

 

 

Share this post


Link to post
Share on other sites

Hi thanks for your response.

 

 

 

I've try it also but get the same error. If i use url encode then the output of querystring will be doAction=viewchart&FCTime=5. Or i should to change my logic for this. The thing is i want to pass a parameter more than 1 when calling the data URL.

 

 

 

Thanks

Share this post


Link to post
Share on other sites

Alternatively, manually encode the & used to divide the querystring parameters with a %20  (it's encoded version).

This worked for my piping through xsl.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this