これを試して
var params ="your parameters to send";
var resultStringX = $.ajax({
type: "POST",
url:"myscript.jsp",//jsp,servlet,struts action
data: params,
async: false
}).responseText;
resultStringX=$.trim(resultStringX);
//here the result will be stored in resultStringX
また
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#call').click(function ()
{
$.ajax({
type: "post",
url: "myscript.jsp", //here you can use servlet,jsp, etc
data: "input=" +$('#ip').val()+"&output="+$('#op').val(),
success: function(msg){
$('#output').append(msg);
}
});
});
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
input:<input id="ip" type="text" name="" value="" /><br></br>
output:<input id="op" type="text" name="" value="" /><br></br>
<input type="button" value="Call JSP" name="Call JSP" id="call"/>
<div id="output"></div>
</body>