stripes

Setting createdBy and updatedBy in JPA entities automatically

寵の児 提交于 2019-12-21 04:53:09
问题 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

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

岁酱吖の 提交于 2019-12-21 03:43:15
问题 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

Help configuring Hibernate,Jpa, Stripesist on Stripes

南笙酒味 提交于 2019-12-13 17:18:12
问题 I need some help configuring JPA Stripersist and Hibernate on a Stripes project I have the Stripersist.jar and JPA.jar, the book i have is not that clear about how to get the "correct" Hibernate jars(i just found so many on the hibernate website), and where to place them(i suppose the classpath). Has some of you managed to configure Stripes and Hibernate,jpa,Stripersist successfully? Thank you, unfortunately Stripes community is not that big and i cant find any useful info 回答1: Stripes is a

Call JavaScript function in Strut 2

让人想犯罪 __ 提交于 2019-12-12 02:53:32
问题 Good day all, I have a html code to call function to do date time picker in Stripes framework which is working fine, the code is as follow : <td class="value" align="left"> <s:text name="firstProcessDate" id="firstProcessDate" maxlength="16" size="20" readonly="true"/> <img alt="Calendar" src="../images/ib/icon_calendar.gif" id="calendar" name="calendar"/> <script type="text/javascript"> Calendar.setup({ inputField: getObject("firstProcessDate"), dateFormat: "%d/%m/%Y", trigger: getObject(

Multiple file upload(stripes)

淺唱寂寞╮ 提交于 2019-12-11 18:25:00
问题 I am trying to make a file upload that will accept multiple files using the stripes framework. I have a single file upload working. I am trying to understand the Documentation for multiple file upload. According to the doc, all I need to do is modify single file example to: <stripes:form> <c:forEach ... varStatus="loop"> ... <stripes:file name="newAttachments[${loop.index}]"/> ... </stripes:form> ActionBean private List<FileBean> newAttachments; public List<FileBean> getNewAttachments() {

Hidden field becomes null when binding it in stripes actionbean

女生的网名这么多〃 提交于 2019-12-11 03:21:06
问题 I have a stripes action page. and When the page loads, I want to save an originalAssignee by assigning it from an object (i.e setOriginalAssignee (userAction.getAssignee())) so that in case if the object's field assignee is changed i will do some computing. Here is my action bean: @UrlBinding("/action/view-details.page") public class ActionListViewPage extends CustomAction { . . . private static final String ACTION_LIST_VIEW = "/action/view-details.jsp"; private static final String ACTION

Jmockit mock abstract class

自古美人都是妖i 提交于 2019-12-11 02:06:54
问题 I have a super abstract class public abstract class PsActionBeanContext{ ... abstract public Brand getBrand(); .. } I want to mock the abstract class to get default value "TESTUSER_BRAND_ID", which is a constant. I tried: final PsActionBeanContext contextFake = new MockUp<PsActionBeanContext>(){ @Mock public Brand getBrand(){ Brand brand = new Brand(); brand.setBrandId(TESTUSER_BRAND_ID); return brand; } }.getMockInstance(); } But I got java.lang.IllegalArgumentException: Attempted to mock

Shiro always redirects me to login.jsp

╄→尐↘猪︶ㄣ 提交于 2019-12-10 17:55:02
问题 Here is the config from shiro.ini shiro.loginUrl = /login.jsp ######### URL CONFIG ################### [urls] /login.jsp = anon /public/login/** = anon /public/app/** = authc Stripes ... @UrlBinding("/public/app/") public class CalculatorActionBean implements ActionBean { ..... } @UrlBinding("/public/login/") public class UserAuthenticateBean implements ActionBean { private static final transient Logger log = LoggerFactory.getLogger(UserAuthenticateBean.class); private ActionBeanContext

Converting a Stripes application to use Friendly URLs

核能气质少年 提交于 2019-12-09 13:05:27
问题 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

Instance variable in Stripes

有些话、适合烂在心里 提交于 2019-12-08 08:14:29
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 there there is no way to access the init() method and write some code in it. Do you have any