Re: Ajax with struts

2006-07-25 Thread Frank W. Zammetti
That page isn't actually about AjaxTags, it's about Ajax with Struts in general. It does of course mention AjaxTags :) In any case, all changed... I also did some updating of that page while I was at it :) Frank Michael Jouravlev wrote: No one owns wiki :) I just wanted to structure it so

Replace ' by /' in while passing to javascript with bean:write

2006-07-25 Thread Patil, Sheetal
hi there, I am passing a string value to a javascript function with like Onclick=javascript:functionName('bean:write name=xx property=qq/'); And function is like Function functionName(data) { Alert(data); } Now it works fine if bean:write passes a string without any quotes like this is the

Re: Replace ' by /' in while passing to javascript with bean:write

2006-07-25 Thread Antonio Petrelli
Patil, Sheetal ha scritto: But problem comes when bean:write passes a string with quote like this is th'e test You can create an escaped string using string:escape http://jakarta.apache.org/taglibs/doc/string-doc/string-1.1.0/index.html#escape But you have to use double-quotes (--) do

A problem with form-based login

2006-07-25 Thread David Soler
Hi, I have a problem with form-based login. This way of login remembers the page where you want to go when the session expires, but I don't want this. I always want it to go to the index page, because the index page must do some operations before entering the page. Somebody knows how to do

RE: A problem with form-based login

2006-07-25 Thread Jose Cardoso
1- Create a jsp page where you will allow for the typping of username and password lets call this page login.jsp 2- in the login.jsp, within the body tag call the struts-config.xml: html:form action=login.do focus=userName 3- In the struts-config.xml define the action: for example:

Displaying images from database.

2006-07-25 Thread prerna.sawhney
Hi All, My application saves the images in database as BLOB. I now want to display these images stored in my database. How can I do this in struts 2.0 ? Thanks Regards Prerna The information contained in this electronic message and any attachments to this message are intended for the

RE: A problem with form-based login

2006-07-25 Thread David Soler
But I want to use the default form-based login (in web.xml) I'll try to explain my problem better. When you enter the page, the login form appears, becuase of this: login-config auth-methodFORM/auth-method realm-namemy realm/realm-name form-login-config

Re: A problem with form-based login

2006-07-25 Thread Antonio Petrelli
David Soler ha scritto: But I want to use the default form-based login (in web.xml) I'll try to explain my problem better. When you enter the page, the login form appears, becuase of this: login-config auth-methodFORM/auth-method realm-namemy realm/realm-name form-login-config

RE: Displaying images from database.

2006-07-25 Thread David Soler
Try the following: /*** JSP file / %@ taglib uri=/tags/struts-html prefix=html % html:html locale=true head html:base/ /head body % HashMap params = new HashMap(); params.put(ID, request.getParameter(ID)); pageContext.setAttribute(params, params); % html:img page=/GetImage.do

Displaying images from database.

2006-07-25 Thread prerna.sawhney
Hi All, My application saves the images in database as BLOB. I now want to display these images stored in my database. How can I do this in struts 2.0/1.2.8 ? Thanks Regards Prerna -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 6:04

Re: A problem with form-based login

2006-07-25 Thread Thomas Joseph
David, You can include the startup scripts that you want to run in the index to be included as jsp:include (using tieles or whatever) in every page of your application. Then, no problem if the container remembers your page. Thanks and Regards, Thomas Joseph Kott Software Pvt. Ltd. |

RE: Displaying images from database.

2006-07-25 Thread prerna.sawhney
Hi David Thanks for a prompt response. But I also want to display other things on the jsp page besides the image. For e.g. My jsp page would have Company name, Address, Business Area and its logo with an EDIT button and when the user clicks on the EDIT button he can update Address information

Re: Displaying images from database.

2006-07-25 Thread vijay venkataraman
Say if all request for images will refer to the same action like image.do, then So map this to a particular action. Set the content type and write the image content to the ServletOutputStream return null for ActionForward. The snippet below should give you an idea. Consider if

Re: Displaying images from database.

2006-07-25 Thread Thomas Joseph
Hi Prerna, Use the Action Class for the image display solely for image display. When the browser executes the img src=GetImage.do?param1=blahparam2=xyz tag, it is basically giving a saparate request to your action class that generates the image. Notice that the action class returns null,

Re: Displaying images from database.

2006-07-25 Thread C. Grobmeier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Then how can one have an Java-Object, let's say Person.java. Person has a property called 'avatare' which can be get with File getAvatar(). Can i do something like bean:write name=avatar or so? Btw- this isn't really good practice, is it? The example

Re: Displaying images from database.

2006-07-25 Thread Martin Gainty
2 possibly ways img src with an embedded bean:write OR jsp:useBean with embedded html:image take a look at http://www.velocityreviews.com/forums/t135655-help-sessions-images-amp-beans-no-cookies-please.html Anyone else? M- *

Re: Displaying images from database.

2006-07-25 Thread C. Grobmeier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is it good practice to store images in a database for webapplications? I allways thougth space is better. Thanks for your answer and the link Martin Gainty wrote: 2 possibly ways img src with an embedded bean:write OR jsp:useBean with

pb using validator with struts1.2.9

2006-07-25 Thread Jeremy Jardin
Hi, I'm trying to use struts plugin validator to check a big form.. and it works well.. but I've a little pb with validwhen constraint; I've written something like this : field property=enterpriseName depends=validwhen arg0

Re: pb using validator with struts1.2.9

2006-07-25 Thread Adam Gordon
Jeremy- At first glance, I think you need to modify your parenthesis. Per the Validation docs at http://struts.apache.org/1.2.9/userGuide/dev_validator.html, only two items may be joined with and or or. I don't know if that means you can only have a max of two items or a max of two items

Re: pb using validator with struts1.2.9

2006-07-25 Thread Jeremy Jardin
-Adam, I've just changed my conf like that : field property=enterpriseName depends=validwhen arg0 key=error.inscription.entreprise.nom / var var-nametest/var-name

Re: pb using validator with struts1.2.9

2006-07-25 Thread Adam Gordon
Jeremy- Ok, sanity-check time. Make sure your field names are all spelled correctly. Also, are any errors being output to the form? I had errors displaying and it turned out that the validator was doing exactly what I was asking it to do and the problem was that I just didn't understand

Struts - dynaforms and indexed properties

2006-07-25 Thread Gallagher, Damien
Hello I have a struts dynaform set up that takes an array of expense beans as a parameter When I submit 1 expense bean all works well but when I submit more than 1 expense bean the system returns a BeanUtils.populate error I am initializing my bean in the action. Any suggestions out there?

Re: Displaying images from database.

2006-07-25 Thread Niall Pemberton
Struts has a download action which can help with this: http://wiki.apache.org/struts/StrutsFileDownload Niall On 7/25/06, Martin Gainty [EMAIL PROTECTED] wrote: 2 possibly ways img src with an embedded bean:write OR jsp:useBean with embedded html:image take a look at

Re: About Display Tag

2006-07-25 Thread Alan Treece
Senthil Not sure if you still need this info, but here goes anyway. Also... At the end of all this I have a question to the group about DisplayTag and Struts. Sorry for the long winded-ness of this email... Usually I need a little more hand holding than just a check out this web site

(Struts validation) Different message resource keys rather than placeholders

2006-07-25 Thread Scott Van Wart
The validator, by default uses stuff like this: errors.required={0} is required. I'd like to be able to use entirely different message keys depending on the field, rather than always using errors.required. The solution for the required validator was to simply use a passthrough key like this: