stripes

Instance variable in Stripes

北战南征 提交于 2019-12-08 05:26:26
问题 I'm trying to find a way to create an instance variable within the Stripes application context. Something that i would do in the init() method of a Servlet while using hand-coded servlets. The problem is that since an instance of the ActionBean is created each time the application is accessed, the variable in the actionBean is created multiple time. I have tried to get some reasonable place withing Stripes trying to call the ServletContext via ActionBeanContext.getServletContext() , but from

How can I read Apache Httpd Env variables from a Java application running in TomCat?

孤者浪人 提交于 2019-12-07 19:23:38
问题 I have a couple of Java applications running in TomCat containers behind Apache Httpd. In Apache Httdp you can set Env variables with SetEnv FOO bar , if you have mod_env installed. How can I read those variables in my Java applications running inside TomCat? The Java applications are mostly build with Stripes, if that helps. 回答1: Because Tomcat is started outside of Apache it does not have access to the Apache environment. This means you need some way of passing environment variables from

How can I read Apache Httpd Env variables from a Java application running in TomCat?

放肆的年华 提交于 2019-12-05 21:39:06
I have a couple of Java applications running in TomCat containers behind Apache Httpd. In Apache Httdp you can set Env variables with SetEnv FOO bar , if you have mod_env installed. How can I read those variables in my Java applications running inside TomCat? The Java applications are mostly build with Stripes, if that helps. Because Tomcat is started outside of Apache it does not have access to the Apache environment. This means you need some way of passing environment variables from Apache to Tomcat. If you are connecting Apache and Tomcat using mod_jk , you can use the JkEnvVar directive to

Tomcat 6 - The requested resource … is not available

不打扰是莪最后的温柔 提交于 2019-12-05 11:41:13
I am trying to start developing with Java and the Stripes Framework. I have the following in my web.xml file <?xml version="1.0" encoding="ISO-8859-1"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > <filter> <filter-name>StripesFilter</filter-name> <filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class> <init-param> <param-name>ActionResolver.Packages</param-name> <param-value> pdapm.action </param

How can I display a JFreeChart in web browser with Stripes Framework

自古美人都是妖i 提交于 2019-12-04 03:49:20
问题 This is the situation: My 'metrics.jsp' page submits a couple variables that are needed to create the chart. The 'ProjectActionBean.java' calls down to a few other java classes that create the JFreeChart. I can display the chart in a pop-up but I want it to be displayed in the original browser window. JFreeChart placeChart = ChartFactory.createBarChart( "ChartName", "", //x-axis label "", //y-axis label dataset, PlotOrientation.VERTICAL, false, //legend true, //tooltype false); //generate

JSF vs Stripes, which is best? [closed]

烈酒焚心 提交于 2019-12-03 16:08:07
Which is best, or in other words, whish is easiest to use? Stripes or JSF. Although I haven't used both in anger I need to gauge what is the best option to work with for both starting new projects and converting existing Struts projects. I have a fear that JSF won't render as nicely as I want but what are others experiences? Seems Stripes is far more straight forward, would I be correct in this assumption? Which is best, or in other words, which is easiest to use? Stripes or JSF. Which is the best? Well, Stripes and JSF are different. The former is an action-based framework (like Struts) while

Converting a Stripes application to use Friendly URLs

喜欢而已 提交于 2019-12-03 15:40:09
I am working through Fred Daoud's Stripes book and trying to convert the Hello World application to use friendly URLs, as I'm not a big fan of suffix-based mappings like http://localhost:8080/getting_started/Hello.action . Here is the before ... index.jsp: <jsp:forward page="/Hello.action"/> web.xml: <servlet-mapping> <servlet-name>DispatcherServlet</servlet-name> <url-pattern>*.action</url-pattern> </servlet-mapping> and I have no UrlBinding on my HelloActionBean. I have the book example working. I'm wondering if the book examples may suit an earlier version of Stripes, as I've downloaded 1.5

Setting createdBy and updatedBy in JPA entities automatically

怎甘沉沦 提交于 2019-12-03 14:11:08
I'm working on a JPA (Hibernate implementation of), Spring and Stripes web app. I have a number of JPA entities that have the following fields in common for both audit and query purposes: createdBy - the user ID of the person who created the entity. createdOn - the date the entity was created updatedBy - the user ID of the person who last updated the entity updatedOn - the date the entity was last updated I've got my app working so that createdOn and updatedOn are set automatically when the entity is persisted but I'm not sure how I can get the createdBy and updatedBy fields populated without

Stripes, Spring, Play (or ?) : which high performance Java framework to use?

≯℡__Kan透↙ 提交于 2019-12-03 11:06:26
We are beginning to build out a webapp which will probably see a lot of traffic. We dont have a lot of money, so we want to reduce hardware cost. More or less, I think that means we will try to be as stateless as possible (as the Wicket way suggests - have bookmarkable URLs, etc. etc.) The other problem is that we are gonna be hiring contractors (think oDesk or elance) for chunks of work - so there is the question of finding talent. I have looked at Tapestry and seen a lot of API instability ( see: Why did you stop using Tapestry? ) which makes me reluctant to use it. Seam and Wicket are

How can I display a JFreeChart in web browser with Stripes Framework

时光总嘲笑我的痴心妄想 提交于 2019-12-01 19:33:10
This is the situation: My 'metrics.jsp' page submits a couple variables that are needed to create the chart. The 'ProjectActionBean.java' calls down to a few other java classes that create the JFreeChart. I can display the chart in a pop-up but I want it to be displayed in the original browser window. JFreeChart placeChart = ChartFactory.createBarChart( "ChartName", "", //x-axis label "", //y-axis label dataset, PlotOrientation.VERTICAL, false, //legend true, //tooltype false); //generate urls ChartFrame frame = new ChartFrame(name, placeChart); frame.pack(); frame.setVisible(true); I've