Re: Custom Tags for Struts2

2009-03-16 Thread Beppe Catanese
I put together a simple HOW-TO based on my experience with a similar task: http://bodez.wordpress.com/2009/03/13/customising-struts2-jsp-tags/ Ciao Beppe Varun Narang wrote: > > Hello all, > I want to get started with the customzied tag writing for Struts2. > I was able to find out ftl files

Unable to find interceptor class referenced by ref-name gwt

2009-03-16 Thread Stephan Schröder
When deploying my HelloWorld-struts2-gwt-application i get this exception: SCHWERWIEGEND: Exception starting filter struts2 Unable to load configuration. - interceptor-ref - file:/D:/Programme/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/struts2gwt-helloworld/W

Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
Hi, Please help me to show error messages.when we restrict the contentTypes as shown in the link http://struts.apache.org/2.0.11.1/docs/file-upload-interceptor.html The contents are restricted but the error wont be shown to end user how to make it work please help me! struts.xml

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread ravindra
You have to mention param -allowed types. image/png,image/gif,image/jpeg,text/plain -Original Message- From: sajidbigler [mailto:sajidbig...@gmail.com] Sent: Monday, March 16, 2009 4:23 PM To: user@struts.apache.org Subject: Fileupload : Restricted cont

System.out into interceptor

2009-03-16 Thread PEGASUS84
excuse me!!! how can I show in a jsp page the text which is into an interceptor [snipp] public String intercept(. System.out.print("text") [/snipp] In result page the text doesn't appear -- View this message in context: http://www.nabble.com/System.out-into-interceptor-tp225359

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
Hi Ravindra, I have done it but really dont no why it dint got pasted properly on forum image/png,image/gif,image/jpeg

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
I have included this but still errors wont be send to end user and more over surprizingly why the forum trims these lines when i copy/paste from my struts.xml :( image/png,image/gif,image/jpeg -- View this message in context: http://www.nabble.com/Fileupload-%3A-Restricted-contentType-is-workin

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread ravindra
Check this page, http://cwiki.apache.org/WW/file-upload.html Make sure you have all jar files and other properties they mentioned in it. -Original Message- From: sajidbigler [mailto:sajidbig...@gmail.com] Sent: Monday, March 16, 2009 4:47 PM To: user@struts.apache.org Subject:

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
Error on Console Mar 16, 2009 4:50:49 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error SEVERE: Content-Type not allowed: upload "simplifiedapi.pdf" "upload__1ed47216_1200f02e810__8000_0001.tmp" application/pdf Error on Browser HTTP Status 500 - type Exception report mes

Re: System.out into interceptor

2009-03-16 Thread Nils-Helge Garli Hegvik
Please don't create new threads for existing questions. Obviously, System.out won't print to the JSP. So you have to put the message somewhere (request, session, action) your JSP can look it up and use it. Nils-H On Mon, Mar 16, 2009 at 12:04 PM, PEGASUS84 wrote: > > excuse me!!! > how can I sho

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
I think if jars are not included properly it would not even allow me to submit correct files() but i can do every thing and more over its telling the file is not a correct contentType but no message is shown to user in browser :( i even kept struts.properties struts.custom.i18n.resources=MMSApp

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
why forum skips files \MMSApplication\WebRoot\WEB-INF\lib in bracket and param name="allowedTypes" in struts.xml while i post it ? :( application/vnd.ms-excel -- View this message in context: http://www.nabble.com/Fileupload-%3A-Restricted-contentType-is-working-fine-but-no-proper-error-messag

Re: Unable to find interceptor class referenced by ref-name gwt

2009-03-16 Thread Stephan Schröder
> Unable to find interceptor class referenced by ref-name gwt solved, i forgot to extend the example-package from gwt-default instead of struts-default. Stephan Schröder wrote: > > When deploying my HelloWorld-struts2-gwt-application i get this exception: > > SCHWERWIEGEND: Exception startin

Re: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread Dave Newton
sajidbigler wrote: why forum skips files \MMSApplication\WebRoot\WEB-INF\lib in bracket and param name="allowedTypes" in struts.xml while i post it ? :( application/vnd.ms-excel Probably because it tries to interpret tags as actual tags; that's why using the mailing list directly and posting

Re: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread Dave Newton
sajidbigler wrote: i have done and followed all steps and following are the jars in my application(MMSApplication\WebRoot\WEB-INF\lib) commons-beanutils-1.7.0.jar commons-fileupload-1.2.1.jar commons-io-1.4.jar commons-logging-1.0.4.jar commons-logging-api-1.1.jar commons-validator-1.3.1.jar dwr

Re: Struts 2 instance creation in memorey

2009-03-16 Thread Sumit Agarwal
Well i have one doubt regarding interceptor and value stack:- i have read interceptor can store and read the data from value stack.well if interceptor is defined in the stack.as per below answer one stack will be create for interceptor and two instance(for two request) for value stack then in th

Re: Type conversion exceptions

2009-03-16 Thread ryangr
Okay, I changed it back to settings[0] type syntax (I had tried it before and it didn't work), so now I have this:

Re: Actionerror's wont be shown when ajax call or when we do type="redirectAction" using struts2.1.6

2009-03-16 Thread Greg Lindholm
For Scenario 1 I'm still not sure what you are asking about, the RedirectMessageInterceptor is used to preserve messages across a redirect but now you are saying there is no redirect so the interceptor is certainly not going to do anything. You might be better off starting over with scenario 1 a

Re: Type conversion exceptions

2009-03-16 Thread Lukasz Lenart
2009/3/16 ryangr : > ERROR com.opensymphony.xwork2.util.InstantiatingNullHandler  - Could not > create and/or set value back on to object > ognl.OgnlException: settings [java.lang.IllegalArgumentException: argument > type mismatch] > ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor  

Need help using

2009-03-16 Thread hermann . x . lau
I am having trouble getting two links to work. The links render properly but when I click on the links, it doesn't forward to the appropriate page. I am not getting any exceptions on the server either. What am I missing? The jsp:

Re: Struts2 Standards, guidelines, recommendations

2009-03-16 Thread Norris Shelton
Just Struts2. I will tackle the others later. Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Shelton Consulting, LLC ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton From: dusty To: user@struts.apache.org Sent: Sunday, March 15, 2009 1

Re: Type conversion exceptions

2009-03-16 Thread ryangr
settings is a SettingList which is just an extended ArrayList. The rendered source looks like: Currently there is only one Setting, but adding another arbitrary entry does come up with settings[1].value, etc. Ryan Lukasz Lenart wrote: > > 2009/3/16 ryangr : >> ERROR com.opensymphony.xwork2.

Re: Type conversion exceptions

2009-03-16 Thread Lukasz Lenart
2009/3/16 ryangr : > settings is a SettingList which is just an extended ArrayList. That can be a problem, generics are erased during compilation and Ognl doesn't know how to convert array to SettingList, did you try to prepare converter for it? Regards -- Lukasz http://www.lenart.org.pl/

Re: Type conversion exceptions

2009-03-16 Thread ryangr
That makes sense...I've added a converter for it similar to others that already exist in the app, but it doesn't appear to be calling convertFromString which the others use. Instead, it seems to be calling convertValue(Map, Object, Member, String, Object, Class) which I do not see in the Struts 2.

Re: Type conversion exceptions

2009-03-16 Thread Lukasz Lenart
2009/3/16 ryangr : > That makes sense...I've added a converter for it similar to others that > already exist in the app, but it doesn't appear to be calling > convertFromString which the others use. Instead, it seems to be calling > convertValue(Map, Object, Member, String, Object, Class) which I d

Re: Struts2 Standards, guidelines, recommendations

2009-03-16 Thread Dave Newton
Norris Shelton wrote: Just Struts2. I will tackle the others later. Convention's naming (uh) conventions are covered in the Convention plugin docs. Other than that I'm not sure there are any hard-and-fast rules about how "best" to use S2. I guess I'm still not quite sure what you're lookin

Re: System.out into interceptor

2009-03-16 Thread PEGASUS84
that's right! now i realize this: import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.Interceptor; import com.opensymphony.xwork2.Action; import javax.servlet.http.HttpServletRequest; import com.opensymphony.xwork2.ActionContext; import java.util.*; publi

request into interceptor

2009-03-16 Thread PEGASUS84
How can i set an attribute in the curret http request into an interceptor? -- View this message in context: http://www.nabble.com/request-into-interceptor-tp22541443p22541443.html Sent from the Struts - User mailing list archive at Nabble.com. --

how to prevent JSP from interpreting ${0}

2009-03-16 Thread John Cartwright
Hello All, I'm trying to get the literal string "this is a test: ${0}" to be rendered in my JSP output. Can someone please tell me how to protect this string from getting evaluated on the server-side? Thanks! --john - To

Re: how to prevent JSP from interpreting ${0}

2009-03-16 Thread Lukasz Lenart
2009/3/16 John Cartwright : > I'm trying to get the literal string "this is a test: ${0}" to be rendered > in my JSP output.  Can someone please tell me how to protect this string > from getting evaluated on the server-side? Use HTML entities [1] [1] http://www.w3schools.com/tags/ref_ascii.asp

Re: request into interceptor

2009-03-16 Thread Musachy Barroso
"Please don't create new threads for existing questions. Obviously, System.out won't print to the JSP. So you have to put the message somewhere (request, session, action) your JSP can look it up and use it. Nils-H" http://struts.apache.org/2.0.6/docs/how-can-we-access-the-httpservletrequest.html

Re: how to prevent JSP from interpreting ${0}

2009-03-16 Thread John Cartwright
Thanks for the suggestion, Lukasz. That's one of the things that I tried, but couldn't get it to work for me. I need the braces to appear as such in the generated page as it's part of a javascript expression. I found a workable solution in: "this is a test: $\{0\}" but was hoping there mig

Re: how to prevent JSP from interpreting ${0}

2009-03-16 Thread Musachy Barroso
If you don't have any EL on that page you can disable it using the "isELIgnored" attribute of the page directive. musachy On Mon, Mar 16, 2009 at 1:46 PM, John Cartwright wrote: > Thanks for the suggestion, Lukasz.  That's one of the things that I tried, > but couldn't get it to work for me.  I

Re: System.out into interceptor

2009-03-16 Thread Nils-Helge Garli Hegvik
You're setting a request attribute, but trying to access a request parameter. Also, I would recommend that you do not access the output stream directly. I suggest you take some time to study some servlet/jsp tutorials, and then move on to the Struts 2 bootstrap guides. Nils-H On Mon, Mar 16, 2009

Re: System.out into interceptor

2009-03-16 Thread Lukasz Lenart
On Mon, Mar 16, 2009 at 5:31 PM, PEGASUS84 wrote: > <%out.print(request.getParameter("ciao"))%> Simplest solution <%= request.getParameter("ciao") %> Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-

RE: Required field only works with text fields?

2009-03-16 Thread Griffith, Michael *
Ok, So I am being a bone-head. When I added the @RequiredStringValidator to the model, the validation is in sync with what is being required on the form. That makes sense to me, but... How are relationships handled? I have a form control as such: And the relationship is being managed via a

Re: System.out into interceptor

2009-03-16 Thread Chris Pratt
Even simplester solution ${param.caio} (*Chris*) On Mon, Mar 16, 2009 at 11:05 AM, Lukasz Lenart < lukasz.len...@googlemail.com> wrote: > On Mon, Mar 16, 2009 at 5:31 PM, PEGASUS84 wrote: > > <%out.print(request.getParameter("ciao"))%> > > Simplest solution > <%= request.getParameter("ciao") %

Re: Type conversion exceptions

2009-03-16 Thread ryangr
Well I can't seem to find documentation or examples of how to use the convertValue() API. This is what each call outputs (it seems both versions get called each time the converter is run): Called convertValue(Map, Object, Member, String, Object, Class) target: com.rjssoft.webdocs.admin.settingact

Re: Need help using

2009-03-16 Thread benjamin haimerl
hi hermann imho it should work.. which page will be shown when you follow the link? just an empty page? Then i guess your action returned null as ActionForward, or an notConfigured forward or did you saw an error page for example: http status 404 - invalid path was requestet that means the act

interceptor and request http

2009-03-16 Thread PEGASUS84
how can I access in the current http request from an interceptor -- View this message in context: http://www.nabble.com/interceptor-and-request-http-tp22541808p22541808.html Sent from the Struts - User mailing list archive at Nabble.com.

Re: interceptor and request http

2009-03-16 Thread Wes Wannemacher
ActionContext.getContext().get(StrutsStatics.HTTP_REQUEST); -Wes On Mon, Mar 16, 2009 at 3:11 PM, PEGASUS84 wrote: > > how can I access in the current http request from an interceptor > -- > View this message in context: > http://www.nabble.com/interceptor-and-request-http-tp22541808p22541808.h

Re: interceptor and request http

2009-03-16 Thread Dave Newton
PEGASUS84 wrote: how can I access in the current http request from an interceptor *Please* stop posting message after message asking the same thing. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For addit

sx:textarea and label

2009-03-16 Thread Ignacio de Córdoba
Hi there, I have just replaced s:textarea with sx:textarea to get the HTML editor. It works OK but now I don't see the "labels" for these textarea fields: ¿Anybody knows if that is the suppoused behaviour and I must add tags my self? thanks, Ignacio -- View this message in context: http://w

Re: Type conversion exceptions

2009-03-16 Thread Lukasz Lenart
2009/3/16 ryangr : > It appears both values objects (value and o, respectively) are completely > empty... It's strange but anyway you should be able to use Struts2 / XWork2 convertion mechanism, did you setup xwork-conversion.properties file as mentioned in documentation [1]? [1] http://struts.a

Re: System.out into interceptor

2009-03-16 Thread PEGASUS84
please can you tell me any quicly method to implement this because i've not time Nils-Helge Garli wrote: > > You're setting a request attribute, but trying to access a request > parameter. Also, I would recommend that you do not access the output > stream directly. I suggest you take some t

Re: Need help using

2009-03-16 Thread hermann . x . lau
Benjamin, When I click on link, it reloads the same (welcome.jsp) page. It doesn't go to an empty page or go to an 404 error page. I added logging to my action classes and it looks like the classes are even being called. This leads me to believe that the configuration is not correct... but I

Re: System.out into interceptor

2009-03-16 Thread Dave Newton
PEGASUS84 wrote: please can you tell me any quicly method to implement this because i've not time O_o Dave Nils-Helge Garli wrote: You're setting a request attribute, but trying to access a request parameter. Also, I would recommend that you do not access the output stream directly. I

Re: System.out into interceptor

2009-03-16 Thread Nils-Helge Garli Hegvik
http://www.google.com/search?q=java+servlet+tutorial http://struts.apache.org/2.1.6/docs/tutorials.html Nils-H On Mon, Mar 16, 2009 at 9:02 PM, PEGASUS84 wrote: > > please can you tell me > any quicly method to implement this > because i've not time > > > > > > > Nils-Helge Garli wrote: >> >> Yo

Re: Type conversion exceptions

2009-03-16 Thread ryangr
Yes, I have it listed in the xwork-conversion.properties file as such: com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.converter.SettingListConverter Ryan Lukasz Lenart wrote: > > > It's strange but anyway you should be able to use Struts2 / XWork2 > convertion mechanism, did yo

Re: Type conversion exceptions

2009-03-16 Thread Lukasz Lenart
2009/3/16 ryangr : > > Yes, I have it listed in the xwork-conversion.properties file as such: > > com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.converter.SettingListConverter And the file is in the root of your classpath (WEB-INF/classes)? Regards -- Lukasz http://www.lenart.org.p

Re: Need help using

2009-03-16 Thread benjamin haimerl
hmm but it works in my project ;) here is my struts-config.xml Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd";> type="com.yourcompany.struts.action.DisplaySearchNameAction" parameter="methodtocall"> parameter="com.yourcompa

Re: Type conversion exceptions

2009-03-16 Thread ryangr
Yes. Hence why I'm confused! :confused: :-D Ryan Lukasz Lenart wrote: > > 2009/3/16 ryangr : >> >> Yes, I have it listed in the xwork-conversion.properties file as such: >> >> com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.converter.SettingListConverter > > And the file is in t

Re: Struts 2 Container Security problem

2009-03-16 Thread pblatner
I have tried to do the exact thing that Jeromy suggests below with 2 packages. And then in the web.xml specify a security constraint with the URL pattern "/protected/*". After doing so, I am not getting the result that I think I should be. When issuing a request for my action at "http://localho

Re: Struts 2 Container Security problem

2009-03-16 Thread Struts Two
There is a problem running Struts 2.1.6 on Websphere when security is enabled. The case happens when url is an action not a resource like jsp or html. Refer to JIRA WW-2642 that I opened almost a year ago. I was hoping that Apache group can get their hands on Websphere to verify the issue but

Re: Type conversion exceptions

2009-03-16 Thread ryangr
Somewhere in here it appears to be losing the values because the parameter interceptor has them then once it hits the converter they disappear: com.opensymphony.xwork2.interceptor.ParametersInterceptor - Setting params settings[0].value => [ 192.168.1.1 ] settings[0].title => [ SMTP Server Addre

Re: Struts Ajax Newbie

2009-03-16 Thread Jiří Chaloupka
hmm I have next problem, I tested it in Mozilla and it works, but now I made a test in IE7 and it does not. I am using version 1.5 beta 0.1 (beta 0.2 does not works neither as demo application) I am running latest JBoss AS (5.0.0) and java 1.6 b12 I found similar question on Ajaxtags phorum wi

Re: Struts Ajax Newbie

2009-03-16 Thread Jiří Chaloupka
One more hint - using MSIE, I found following in server log. When I used Mozilla, there is not this error: 23:17:45,625 ERROR [[sourceloader]] Servlet.service() for servlet sourceloader threw exception javax.servlet.ServletException: resource not found (/net/sourceforge/ajaxtags/js/'+libraryNa

Re: Struts 2 instance creation in memorey

2009-03-16 Thread musomesa
Hi Sumit -- the two are different. Easiest to illustrate by example: Definitions: Interceptor stack: an ordered list of interceptors with pre/post processing logic. You have one. Value stack: a stack (in data structure sense) that holds javabeans including your current action. You have one *per