struts

How to secure BIRT Report Viewer

ⅰ亾dé卋堺 提交于 2019-12-03 17:10:38
I need to implement authentication of user for birt report viewer while opening the reports, so that we should not be able to run the report and user authentication should also be done before opening the report. As Iswanto San already mentioned in his comment - I would use Spring Security as well. But it really depends on your skill set - and what you are deploying your viewer to. If you use Tomcat - you can create a simple form authentication by following this step-by-step guide from Deron Eriksson on avajava.com. Another option would be to follow what Birt-Exchange recommends by following

Tomcat Hot Deploy to instance hosting several applications

纵饮孤独 提交于 2019-12-03 16:14:44
My question is about deployment to a Tomcat server instance which hosts multiple applications and hosts application contexts for Struts, Spring, and Hibernate. I would like to deploy changes to one application without restarting my Tomcat server. As an example, many times in our firm we have to deploy new applications or versions of applications to our tomcat enviroment and the process could be: Move class and jsp to the exploded folder then the context reload itself, or Another scenario is when we have to deploy new features which require modifications to xml contexts such as struts-config

java EE web开发常用框架使用感言

末鹿安然 提交于 2019-12-03 11:31:50
java EE web项目开发,从前到后... 从访问地址到处理完成转到JSP页面的转向方式: Struts:采用XML配置文件方式,路径配置集中。 Spring MVC:采用标记注入和return页面方式,路径配置分散在每个java文件中。 从对比中,我觉得Spring的这种方式存在难于集中维护项目路径的缺憾。而Struts这种方式,我们就可以很方便集中的管理项目的路径。如果项目已经很庞大,路径很多,我们现在还要在这个项目上做新东西,继续加新路径来完成新业务的访问。在Struts中,我们就可以很方便的通过查看仅有的那几个XML配置文件来确定我们要新加的路径是否和已有的存在冲突、重复等。而spring在这时就显得很悲剧了,路径分散在各个controller java文件中,你要怎么去确定呢,难道一个一个打开去看它们占有的路径? 这时你可以说,可以用eclipse来查所有的controller吖,也很简单就能确定是否和已有路径冲突。当然这样的思路可以解决大部分问题,但不是全部。首先,spring的@RequestMapping 路径定义标签是可以作用于类,也可以作用于方法的,且都允许“/”路径符号。问题随之而来,“/a/b/c/d”这样的路径,就可以分成数种写法而分开写在controller类上或类中的具体方法上,当有人把它们分段写开的时候,你还怎么来查你想定义的路径是否已经存在呢

Tiles Framework : refresh only body content

廉价感情. 提交于 2019-12-03 10:17:34
问题 we have a Tiles layout page having Header, Menu, Body and Footer. In this layout whenever user does some action in the Menu lists, the whole Layout (Incl Header, menu and footer) is refreshing. I want header,menu, footer to be static, and only body part should get updated. Is there any way to prevent the refresh of the Header, menu and Footer and update only Body content on the menu click which can be implemented using Tiles? 回答1: To do this you need to use ajax calls. The general procedure

I'd like to learn Struts.Is there any good web sites or books? [closed]

怎甘沉沦 提交于 2019-12-03 10:15:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I want learn it for abc. And I'd like to know what's the difference between struts 1 and struts 2. 回答1: Check this free book: Jakarta Struts Live Also here you can find some good basic code examples. For a Struts 1 vs. Struts 2 comparative, check this. 回答2: Personal opinion. Jakarta Struts For Dummies is really

Jasper Reports in JSP page

烂漫一生 提交于 2019-12-03 09:07:01
How to display jasper reports in JSP page? I am using iReport1.3.3 tool to create reports. I am struggling to display jasper report in JSP page. Is it possible to pass ArrayList to jasper reports? I need to display the report in PDF and EXcel format. I have written an struts (1.1) application that renders PDFs and CSVs. I would do this in an action handler: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { response.setContentType("application/pdf"); OutputStream out = response.getOutputStream(); try

Cross-site request forgery prevention using struts token

坚强是说给别人听的谎言 提交于 2019-12-03 08:40:46
问题 I want to implement Cross-site request forgery prevention for my web application which is base on struts 1.x framework. I know that struts 2 framework provide token interceptor for this and I can implement similar functionality using filters. I am bit confuse about few thinks 1 ) how I can generate unique token with straightforward way ? (can I use Action class token for this purpose which is use for avoiding duplicate form submission) Are there any issue in using struts 1.x framework token

Catch-all servlet filter that should capture ALL HTML input content for manipulation, works only intermittently

核能气质少年 提交于 2019-12-03 08:04:00
I need a servlet filter that will capture all input, then mangle that input, inserting a special token in every form. Imagine that the filter is tied to all requests (E.g. url-pattern=* ). I have the code for capture of content, but it doesn't seem like the RequestWrapper is robust enough to capture all input. Some input returns zero bytes and then I can't "stream" that content back to the user. For example, we are still using Struts 1.3.10 and any Struts code does not "capture" properly, we get zero byte content. I believe it is because of how Struts handles forwards. If there is a forward

调用Action中其他方法的两种实现

白昼怎懂夜的黑 提交于 2019-12-03 06:58:04
在struts2中,我们可以通过两种方法来调用action类中除了execute之外的其他方法。而这两种方法都是struts框架直接支持的。 而在以前,而可以在form页面提交的时候指定一个特定的参数,如actio_type来指定要执行action中的哪个方法,在action接受到参数后,判断参数的值,用if,或switch语句来判断执行哪个方法。 下面叙述strut框架直接支持的两种调用方法。 1,method属性, method属下是指在struts.xml文件中,配置action的时候指定method属性。具体示例如下; 请注意其中的蓝色部分 文件名:struts.xml 文件内容: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="default" extends="struts-default"> <action name="login" class="struts2.login.LoginAction"> <result

struts.xml and struts-config.xml

前提是你 提交于 2019-12-03 05:43:52
What is the difference between struts.xml and struts-config.xml? Are both the same or is there any difference between them? The core configuration file for the Struts framework is by default the struts.xml for Struts 2 and struts-config.xml for Struts 1. They are both configuration files so that is the same, but they are different beasts because they refer to different versions of the Struts framework. There are large differences between Struts 1 and 2 as you can see here . The files have different structure and content so you can't really compare one with the other (except for their purpose).