struts

File Download start event in Struts

老子叫甜甜 提交于 2019-12-02 01:58:17
问题 In my struts application, a user can download a file from the server. I want to show a spinner during the time between the button click (to initiate the download) and file is ready to download. Is there an event which is triggered when the file starts to download? I assume it would be some sort of page load event. This is the section from my struts xml: <action name="getFile" method="getFile" class="foo.pack.TAction"> <result name="success" type="stream"> <param name="contentType">application

Compress components with gzip - Java EE

守給你的承諾、 提交于 2019-12-02 01:31:58
I am looking to improve front-end performance of my application, so I used YSlow tool in Firefox. When I ran this tool for my app, in the YSlow grade tab it showed up a issue 'Grade F on Compress components with gzip'. Seems to be that we need to compress the files(js, css) while sending from the server to client to increase the server response time. My app is a Struts Java application. Can anyone let me know how to compress and send the front end UI files(JS,CSS) from server so that the response time increases and my pages lot fastly? What are the things that I need to do to compress these

Struts2 tutorial doesn't work

牧云@^-^@ 提交于 2019-12-02 01:24:49
I'm learning struts2. And I try my hello world projects according to the tutorial Then I run the code in eclipse. But it doesn't work. The Console shows a lot of error. The first is as below: com.opensymphony.xwork2.util.logging.commons.CommonsLogger error SEVERE: Dispatcher initialization failed Unable to load configuration. - bean - jar:file:/C:/Users/Administrator/Eclipse/workspace_2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/MyStruts2/WEB-INF/lib/struts2-gxp-plugin-2.3.8.jar!/struts-plugin.xml:8:162 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration

Which variables can be accessed with the ${…} syntax in a Struts tag in a JSP page?

我与影子孤独终老i 提交于 2019-12-01 23:32:29
问题 I'm getting a little bit frustrated since I can't find out which variables I can access with the ${...} syntax in a Struts tag, placed in a JSP page. As an example I've got the following code: <c:set target="${status.menue}" property="activeMenuePath" value="whatever" /> Where does the object "status.menue" have to be defined in order to can be accessed with a dollar sign and braces. Is it defined in another struts tile or in the form? 回答1: It should be placed in any of the page, request,

Which variables can be accessed with the ${…} syntax in a Struts tag in a JSP page?

自作多情 提交于 2019-12-01 21:43:32
I'm getting a little bit frustrated since I can't find out which variables I can access with the ${...} syntax in a Struts tag, placed in a JSP page. As an example I've got the following code: <c:set target="${status.menue}" property="activeMenuePath" value="whatever" /> Where does the object "status.menue" have to be defined in order to can be accessed with a dollar sign and braces. Is it defined in another struts tile or in the form? BalusC It should be placed in any of the page, request, session or application scopes using respectively JspContext#setAttribute() , ServletRequest#setAttribute

Why do I keep getting Object reference on server while it works fine on a local system

五迷三道 提交于 2019-12-01 20:42:58
My class objects are not getting converted into json, I think it returns object references, though while executing it locally, it executes perfectly. Here is the code private def static sql private static List<ProductAlertsResponse> executeSelection(String query) { List<ProductAlertsResponse> prodAlerts=new ArrayList<ProductAlertsResponse>() sql.eachRow(query) { ProductAlertsResponse prodAlert=new ProductAlertsResponse((String)it.id,(String)it.name,(String)it.description,(String)it.active,(String)it.release_date) prodAlerts.add(prodAlert) } return prodAlerts } static main(args) { AppProperties

How to work with referenced projects in eclipse

风格不统一 提交于 2019-12-01 18:09:11
Ok maybe everybody knows how to do this, but I've never try it beacause I've never needed it so, how do you work with multiple referenced projects in eclipse? I have a couple of Struts 1 web applications that must use another struts 1 "library" project and right now I'm doing the communication between them using url requests, wich is really annoying (at least how I have implemented it). I would like to be able to use the classes of the "library" project directly in my other struts applications. So far I know there are supposed to be in the same workspace and that I must reference using the

Duplicate class definition error

牧云@^-^@ 提交于 2019-12-01 17:27:46
问题 Can anyone help resolve this? 15:02:06,698 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception java.lang.LinkageError: loader (instance of org/apache/jasper/servlet/JasperLoader): attempted duplicate class definition for name: "org/apache/jsp/tag/web/divBox_tag" [geronimo 2.1, struts 1.2 ] 回答1: Try cleaning the deploy directory of whatever server you're using. Try cleaning your project/s in the IDE you're using (try F5 the project/s, restart the IDE). Try cleaning the project/s

How to use angularjs with struts 1.x

强颜欢笑 提交于 2019-12-01 17:25:29
I'm new to angularjs and client side stuff and I'm adding a new page to an old application that uses struts 1.3 as its framework. I would like to use angularjs for the front end. I know how to return json from the action class by writing the json to the front end and returning null for the action forward. However, I'm unclear how I would populate the scope variables within the controller after the get. If I use a get in the controller and get json back, how does my actionform fit into all this? Is it useful at all? Can I have a get and post for the same controller if I want to send new values

How to use angularjs with struts 1.x

故事扮演 提交于 2019-12-01 16:10:56
问题 I'm new to angularjs and client side stuff and I'm adding a new page to an old application that uses struts 1.3 as its framework. I would like to use angularjs for the front end. I know how to return json from the action class by writing the json to the front end and returning null for the action forward. However, I'm unclear how I would populate the scope variables within the controller after the get. If I use a get in the controller and get json back, how does my actionform fit into all