From the pop-up on the struts + extjs download dialog box problem

2010-10-11  来源:本站原创  分类:Web  人气:217 

From the pop-up on the struts + extjs download dialog box problem

From the pop-up on the struts + extjs Download dialog problem

Today, I encountered this problem, of course, do not know if you are too, following the course of my record

First, we generally are used when delivered with extjs json data format. So in the struts configuration file may be added into the next code

<result name="delbyprocessid" type=" json "> </ result>

This is one of the reasons

And our operating results in the returned JSON data is also returned. . Result of the operation prompt the user

Right now I do not do. I return a null in struts action

And then through the response to output to the page. Receive the results in the use of extjs

Code into the next:

HttpServletResponse response =
ServletActionContext.getResponse ();
try {
response.setContentType ("text / html; charset = UTF-8");
PrintWriter out = response.getWriter ();
out.write ("{");
out.write ("success: 'false',");
out.write ("message: 'File can not be null'");
out.write ("}");
} Catch (Exception eb) {
throw new RuntimeException (eb);
}

Like this. My download box does not appear. Complete

相关文章
  • From the pop-up on the struts + extjs download dialog box problem 2010-10-11

    From the pop-up on the struts + extjs download dialog box problem From the pop-up on the struts + extjs Download dialog problem Today, I encountered this problem, of course, do not know if you are too, following the course of my record First, we gene

  • struts + json + jquery, download the box to solve the problem 2009-10-02

    Using struts2.0 + jquery + json write a log function, action reads as follows: public class UserAction extends BaseAction implements Preparable { private static final long serialVersionUID = 8992700772962868363L; private User user; private String res

  • Extended learning ExtJS components list box Ext.ux.Multiselect 2010-09-04

    An extension to use ExtJS: Ext.ux.Multiselect, that is, the list box component. Correlation processing of the components and data binding, dynamic setting Summarize the method of dealing with small : One. Data Binding // Create a record type person v

  • struts 1 Download cvs when: getOutputStream () has already been called for this response 2010-03-29

    return mapping.findward ("....");// Change: return null; / / must return a NULL Production test: http://orz.javaeye.com/blog/83175

  • struts file download 2010-04-13

    http://www.blogjava.net/thisliy/archive/2009/08/14/291153.html

  • Why JS pop up dialog box is garbled? 2010-06-01

    echo "<script language='javascript' type='text/javascript'> alert ('Commit failed !');</ script>"; ========================== Solution: header ('Content-Type: text / html; charset = utf-8');

  • Extjs page query parameter problem 2010-06-21

    Press the condition of query data, and then point Next retain query, the solution is to check parameters in place to store.baseParam storeMain.on ('beforeload', function (thiz, options) ( Ext.apply (thiz.baseParams, ( msg: Ext.get ('title'). dom.valu

  • Apache2 will not start, pop up a dialog box says: "Windwos can not start the machine Apache2 ..." solution 2010-07-13

    Open the service, to the figure above the "IIS Admin" Startup Items close to OK the

  • Extjs Grid check box from the view that a bug, and fix this bug 2010-09-03

    When EXTJSGIRD increase box, the entire election, the next head of the box still selected, this is not correct, do not know if I have got justified. Ways to modify this bug has the following revised Source Law: Method 1: Find Ext.grid.GridView under

  • tab key to pop up dialog box 2010-10-25

    / / Tab button to eject the drop-down box ((ComboBoxCellEditor) editor). SetActivationStyle (ComboBoxCellEditor.DROP_DOWN_ON_TRAVERSE_ACTIVATION | ComboBoxCellEditor.DROP_DOWN_ON_PROGRAMMATIC_ACTIVATION | ComboBoxCellEditor.DROP_DOWN_ON_MOUSE_ACTIVAT

  • EXTJS between different pages-value problem (the data without the background, obtained through the page) 2010-11-01

    ; Implement a feature in a page A click of a button] [jump to another page (this page is public because there is a page, usually a separate page, such as the attachment of a js in the cxgl.js) into the attachment inside 1.png when Click OK] [will poi

  • Struts 2 in the implementation file download (amended the Chinese problem) 2011-01-11

    Struts 2 in the implementation file download (amended the Chinese problem) In BlogJava already has a file upload of the problems described, the address is implemented in Struts 2 File upload , so I will not discuss that topic. Today, I briefly talk a

  • Struts 2 and AJAX 2009-05-16

    In today's - Web 2.0 concept of overwhelming Internet environment, easy AJAX integration for a successful WEB framework is indispensable. Therefore, Struts 2 one of the essential functions of a (Feature) is the "First-class AJAX support - Add interac

  • strust achieve file upload and download 2010-08-12

    First of all, a FileAction package com.action; import org.apache.struts.action.*; import javax.servlet.http.*; import com.actionForm.FileActionForm; import org.apache.struts.actions.DispatchAction; import java.util.Date; import java.text.*; import or

  • Prohibited View Source 2008-05-13

    【Right】 lock The <body> web page code can be changed as follows: <body oncontextmenu = "return false" ondragstart = "return false" onselectstart = "return false" onselect = "document.selection.empty ()" onc

  • Save as shield against web right mouse button 2009-07-10

    Sometimes we do hard work out of web pages, others Save As, and suddenly out of one another to imitate the same WEB years, devoted to the log on the "Save as shield against web right" and knowledge of skills, these Dongdong if you to spend, you

  • Different way of sending the request result is different 2010-04-16

    Export EXCEL to do today's feature, the background to generate EXCEL, in accordance with the STRUTS2 download of papers to write ACTION and configuration, but reception is not always pop-up download dialog box. The reason is in the foreground with th

  • Simple to use TortoiseSVN 2010-06-10

    First introduced to what is SubVersion, Subversion is a new generation version control tool, not only to manage the source code can also be applied to other collaborative data management work. Installation You can TortoiseSVN official site to downloa

  • Flash + html - Web pass parameters to FLASH 2010-07-05

    First, do first a need to receive the Flash parameters Create a new Flash document named: Test.fla, in the first frame by adding the following code: / / Create three text fields and set properties _root.createTextField ("foo_txt", 1,0,0,16,16);

  • ubuntu (linux) android development environment set up under 2010-09-05

    Posts android development environment set up Ubuntu 1, Java Environment Installation and Configuration Ubuntu java install and configure the detailed steps: [/ Align] 1. Download jdk Download link http://java.sun.com/javase/downloads/index.jsp Select