struts

Does Java 11 or 12 supports Struts 1.3?

烈酒焚心 提交于 2019-12-04 20:46:44
Am trying to upgrade maven Struts 1.3 built using Java 1.7 to Java 1.8 and was able to successfully launch the application after changing all possible library files. Now, it has been instructed to upgrade the application to Java 11 or 12. Does Java 11 or 12 supports Struts 1.3 ? Can I proceed to make this changes? Your thoughts please. 来源: https://stackoverflow.com/questions/56521038/does-java-11-or-12-supports-struts-1-3

Struts OR Tiles OR ???… JSP template solution

时光怂恿深爱的人放手 提交于 2019-12-04 20:12:27
currently I'm using a JSP templating system which uses this example's lib ("/WEB-INF/tlds/template.tld"). I'm not even sure how it's called. Anyway it seems like it's not too developed, it makes problems with form POST method, I have no idea who made it (just found it) and I've heard about Apache's Struts & Tiles. I'm not even sure that Struts does what I'm talking about. Down to business: A page in my site has this JSP content, that utilizes the template: <%@ taglib uri="/WEB-INF/tlds/template.tld" prefix="template"%> <template:insert template="/WEB-INF/main_template_page/template.jsp">

Any way to anticipate session timeout?

佐手、 提交于 2019-12-04 16:56:59
Is there a way to "catch" the session timeout event, so as to retrieve data from HttpSession before its invalidated ? We're implementing the Filter Interface, and in the doFilter method, the user we stored in the session object at login is null when session times out. Thanks in advance. You should be able to register an HttpSessionListener for your webapp that will allow you to get notified when a Session is destroyed. It has two callback methods: public void sessionCreated(HttpSessionEvent se) public void sessionDestroyed(HttpSessionEvent se) The HttpSessionEvent class has a getSession method

java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?

烂漫一生 提交于 2019-12-04 15:55:15
问题 This the file web.xml in WEB-INF <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <filter> <filter-name>LoginFilter</filter-name> <filter-class

Jasper Reports in JSP page

大城市里の小女人 提交于 2019-12-04 14:21:54
问题 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. 回答1: 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)

Lift filter to force ssl

天涯浪子 提交于 2019-12-04 13:53:33
问题 in a struts application, I have a filter that forces certain pages to be accessed only over https via redirection. I'm thinking in porting it to lift so my question is: In the this environment, is there a "lift" way to implement such filter or is it similar/the same as in struts ? Thanks 回答1: In Lift, the SiteMap defines the rules for page access. You can create a SiteMap entry that does a Redirect to the https site on certain pages: // create an object that does a redirect to the https

struts.xml and struts-config.xml

安稳与你 提交于 2019-12-04 10:22:28
问题 What is the difference between struts.xml and struts-config.xml? Are both the same or is there any difference between them? 回答1: 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

javax.xml.ws.WebServiceException: Undefined port type Java Struts SOAP WSDL

假如想象 提交于 2019-12-04 07:22:42
ok I have really a strange problem that I keep looking for solution in google and yahoo for almost 4 hours today. And I desperately looking for a solution. public static String [] checkCardAccount(String cardNumber, String cardIssuer, String securityNumber){ URL url = null; try { url = new URL("http://localhost:8999/bankcard?wsdl"); } catch (MalformedURLException e) { e.printStackTrace(); } QName qname = new QName("http://server.bcard.soap.com/","BankCardImplService"); Service service = Service.create(url,qname); BankCard bankcard = service.getPort(BankCard.class); return bankcard

Redirect or forward

☆樱花仙子☆ 提交于 2019-12-04 07:07:02
Looking through some legacy code I have in front of me using struts one, I see: <global-forwards> ... <forward name="accessDenied" path="/www/jsp/AccessDeniedForm.do" redirect="true" /> </global-forwards> So it's just a global forward to send to a access denied page. I am curious about the decision to redirect as opposed to forward. What are the advantages and disadvantages of using it? What are the pro's and con's of using it? Before discussing pro's and con's of using that forward element with redirect set to true, let's understand what is actually going on with that configuration. When

How do I specify HTML5 attributes with Struts 2.x?

青春壹個敷衍的年華 提交于 2019-12-04 06:36:54
I make extensive use of Struts2 in my application. Now I want to add HTML5 attributes like autocorrect and type="email" . I don't see any HTML5 plugin. Is there a standard way to the <s:textfield..> tag for example? You can add HTML5 attributes directly into the textfield tag. I've done it successfully with pattern , min and max , they are correctly rendered in the HTML. <s:textfield type="number" name="..." value="%{...}" pattern="[0-9]+" min="40" max="700" /> 来源: https://stackoverflow.com/questions/11074087/how-do-i-specify-html5-attributes-with-struts-2-x