calculation table
hi, Have anybody seen a class similar in its behaviour to excel's sheet. I mean the ability to enter values in some cells and in another cell specify some kind of formula Rgs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
repeat previous action from the other one
hi, My problem could be strange but let me describe it. I've a application where data for every page is customized to some filter. For example there is page showing records from database. The data are limited to currently selected user (user object stored in session). Hence there are many pages where data are limited this way, I've a list of user as a menu on left side. What I want to achieve is to automatically invoke last performed action after each user change. Rgs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionMessages vs ActionErrors in jstl
Grzegorz Stasica wrote: hi, Basically I'd like to ask why I'm not able to access my messages stored in action from jsp. ActionMessages m=new ActionMessages(); m.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage("error.no_value")); saveMessages(request,m); in jsp I try this value="${requestScope['org.apache.struts.action.GLOBAL_MESSAGES']}" /> I know I can access errors by ${requestScope['org.apache.struts.action.ERROR']} but isn't it weird. Why do messages can be accessed by ERROR key? And the final question if I store my message under key "my_key" how should I specify package in address My motto is: If you do not know the answer go to the sources!! To access messages in JSTL I should write - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionMessages vs ActionErrors in jstl
hi, Basically I'd like to ask why I'm not able to access my messages stored in action from jsp. ActionMessages m=new ActionMessages(); m.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage("error.no_value")); saveMessages(request,m); in jsp I try this value="${requestScope['org.apache.struts.action.GLOBAL_MESSAGES']}" /> I know I can access errors by ${requestScope['org.apache.struts.action.ERROR']} but isn't it weird. Why do messages can be accessed by ERROR key? And the final question if I store my message under key "my_key" how should I specify package in address - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: actionservlet init-params
Luis Gervaso wrote: Hello, What happen in Struts 1.2.7 with init-params debug application detail I can't find them in ActionServet javadoc where are documented? Did you try to use them? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ajax and struts-flow - how to refresh part of a page
hi, I'm checking struts-flow package and one of it's features "Remote RPC support (termed Ajax but with JSON instead of XML) for calling flow methods from the client". As much as I can see now there is no problem to invoke actions from struts-config but as much as I see all page is being rendered although I assume only part of should be. Does anybody has an experience with updating some part of a page from struts-flow.jar package. I'd like at once give up and start using DWR. My code is as follow: function main() { forwardAndWait("start", { "random" : random, "hint": hint, "guesses" : guesses} ); forwardAndWait("success1", { "random" : random, "hint": hint, "guesses" : guesses} ); break; } and struts-config - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with pdf fonts in jasper
Grzegorz Stasica wrote: hi, I know this question should be asked on jasperreports http://sourceforge.net/forum but after asking it seems that this group is dead. The problem is that I'm limited to standard 14 fonts for PDF. Everytime I try to use different font in PDF the text is not displayed. My definition is: rotation="None" lineSpacing="Single"> isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Cp1250" isStrikeThrough="false" /> Fonts are installed. Rgs Just to these who will'll have similar proble. The solution is to specify path to font. PDFFontName atribute should be like that: pdfFontName="c://ARIAL.TTF" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
packages in /WEB-INF/lib not seen by classes using reflection
hi, In my application I use jasperreports which works fine on my computer but I've a problems to run them on production server. The problem is with compiling report definition. JasperReport uses some packages which are already in /WEB-INF/lib like (commons-collection.jar). Unfortuatelly it doesn't see them. It keeps looking in /java/lib/jre/ext. I think the problem is with classloader? How can I "tell" some class to use search path from container /WEB-INF/lib? Is there any workaround to this problem? Rgs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with pdf fonts in jasper
hi, I know this question should be asked on jasperreports http://sourceforge.net/forum but after asking it seems that this group is dead. The problem is that I'm limited to standard 14 fonts for PDF. Everytime I try to use different font in PDF the text is not displayed. My definition is: rotation="None" lineSpacing="Single"> isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Cp1250" isStrikeThrough="false" /> Fonts are installed. Rgs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: architecture of composite action forms - please help
Rivka Shisman wrote: Hello Friends, I have a transfer object called FatherTO that contains a collection of ChildTO's. Can you please help me with how the relevant ActionForm (i.e. FatherForm ) should look like. How should the reset() & validate() methods look like? Should I use the same jsp form for the Father data and it's childs data? Thanks Rivka ** The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies. ** eSafe scanned this email for viruses, vandals and malicious content. ** ** hi, I'd choose solution with two forms - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with action testing in MockStrutsTestCase
hi, Prior to opening a page I call an action in order to store in request collection of value beans. Although I know how to test situation when everything goes OK I do not know how to test the oposite especially when Hibernate is being used. My action in struts-config.xml is as follow: the value of parameter is goToAdd (this invokes goToAdd action). The action is simply: public ActionForward goToAdd(ActionMapping mapping,ActionForm form, HttpServletRequest request,HttpServletResponse response) { CodeKindDAO ckdao=new CodeKindDAO(); List codekinds=ckdao.findAll(); if(codekinds.isEmpty()){ ActionMessages messages=new ActionMessages(); if(codekinds.isEmpty()) messages.add("error",new ActionMessage("error.codekinds.missing")); saveMessages(request,messages); return mapping.findForward("failure"); } request.setAttribute("codekinds",codekinds); return mapping.findForward(IConstants.SUCCESS); } The test for success is like that: setRequestPathInfo("/goToAddCode"); addRequestParameter("method","goToAdd"); actionPerform(); verifyForward("success"); assertTrue(!((List)request.getAttribute("codekinds")).isEmpty()); As I wrote I've a problem to test situation when there is an error. I suppose the solution is to change the way I provide datas for testing. At this moment I just call function from appropriate DAO object which in turn use hibernate API. How to write action tests with hibernate? Rgs. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] check role - isUserInRole in jstl
ok, but is not jstl solution? Laurie Harper wrote: See also the standard Struts logic tags, particularly logic:present: http://struts.apache.org/userGuide/struts-logic.html#present L. Lindholm, Greg wrote: I've used the Jakarta taglibs-request tags to do this. <%@ taglib uri="http://jakarta.apache.org/taglibs/request-1.0"; prefix="req" %> -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Grzegorz Stasica Sent: Thursday, June 30, 2005 12:48 PM To: user@struts.apache.org Subject: check role - isUserInRole in jstl I've a code like that but I get an error that namespace has to be specified. IsUserInRole is a function so probably I invoke it incorectlly. How can I check user's role in jstl? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
check role - isUserInRole in jstl
I've a code like that but I get an error that namespace has to be specified. IsUserInRole is a function so probably I invoke it incorectlly. How can I check user's role in jstl? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: isUserInRole - how it works
Frank W. Zammetti wrote: What do you mean by "reload roles"? Do you mean put changes to your roles in effect in real-time, or do you mean assign a user to a given role? I mean the first one. I want to put changes in roles in real-time - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: isUserInRole - how it works
ok but is it possible to reload roles manually from action. Function getPrinciple() seems to solve some of my problems but still I need to have an possibility to reload roles. I can not find setPrinciple function - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
isUserInRole - how it works
hi, Actinally my question is how to access container from struts action but if I know how isUserInRole is working I'll be able to solve my main problem which is: Is it possible to access container from action. I'm using securityfilter which extends BaseRealm. In this way I can put additional parameter to user being authorized but the problem is that I'm not able to access it from the action. There is only function: request.isUserInRole() but unfortunatelly I do not know how it works - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validate data problem in ActionForm - combine with tiles
hi, The problem is that after I validate values in the method, the controller forwards me to input page. Since I use tiles in my application I'd like to be forwarded to tiles definition not input page (I need to preserve header, menu etc). The question is: Is it possible to use validate method while using tiles at the same time? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
add new role to user
hi, My application use Tomcat's security mechanism to authorize users. My question is: Is it possible to add user a new role without forcing him to logout. I need this because in some circumstances user has different roles (for instance when in session there is object A user has roles: roleA,roleB; while when in session there is object B user has roles: roleC,roleD) Rgs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
program for drawing buttons
hi, I know this group focus on other issues but could anybody suggest me any good program for drawing buttons and writing text on transparent background. At this moment I use GIMP but fonts looks woefully !!! Which is the best font for these things - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reading value from HashMap via JSTL
hi, I've a page on which there are a lot of similar data. For every week in a year (52 total) I have 3 different values for instance: week 1 efficiency=98 complaints=45 other=3 I've decided that HashMap will be the best to store all of the values and access each value base on key (key is being build from concatenting string year+week+value_type) How can I access value for specific key from JSTL Or is it better way to store these values. I rule out having each value as a different variable since I'll have 52*3 different variables - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jstl - define bean
I thought defines a new bean in page scope. If this is true I do not understand why attached code keeps throwing exception that no getB() is not defined. Login - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jstl - check bean exsist
hi Is it possible to check in jstl if bean is available? Is this code correct - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fw: [HELP] How to restrict access to certain mapping action ???
Aladin Alaily wrote: Hi Pham, I think this was mentioned earlier. There are two things you can do: 1) Use a filter with a url-map to your action 2) Use security constraints Aladin Pham Anh Tuan wrote: Hi all, This is the second time I post this message for help :(. I don't know how to restrict access to certain mapping action? Ex: I have action: /user/myaction.do and I don't want user directly access to above action. Could I use web.xml to solve this problem. something like: Restrict access to JSP pages *.jsp With no roles defined, no access granted Thanks for ur reading. Anh Tuan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You can use role parameter in action mapping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multiple params in
hi, Is there a easy way to have more than one param attached to strut's I know that there is a soultion with HashMap, but in case I just need to attache additional param to already exsisting in some bean I'm bound to use scriplet to create a hashmap. Rgs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to download file (example)
Frank W. Zammetti wrote: Hello, Do you want to use the Struts DownloadAction? If so, have a look here: http://wiki.apache.org/struts/StrutsFileDownload Even if you don't want to use it, you may find the example helpful, along with the source for DownloadAction, to help you along. Unfortunatelly I am running struts 1.2.4. DownloadActioni will be available in 1.2.6 version which at this moment is in beta phase - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to download file (example)
hi, I'm looking for links/examples how to download file in struts action. In action I have OutputStream but what header should I send and the most important how the stram should be send to browser - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles Exception
Nimish Chourey , Tidel Park - Chennai wrote: Hi , I am using struts struts-1.2.4 . I am not able to catch the exception which are caused whenever there is a problem in laying the tiles . For Eg in the below code , if ftpStatus.jsp gives a error , I do not get the exception either in the browser or on Tomcat console . Ideally , I guess the exception should be shown on the screen itself in the place where the tparticular tile is rendered . Any pointers ?? --- Regards Nimish Unfortunatelly working with tiles is rather tedious. In case of errors in tiles definitions no error is being displayed. Only white page or not complete page. The only way you can workaround this problem is to check every page alone and afterward combine them altogether - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
throw exception in servlet filter - no error page displayed
hi, My doFilter method looks like that: public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) throws IOException, ServletException { arg2.doFilter(arg0,arg1); try{ HibernateSessionFactory.commitTransaction(); System.out.println("koniec"); }catch(DAOException e){ throw new ServletException(e); }finally{ HibernateSessionFactory.closeSession(); } } My problem is that although DAOException is being catched and new ServletException is being thrown the page is already rendered. There is no error on the page and the only place where I can find that something went wrong is server log. What is wrong? Why ServletException doesn't affect page? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Instance of org.apache.struts.action.Action class. Share instance
hi, Am I correct that only one Action instance is being created by the server?. I mean all users/threads share the same instance? Base on this I surmise that if I extend Action like that: public abstract class MyAction extends Action { protected static final IAuthorizer auth=new MyAuthorizer(); } and afterwards extend my action classes from modified one I'll have one auth object? Does it apply to ActionForm object,too? (one form object shared by all users/threads). What about different values entered by different users in different sessions? Rgs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]