Re: Nested Struts2 iterator tags

2011-02-16 Thread XCoder Nitin
This is how the JSP code will look like: s:form action=saveaction s:iterator value=lstBean id=lstBean status=outerStat s:textfield value=%{name} name=lstBean[%{#outerStat.index}].name/ s:textfield value=%{amt}

Re: Nested Struts2 iterator tags

2011-02-16 Thread XCoder Nitin
This is how the JSP code will look like: s:form action=saveaction s:iterator value=lstBean id=lstBean status=outerStat s:textfield value=%{name} name=lstBean[%{#outerStat.index}].name/ s:textfield value=%{amt}

Struts2 and Validation issue

2011-02-16 Thread aum strut
Hi All, I am trying to user Validation framework with Struts2 but struck at a point,here are the details. I am developing a import service which includes various steps like 1) Showing number of import options 2) Showing number of elgible files for the import (Import type selected in step one)

Restrict direct access to static content

2011-02-16 Thread Luis Eric López Fernández
Hello there, I am new with Struts2 and I need to restrict direct access to my app's static content. Right now users can access to images, css, js, and pdfs by directly typing in the resource URL, something like: http://server:port/AppName/images/image_name.jpg Will take them to the place where

Re: Restrict direct access to static content

2011-02-16 Thread Dave Newton
2011/2/16 Luis Eric López Fernández wrote: So my first attempt to fix this is by adding the following lines to the web.xml file:    security-constraint        web-resource-collection            web-resource-nameRestrictedDirectories/web-resource-name            

Re: Restrict direct access to static content

2011-02-16 Thread Luis Eric López Fernández
It *sounds* like what you're trying to do is to only allow access to static resources if they're requested from within a web page--is that correct? *That's correct Dave!* Why* are you trying to do that? The answer may dictate the solution. You can always stream static resources to the browser

Re: Restrict direct access to static content

2011-02-16 Thread Alex Lopez
Correct me if I'm wrong, I think you could achieve this by doing: in web.xml: filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter/filter-class /filter filter-mapping filter-namestruts2/filter-name

struts2, jasper reports, nested List error

2011-02-16 Thread Aaron Brown
I'm learning how to use Jasper reports, in this case as a result from a Struts2 (2.1.8) web app. I'm sending a List (ArrayList) of objects to a report and when the case is that simple, I have things working just fine. Next, I need to report a hierarchy of data like this example: ListParent

Re: Restrict direct access to static content

2011-02-16 Thread Vitor De Mario
Unfortunately I don't know a solution to the problem, but what he's trying to do doesn't look that strange to me. I believe Luis'd like to hide his internal folder structure, probably. Struts 2 URL's are made up, don't correspond to any physical folders, but .js, .css and the like would probably

Re: struts2, jasper reports, nested List error

2011-02-16 Thread Dave Newton
That it works in JSP is meaningless--the two mechanisms are nothing alike. The error message describes exactly what the problem is; you're passing a list, not something that JR can use. Tragically, I don't actually remember what I did to fix this, although I thought I had changed the plugin to

Re: Restrict direct access to static content

2011-02-16 Thread Luis Eric López Fernández
I'm pretty much trying to do the following: 1.- user tries to access a static resource directly 2.- app receives the request 3.- application directs the user to a default location, but not the requested resource I am thinking to do something that will completely destroy the purpose of struts

Re: Restrict direct access to static content

2011-02-16 Thread Dave Newton
2011/2/16 Luis Eric López Fernández wrote: I am thinking to do something that will completely destroy the purpose of struts hehe.. I will add a servlet to handle all the requests different than .action and there I will redirect to an error page.  =S How will you request them from within the

Re: Restrict direct access to static content

2011-02-16 Thread Chris Pratt
Basically you need to implement an Authentication/Authorization system in your app (you can start with Spring Security if you're not comfortable doing a scratch implementation). Then use that system to protect all your assets. (*Chris*) On Wed, Feb 16, 2011 at 9:24 AM, Vitor De Mario

Re: Restrict direct access to static content

2011-02-16 Thread Dave Newton
Access to the resources isn't the issue, though. Dave On Wed, Feb 16, 2011 at 12:28 PM, Chris Pratt thechrispr...@gmail.com wrote: Basically you need to implement an Authentication/Authorization system in your app (you can start with Spring Security if you're not comfortable doing a scratch

Re: Restrict direct access to static content

2011-02-16 Thread Brian Thompson
On Wed, Feb 16, 2011 at 11:34 AM, Dave Newton davelnew...@gmail.com wrote: 2011/2/16 Luis Eric López Fernández wrote: I am thinking to do something that will completely destroy the purpose of struts hehe.. I will add a servlet to handle all the requests different than .action and there I

Struts2 + dojo + ajax for confirm button

2011-02-16 Thread Emi Lu
Good afternoon, I found very good examples for ajax + asp: http://www.asp.net/ajax/ajaxcontroltoolkit/samples/ConfirmButton/ConfirmButton.aspx For example, confirm button May I know where I can find similar examples for Struts2 + dojo + ajax for confirm button please? Thanks a lot! -- Lu Ying

Re: Struts2 + dojo + ajax for confirm button

2011-02-16 Thread Dave Newton
Please, please be aware that the S2 Dojo plugin is *deprecated*, for good reasons. If you're just using raw Dojo, your best bet is the Dojo documentation/samples. Dave On Wed, Feb 16, 2011 at 2:52 PM, Emi Lu em...@encs.concordia.ca wrote: Good afternoon, I found very good examples for ajax +

Re: Struts2 + dojo + ajax for confirm button

2011-02-16 Thread Emi Lu
On 02/16/2011 03:13 PM, Dave Newton wrote: Please, please be aware that the S2 Dojo plugin is *deprecated*, for good reasons. If you're just using raw Dojo, your best bet is the Dojo documentation/samples. Ok. If dojo is deprecated, then how struts2 supports ajax? -- Lu Ying On Wed, Feb

Re: Struts2 + dojo + ajax for confirm button

2011-02-16 Thread Dave Newton
Either via the jQuery plugin, or by simply using whatever JS library/framework you want. Dave On Wed, Feb 16, 2011 at 3:37 PM, Emi Lu em...@encs.concordia.ca wrote: On 02/16/2011 03:13 PM, Dave Newton wrote: Please, please be aware that the S2 Dojo plugin is *deprecated*, for good reasons.

Re: Struts2 + dojo + ajax for confirm button

2011-02-16 Thread Emi Lu
Either via the jQuery plugin, or by simply using whatever JS library/framework you want. Thank you Dave! -- Lu Ying On Wed, Feb 16, 2011 at 3:37 PM, Emi Luem...@encs.concordia.ca wrote: On 02/16/2011 03:13 PM, Dave Newton wrote: Please, please be aware that the S2 Dojo plugin is

Re: struts2, jasper reports, nested List error

2011-02-16 Thread Aaron Brown
I was able to find a workaround for my problem. The solution is in two parts: 1) This blog entry from Bruce Phillips who gives a walkthrough on solving exactly this problem: http://www.brucephillips.name/blog/index.cfm/2008/7/12/Using-The-JasperReports-Struts2-Plugin-A-Main-Report-And-A-Subreport

Custom Type Converter Session data

2011-02-16 Thread Barry L. Kline
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks to Paweł Wielgus I was turned on to the prospect of using a Custom Type Converter to handle a custom date problem. To recap: I have a form where the user can insert into java.sql.Timestamp field either a date in the form -MM-dd HH:mm or

RE: Strut2 JQuery

2011-02-16 Thread Martin Gainty
..in case anyone is interested.. the new and improved grid control now persists entities to MySQL database vielen danke johannes Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich.

Re: Integrate JasperReports into a Struts2 web application

2011-02-16 Thread @rju
hey can you tell me how to send the jasper report directly to the printer in struts2-jasper report environment -- View this message in context: http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30946577.html Sent from the Struts - User mailing list archive

Re: Integrate JasperReports into a Struts2 web application

2011-02-16 Thread Frans Thamura
struts2 is web based, jasper is standalone if u create as swing that is possible F On Thu, Feb 17, 2011 at 10:34 AM, @rju nagarjunabatt...@gmail.com wrote: hey can you tell me how to send the jasper report directly to the printer in struts2-jasper report environment -- View this message

Re: Integrate JasperReports into a Struts2 web application

2011-02-16 Thread @rju
i.e. it is not possible in this struts2-jasper report environment i hav some thing http://helptodeveloper.blogspot.com/2010/02/way-of-printing-jasper-report-at-client.html; but it is in struts1 but i ve used struts2. i ve used struts2-jasper reports plug-in also can u plz solve this... in

Re: Integrate JasperReports into a Struts2 web application

2011-02-16 Thread Frans Thamura
struts - jasper - PDF - Adobe REader - Printer that is the steps or create HTML TXT - browse printing. -- Frans Thamura Director Meruvian. Integrated Hypermedia Java Solution Provider. Mobile: +628557888699 Blog: http://blogs.mervpolis.com/roller/flatburger (id) FB:

Re: Integrate JasperReports into a Struts2 web application

2011-02-16 Thread @rju
if dont mind can you tell in detailed manner -- View this message in context: http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30946620.html Sent from the Struts - User mailing list archive at Nabble.com.

Re: Integrate JasperReports into a Struts2 web application

2011-02-16 Thread Dave Newton
He's saying Hit Ctrl-P from inside a PDF reader. On Wednesday, February 16, 2011, @rju nagarjunabatt...@gmail.com wrote: if dont mind can you tell in detailed manner -- View this message in context:

Re: Integrate JasperReports into a Struts2 web application

2011-02-16 Thread @rju
hello boss previously you ve helped a lot hope u remember me. boss am giving action call through ajax. so after that action i dont want my result as a jasper report i want to send that report directly to the printer... dat to without user interaction Dave Newton-6 wrote: He's saying Hit

RE: Integrate JasperReports into a Struts2 web application

2011-02-16 Thread Jerson John
Verymuch possible...But u need to create stricter for ur app layer like MVC---U can make use of MODEL for ur swing Good Luck Many Thanks and Regards, Jerson CPR Vision Management Pte Ltd CRM Software Marketing E: jer...@cprvision.com T: + (65) 6535 0996 F: + (65) 6327 8085 www.cprvision.com

Re: Custom Type Converter Session data

2011-02-16 Thread Lukasz Lenart
Why do not change the format in JSP file ? Convert should do only conversion, formatting should be in view. Do you use the s:iterator/ tag to display those dates ? If so, the first entry should be presented with full format, the following entries just with reduced format. And use hidden fields

Re: Struts2 and Validation issue

2011-02-16 Thread Michal Ciasnocha
Hi, the problem of validation through annotations is they are applied every time the action is called. You can try use method which you call from your form. For example, if you want to validate only execute method, write your own method with name validateExecute(). The principle is same for