将操作重定向到另一个操作struts.xml:
<action name="CheckLogin" class="LoginS" method="checkLogin">
<result name="input" type="redirectAction">
<param name="actionName">SectorDisplay</param>
<param name="branch_id">${branch_id}</param>
</result>
</action>
Run Code Online (Sandbox Code Playgroud)
参数虽然发送,branch_id但url它显示为
http://localhost:8085/Display/SectorDisplay.action?branch_id=110
Run Code Online (Sandbox Code Playgroud)
我认为它不是POST,它的GET.
我不想在URL上显示参数,是否有任何方法可以隐藏它或如何将其发布到操作中?
谢谢..
我正在尝试使用 Java(Web 应用程序)和使用 Jaspoersoft iReport Designer 4.5.0 打印条形码
这是我的 Java 代码:
public String onBtnPrintClick() throws JRException, IOException {
Integer pos_number = getMst_posService().getPosById((Integer) getSession().get("pos_id")).getPos_number();
Date dateNow = new Date();
SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Integer total_paid = getPaidCard() + getPaidCash();
// Bill printing
View_transactionprod_pos transactionProdToBill = new View_transactionprod_pos();
transactionProdToBill.setTransaction_id(getTransactionIdFromMakeSale());
listProdToBill = getView_transactionprod_posService().getViewTransactionProdPosListByModel(transactionProdToBill);
Map<String, Object> parameters = new HashMap<String,Object>();
parameters.put("transaction_id", getTransactionIdFromMakeSale());
parameters.put("pos_number", pos_number);
parameters.put("transaction_date", dateFormatter.format(dateNow));
parameters.put("total_price", getTotalPriceToSell());
parameters.put("total_paid", total_paid);
parameters.put("change", getChange());
parameters.put("barcode", getTransactionIdFromMakeSale());
return "pdf";
}
Run Code Online (Sandbox Code Playgroud)
xml :
<action name="MakeSalePrint" class="MakeSaleS" …Run Code Online (Sandbox Code Playgroud) HTML:
<input type="text" class="mytextbox">
<input type="text" class="mytextbox">
<input type="text" class="mytextbox">
<input type="text" class="mytextbox">
<input type="button" class="mybutton" value="focus next" onclick="focusNext()">
<input type="button" class="mybutton" value="focus prev" onclick="focusPrev()">
Run Code Online (Sandbox Code Playgroud)
JS代码:
//focused is getting last focused textfield
var focused = null;
$(".mytextbox").focus(function(){
focused = $(this);
});
//focus next
function focusNext(){
$(".mytextbox").each(
//checking is this textbox focused
if($(this)[0] == focused[0]){
$(this).next().focus();
//or
$(this).next(".mytextbox").focus();
}
);
}
//focus prev
function focusPrev(){
$(".mytextbox").each(
//checking is this textbox focused
if($(this)[0] == focused[0]){
$(this).prev().focus();
//or
$(this).prev(".mytextbox").focus();
}
);
}
Run Code Online (Sandbox Code Playgroud)
我认为 …