Documenting Applications with Apache Struts 2

2009-06-18 Thread juded
Every developer's favorite task is documenting their application. In this chapter, we will look at the many aspects of documentation, including "self-documenting" code, Javadocs, generators, methodologies, and so on, with a focus on automating as much documentation as possible. To read more, plea

how to correctly generate "path" and "type" in structs-config.xml file?

2009-06-18 Thread Sam Wun
Hi, I have an Action java source code with package at the top of the file. When I put the package line in the file, ant couldn't generate any content in all *.xml files. If I remove the package line from the java source code, all xml files are generated, but without path (that come after the word

RE: Localization in struts 2

2009-06-18 Thread Muthu Velappan
We just now completed working on SWING project which supports 5 Indian Languages along with English (Indic Scripts like Tamil, Malayalam, Telugu, Hindi, Bengali etc..). So, I don't see any problem in getting that to work in Java with any framework. As Dave said, it was a confusion b/w I18N O/P and

Re: how to prevent users from directly accessing jsp files

2009-06-18 Thread Girish Naik
Hi, I tried putting the below string in web.xml, but all my css, js from the application got blocked. But pages are coming. Is something missing or some extra thing to be done? Prevent access to raw pages. Raw Pages /struts/*

Re: question

2009-06-18 Thread Girish Naik
To open it as a link the url should be appended by 'http://' before ur url. So check if ur url from db always returns after 'http://' so that you can append 'http://' string at the start. Regards, - Girish Naik Mobile:-+91-09740091638 girish.

Re: Localization in struts 2

2009-06-18 Thread Dave Newton
Martin Gainty wrote: the lang lookup algorithm uses the provided locale to lookup the accompanying text string romance and germanic languages come from the common EUROPEAN base which originate from single byte character set(s) converting to other languages employing Double Byte Character become

RE: Struts2 Error

2009-06-18 Thread Martin Gainty
doc says that nodeTitleProperty is an struts tree attribute as in this example is that what you have in your jsp? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nich

Fw: Struts2 Error

2009-06-18 Thread Bala . T . Ramanadham
Hi, Can anybody help me with the error below 6/18/09 13:07:47:968 PDT] 001d runtime E Expression stack.findValue(parameters.nodeTitleProperty) is undefined on line 23, column 48 in template/ajax/treenode-include.ftl. The problematic instruction: -- ==> ${stack.findValue(parame

Re: Need help with tiles in struts

2009-06-18 Thread Antonio Petrelli
2009/6/18 abhishek reddy > Iam using tiles definiton in my application.when the struts action is > requested, the entire page is getting refreshed and > when there is a delay in the responsethe page is blank > > Is there any way i can modify the tiles layout, where only body part is > get

BaseStrutsTestCase

2009-06-18 Thread stanlick
For those of you who are using thisbase class to unit test your Struts 2 apps, have you encountered this requirement? I have a web.xml listener placing an object in application scope using servletConte

RE: Localization in struts 2

2009-06-18 Thread Martin Gainty
yes you would need to start by populating all localisable text strings into your globalMessages_.properties files http://struts.apache.org/2.0.14/docs/localization.html ActionClass.propertiesInterface.properties (every interface and sub-interface)BaseClass.properties (all the way to Object.pro

Need help with tiles in struts

2009-06-18 Thread abhishek reddy
Iam using tiles definiton in my application.when the struts action is requested, the entire page is getting refreshed and when there is a delay in the responsethe page is blank Is there any way i can modify the tiles layout, where only body part is getting refrshed, rather than the entire

Re: how to prevent users from directly accessing jsp files

2009-06-18 Thread abhishek reddy
Can you please explain this a bit more.iam using Tiles Definiton On Thu, Jun 18, 2009 at 7:11 PM, Greg Lindholm wrote: > We put all our jsp file into a /struts/ folder then add the following > security contraint to web.xml > > > >Prevent access to raw pages. > >

question

2009-06-18 Thread riya
Hi, I have this requirement where I have to get the URL from database and plug this url in anchor from resource bundle. For eg: Database will give me: URL = www.google.com and the key in bundle: search_key = {0} Find it here Lets say n JSP <% url = "www.google.com" ; --> This i'll g

struts 2: checkbox fieldvalue and value - what's the difference? strange behavior with non boolean values

2009-06-18 Thread Suneel
Hi, I'm trying to understand the different between fieldValue and value attributes of the checkbox tag. I'm asking this because the checkbox is unchecked even though the field associated with it has the same value as the fieldValue. (i.e redemption.countryNotice=="N") But when I have it as this

Re: Interceptor issue in Struts 2.1.6

2009-06-18 Thread Yanto
Hi Dave, thanks, we already solve the interceptor issue, we need to include the defaultstack before the custom interceptor.. after that it's working fine... Regards Yanto On Thu, Jun 18, 2009 at 7:36 PM, Dave Newton wrote: > Yanto wrote: > >> thanks, we are able to run the interceptor now, but

Re: how to prevent users from directly accessing jsp files

2009-06-18 Thread Greg Lindholm
On Thu, Jun 18, 2009 at 11:25 AM, Girish Naik wrote: > yes it will not show the directory listing. but how now a user has to guess > ur jsp name and its folder location which i think is difficult. And keeping > the jsps inside WEB-INF will make the coder to add the WEB-INF before the > page locat

Re: how to prevent users from directly accessing jsp files

2009-06-18 Thread Girish Naik
yes it will not show the directory listing. but how now a user has to guess ur jsp name and its folder location which i think is difficult. And keeping the jsps inside WEB-INF will make the coder to add the WEB-INF before the page location. :( Regards,

Re: Problem uploading files without content type

2009-06-18 Thread David Canos
it works in firefox! it's a chrome and safari issue! sometimes (depends on the file) this browsers don't set the content type. thanks Dave, you show me the key. I hope it helps the community 2009/6/18 Dave Newton > David Canos wrote: > >> if a try to upload a file without ContentType I get

Re: how to prevent users from directly accessing jsp files

2009-06-18 Thread Jan T. Kim
On Thu, Jun 18, 2009 at 07:47:45PM +0530, Girish Naik wrote: > Go to Tomcat Home/conf/web.xml file. in this file put listings as false. > > listings > false > > > Regards, > - > Girish Naik doesn't that stil

Re: Load on startup servlet in glassfish initializing two times

2009-06-18 Thread Girish Naik
It seems your problem something similar to : thisand not struts related as Newton ( [?] Dave Newton) mentioned. Regards,

Re: drop down list not working after using validation.xml

2009-06-18 Thread Girish Naik
After validation, Action's Preparable method is called, you can load the required list in request again. Regards, - Girish Naik Mobile:-+91-09740091638 girish.n...@gmail.com Samuel Goldwyn

Re: how to prevent users from directly accessing jsp files

2009-06-18 Thread Girish Naik
Go to Tomcat Home/conf/web.xml file. in this file put listings as false. listings false Regards, - Girish Naik Mobile:-+91-09740091638 girish.n...@gmail.com Rodney Dangerfield

Re: how to prevent users from directly accessing jsp files

2009-06-18 Thread Greg Lindholm
We put all our jsp file into a /struts/ folder then add the following security contraint to web.xml Prevent access to raw pages. Raw Pages /struts/* No roles, so no direct access On Thu, Jun 18, 2009 at 9:

Re: how to prevent users from directly accessing jsp files

2009-06-18 Thread Jim Kiley
Put the JSPs under /WEB-INF/ and refer to them as the destination of your Struts action results. jk On Thu, Jun 18, 2009 at 9:32 AM, abhishek reddy wrote: > how to prevent users from directly accessing jsp files, rather they have to > come thru sturts action? > > -- > Abhishek > -- Jim Kiley

how to prevent users from directly accessing jsp files

2009-06-18 Thread abhishek reddy
how to prevent users from directly accessing jsp files, rather they have to come thru sturts action? -- Abhishek

Re: Problem uploading files without content type

2009-06-18 Thread Dave Newton
David Canos wrote: if a try to upload a file without ContentType I get this: [ERROR] 10:39:39.953 (FileUploadInterceptor.java:intercept:263) org.apache.struts2.interceptor.FileUploadInterceptor Could not find a Content-Type for <*field*>. Verify that a valid file was submitted.|#] how can I sol

Re: Load on startup servlet in glassfish initializing two times

2009-06-18 Thread Dave Newton
This doesn't appear to be a Struts issue. ECLIPSE + CVS wrote: I have one problem in glassfish while i am specifying the load on start up servlet; it is initializing two times. ie:Print statement in the init method of the servlet is executing two times. I need to look up all the ejb's while th

Re: drop down list not working after using validation.xml

2009-06-18 Thread Dave Newton
Please consider copying your code snippets into a plain-text editor before including them in an email message: we're getting a blank line between each line and a lot of spurious asterisks. Yanto wrote: *org.apache.jasper.JasperException: tag 'select', field 'list', name 'entityInternalId': The

Re: Interceptor issue in Struts 2.1.6

2009-06-18 Thread Dave Newton
Yanto wrote: thanks, we are able to run the interceptor now, but we have another issue, the interceptor will Loop, we create the sample follow the code from the webworks *public* *class* *InterceptorSample* *extends* AbstractInterceptor { @Override *public* String intercept(ActionInv

RE: Localization in struts 2

2009-06-18 Thread Martin Gainty
Wenn sie Re unter Verwendung XWork außerhalb eines Netzzusammenhangs, benutzen dann, was Starthaken Sie in diesem Zusammenhang haben (d.h. Anwendungsanfang für eine Schreibtisch-APP) zum des globalen Hilfsmittelbündels zu addieren. Dieses ist eine Starttätigkeit, also verwenden Sie, was auch imme

Problem uploading files without content type

2009-06-18 Thread David Canos
hi folks im using struts 2.0.14 if a try to upload a file without ContentType I get this: [ERROR] 10:39:39.953 (FileUploadInterceptor.java:intercept:263) org.apache.struts2.interceptor.FileUploadInterceptor Could not find a Content-Type for <*field*>. Verify that a valid file was submitted.|#] h

RE: Localization in struts 2

2009-06-18 Thread Muthu Velappan
I think if an app has to support internationalization then all text should be written from properties file and not through static images content. So, I would be remove images and try to get write all text from properties file only. For Dynamic Data Issue - I believe you fetch the content from dat

RE: Localization in struts 2

2009-06-18 Thread Johnson nickel
Thank you.. it's working fine. I have other issue.. in my application most of the places i used the images. I want to change images(like username,password) also in hindi. And, using this method, i can display the text from properties file only. in my application i have some dynamic data to add

RE: Localization in struts 2

2009-06-18 Thread Muthu Velappan
Try this... Take a copy of ur current properties file and name it as hinditext.txt(save it in UTF-8 format) Now open command prompt and go to your /bin folder and run this command native2ascii -encoding UTF-8 Now rename this app_hi.properties file with respect to ur application properties fi