Fwd: Help

2009-05-19 Thread Murugesh
-- Forwarded message -- From: Murugesh muruges...@gmail.com Date: Tue, May 19, 2009 at 11:41 AM Subject: Help To: user@struts.apache.org consider an application already running in the browser and if user try to run same application in the same browser. here i need to skip the

Re: Fwd: Help

2009-05-19 Thread suhas kokal
Hi, You don't need to do any thing as starting a new (same) application in another browser(from parent one) carries the session into another application.You can check this from the URL. Thanks Suhas --- On Tue, 19/5/09, Murugesh muruges...@gmail.com wrote: From: Murugesh

Re: Fwd: Help

2009-05-19 Thread Murugesh
Thanks for reply like googles gmail, if u try to open 2nd gmail in same browser (multi tabbed)it will take you to already logged in account. how to handle this in normal application? On Tue, May 19, 2009 at 12:29 PM, suhas kokal kokalsu...@yahoo.com wrote: Hi, You don't need to do any

Re: Fwd: Help

2009-05-19 Thread Paweł Wielgus
Hi Murugesh, read about session in HTTP. Best greetings, Paweł Wielgus. 2009/5/19 Murugesh muruges...@gmail.com: Thanks for reply like googles gmail, if u try to open 2nd gmail in same browser (multi tabbed)it will take you to already logged in account. how to handle this in normal

Any validation flag available to the action code?

2009-05-19 Thread Qunhuan Mei
Greetings everyone! When Struts validation is in place, the java action code appears to run fully twice by default. I was wondering if the action code could detect weather the current run is for validation or the one after so that certain resource intensive (e.g. database op) access could be

[S2 2.0.14] how to save the old and new values of the fields of a form

2009-05-19 Thread Fernandes Celinio
Hi, In struts 2, what are the different ways to keep the previous values of the fields of a form which is being modified (with new values) ? I would like to save in the database the NEW (after modification) and the OLD (before modification) values of the fields of the form. Let's say I have 3

Re: Could not load MultiColumnPrinter.class

2009-05-19 Thread David Canos
Hi again folks. I have nothing found, Could not load MultiColumnPrinter.class still remains as an error. Google says nothing about it. My conventions plugins is failing and I dont know whether is related to this error. 2009/5/12 David Canos davidca...@gmail.com I was just starting to work

Re: Could not load MultiColumnPrinter.class

2009-05-19 Thread David Canos
if you remove convention-plugin jar you dont get the error msg. anyway it's hard to understand I dont know what's happening inside! any idea or plan?? everything is welcome thanks in advance 2009/5/19 David Canos davidca...@gmail.com Hi again folks. I have nothing found, Could not load

Accessing protected resources via a login page

2009-05-19 Thread Steve
Hi everyone, I have an application that insists on a user being logged in before they can access specific resources. Currently, if a user who is not logged in, attempts to access these resources, they are simply redirected to the login page. This works fine and is implemented using an

passing form parameters to a custom validator

2009-05-19 Thread manub
Hi all, I'm trying to write a custom field validator which needs other fields to validate the field I need to validate. How can I pass field values (and not static params) to a field validator in the validation xml? I'm using Struts 2.1.6. Thank you. -- View this message in context:

Re: how to use struts 2 to redirect jQuery Ajax request

2009-05-19 Thread fireapple
So there is no way to put the control of determining the result to Struts instead of Javascript? Steven Yang wrote: Actually you went off Struts' scope by using AJAX.because javascript is on the client side. by using XHR you have put the control of determining the result to javascript and

Re: Could not load MultiColumnPrinter.class

2009-05-19 Thread David Canos
I've started again forgetting my code. this time I tried by importing struts2-rest-showcase-2.1.6.war to my eclipse. After running the sample app SAME ERROR happens. struts2-rest-showcase.2.1.6.war throws the same problem in Glassfish 2.1 and Glassfish 2.0. Have someone test 2.1.6 sample

Re: Accessing protected resources via a login page

2009-05-19 Thread Lukasz Lenart
2009/5/19 Steve st...@sjlt.co.uk: Can anyone advise on the best way to do this? Use Acegi, it has such functionality built-in or store request path in session when redirecting to login page and after successful login, read it from session and redirect to it. It should be achievable with the same

Re: customize fielderror

2009-05-19 Thread manub
Isn't it possible to reference directly the single field errors without modifying the FTL and without having ul and li tags? Sonny Gill wrote: Ahh...right. Assuming that you are using simple theme as default, You will need to extract fielderror.ftl from the struts2 jar, modify it to suit

[S2] When/How are Actions Created?

2009-05-19 Thread Asleson, Ryan
Hello, Not sure if this is a Struts 2 or Spring question but I'll start here. I'm using Struts 2 along with Spring 2.5. In our Struts 2 Actions, we use the @Autowired annotation to inject our service beans into the Action class: @Autowired private MyService myService; Note that we do

Re: How to keep information when a auto-checked type is done by struts?

2009-05-19 Thread Stefano Tranquillini
So, i've done this: there's a init action that does:     public String execute() throws Exception {     Map session = ActionContext.getContext().getSession();     List cat = mgmt.getAllCategory();     session.put(category, cat);     return SUCCESS;     } after that a jsp is

Re: How to keep information when a auto-checked type is done by struts?

2009-05-19 Thread Jim Kiley
You could access category with #session.category if I remember my OGNL right. Or you could add a 'category' field to your Action class, with public getter and setter, and then, instead of putting cat into the session, you could do this.setCategory(cat) -- and then your JSP would work fine. On

Re: How to keep information when a auto-checked type is done by struts?

2009-05-19 Thread Stefano Tranquillini
On Tue, May 19, 2009 at 17:14, Jim Kiley jhki...@summa-tech.com wrote: You could access category with #session.category if I remember my OGNL right.   Or you could add a 'category' field to your Action class, with public getter and setter, and then, instead of putting cat into the session, you

Re: How to keep information when a auto-checked type is done by struts?

2009-05-19 Thread Stefano Tranquillini
same problem anyway -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

RE: Accessing protected resources via a login page

2009-05-19 Thread Steve
I would rather avoid using Acegi as I'm not using Spring. I'm using Struts 2 and EJB3. I appreciate the Acegi can be used without Spring. But it still seems like overkill to solve this one issue. I was hoping to generate a call to login.action like .../login.action?url=complete request string. I

Re: Accessing protected resources via a login page

2009-05-19 Thread Stuart Ellidge
Hi Steve, What you are asking is relatively simple really - we implemented an interceptor to capture the current request URL and store it in the current value stack. We can subsequently reference it in our JSPs and use it in forms in several places to enable us to redirect to the original page

Re: customize fielderror

2009-05-19 Thread manub
I used the iterator trick described before and it works, showing me all field errors. Nested into the 2 iterators tag, there's a tag which I could use to print only the errors for a specific field using s:property /? Thanks. manub wrote: Isn't it possible to reference directly the single

Re: [S2] When/How are Actions Created?

2009-05-19 Thread Andy Sykes
1. It's created when the Struts dispatcher filter receives a request that matches an action element in the XML configuration file. Xwork handles the creation, I believe (Struts internal DI framework). You're running with Spring as the container, which mean Spring does the action creation

UI: upload and store img

2009-05-19 Thread Stefano Tranquillini
Hi all. i've to do a UI that permits to store some images, how can i do that? i tried to use upload file but is quite complex and doesn't work. is better if i put the img inside the db? someone of u has experience about that? if i put inside the db the img (i use postrgres) how can i display it in

RE: upload and store img

2009-05-19 Thread Kawczynski, David
Retrieving from DB and outputting to HTTP: Every time I've done this it has been without the use of struts. I use a servlet that looks for e request parameter storing an ID that resolves to the image in the DB. I lookup the image, set the response type for that image, then output the bytes that

RE: upload and store img

2009-05-19 Thread Martin Gainty
Struts FileUploadInterceptor offers maximumSize,allowedTypes and allowedExtensions parameters specifically Interceptor parameters: maximumSize (optional) - the maximum size (in bytes) that the interceptor will allow a file reference to be set on the action. Note, this is not

JSON plugin class loading problem?

2009-05-19 Thread Jim_Greuel
I am using version 0.32 of the JSON plugin with Struts 2.0.11. It seems to work well except for the fact that the JSON results from my struts action are inconsistent. I have annotated my action as follows: @Results( { @Result(name = jsonPopsResult, type = JSONResult.class, value = ,

I18n blew up

2009-05-19 Thread Jon Pearson
I moved away from the web side of my project for a couple of days to take a break, and now as I come back, I18n has completely stopped working. In 'struts.properties' I have the line struts.custom.i18n.resources = global-messages And in 'global-messages.properties' I have text like this

RE: I18n blew up

2009-05-19 Thread Jon Pearson
Upon further examination, it looks like 'struts.properties' is not being loaded -- When I cause an exception, I don't see the development-mode data that I would expect for having this line in that file: struts.devMode = true Still very confused. -Original Message- From: Jon Pearson

RE: I18n blew up

2009-05-19 Thread Jon Pearson
As far as I can tell, Eclipse is placing struts.xml into WEB-INF/classes when it deploys to Tomcat, but not struts.properties or any of the other important files that I need. No idea why, and I haven't yet figured out how to fix this. Anyone else experience a problem like this? Any idea how to get

Re: JSON plugin class loading problem?

2009-05-19 Thread dusty
I have used the JSON plugin quite a bit and I have not seen the root switching you are describing. The only difference I can see is that I am using xml config for those actions. It seems like your result is not getting the root parameter. Could it be an issue with the @Result annotation

RE: I18n blew up

2009-05-19 Thread Martin Gainty
typical use is to use getText to acquire the property attribute as defined here s:textfield label=%{getText('label.firstName')} name=firstName /modifying controlheader-core.ftl would allow you to supply neccesary call to getText ${parameters.label?html}:#t/ #assign

RE: I18n blew up

2009-05-19 Thread Jon Pearson
Thanks, but the problem is definitely Eclipse. It was working last week, and now it isn't. Eclipse isn't copying the necessary properties files containing those translations for getText() when I deploy to my local Tomcat server for development/testing. It will copy struts.xml, but none of the

Re: Accessing protected resources via a login page

2009-05-19 Thread dusty
I think this is more difficult than most people think. There are a lot of use cases and edge cases that make most home grown solutions pretty fragile. I think GETs are pretty easy but it gets a little more exciting when you are dealing with POSTs to a secure resource. People tend to get pissed

RE: I18n blew up

2009-05-19 Thread Jon Pearson
Fixed -- I had been building the properties files and whatnot in the src/ folder, and Eclipse had been copying them. But then it stopped, so I had to manually move my files from src/ to web/WEB-INF/classes/. Not that this is an Eclipse support forum, but I thought that someone else may

Re: how to use struts 2 to redirect jQuery Ajax request

2009-05-19 Thread dusty
There is no reason why Struts can't figure out the URL and give it back. I have not seen the JSON result used the way you have it configured. Typically, you see the JSON result with a root parameter. The root is the action property you want to be the root of your JSON object graph. So what I

Re: JSON plugin class loading problem?

2009-05-19 Thread Musachy Barroso
That's pretty weird, you could try mapping that action with XML, if the problem goes away, then it is a Codebehind problem, but I can't think of anything causing this. musachy On Tue, May 19, 2009 at 2:26 PM, jim_gre...@fws.gov wrote: I am using version 0.32 of the JSON plugin with Struts

Re: [OT] Re: Struts2Builder 0.1.0 has been released

2009-05-19 Thread tsattler
newton.dave wrote: Why not just use the metadata returned from a JDBC connector? Dave, Thanks for the reply and the suggestion. I didn't do that simply because it just didn't occur to me at the time. But it's a good idea, and it would certainly allow more database products to be

Preload of database data?

2009-05-19 Thread Christian Benjamin Ries
Hi there, I have a small site with some informations which are stored in a database. A method for administrations reason is added to change the content (names) of the datasets. Now, I will add these names to my navigation. I have a action like this: action name=Admin class=bean.Admin ...

RE: JSON plugin class loading problem?

2009-05-19 Thread Martin Gainty
Jim- /** * Generates the key to store the bean in the session with. */ private void updateBeanKey() { if (this.sessionKey == null) { final StringBuffer buff = new StringBuffer(); buff.append(this.getClass().getName()); //WHAT iS THE CLASSNAME

Re: JSON plugin class loading problem?

2009-05-19 Thread Musachy Barroso
Martin, where do you get these random code sections from? Please refrain from posting answers that will just confuse users. This is a community and we benefit from the help and collaboration of users, so we encourage everyone to participate, but just throwing random code, from projects that are

RE: JSON plugin class loading problem? (Part Deux)

2009-05-19 Thread Martin Gainty
something else com.opensymphony.webwork.dispatcher.json.JsonObject * For example, if an object has a method named codegetName/code, and * if the result of calling codeobject.getName()/code is codeLarry Fine/code, * then the JSONObject will contain codename: Larry Fine/code.

Re: customize fielderror

2009-05-19 Thread Dave Newton
manub wrote: I used the iterator trick described before and it works, showing me all field errors. Nested into the 2 iterators tag, there's a tag which I could use to print only the errors for a specific field using s:property /? Are you asking about the s:fielderror tag? Dave

Re: Accessing protected resources via a login page

2009-05-19 Thread Wes Wannemacher
On Tuesday 19 May 2009 05:05:11 pm dusty wrote: I think this is more difficult than most people think. There are a lot of use cases and edge cases that make most home grown solutions pretty fragile. I think GETs are pretty easy but it gets a little more exciting when you are dealing with

Struts2+ReST-plugin prolems need help!!!

2009-05-19 Thread xnpeng
I'm doing my project with struts2+rest-plugin for about 3 months.there is a lot of problems unresolved. With rest-plugin and convention-plugin,all action-mapping are done automatically,manual action-mapping in struts.xml cannot work.so, 1, I cannot define global-error-result; 2, I cannot do

Re: JSON plugin class loading problem? (Part Deux)

2009-05-19 Thread Musachy Barroso
The OP stated that he is using the JSON plugin, v32, which is this Struts 2 plugin: http://cwiki.apache.org/S2PLUGINS/json-plugin.html, not related to xwork in anyway. musachy On Tue, May 19, 2009 at 7:58 PM, Martin Gainty mgai...@hotmail.com wrote: something else

Re: Struts2+ReST-plugin prolems need help!!!

2009-05-19 Thread Dave Newton
xnpeng wrote: I'm doing my project with struts2+rest-plugin for about 3 months.there is a lot of problems unresolved. With rest-plugin and convention-plugin,all action-mapping are done automatically,manual action-mapping in struts.xml cannot work.so, 1, I cannot define global-error-result;

Problem with xwork convertor

2009-05-19 Thread Ikya Technical
Hi All, We are working on a Struts 2 project. We are facing a problem whenever there is Double type field with Model class and field value is zero then it is throwing some error. After searching a lot we find out that the issue is with xwork2 and it is already reported and fixed. The issue

Re: Problem with xwork convertor

2009-05-19 Thread Wes Wannemacher
It might be easier to grab the most recent snapshot builds from here - http://people.apache.org/builds/struts/nightlies/2.x/ Give them a try, they should include all of the appropriate dependencies. -Wes On Wednesday 20 May 2009 01:45:12 am Ikya Technical wrote: Hi All, We are working