cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Jquery.js or jquery plugin to SAP ME SDK eclipse.

Former Member
0 Kudos

Hi experts,

How do I use Jquery.js or Jquery Plugin in SAP ME SDK 6.0 eclipse. Do I need to add it as third party library?

Regards, Eshwar.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos
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.
tim_drury
Active Participant
0 Kudos

I'd strongly recommend you write a blog entry within the ME space of SCN on this topic.