jquery
$('.snd').click(function (){
$.ajax({
url: '/M08CDECUStructuralOptimiser/NodeAction?action=test',
data: {cl1: $('.t11').val()},
dataType: "json",
success: function (response){
alert(response[1]);
}
});
});
Servlet
if (action.compareTo("test") == 0) {
String[] ss= {"n1","n2"};
Form f1=new Form(1,2,3);
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try {
Gson gson = new GsonBuilder().setPrettyPrinting().create();
String json=gson.toJson(ss);
out.println(json);
} finally {
out.close();
}
}
Monday, April 22, 2013
Friday, April 19, 2013
Thursday, April 18, 2013
Xampp setup in linux
This solution worked well for me:
http://www.apachefriends.org/f/viewtopic.php?f=17&t=50902&p=196185#p196185
Edit /opt/lampp/etc/extra/httpd-xampp.conf and adding Require all granted line at bottom of block <Directory "/opt/lampp/phpmyadmin"> to have the following code:
Extract the downloaded archive file to /opt:
tar xvfz xampp-linux-1.8.1.tar.gz -C /opt
To start XAMPP simply call this command: /opt/lampp/lampp start
|
Subscribe to:
Posts (Atom)