首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > extdirect Struts 2插件

extdirect Struts 2插件

资 源 简 介

A struts 2 plugin for Ext.Direct This plugin allow you to write Ext.Direct Action using annotation: * @ExtDirectAction * @ExtDirectMethod Put the extdirect.jar in your WEB-INF/lib directory You can call the router to get the API list at: http://yourdomain:yourport/extdirectj/ExtDirectJRouter.action Example Annotation Usage ``` package it.extdirectj.test; import java.text.MessageFormat; import it.extdirectj.annotation.ExtDirectMethod; public class TestAction{ @ExtDirectMethod public int sum(int a,int b) { return a+b; } //you can set different method name @ExtDirectMethod(name="MyMultiply") public String multiply(int a,int b){ return "Result : "+(a*b); } @ExtDirectMethod public String echo(String string,boolean bool, int integer){ return MessageFormat.format("String {0} boolean {1} integer {2}", string, bool, integer); }
VIP VIP
0.174727s