Re: action namespace

2007-12-20 Thread Omkar patil
Filipe, Try this in the intercept method - ai.getProxy().getNamespace() (where ai is the ActionInvocation instance being passed in into the intercept method) - Omkar Filipe David Manana wrote: Hi, In an Interceptors intercept method I am able to get the associated action's name, through th

Re: Struts Context problem

2007-11-29 Thread Omkar Patil
Jignesh, XYZ seems to be the context root for your web application. Context root comes from application.xml of your application. Here is the snippet from application.xml myapp.war XYZ If that's the case, then it's outside of Struts2, and it will be there in the URL. Ch

Re: bean:write on a Collection

2007-11-27 Thread Omkar Patil
Are you using struts1 or struts2? - Omkar Minghui Yu wrote: > > In my Action, I have: request.setAttribute("book", book); > > book is a Book object, which has a getAuthors method. getAuthors > returns a collection (Set) > > in JSP page, I want to list authors one by one. How shall I do? > >

Re: [S2] Image Generation

2007-11-27 Thread Omkar Patil
I'm sorry the example is messed up as it contains xml. Here is the link for it - http://struts.apache.org/2.x/docs/stream-result.html Omkar Patil wrote: > > Julien, > > I could be completely off-mark here. If I understand correctly you are > planning to generate a PDF (o

Re: [S2] Image Generation

2007-11-27 Thread Omkar Patil
Julien, I could be completely off-mark here. If I understand correctly you are planning to generate a PDF (or an image) and then send it to the browser. This can be achieved using the Stream Result. Here is the code snippet from the S2 documentation - image/jpeg imageStream filename="doc

Re: Retrieving last inserted ID

2007-11-27 Thread Omkar Patil
Unni, I'm not sure if this is related to Struts2. CustomerFacadeLocal looks like an application specific class for your application. You'll need to find out what api this class provides within your application - Omkar Unnikrishnan wrote: > > Hi > > I am new to Struts 2. I would like to know

Re: [S2] How to forward to another struts mapping

2007-11-21 Thread Omkar Patil
You can do it in two ways - 1. Action chaining using result type="chain" - But as a rule, action chaining is not recommended. 2. Using Redirect-after-post pattern. You'll need to define result type="redirectAction". For example, if you need to redirect from ActionA to ActionB, your struts2 config

Re: Having query on action chaining

2007-11-21 Thread Omkar Patil
http://struts.apache.org/2.0.11/docs/action-chaining.html vijay vijay wrote: > > Hi, > i am want to work on action chaining can any one give me links > for > it. > > vijay > > -- View this message in context: http://www.nabble.com/Having-query-on-action-chaining-tf484

Re: Access the value stack

2007-11-20 Thread Omkar Patil
One way is by having following code in your action - ValueStack valueStack = ActionContext.getContext().getValueStack(); -Omkar slideharmony wrote: > > How can I access the value stack in my action in order to store > objects(that I want to retrieve in my jsps)? > -- View this message in

Re: Not finding action because of jsessionid

2007-11-19 Thread Omkar Patil
There is an issue for it already logged in JIRA(WW-2328) and the fix version is 2.1.1 So, you can expect the solution sooner. -Omkar Vineeth Varghese-2 wrote: > > Hi Folks, > > I am facing this odd issue with Struts2.0.9 on jetty. I specify a form > using > the s:form tag like:- > > > but w

Re: getting an error like this repetedly

2007-11-16 Thread Omkar patil
Vijay, Looks like you are using the spring plugin, and the following snippet from the stacktrace clearly indicates that the spring classes are not available - java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware If you look at the spring plugin pom.xml, it decl

Re: [S2] wildcard mapping and spring

2007-11-16 Thread Omkar patil
Laszlo Borsos wrote: I started using Spring 2 with Struts 2. I can't use wildcard mappings though. This works: This does not: Is there any way around this? kuvera - http://javatar.hu Java EE programming Laszlo, It works. Let me go through it step by step - Assuming that you have

Re: how can I set autoreload of struts.xml in struts2

2007-11-16 Thread Omkar Patil
Here is how to do it - http://struts.apache.org/2.0.11/docs/how-can-we-force-the-action-mappings-strutsxml-to-reload.html slideharmony wrote: > > I need to know how can I set autoreload of struts.xml in struts2, without > restarting the container every time. > -- View this message in contex

Re: [struts] action and method separator using something other than action!method

2007-11-16 Thread Omkar Patil
Looks like you are trying for RESTful URLs, check out the REST plugin from the plugins page. It's part of standard s2 distribution 2.0.11. Also, take a look at Restful2ActionMapper javadocs. Amit Rana wrote: > >>From: Omkar patil >>Amit, >> >>I am not sure if

Re: action and method separator using something other than action!method

2007-11-15 Thread Omkar patil
Amit, I am not sure if there is any easy way to achieve this. Is there any specific reason you would like achieve this? One way could be provide your own action mapper class by extending DefaultActionMapper and overriding getUriFromActionMapping method to provide your own separator. -Omkar

Re: struts2: some action mapping clarificacions needed

2007-11-15 Thread Omkar patil
Read through the javadocs for DefaultActionMapper. hernan gonzalez wrote: I have a wildcard mapping, say If I have a form ... which results in (html stripped) and inside I have some submit buttons which go to other methods (besides load) I can accomplish that by using the "method" and "act

Re: [s2] How can I access the RequestMap from an Interceptor?

2007-11-14 Thread Omkar patil
Thilo, You can directly access an HttpServletRequest in the Interceptor using following - ActionContext ac = invocation.getInvocationContext(); HttpServletRequest request = (HttpServletRequest) ac.get(ServletActionContext.HTTP_REQUEST); - Omkar Thilo Ettelt wrote: Hey, som