I am trying to pass 2 querystring parameters in my Job using tSystem component to launch a JSP page. The page gets launched properly but always i am getting the second parameter as null.
Can you help me in that? See in my screenshot below, i am passing the value as:
"cmd /c start chrome http://localhost:8080/TestDataUpdate?tablename=temp_staging_table&pk=empid"
This gives first parameter as correct, but second parameter is null.
Encode your url. It is possible that the & is being interpreted differently in a java script. Look at URL Encoding when you pass parameters.
Ok. But I am not able to understand how to use encodeURI in our example.
I think we need to do something like this:
var uri = "my test.asp?name=ståle&car=saab";
var res = encodeURI(uri);
How to do it in our case i.e. what would command line look like?
These are simple developer questions. It takes less time to google it and find the answer
Ya sure @iburtally, it was easy to find on net about encoding, but what I wanted that how to pass it in our URL. i am trying to pass value as:
"cmd /c start chrome " + "URLEncoder.encode(http://localhost:8080/TestDataUpdate?tablename=temp_staging_table&pk=empid, \"UTF-8"\ +")"; "
But not getting success, there are errors in it..so I am only seeking help on Syntax..
"cmd /c start chrome " + URLEncoder.encode("http://localhost:8080/TestDataUpdate?tablename=temp_staging_table&pk=empid", "UTF-8")
This resolves my compiler error and my final string is now:
"cmd /c start chrome " + java.net.URLEncoder.encode("http://localhost:8080/TestDataUpdate?tablename=temp_staging_table&pk=empid", "UTF-8")
However, on executing my Job, this only launches 'chrome' and the application hosted doesn't gets launched.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Test drive Talend's enterprise products.