Hi Eshwar,
im not an expert for sure but i can help maybe. I use jquery for own Web Application Projects and some Ajax functionaltiy. Im using ME SDK 5.2.x so i dont know all the structure changes made in SDK 6.0 but maybe it will help you nevertheless.
I imported the jquery.js in "Web-Ext Application" -> web -> js (i created this folder)
make sure it will be copied, just create a folder doesnt work u have to tell the build.xml like this :
<!-- Web extension application content. -->
<path id="web-ext.content">
<fileset dir="${extension.dir}/web.ext/${web-ext.war.filename}/web" erroronmissingdir="false">
<include name="images/**/*.*"/>
<include name="workinstructions/**/*.*"/>
<include name="js/**/*.*"/>
</fileset>
</path>
Now u can call something like this in JSP-File :
<script type="text/javascript" src="../web-ext/js/jquery.js"></script>
.....
function Ajaxtest()
{
$.ajax( {
type : "POST",
data : {
action : 'ajax',
method : 'selectionlist',
site : global_site
},
cache : false,
success : function(data)
{
// response
}
});
}
the request will enter your Controller at :
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
......
u can get the action with "request.getParameter("action")" and also the method parameter.
Hope that will help a little.
Regards, Sascha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.