Re: Advice needed: Offline Struts App

2012-03-15 Thread Brian Thompson
Another option that might work for you is an Adobe AIR app.  There's a
sample AIR web browser app [1]; install that demo and test your S2 app in
it.  If it works out properly, you can embed your Tomcat stack in the AIR
app [2] and customize the browser from the sample to interact with your
embedded Tomcat instance.

Brian

[1] -
http://jeffreypalermo.com/blog/adobe-air-web-browser-with-flex-4-1-sample-application-available/
[2] -
http://coenraets.org/blog/2009/12/embedding-tomcat-and-blazeds-in-an-air-2-0-application/


On Thu, Mar 15, 2012 at 3:34 PM, Christian Grobmeier grobme...@gmail.comwrote:

 On Thu, Mar 15, 2012 at 8:49 PM, Wes Wannemacher w...@wantii.com wrote:
  Christian, have you considered using XWork? Struts2 is basically a web
  implementation of the command pattern framework implemented by XWork.
  I worked on a project where I embedded XWork in a non-web-app and was
  very happy with it.

 Actually no, I didn't. But you are right, it might make sense to
 figure that out!
 If you have any more hints/links etc in that direction please let me know.

 What was your frontend technology? Swing?

 At the moment I need both, Web and the Non-Web features. Will try to
 see if I can separate these for my two apps.


 --
 http://www.grobmeier.de
 https://www.timeandbill.de

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Map param in param tag

2012-02-22 Thread Brian Thompson
http://lmgtfy.com/?q=struts+mailing+list+unsubscribe



On Wed, Feb 22, 2012 at 1:56 PM, Yadav Khanal yadav_kha...@yahoo.comwrote:

 Hi,
 I would like to unsubscribe from the list because it flooded my email box.
 Could anybody tell me how to unsubscribe?

 Thanks,
 YK



 
  From: Oscar Alvarez oialva...@gmail.com
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Tuesday, February 21, 2012 9:00:35 AM
 Subject: Re: Map param in param tag

 Hi Ansari,

 Already tested the email in this URL?
 http://struts.apache.org/1.x/faqs/validator.html

 Best regards,
 Oscar.

 2012/2/21 danish ansari mohddanish27...@gmail.com

  Hello there ,
  I am working on struts 1.2 validation.
  I am having a requirement which i am unable to implement.
  I am having two fields username and email form resetting the password.
  user has to enter any one of them if user does not enter any field then a
  message must be pop up that enter at least one field.
  if user has entered username then email should not be validated.
  but if the user entered the email then email must be verified for valid
  email input.
  i have to implement this using XML only. I cant override the validate()
  Please provide me sample XML code.I have wasted a lot of time on it.
  Thank you
 



 --
 Atentamente
 Óscar



Re: admins, can you add something like [struts] before every subject

2012-01-13 Thread Brian Thompson
My gmail filter for this mailing list is as follows:

Matches: to:(user@struts.apache.org)
Do this: Skip Inbox, Apply label struts

Brian



On Fri, Jan 13, 2012 at 12:40 PM, Wes Wannemacher w...@wantii.com wrote:

 On Fri, Jan 13, 2012 at 11:54 AM, Bogomil Shopov
 shopov.bogo...@gmail.com wrote:
  On 13 January 2012 17:48, Maurizio Cucchiara mcucchi...@apache.org
 wrote:
 
  Can you explain why?
 
 
  -1. Because now mails look like personal emails.
  0.because it's normal for a discussion list
  1. Because if you are subscribed for more than 10 of them, you may need
  some kind of way to recognize what is this about
 

 Can you filter on headers? Each message posted uses the following header -

 List-Id: Struts Users Mailing List user.struts.apache.org

 Depending on your mail client, there may be an easy way to filter
 based on a header (saving some bytes [as if that is still important])

 Also, JRebel rocks!

 -Wes

 --
 Wes Wannemacher

 Head Engineer, WanTii, Inc.
 Need Training? Struts, Spring, Maven, Tomcat...
 Ask me for a quote!

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Struts 2 Webinar in Wednesday

2011-12-22 Thread Brian Thompson
I'm sorry I missed it.  I wanted to attend, but my work schedule
interfered, unfortunately.

Brian



On Thu, Dec 22, 2011 at 12:53 PM, Christian Grobmeier
grobme...@gmail.comwrote:

 I was there, it is pretty cool
 You can interview me on chat, if you need some info. I installed it
 for my struts-dev env

 Cheers

 On Thu, Dec 22, 2011 at 7:18 PM, Maurizio Cucchiara
 mcucchi...@apache.org wrote:
  Unfortunately I missed the webinar, is there an offline version?
 
  Twitter :http://www.twitter.com/m_cucchiara
  G+  :https://plus.google.com/107903711540963855921
  Linkedin:http://www.linkedin.com/in/mauriziocucchiara
 
  Maurizio Cucchiara
 
 
  On 22 December 2011 14:53, Bogomil Shopov shopov.bogo...@gmail.com
 wrote:
 
  On 22 December 2011 11:50, Anirudh Bhardwaj 
 anirudhbhardwa...@gmail.com
  wrote:
 
   Hi  Bobo,
  
 
  You are more than welcome :)
 
  //Bogo
 
  
   A great seminar
  
   Thank you  for informing us and providing a good opportunity
  
   Anirudh
  
   On Mon, Dec 19, 2011 at 10:01 PM, Bogomil Shopov
   shopov.bogo...@gmail.comwrote:
  
On 19 December 2011 17:22, Brian Thompson elephant...@gmail.com
  wrote:
   
 What time (GMT) on Wednesday?

   
Wed, Dec 21, 2011 5:00 PM - 6:00 PM GMT
   
//Bogo
   

 Brian



 On Mon, Dec 19, 2011 at 10:16 AM, Bogomil Shopov
 shopov.bogo...@gmail.comwrote:

  Hey guys,
  We will have free Struts 2 related webinar in Wednesday. I
 invite
  you
to
  join if you are interested in making your life fun with Struts 2
  and
  JRebel.
 
 
  I am looking forward to meet you there.
 
  https://www3.gotomeeting.com/register/751400870
 
  --
  Bogomil Bogo Shopov
 
  Internet enthusiast in motion
  http://about.me/bogo http://talkweb.eu
 
 
  #JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web
 Programmer
  and a Father. #Mozilla, #OpenData  #Foss Rebellion. #Bulgarian
   Living
in
  #Prague.
 

   
   
   
--
Bogomil Bogo Shopov
   
Internet enthusiast in motion
http://about.me/bogo http://talkweb.eu
   
   
#JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web
   Programmer
and a Father. #Mozilla, #OpenData  #Foss Rebellion. #Bulgarian
 Living
  in
#Prague.
   
  
  
  
   --
   Anirudh Bhardwaj
   9268307298
  
 
 
 
  --
  Bogomil Bogo Shopov
 
  Internet enthusiast in motion
  http://about.me/bogo http://talkweb.eu
 
 
  #JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web
 Programmer
  and a Father. #Mozilla, #OpenData  #Foss Rebellion. #Bulgarian Living
 in
  #Prague.
 



 --
 http://www.grobmeier.de
 https://www.timeandbill.de

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Struts 2 Webinar in Wednesday

2011-12-19 Thread Brian Thompson
What time (GMT) on Wednesday?

Brian



On Mon, Dec 19, 2011 at 10:16 AM, Bogomil Shopov
shopov.bogo...@gmail.comwrote:

 Hey guys,
 We will have free Struts 2 related webinar in Wednesday. I invite you to
 join if you are interested in making your life fun with Struts 2 and
 JRebel.


 I am looking forward to meet you there.

 https://www3.gotomeeting.com/register/751400870

 --
 Bogomil Bogo Shopov

 Internet enthusiast in motion
 http://about.me/bogo http://talkweb.eu


 #JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web Programmer
 and a Father. #Mozilla, #OpenData  #Foss Rebellion. #Bulgarian Living in
 #Prague.



Re: Pulling up data in a pop up window

2011-11-04 Thread Brian Thompson
First, I'd say this isn't really a Struts question.
Second, it looks like you're not submitting the data in the current page to
the page you're calling in window.open.
Third, ew.  Using a popup is usually a pretty user-hostile design choice
(people get confused about why the Back button is suddenly broken).

Brian



On Fri, Nov 4, 2011 at 4:37 AM, ANTARA PAUL CHOUDHURY (IT DEPT.) 
antara.choudh...@rosevalleyindia.com wrote:

 I am trying to pull up a new window by using window.open.I used the
 following function:


 function tosubmit(){

  if (document.forms[0].condition.checked == true){


  
 window.open(/RoseValley/newrenewalbusiness.do?print=Y,,toolbar=no,menubar=no,height=700,width=900,left=60,top=0,scrollbars=yes);
   document.forms[0].submit();

   }else{

document.forms[0].action = '/RoseValley/newrenewalbusiness.do?print=N';
  document.forms[0].submit();

   }
  return true;
  }




 It opens the page okay when I click on the button but I also want to pull
 up the data from the same action.Unfortunately it does not show the data in
 the pop up window.Please let me know what I am doing wrong.




 Thanking you in advance


 Regards


 Antara C


 This message and the information contained herein is proprietary and
 confidential and subject to theRose Valleyemail policy statement, You may
 review the policy athttps://www.rosevalleyindia.com/emailprivacy



Re: Pulling up data in a pop up window

2011-11-04 Thread Brian Thompson
4.  Antara, why did you forward your message to
struts-user-unsubscr...@jakarta.apache.org and
struts-user-h...@jakarta.apache.org??!?  That's a move that doesn't make
any sense.

Brian



On Fri, Nov 4, 2011 at 8:07 AM, Brian Thompson elephant...@gmail.comwrote:

 First, I'd say this isn't really a Struts question.
 Second, it looks like you're not submitting the data in the current page
 to the page you're calling in window.open.
 Third, ew.  Using a popup is usually a pretty user-hostile design choice
 (people get confused about why the Back button is suddenly broken).

 Brian




 On Fri, Nov 4, 2011 at 4:37 AM, ANTARA PAUL CHOUDHURY (IT DEPT.) 
 antara.choudh...@rosevalleyindia.com wrote:

 I am trying to pull up a new window by using window.open.I used the
 following function:


 function tosubmit(){

  if (document.forms[0].condition.checked == true){


  
 window.open(/RoseValley/newrenewalbusiness.do?print=Y,,toolbar=no,menubar=no,height=700,width=900,left=60,top=0,scrollbars=yes);
   document.forms[0].submit();

   }else{

document.forms[0].action = '/RoseValley/newrenewalbusiness.do?print=N';
  document.forms[0].submit();

   }
  return true;
  }




 It opens the page okay when I click on the button but I also want to pull
 up the data from the same action.Unfortunately it does not show the data in
 the pop up window.Please let me know what I am doing wrong.




 Thanking you in advance


 Regards


 Antara C


 This message and the information contained herein is proprietary and
 confidential and subject to theRose Valleyemail policy statement, You may
 review the policy athttps://www.rosevalleyindia.com/emailprivacy





Re: ajax validation with css_xhtml theme

2011-10-22 Thread Brian Thompson
Cat-keyboard?

Brian

On Sat, Oct 22, 2011 at 6:28 AM, serge nana nanata...@gmail.com wrote:

 sqtdqtqzstzatsarvqsqqNqYc@aRTqtxa1qq!qqAqqq1
 On Oct 18, 2011 3:44 AM, Johannes Geppert jo...@apache.org wrote:

  Is there any Error Message in the JavaScript Console?
 
  Johannes
 
  -
  web: http://www.jgeppert.com
  twitter: http://twitter.com/jogep
  --
  View this message in context:
 
 http://struts.1045723.n5.nabble.com/ajax-validation-with-css-xhtml-theme-tp4905398p4913082.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 



Re: can't download excel file correctly

2011-10-19 Thread Brian Thompson
If you rename actionClassName.zip to actionClassName.xls, can you open it in
Excel?

Where is the 'fileName' variable defined?

Brian



On Wed, Oct 19, 2011 at 4:17 AM, raygrrr rayg...@gmail.com wrote:

 Dear Experts,

 I have this action class to perform file downloading function, however, it
 doesn't export excel file correctly, it give me a 'actionClassName.zip'
 file
 instead of the excel file, but other format files like pdf file, jpg file
 and text file are fine though, can't figure it out why



 My action class code:
 public class DownloadDocumentAction extends Action {
private static Log log =
 LogFactory.getLog(DownloadDocumentAction.class);

public ActionForward execute(ActionMapping mapping,

  ActionForm form,

  HttpServletRequest request,

  HttpServletResponse response) {


try
{
String token = OpenkmUtils.getToken();
byte[] localFile = OpenkmUtils.getFile(token, okmPath);

ServletOutputStream out = response.getOutputStream();
InputStream in = new ByteArrayInputStream(localFile);

byte[] buffer = new byte[1024];

int length = -1;
while((length = in.read(buffer)) != -1) {
out.write(buffer, 0, length);
}

in.close();
out.flush();
out.close();
  }
  catch (java.io.IOException ex)
  {
 log.error(ex.getMessage());
  }


  response.setContentType(application/vnd.ms-excel);

 response.setHeader(Content-Disposition,attachment;filename=\ +
 fileName+\);

  return null;
}

 }

 --
 View this message in context:
 http://struts.1045723.n5.nabble.com/can-t-download-excel-file-correctly-tp4917014p4917014.html
 Sent from the Struts - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: displaytag CSV output throw Internet Explorer cannot display webpage Exception under IE9

2011-10-18 Thread Brian Thompson
How long is the URL, including all the parameters?  IE has a limit of 2083
characters.

On Tue, Oct 18, 2011 at 3:04 PM, Emi Lu em...@encs.concordia.ca wrote:

 Hello List,

 I know the question is not really related to struts, and I am asking just
 in case, people had similar problem and has the solution.

 I am using struts2 + displaytag.

 Under IE9, for CVS display output, when mouse over the link, it shows

 https://website?param1=1**param2=2paramN=Nhttps://website?param1=1param2=2paramN=N


 If there are lots of search parameters para1...  N, after clicking CSV
 output, IE will return Internet Explorer cannot display the webpage page.
 And the IE tab shows ieframe.dll!

 Does someone know how to fix this?

 Note:
 (1) firefox works fine
 (2) IE works fine when only param1... param5 , but IE does not accept too
 many parameters!!!

 Thanks a lot!
 Emi

 --**--**-
 To unsubscribe, e-mail: 
 user-unsubscribe@struts.**apache.orguser-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: To create new session without invalidating existing one

2011-09-29 Thread Brian Thompson
Well, first I'd suggest dropping the requirement for launching the new
browser window.  It's a pretty user-hostile way to program a site.  Hey,
why'd my Back button stop working?  Sigh, call IT again.

That said, you could try launching the popup window with a URL on a
different subdomain.  That should keep the sessions separate from each
other.

Failing that, you'll have to build in some logic to manage two sessions with
different keys for the session IDs.

Regardless, I don't think it's really a Struts-level issue.

Brian



On Thu, Sep 29, 2011 at 1:02 AM, Ganesh emailg...@yahoo.co.in wrote:

 Hello all,

 We have a requirement to launch a new browser window with new session but
 the exisiting session with parent browser should not be disturbed. We tried
 couple of methods the new session is created but the existing session is
 modified. Could some one throw me light on this.

 Regards
 Ganesh




Re: To create new session without invalidating existing one

2011-09-29 Thread Brian Thompson
On Thu, Sep 29, 2011 at 3:58 AM, Marcus Bond mar...@marcusbond.me.ukwrote:

 What is the reason for the new session? Doesn't sound a great plan.
 Anyway you're going to have a problem as this isn't how browsers expect to
 work, that said Chrome allows incognito browsing so that might work but it
 isn’t generally the expected behaviour.

 If the same application is being accessed from the same browser (Firefox,
 Chrome, IE etc.) once a session is created then that is the same session
 unless you destroy it. Your browser has a cookie with the jsessionid and
 that cookie is for the site from that browser across all windows not per
 browser window.
 Marcus.



I should probably note that my suggestion for managing two sessions is
really more like reimplement session functionality manually, so it's not a
very efficient course.

Brian


Re: Simplest way to implement lightbox or lightbox clone in struts2

2011-09-14 Thread Brian Thompson
Step 1:  Create your Struts2 page with whatever layout makes sense for your
application.
Step 2:  Insert lightbox javascript.

There isn't really anything Struts-specific to this type of task.

Brian



On Wed, Sep 14, 2011 at 4:32 PM, Rafael Barrera Oro boraf...@gmail.comwrote:

 Hello!

 I come to you today with a simple question, which is the simplest way to
 implement lightbox or similar funcionality in a struts2 page? (i am not
 asking for a full tutorial, just for basic directions)

 Thanks in advance!

 Rafael



Re: Return text to jsp, plus image and imageMap from a single Data query?

2011-09-05 Thread Brian Thompson
You can embed images directly in html using base-64 encoding.

Something like
img src=data:image/gif;base64s:property name='encodedImage' / / might
do the trick.

Brian



On Mon, Sep 5, 2011 at 7:02 AM, Aaron Brown aa...@thebrownproject.comwrote:

 The problem is really an html problem. You cannot embed an image in a web
 page, all you can do is embed a url reference to an image. The browser, if
 it is a graphical browser and not a text reader, will find that reference
 and execute another completely separate request for the image binary. This
 is the request that should trigger your binary stream, not the first
 request
 which only gets the base html for the page.

 Given this model, it doesn't make much sense to fetch the image from the db
 at the same time as the metadata you need to build the textual imagemap
 definition. You would either have to just throw away the binary data or
 else
 cache it in expectation of the second request. You've said the caching
 system doesn't work for you, so you're better off just fetching the binary
 image by itself, in its own dedicated action, when that seecond request
 comes in.

 - Aaron
  On Sep 5, 2011 6:10 AM, AndyLaw andy@roslin.ed.ac.uk wrote:
 
  On 3 Sep 2011, at 15:07, Dave Newton-6 [via Struts] wrote:
 
  Okay, so I guess my question is Why do you want to deliver the result
 in

  three separate parts? Without a clear understanding of what you're
 trying
  to do and why, it's difficult to answer in a helpful way.
 
 
  The results come back in a single hit which is defined in a JSP page. The
 JSP consists of a text table representation of the database results at the
 top of the page and a graphical clickable image of those results
 underneath.
 
  The struts1-based version of the code which I inherited has the action
 querying the database, drawing an image to a temporary file, which is then
 referenced from within the JSP. One of the problems that they had with the
 old version (which is being replaced for a huge number of reasons, not just
 this) was the management of temporary files broken down frequently
 resulting in file system chaos. I would rather avoid writing stuff to file
 that can be streamed and forgotten.
 
  I know how to get the stream returned and I can happily generate the
 image
 as a stream and return it. I don't have a clear picture in my head though
 about how to generate that image as a stream embedded within a JSP.
 
  My prototype has the jsp reference the graphic-drawing action as the
 source of an image. However, if I implement that, I'll need to extract the
 data into the action that presents the jsp text and generates the image and
 its source reference. I'll also need to extract the data into the action
 that generates the referenced image and still find a way to dump back the
 html imagemap coordinates and urls to make that image clickable.
 
  I'm clearly suffering a brain-fade here. Is the temporary file route the
 way to go or is there something smarter and more self managing that I can
 do?
 
  Later,
 
  Andy
  
  Yada, yada, yada...
 
  The University of Edinburgh is a charitable body, registered in Scotland,
 with registration number SC005336
  Disclaimer: This e-mail and any attachments are confidential and intended
 solely for the use of the recipient(s) to whom they are addressed. If you
 have received it in error, please destroy all copies and inform the sender.
 
 
 
 
 
  --
  The University of Edinburgh is a charitable body, registered in
  Scotland, with registration number SC005336.
 
 
 
  --
  View this message in context:

 http://struts.1045723.n5.nabble.com/Return-text-to-jsp-plus-image-and-imageMap-from-a-single-Data-query-tp4762757p4769657.html
  Sent from the Struts - User mailing list archive at Nabble.com.



Re: Struts Validator Framework: client-side validation problem

2011-09-02 Thread Brian Thompson
I'm not familiar with the html:form tag; does that auto-include the script
defining the validateForm() function?

If not, I'd suggest a missing script in the html as a likely culprit ...
at least, without any further info!

Brian



On Fri, Sep 2, 2011 at 5:47 AM, Dave Newton davelnew...@gmail.com wrote:

 What happens? What do you expect to happen? What's your validation config?
 We need something beyond it doesn't work.

 Dave
  On Sep 2, 2011 3:47 AM, RajasekharReddy pamired...@gmail.com wrote:
  I am trying to implement Client-Side Validations using struts 1.3
 
  But server Side validations are working properly, but Client-Side
  Validations are not working properly.
 
  My code is as follows
 
 
 
 
  %@ taglib prefix=html uri=/WEB-INF/struts-html.tld %
  %@ taglib prefix=bean uri=/WEB-INF/struts-bean.tld %
  lt;!DOCTYPE HTML PUBLIC quot;-//W3C//DTD HTML 4.01
  Transitional//ENquot;gt;
  html:html
  head
  meta http-equiv=Content-Type content=text/html; charset=UTF-8
  titleLoginPage/title
  /head
 
  body
  center
  html:javascript formName=loginForm/
 
  html:form action=/login.do onsubmit=return validateLoginForm(this)
  table
  trtdbean:message key=uname/ /td
  tdhtml:text property=uname//td
  tdhtml:errors property=uname/ /td/tr
 
  trtdbean:message key=upass/ /td
  tdhtml:password property=upass//td
  tdhtml:errors property=upass/ /td/tr
  /table
  html:submit value=Login /
  /html:form
  bremstrongClick here to nbsp; html:link
  href=SignUp.jspSignUp/html:link /strong/embr
  /center
  /body
  /html:html
 
 
  --
  View this message in context:

 http://struts.1045723.n5.nabble.com/Struts-Validator-Framework-client-side-validation-problem-with-submitting-buttons-tp3481073p4761399.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 



Re: [OT] JQuery or dojo?

2011-08-16 Thread Brian Thompson
I prefer jquery.  Even back in 2007, using dojo with Struts seemed clunky.

AFAIK the Struts dojo plugin is deprecated, but I'm sure Dave can tell you
more about that :)

Brian



On Tue, Aug 16, 2011 at 11:37 AM, Balwinder balwinder@gmail.com wrote:

 Hi All,

 Can any one suggest, for ajax which framework is better?

 Regards,
 Balwinder Kumar




Re: Doc for Struts2

2011-07-20 Thread Brian Thompson
Sometimes I think autocorrect is the best feature ever.

Autotypo, OTOH, is the work of the devil.

Brian



On Tue, Jul 19, 2011 at 11:23 PM, Dave Newton davelnew...@gmail.com wrote:

 Wiki outer blog?! Ah auto-complete, you complete me.

 I'll add something to the wiki or blog about it this weekend.

 Sheesh.

 Dave

 On Tuesday, July 19, 2011, Dave Newton davelnew...@gmail.com wrote:
  There's nothing about custom validators there, though, unless I missed
 it. The validation annotations page discusses it briefly, but I don't think
 it has a complete example either.
  If I have time I'll add something to the wiki outer blog about it this
 weekend.
  Dave
 
  On Jul 19, 2011 11:19 PM, Jeff Black jeffrey.bl...@yahoo.com wrote:
 Ankit -- In addition to the following documentation?
 
  http://struts.apache.org/2.2.3/docs/validation.html
 
  jb
  /
 
 
 
 
  
  From: Ankit Jain mr.ankitja...@gmail.com
  To: Struts Users Mailing List user@struts.apache.org
  Sent: Tue, July 19, 2011 7:27:44 AM
  Subject: Doc for Struts2
 
  Hi,
 
  If anybody can let me know some good user doc which tells how to add
  validations using validator framework in struts2.
 
  thanks
 
 
  Ankit
 
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Emails

2011-06-14 Thread Brian Thompson
I haven't received any Ghanna spam, but your email made me look in
my span folder this morning.  I discovered a newsletter being sent
there by mistake, so I was glad I went and looked.

In general, though, I haven't had any spam problems related
specifically to this mailing list.

-Brian


On Tue, Jun 14, 2011 at 10:26 AM, Saeed Najahi najah...@gmail.com wrote:
 Nope, not at all

 On Tue, Jun 14, 2011 at 2:48 PM, Eric Reed ere...@mail.nysed.gov wrote:

 After registering for this mailing list about a month ago I have been
 receiving spam emails from Ghanna every other day. Is anyone else receiving
 these?

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts2 and FTP (php) editors integration

2011-06-14 Thread Brian Thompson
You sure that isn't the File FTP Protocol? :P

Redundancy FTW!

-Brian


On Tue, Jun 14, 2011 at 11:01 AM, Dave Newton davelnew...@gmail.com wrote:
 On Tuesday, June 14, 2011, webmeiker wrote:
 Have somebody successfully integrated a Struts2 app with some (web)FTP
 editor (based in PHP) like ElFinder?

 I always get responses like ‘Invalid backend configuration’, ‘Invalid XML
 Response’ or things like that.

 S2 doesn't implement the FTP protocol out-of-the-box. How are you
 trying to do this?

 Dave

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts2 and FTP (php) editors integration

2011-06-14 Thread Brian Thompson
On Tue, Jun 14, 2011 at 2:44 PM, webmeiker i...@webmeiker.com wrote:
 Thank you Chris, thats the point... coexistence of Struts2  PHP inside same
 app.


Well...I suppose you could have a server configured to run both PHP
and Tomcat...but I'm pretty sure the Struts code and PHP file viewer
stuff would have to be at separate locations (e.g.
http://example.com/files/ vs. http://example.com/struts-code/).  I
don't know of a way to pack them both into the same URL.

Brian

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [OT] Re: Job postings

2011-05-26 Thread Brian Thompson
LOL ... I had a feeling that was going to happen as soon as I saw Patrick's
request!  It's like an extension of Murphy's Law...

-Brian



On Thu, May 26, 2011 at 9:13 AM, Wes Wannemacher w...@wantii.com wrote:

 damnit, sorry, I hit reply, but didn't pay attention to where it was going
 :(

 Sorry about that.

 -Wes

 On Thu, May 26, 2011 at 10:10 AM, Patrick Cosmo pco...@incognito.com
 wrote:

  Wes, why do I want to know this? Can't you email Robert directly:
  rtay...@dtgresults.com
 
 
  -Original Message-
  From: Wes Wannemacher [mailto:w...@wantii.com]
  Sent: Thursday, May 26, 2011 10:09 AM
  To: Struts Users Mailing List
  Subject: Re: [OT] Re: Job postings
 
  I'm not in the Atlanta, GA area, I am in Ohio, but I am willing to come
  down
  from time to time. I work as an independent contractor, hopefully that
  isn't
  a problem. If you are interested, let me know and I'll send my resume and
  rates. I will highlight this offer by mentioning that I am a PMC member
 of
  the Struts team. You can check that here -
 
  http://struts.apache.org/dev/volunteers.html
 
  http://struts.apache.org/dev/volunteers.html-Wes
 
  On Thu, May 26, 2011 at 10:01 AM, Robert Taylor
  rtay...@dtgresults.comwrote:
 
   Hello,
  
   Currently we are only considering candidates in the Atlanta, GA area.
   Telecommuting is an option; however, you will be required to be onsite
   at various times.
  
   Thanks,
  
   /robert
   - Original Message - From: Mohamed SIDI mhm.s...@gmail.com
  
   To: Struts Users Mailing List user@struts.apache.org
   Sent: Thursday, May 26, 2011 9:41 AM
  
   Subject: Re: [OT] Re: Job postings
  
  
Hello there,
  
   This may be one of the most important opportunity what about one witch
  is
   located in France ? there are some conditions to candidate :)
  
   2011/5/26 Robert Taylor rtay...@dtgresults.com
  
Hi Dale,
  
   We have a posting on the AJUG site.
   I've also been to the latest AJUG meetings.
   When I was there, 6 companies stood up and declared many openings
   for Java developers.
  
   Thanks for the advice.
  
   /robert
   - Original Message - From: Dale Newfield 
 d...@newfield.org
  
   To: Struts Users Mailing List user@struts.apache.org
   Sent: Thursday, May 26, 2011 9:06 AM
  
   Subject: [OT] Re: Job postings
  
  
On 5/26/11 7:51 AM, Martin Gainty wrote:
  
  
does'nt dale live down there?
  
  
   Thanks for thinking of me.  The reason I've been scarce around these
   parts
   lately is that I finally had to get a real job at the end of last
   year, so
   I no longer have as much time to respond to questions here, and I'm
  no
   longer in the market for a job.  I'm now working at Turner
   Entertainment,
   and we're also looking for senior level folks, but we've been having
   quite a
   difficult time finding well qualified candidates ourselves.  In
  Atlanta
   my
   first suggestion would be to post to the Atlanta Java Users' Group
  job
   mailing list, but seeing as we're still looking I'm not sure how
 much
   that
   advice is worth.
  
   -Dale
  
On Thu, May 26, 2011 at 4:50 PM, Robert
  Taylorrtay...@dtgresults.com
  
   wrote:
  
Greetings,
  
  
   I'm a Java team lead for a company in Atlanta Ga.
   My team has 2 positions open for senior level Java/Struts
  developers.
   I was wondering if its okay to post on this list regarding these
  open
   positions.
  
   /robert
  
  
  
  -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
   -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
  
   --
  
  
   Cordialement
  
   Mohamed
  
  
  
   -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
 
 
  --
  Wes Wannemacher
 
  Head Engineer, WanTii, Inc.
  Need Training? Struts, Spring, Maven, Tomcat...
  Ask me for a quote!
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 


 --
 Wes Wannemacher

 Head Engineer, WanTii, Inc.
 Need Training? Struts, Spring, Maven, Tomcat...
 Ask me for a quote!



Re: rafael_muneton

2011-05-20 Thread Brian Thompson
More like spamvirus/hack victim, I think.



On Fri, May 20, 2011 at 6:57 PM, Saeed Najahi najah...@gmail.com wrote:

 moron...

 On Fri, May 20, 2011 at 7:58 PM, Rafael Muneton
 rafael_mune...@hotmail.comwrote:

 




 --

 
 `*The early bird catches the worm, but the second mouse gets the cheese..*`

 *NAJAHI Saïd* (* KyouJin-SaMa* )
 4ème année G.Info E.N.S.A.Safi

 -



Re: form action is not calling while click on submit button: Struts2.0

2011-04-13 Thread Brian Thompson
 which is why plain-text emails are better.

Fixed that for you ;)

-Brian



On Wed, Apr 13, 2011 at 9:45 AM, Dave Newton davelnew...@gmail.com wrote:

 Probably that whole tags-being-interpreted-as-tags this in HTML
 emails, which is why plain-text emails are better for lists.

 Dave

 On Wed, Apr 13, 2011 at 10:15 AM, Biesbrock, Kevin
 biesbrock.ke...@aoins.com wrote:
  That's strange.  Why doesn't the code come through in the email but it
  shows up on the nabble site?
 
 
  Beez
 
  -Original Message-
  From: arun [mailto:arunnh...@gmail.com]
  Sent: Wednesday, April 13, 2011 12:45 AM
  To: user@struts.apache.org
  Subject: Re: form action is not calling while click on submit button:
  Struts2.0
 
  hi Dave,
 
  Here is the code :
 
 
 
 
 
 
 
 
  --
  View this message in context:
  http://struts.1045723.n5.nabble.com/form-action-is-not-calling-while-cli
  ck-on-submit-button-Struts2-0-tp4292686p4299769.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Accessing session objects other than action in Struts 1.x

2011-04-07 Thread Brian Thompson
On Thu, Apr 7, 2011 at 7:05 AM, Dave Newton davelnew...@gmail.com wrote:

 On Apr 7, 2011 5:48 AM, Ganesh wrote:
  I am using Struts 1.0.2.

 Good lord why?


Legacy code, I'll wager.  If he were building something brand-new, it would
be a no-brainer to use Struts 2.

-Brian


Re: [maybe OT] Detecting if a new window or tab was opened (server-side)

2011-03-17 Thread Brian Thompson
CTRL-click?
Shift-click?
Configure the browser to open all links in new tabs?  I'm pretty sure you
can do that in Firefox.

And please don't suggest blocking mouse events.  I like to use those
features, and I really hate it when sites try to hijack my browser that
way.  It's one of the more user-hostile things you can do.


On Thu, Mar 17, 2011 at 1:51 AM, Maurizio Cucchiara 
maurizio.cucchi...@gmail.com wrote:

 Why would you track a window open event?
 I don't know what exactly your requirements are but I think it should be
 quite simple to /intercept/block/change every mouse click event which is
 not  the left click event through javascript.

 Maurizio Cucchiara

 Il giorno 16/mar/2011 22.26, Wes Wannemacher w...@wantii.com ha
 scritto:
 Does anyone know of a good trick to detect whether a new window or tab
 was opened by the user...

 Here is the scenario, a user is looking at a view and he/she
 right-clicks one of the links and chooses to open the link in a new
 tab or window. The original view and the new tab or window will share
 the session, but I'd like to know that there are two windows (or tabs)
 interacting with the site.

 I thought about trying to track the referrers as requests come in, but
 I get stumped when I realize that a user can re-visit a page.

 There are some javascript mechanisms, but by the time I can detect
 from javascript that a window is new, the response is already being
 rendered (committed).

 Here is one link I found, but the code is poorly formatted making the
 example difficult to follow -

 https://sites.google.com/site/sarittechworld/track-client-windows

 -Wes

 --
 Wes Wannemacher

 Head Engineer, WanTii, Inc.
 Need Training? Struts, Spring, Maven, Tomcat...
 Ask me for a quote!

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



Re: loading Dropdown dynamically from database

2011-03-15 Thread Brian Thompson
Try making the following changes to your Java code -- the output should give
you some clues about what's going wrong.

-Brian

On Sun, Mar 13, 2011 at 11:52 PM, JavaNoobie87 vivek...@enzentech.comwrote:

 Hi All,
 Im developing a Crud example using Struts 2 where im in the need to load
 values for a dropdown box dynamically from a database . However im just
 getting a empty dropdown now .
 The JSP code snippet is as below.
DomainType



 The action class and DAO for the same function are as below.

 Action.
 public String loadDomainType(){
// Class used to get the domaintype from domaintype table
System.out.println(my logging statement);
String result=SUCCESS;
try {
System.out.println(Inside loaddomaintype);
List loadDomainType = DomainDAO.loadDomainType();
dtList=loadDomainType;

System.out.println(dtList length:  + dtList.length);

} catch (Exception e) {
// TODO Auto-generated catch block;
result=ERROR;
e.printStackTrace();
}

 DAO Class--
 public static List loadDomainType() throws Exception {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
System.out.println(loadDomaintype DAO);
DomainBean bean = new DomainBean();
ArrayList dtList = new ArrayList();

try {
con= DBConnector.getConnection();
if (con != null){
System.out.println(Connected);
String query=  SELECT
 CODE,DESCRIPTION,OBJECTID FROM DOMAINTYPE  ;
stmt = con.prepareStatement(query);
rs = stmt.executeQuery();
System.out.println(inside loadDomainType);
while (rs.next()){

bean = new DomainBean();

bean.setCode(rs.getString(CODE));

  bean.setDescription(rs.getString(DESCRIPTION));

  bean.setObjid(rs.getInt(OBJECTID));
dtList.add(bean);

System.out.println(Adding bean to list:  + bean.getDescription());



}

}
} catch (SQLException sqe) {
sqe.printStackTrace();

} finally {
DBConnector.closeResultSet(rs);
DBConnector.closeStatement(stmt);
DBConnector.closeConnection(con);
}

return dtList;
}


 --
 View this message in context:
 http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555884p3555884.html
 Sent from the Struts - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: loading Dropdown dynamically from database

2011-03-15 Thread Brian Thompson
Oh, nevermind -- I replied before I saw that you'd solved that part of it :/

-Brian

On Tue, Mar 15, 2011 at 2:40 AM, JavaNoobie87 vivek...@enzentech.comwrote:

 Following changes? I didnt get what you meant. i dont see any code :S

 --
 View this message in context:
 http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3683230.html
 Sent from the Struts - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: [OT] Re: Just a stab in the dark

2011-03-14 Thread Brian Thompson
On Mon, Mar 14, 2011 at 7:29 AM, Dave Newton davelnew...@gmail.com wrote:

 On Mon, Mar 14, 2011 at 8:07 AM, Adam Hardy wrote:
  But for the future I am writing an app where the user can upload a file
 of
  data and specify the input using that printf/scanf pattern description,
 and
  output the same data into new file with a new format according to a
 secocnd
  pattern. It's OHLC historical data from the financial markets, and it
 must
  be in the correct format for importing into various different analysis
  programs.

 DSL. In fact a guy at the Clojure NYC meetup did this exact thing (for
 financial data, in clojure) to generate all the Java APIs needed to
 consume/write the data files.



For the sake of us poor, clueless lurkers, would you mind defining DSL in
this context?  All I can think of is DSL as in Internet service, but I can
tell from context that it's not the right definition.

Brian




 Groovy or JRuby might be a better choice depending on how averse you
 are to toenail-based languages, but this is precisely the kind of
 thing DSLs are good for, and it's a lot easier to remember a
 human-readable DSL than the scanf spec, and it'd be easier to add
 domain-specific data types.

 Dave




Re: JSON Plugin - my execute method is being called twice

2011-03-14 Thread Brian Thompson
On Mon, Mar 14, 2011 at 8:03 PM, Dave Newton davelnew...@gmail.com wrote:

 On Mon, Mar 14, 2011 at 8:36 PM, Muneer Malik tutti...@gmail.com wrote:
  Can someone help here? using the JSON plugin - my execute method is being
  called twice.

 So far, it sounds like it's being called twice for some reason.

 Any other information available?

 Dave



Probably, but I'd almost be willing to put money on it being PRIVILEGED,
CONFIDENTIAL AND EXEMPT FROM DISCLOSURE :P

Brian


Re: Struts 2.0.11.1 question

2011-03-08 Thread Brian Thompson
You can definitely write an Action to return a JSON string -- just set the
content-type of the response appropriately and instead of writing HTML to
the response, write your JSON string.

If you're comfortable with JSON and Javascript in general, it should be
easy.

-Brian


On Tue, Mar 8, 2011 at 5:23 PM, Harsh C hchau...@gmail.com wrote:

 Hi,

 I don't know if this is the right list for a question regarding 2.0.11.1,
 if
 not please let me know the right forum.

 I am trying to use Struts 2.0.11.1 to work on an AJAX-ified app using Dojo.
 Problem is, struts-json plugin is not blessed.

 Is there a way in which I can code an Action which returns a JSON string
 without using the JSON plugin?

 --
 *Thanks,
 Harsh*



Re: Forum Advice

2011-02-24 Thread Brian Thompson
You'll probably have to build it from scratch.  This Stackoverflow post [1]
might be of some help, but it's a bit more general than what you're looking
for (focused on Java rather than Struts-based forums).

-Brian

[1] -
http://stackoverflow.com/questions/235729/whats-the-best-java-based-forum-software



On Thu, Feb 24, 2011 at 8:57 PM, Jerson John jer...@cprvision.com wrote:

 Hi,
How can i do forum in Struts 2...Is it has to custom build or is there
 any api or opensource application or thirdpart thing...Beacuse now I am
 heading towards building the forum for my applicationPlease help me

 Many Thanks and Regards,

 Jerson




Re: sending the report directly to the printer

2011-02-22 Thread Brian Thompson
Could you post your code for your report?

-Brian



On Tue, Feb 22, 2011 at 5:15 AM, @rju nagarjunabatt...@gmail.com wrote:


 sir
  u said Can't you just put it in your jsp for the report action?
 please elaborate this sir. i am not getting your point.
 please sir


 Brian Thompson-5 wrote:
 
  Can't you just put it in your jsp for the report action?
 
  -Brian
 
  On Mon, Feb 21, 2011 at 2:24 AM, @rju nagarjunabatt...@gmail.com
 wrote:
 
 
  here urlx is nothing but an action
  in that action i have a code as follows
   action
 name=myaction
 method=getItemsNotInPackageReport
 
  class=com.ae.school.web.action.sales.reports.ItemsNotInPackageAction
 
 result name=myaction type=jasper
 /jasper/sales/ItemsNotInPackageReport.jasper
 itemNameList
 PDF
 /result
 /action
 
  so now what to do? how should i include that window.print()..
  please tell me sir
 
 
  Brian Thompson-5 wrote:
  
   Try putting the window.print() in the code for the page at urlx.
  
   -Brian
  
  
   On Sun, Feb 20, 2011 at 11:39 PM, @rju nagarjunabatt...@gmail.com
  wrote:
  
  
   exactly i did
   but the problem here is.. see my code
  
   var urlx=myaction.action;
   var x= window.open(urlx);
   x.window.print();
  
   here it is invoking printer
   but empty page is printing because the action is taking time to load.
   thats y am getting empty page so any alternative?
  
  
   Brian Thompson-5 wrote:
   
Then no, there's no way to do this.
   
What you *can* do is:
   
User clicks HTML button -- Struts action/Jasper report displays
 --
   some
javascript on the report calls window.print(); -- user clicks OK
  on
   the
Print dialog.
   
-Brian
   
   
   
On Sun, Feb 20, 2011 at 10:27 PM, @rju nagarjunabatt...@gmail.com
 
   wrote:
   
   
yes user is clicking html/jsp button only
   
Brian Thompson-5 wrote:

 Where is the user clicking ok?  Do you mean an HTML button?
  Or
   the
 browser's print dialog box?

 At the very least, the user will see the print dialog...there's
  no
   way
 around that for a web page (which, ultimately, is what Struts is
sending
 to
 the user).

 -Brian



 On Sun, Feb 20, 2011 at 9:46 PM, @rju
  nagarjunabatt...@gmail.com
wrote:


 no sir.
 no. user interaction means he will press ok button.
 there no user interaction means after clicking ok, some
 guys
 suggested
 me that use onLoad () then write one listener for print. so
 here
  no
user
 interaction means after pressing ok button.

 user will interact only by pressing ok button. after that ok
  button
will
 call the struts action.
 so here now without any user interaction i need the print out
  after
 calling
 action unlike a report pdf.
 hope u got my point


 Dave Newton-6 wrote:
 
  I have no idea. Personally, I'd be a little surprised if it
  was
  possible to print from a website with *no* user interaction
   without
  using something like ActiveX, an applet, or *something*.
 
  Dave
 
  On Sun, Feb 20, 2011 at 11:06 AM, @rju
   nagarjunabatt...@gmail.com
   
 wrote:
 
  sir please help me
  i ve already told my requirement as follows
  am using struts2-jasper plugin am calling my action through
   jquery.
  nw i need to print the report directly from printer when i
 ve
pressed
 ok
  button.
  ok button will call the action.
  please help me ragarding this.Its very urgent for me and it
  is
   the
 main
  requirement for this project...
 
 
 
  Dave Newton-6 wrote:
 
  He's saying Hit Ctrl-P from inside a PDF reader.
 
  On Wednesday, February 16, 2011, @rju 
   nagarjunabatt...@gmail.com
  wrote:
 
  if dont mind can you tell in detailed manner
  --
  View this message in context:
 

   
  
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30946620.html
  Sent from the Struts - User mailing list archive at
   Nabble.com.
 
 
 

   -
  To unsubscribe, e-mail:
 user-unsubscr...@struts.apache.org
  For additional commands, e-mail:
  user-h...@struts.apache.org
 
 
 
 
   
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail:
 user-h...@struts.apache.org
 
 
 
 
  --
  View this message in context:
 

   
  
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30971331.html
  Sent from the Struts - User mailing list archive at
  Nabble.com

Re: sending the report directly to the printer

2011-02-22 Thread Brian Thompson
On Tue, Feb 22, 2011 at 10:31 AM, Dave Newton davelnew...@gmail.com wrote:

 On Tue, Feb 22, 2011 at 11:29 AM, Brian Thompson wrote:
  Could you post your code for your report?

 Why? This isn't an issue with the report itself, is it?

 Dave



I hope not -- I have no experience with Jasper reports.  OTOH, he's confused
when I say put it in the jsp, so seeing his code might help me explain it
better (or, if his action doesn't use jsps at all, it'll let me know that
it just doesn't work that way).

-Brian


Re: Session for User Class

2011-02-22 Thread Brian Thompson
Normally I use Spring Security for handling authentication.  However, that's
a fair bit of trouble to configure if your needs differ from the default
config.

For a roll your own approach, I'd put the user object into the session
context.

-Brian


On Tue, Feb 22, 2011 at 11:43 PM, Jerson John jer...@cprvision.com wrote:

 Hi,
   Can anyone suggest me a best practice for me to save the user object once
 user logined into my portal application...It seems that I am saving it in
 the actioncontext but not accessable to the other action classes...Pls help
 me

 Many Thanks and Regards,

 Jerson






Re: sending the report directly to the printer

2011-02-21 Thread Brian Thompson
Can't you just put it in your jsp for the report action?

-Brian

On Mon, Feb 21, 2011 at 2:24 AM, @rju nagarjunabatt...@gmail.com wrote:


 here urlx is nothing but an action
 in that action i have a code as follows
  action
name=myaction
method=getItemsNotInPackageReport

 class=com.ae.school.web.action.sales.reports.ItemsNotInPackageAction

result name=myaction type=jasper
/jasper/sales/ItemsNotInPackageReport.jasper
itemNameList
PDF
/result
/action

 so now what to do? how should i include that window.print()..
 please tell me sir


 Brian Thompson-5 wrote:
 
  Try putting the window.print() in the code for the page at urlx.
 
  -Brian
 
 
  On Sun, Feb 20, 2011 at 11:39 PM, @rju nagarjunabatt...@gmail.com
 wrote:
 
 
  exactly i did
  but the problem here is.. see my code
 
  var urlx=myaction.action;
  var x= window.open(urlx);
  x.window.print();
 
  here it is invoking printer
  but empty page is printing because the action is taking time to load.
  thats y am getting empty page so any alternative?
 
 
  Brian Thompson-5 wrote:
  
   Then no, there's no way to do this.
  
   What you *can* do is:
  
   User clicks HTML button -- Struts action/Jasper report displays --
  some
   javascript on the report calls window.print(); -- user clicks OK on
  the
   Print dialog.
  
   -Brian
  
  
  
   On Sun, Feb 20, 2011 at 10:27 PM, @rju nagarjunabatt...@gmail.com
  wrote:
  
  
   yes user is clicking html/jsp button only
  
   Brian Thompson-5 wrote:
   
Where is the user clicking ok?  Do you mean an HTML button?  Or
  the
browser's print dialog box?
   
At the very least, the user will see the print dialog...there's no
  way
around that for a web page (which, ultimately, is what Struts is
   sending
to
the user).
   
-Brian
   
   
   
On Sun, Feb 20, 2011 at 9:46 PM, @rju nagarjunabatt...@gmail.com
   wrote:
   
   
no sir.
no. user interaction means he will press ok button.
there no user interaction means after clicking ok, some guys
suggested
me that use onLoad () then write one listener for print. so here
 no
   user
interaction means after pressing ok button.
   
user will interact only by pressing ok button. after that ok
 button
   will
call the struts action.
so here now without any user interaction i need the print out
 after
calling
action unlike a report pdf.
hope u got my point
   
   
Dave Newton-6 wrote:

 I have no idea. Personally, I'd be a little surprised if it was
 possible to print from a website with *no* user interaction
  without
 using something like ActiveX, an applet, or *something*.

 Dave

 On Sun, Feb 20, 2011 at 11:06 AM, @rju
  nagarjunabatt...@gmail.com
  
wrote:

 sir please help me
 i ve already told my requirement as follows
 am using struts2-jasper plugin am calling my action through
  jquery.
 nw i need to print the report directly from printer when i ve
   pressed
ok
 button.
 ok button will call the action.
 please help me ragarding this.Its very urgent for me and it is
  the
main
 requirement for this project...



 Dave Newton-6 wrote:

 He's saying Hit Ctrl-P from inside a PDF reader.

 On Wednesday, February 16, 2011, @rju 
  nagarjunabatt...@gmail.com
 wrote:

 if dont mind can you tell in detailed manner
 --
 View this message in context:

   
  
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30946620.html
 Sent from the Struts - User mailing list archive at
  Nabble.com.



   
  -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




   -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




 --
 View this message in context:

   
  
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30971331.html
 Sent from the Struts - User mailing list archive at Nabble.com.



   -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




   -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



   
--
View this message in context:
   
  
 
 http://old.nabble.com/Integrate

Re: sending the report directly to the printer

2011-02-20 Thread Brian Thompson
On Sun, Feb 20, 2011 at 10:18 AM, Dave Newton davelnew...@gmail.com wrote:

 I have no idea. Personally, I'd be a little surprised if it was
 possible to print from a website with *no* user interaction without
 using something like ActiveX, an applet, or *something*.

 Dave



Indeed.  Browsers restrict such functionality for very good reasons.  If a
report needs to be run and then sent directly to the printer, writing a web
app is kind of using the wrong tool for the job, IMO.

-Brian


Re: sending the report directly to the printer

2011-02-20 Thread Brian Thompson
Where is the user clicking ok?  Do you mean an HTML button?  Or the
browser's print dialog box?

At the very least, the user will see the print dialog...there's no way
around that for a web page (which, ultimately, is what Struts is sending to
the user).

-Brian



On Sun, Feb 20, 2011 at 9:46 PM, @rju nagarjunabatt...@gmail.com wrote:


 no sir.
 no. user interaction means he will press ok button.
 there no user interaction means after clicking ok, some guys suggested
 me that use onLoad () then write one listener for print. so here no user
 interaction means after pressing ok button.

 user will interact only by pressing ok button. after that ok button will
 call the struts action.
 so here now without any user interaction i need the print out after calling
 action unlike a report pdf.
 hope u got my point


 Dave Newton-6 wrote:
 
  I have no idea. Personally, I'd be a little surprised if it was
  possible to print from a website with *no* user interaction without
  using something like ActiveX, an applet, or *something*.
 
  Dave
 
  On Sun, Feb 20, 2011 at 11:06 AM, @rju nagarjunabatt...@gmail.com
 wrote:
 
  sir please help me
  i ve already told my requirement as follows
  am using struts2-jasper plugin am calling my action through jquery.
  nw i need to print the report directly from printer when i ve pressed ok
  button.
  ok button will call the action.
  please help me ragarding this.Its very urgent for me and it is the main
  requirement for this project...
 
 
 
  Dave Newton-6 wrote:
 
  He's saying Hit Ctrl-P from inside a PDF reader.
 
  On Wednesday, February 16, 2011, @rju nagarjunabatt...@gmail.com
  wrote:
 
  if dont mind can you tell in detailed manner
  --
  View this message in context:
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30946620.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 
  --
  View this message in context:
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30971331.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30974347.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: sending the report directly to the printer

2011-02-20 Thread Brian Thompson
Then no, there's no way to do this.

What you *can* do is:

User clicks HTML button -- Struts action/Jasper report displays -- some
javascript on the report calls window.print(); -- user clicks OK on the
Print dialog.

-Brian



On Sun, Feb 20, 2011 at 10:27 PM, @rju nagarjunabatt...@gmail.com wrote:


 yes user is clicking html/jsp button only

 Brian Thompson-5 wrote:
 
  Where is the user clicking ok?  Do you mean an HTML button?  Or the
  browser's print dialog box?
 
  At the very least, the user will see the print dialog...there's no way
  around that for a web page (which, ultimately, is what Struts is sending
  to
  the user).
 
  -Brian
 
 
 
  On Sun, Feb 20, 2011 at 9:46 PM, @rju nagarjunabatt...@gmail.com
 wrote:
 
 
  no sir.
  no. user interaction means he will press ok button.
  there no user interaction means after clicking ok, some guys
  suggested
  me that use onLoad () then write one listener for print. so here no user
  interaction means after pressing ok button.
 
  user will interact only by pressing ok button. after that ok button will
  call the struts action.
  so here now without any user interaction i need the print out after
  calling
  action unlike a report pdf.
  hope u got my point
 
 
  Dave Newton-6 wrote:
  
   I have no idea. Personally, I'd be a little surprised if it was
   possible to print from a website with *no* user interaction without
   using something like ActiveX, an applet, or *something*.
  
   Dave
  
   On Sun, Feb 20, 2011 at 11:06 AM, @rju nagarjunabatt...@gmail.com
  wrote:
  
   sir please help me
   i ve already told my requirement as follows
   am using struts2-jasper plugin am calling my action through jquery.
   nw i need to print the report directly from printer when i ve pressed
  ok
   button.
   ok button will call the action.
   please help me ragarding this.Its very urgent for me and it is the
  main
   requirement for this project...
  
  
  
   Dave Newton-6 wrote:
  
   He's saying Hit Ctrl-P from inside a PDF reader.
  
   On Wednesday, February 16, 2011, @rju nagarjunabatt...@gmail.com
   wrote:
  
   if dont mind can you tell in detailed manner
   --
   View this message in context:
  
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30946620.html
   Sent from the Struts - User mailing list archive at Nabble.com.
  
  
  
  -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
  
 -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
  
   --
   View this message in context:
  
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30971331.html
   Sent from the Struts - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
   -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30974347.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30974450.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: sending the report directly to the printer

2011-02-20 Thread Brian Thompson
Try putting the window.print() in the code for the page at urlx.

-Brian


On Sun, Feb 20, 2011 at 11:39 PM, @rju nagarjunabatt...@gmail.com wrote:


 exactly i did
 but the problem here is.. see my code

 var urlx=myaction.action;
 var x= window.open(urlx);
 x.window.print();

 here it is invoking printer
 but empty page is printing because the action is taking time to load.
 thats y am getting empty page so any alternative?


 Brian Thompson-5 wrote:
 
  Then no, there's no way to do this.
 
  What you *can* do is:
 
  User clicks HTML button -- Struts action/Jasper report displays -- some
  javascript on the report calls window.print(); -- user clicks OK on
 the
  Print dialog.
 
  -Brian
 
 
 
  On Sun, Feb 20, 2011 at 10:27 PM, @rju nagarjunabatt...@gmail.com
 wrote:
 
 
  yes user is clicking html/jsp button only
 
  Brian Thompson-5 wrote:
  
   Where is the user clicking ok?  Do you mean an HTML button?  Or the
   browser's print dialog box?
  
   At the very least, the user will see the print dialog...there's no way
   around that for a web page (which, ultimately, is what Struts is
  sending
   to
   the user).
  
   -Brian
  
  
  
   On Sun, Feb 20, 2011 at 9:46 PM, @rju nagarjunabatt...@gmail.com
  wrote:
  
  
   no sir.
   no. user interaction means he will press ok button.
   there no user interaction means after clicking ok, some guys
   suggested
   me that use onLoad () then write one listener for print. so here no
  user
   interaction means after pressing ok button.
  
   user will interact only by pressing ok button. after that ok button
  will
   call the struts action.
   so here now without any user interaction i need the print out after
   calling
   action unlike a report pdf.
   hope u got my point
  
  
   Dave Newton-6 wrote:
   
I have no idea. Personally, I'd be a little surprised if it was
possible to print from a website with *no* user interaction without
using something like ActiveX, an applet, or *something*.
   
Dave
   
On Sun, Feb 20, 2011 at 11:06 AM, @rju nagarjunabatt...@gmail.com
 
   wrote:
   
sir please help me
i ve already told my requirement as follows
am using struts2-jasper plugin am calling my action through
 jquery.
nw i need to print the report directly from printer when i ve
  pressed
   ok
button.
ok button will call the action.
please help me ragarding this.Its very urgent for me and it is the
   main
requirement for this project...
   
   
   
Dave Newton-6 wrote:
   
He's saying Hit Ctrl-P from inside a PDF reader.
   
On Wednesday, February 16, 2011, @rju 
 nagarjunabatt...@gmail.com
wrote:
   
if dont mind can you tell in detailed manner
--
View this message in context:
   
  
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30946620.html
Sent from the Struts - User mailing list archive at Nabble.com.
   
   
   
   -
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
   
   
   
   
  -
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
   
   
   
   
--
View this message in context:
   
  
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30971331.html
Sent from the Struts - User mailing list archive at Nabble.com.
   
   
   
  -
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
   
   
   
   
  -
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
   
   
   
  
   --
   View this message in context:
  
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30974347.html
   Sent from the Struts - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30974450.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Integrate-JasperReports-into-a-Struts2

Re: requests die with a stack overflow

2011-02-17 Thread Brian Thompson
Looks to me like it's getting into an infinite loop somewhere.  I did notice
that the same 18 lines were repeating for about half the file.

-Brian




On Thu, Feb 17, 2011 at 10:21 AM, Denis Laroche dlaroc...@gmail.com wrote:

 Hello all,

 I also posted this message to the Tomcat mailing list, because I'm not sure
 where the problem is. The version of Struts is 1.3.10. The version of Tomcat
 is 6.0.29, and the JVM is 1.6.0_17-b17 running on a Linux server, kernel
 version 2.6.18.

 Once in a while, the application starts behaving erratically with huge
 stack traces generated in the log file of the application. When the
 application starts behaving this way, all requests fail and they all
 generate those huge stack traces. The log file reaches 1 gigabyte in no
 time.

 I've attached one of those stack traces which I compressed with gzip. The
 trace is 3756 lines long!

 Any help would be greatly appreciated.

 --
 D. Laroche
 Pratt  Whitney Canada




 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



Re: Restrict direct access to static content

2011-02-16 Thread Brian Thompson
On Wed, Feb 16, 2011 at 11:34 AM, Dave Newton davelnew...@gmail.com wrote:

 2011/2/16 Luis Eric López Fernández wrote:
  I am thinking to do something that will completely destroy the purpose of
  struts hehe.. I will add a servlet to handle all the requests different
 than
  .action and there I will redirect to an error page.  =S

 How will you request them from within the JSP?



About the only way I see to accomplish this requirement is to check on
HTTP_REFERER somehow ... but that's hardly reliable.

Really, this seems a lot like a requirement that leads to ... mean people
writing javascript to replace the context menu with Copyright Crazy-People
alerts.

-Brian


Re: SAMRALA?

2011-01-27 Thread Brian Thompson
TBF, if he's not actually asking about Indian geography, Google won't help
him much.

-Brian



On Thu, Jan 27, 2011 at 9:39 AM, Antonio Petrelli 
antonio.petre...@gmail.com wrote:

 2011/1/27 Martin Gainty mgai...@hotmail.com:
 
  Good Morning Fellow Struts Geeks
 
  Anyone come across the term SAMRALA???

 A bot deserves a very bot answer:
 http://lmgtfy.com/?q=samrala

 Antonio



Re: Action Struts2

2011-01-12 Thread Brian Thompson
That's never a good sign.

-Brian



On Wed, Jan 12, 2011 at 10:03 AM, Dave Newton davelnew...@gmail.com wrote:

 We've been butt-posted?!

 :D

 On Wed, Jan 12, 2011 at 11:00 AM, JOSE L MARTINEZ-AVIAL jlm...@gmail.com
 wrote:

  Sorry about the repetition of mails. I forgot to close my BlackBerry, and
  put it into my pocket...
 
  Jose
 
  2011/1/12 jlm...@gmail.com
 
   Yy
   --Mensaje original--
   De: Robert Graf-Waczenski
   Para: Struts Users Mailing List
   Responder a: Struts Users Mailing List
   Asunto: Re: Action Struts2
   Enviado: 12 Ene, 2011 08:19
  
   Am 12.01.2011 14:02, schrieb Mohamed SIDI:
Hello,
   
I woud like to know if the Struts actions are singleton based or not,
   some
links treating this topic are pleased
   
Thanks
   
  
  
   Struts2 actions are far away from being singletons. Quite the contrary:
   Instances of action classes are created (IIRC) freshly for each
 request.
   This is an important difference to Struts1, were one action instance
 was
   created, buffered and reused to serve various requests.
  
   Robert
  
  
   -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
   Sent via BlackBerry from T-Mobile
  
 



Re: Struts 2 - multi select

2011-01-06 Thread Brian Thompson
Stefan,

Can you filter the list somehow?  Say, if the list entries fall into
categories, have the user select a category first.  Something like that
would probably help.

-Brian





On Thu, Jan 6, 2011 at 6:36 AM, Dave Newton davelnew...@gmail.com wrote:

 It's all html; if one of the S2 tags doesnt do what you want, your options
 are the same as any other web app.

 Dave
  On Jan 6, 2011 3:42 AM, Stefaan Somers stefaan.som...@gmail.com
 wrote:
  I want to have a select-list where I can choose multiple values. If I use
  checkboxes, the pages becomes too big because the list contains about
 2000
  entries. The best thing is something describe like on this web-site :
  http://www.preeostudios.com/jqueryplugins/listselect
 
  What are the core solutions/alternatives within Struts2 itself



Re: Multiple Submit Buttons problem in Struts2

2011-01-03 Thread Brian Thompson
Pardon my ignorance, but what is a CLA?  I haven't heard of it before this.

Brian

Sent via my Droid, Eka.
On Jan 3, 2011 10:42 AM, Dave Newton davelnew...@gmail.com wrote:
 I kind of thought the ability to submit to specific action methods was
 well-known, but perhaps you're correct, as this thread indicates (to my
 chagrin).

 There are a number of things in the wiki that need updating; I'll probably
 start compiling a list from previous threads and open JIRA issues. The
cool
 thing is that anybody with a CLA on file can help. (The uncool thing is
that
 we get that kind of help more rarely than might be optimal.)

 Dave

 On Mon, Jan 3, 2011 at 11:33 AM, Biesbrock, Kevin 
biesbrock.ke...@aoins.com
 wrote:

 Should this be included in documentation as a more complex example of
 Struts2? Maybe an example action as well? Just a thought.


 -Beez

 -Original Message-
 From: stanl...@gmail.com [mailto:stanl...@gmail.com]
 Sent: Sunday, January 02, 2011 5:20 PM
 To: Struts Users Mailing List
 Subject: Re: Multiple Submit Buttons problem in Struts2

 How about something like this?

 s:form namespace=/customer 
 s:hidden key=domain.id /
 s:textfield key=domain.firstName /
 s:textfield key=domain.lastName /
 s:textfield key=domain.address1 /
 s:textfield key=domain.address2 /
 s:textfield key=domain.city /
 s:textfield key=domain.state /
 s:textfield key=domain.zip /


 s:submit action=customer_cancel value=Cancel/ s:submit
 action=customer_save value=Save/ s:submit action=customer_print
 value=Print/ /s:if /s:form

 Scott

 On Sat, Jan 1, 2011 at 8:53 AM, aum strut aum.str...@gmail.com wrote:

  Hi All,
 
  Trying to work with multiple submit buttons within a single form in
  struts2 application but not able to work. here is the jsp code i am
  using
 
  tr
  td
  class=buttoninput type=submit value=Import
 
  name=destinationImport class=button/td
  td
  class=buttoninput type=submit value=Export
 
  name=destinationExport class=button/td
  /tr
 
  here is the java part
 
  private boolean destinationImport;
  private boolean destinationExport;
  and there respective setter and getter
 
  but i am sure is that Struts2 type convertor is having problem
  converting the String value to boolean do any one have idea how to
  achieve this
 
  i am using struts-2.2.1 version.
 
  Thanks in advance
 


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Multiple Submit Buttons problem in Struts2

2011-01-03 Thread Brian Thompson
Thanks, Maurizio.

Brian



On Mon, Jan 3, 2011 at 12:14 PM, Maurizio Cucchiara 
maurizio.cucchi...@gmail.com wrote:

 Individual Contributor License Agreement [1]
 [1] http://www.apache.org/licenses/icla.txt

 2011/1/3 Brian Thompson elephant...@gmail.com:
  Pardon my ignorance, but what is a CLA?  I haven't heard of it before
 this.
 
  Brian
 
  Sent via my Droid, Eka.
  On Jan 3, 2011 10:42 AM, Dave Newton davelnew...@gmail.com wrote:
  I kind of thought the ability to submit to specific action methods was
  well-known, but perhaps you're correct, as this thread indicates (to my
  chagrin).
 
  There are a number of things in the wiki that need updating; I'll
 probably
  start compiling a list from previous threads and open JIRA issues. The
  cool
  thing is that anybody with a CLA on file can help. (The uncool thing is
  that
  we get that kind of help more rarely than might be optimal.)
 
  Dave
 
  On Mon, Jan 3, 2011 at 11:33 AM, Biesbrock, Kevin 
  biesbrock.ke...@aoins.com
  wrote:
 
  Should this be included in documentation as a more complex example of
  Struts2? Maybe an example action as well? Just a thought.
 
 
  -Beez
 
  -Original Message-
  From: stanl...@gmail.com [mailto:stanl...@gmail.com]
  Sent: Sunday, January 02, 2011 5:20 PM
  To: Struts Users Mailing List
  Subject: Re: Multiple Submit Buttons problem in Struts2
 
  How about something like this?
 
  s:form namespace=/customer 
  s:hidden key=domain.id /
  s:textfield key=domain.firstName /
  s:textfield key=domain.lastName /
  s:textfield key=domain.address1 /
  s:textfield key=domain.address2 /
  s:textfield key=domain.city /
  s:textfield key=domain.state /
  s:textfield key=domain.zip /
 
 
  s:submit action=customer_cancel value=Cancel/ s:submit
  action=customer_save value=Save/ s:submit action=customer_print
  value=Print/ /s:if /s:form
 
  Scott
 
  On Sat, Jan 1, 2011 at 8:53 AM, aum strut aum.str...@gmail.com
 wrote:
 
   Hi All,
  
   Trying to work with multiple submit buttons within a single form in
   struts2 application but not able to work. here is the jsp code i am
   using
  
   tr
   td
   class=buttoninput type=submit value=Import
  
   name=destinationImport class=button/td
   td
   class=buttoninput type=submit value=Export
  
   name=destinationExport class=button/td
   /tr
  
   here is the java part
  
   private boolean destinationImport;
   private boolean destinationExport;
   and there respective setter and getter
  
   but i am sure is that Struts2 type convertor is having problem
   converting the String value to boolean do any one have idea how to
   achieve this
  
   i am using struts-2.2.1 version.
  
   Thanks in advance
  
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 



 --
 Maurizio Cucchiara

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Authorization/ Authentication

2010-12-28 Thread Brian Thompson
Personally, I'd lean towards having showSales.action always show a report
specific to the current user.

Then the manager wouldn't click on showSales.action.  She'd click on
showSalesSummary.action which would have a completely customized query.

-Brian



On Tue, Dec 28, 2010 at 3:25 PM, stanl...@gmail.com wrote:

 Dave is right in that there are truly a dozen ways to do this.  However,
 Struts does not have an out-of-the-box solution governing user/role level
 permissions.  Does your company have a user user based permissions system
 in
 house today where permissions are determined according to the user logged
 in?  You should be able to latch into it with a Struts 2 interceptor and do
 with the requests only what is authorized.  I worked in a shop that
 integrated a home-grown LDAP back end security system via a Struts 2
 interceptor where the specific URL was a feature that a user had to be
 specifically authorized to.  I thought it was crazy, however, if you want
 short employees to only access short reports while tall employees can run
 slightly longer reports, you sort of have to bite the bullet somewhere.

 Peace,
 Scott

 On Tue, Dec 28, 2010 at 11:49 AM, Amol Ghotankar ghotankaru...@gmail.com
 wrote:

  I can elaborate on the requirement as follows,
 
  Assume a simple action which is authorized to be called by sales dept
  people
  only. i.e showSales.action
 
  When a user from purchase dept tries to call this action then, an
  interceptors will check whether the user in role has the authorization to
  access or not and deny access to purchase dept user to access this action
  this is simple.
 
  I have implemented this using before advice of Spring AOP rather than
  interceptor. I hope i am not wrong?
 
  But the bigger problem is
 
  By how much, I mean for eg. if an *sales execute *logs in and clicks
  showSales.action then he must be get view of his own sales list, but
  when *sales
  manager* logs in and calls same action i.e showSales.action then he must
  get
  more* bigger n wider list, which can be union of data from all sales
  executives.
 
  Here authorization of some kind must be implemented which intercepts
 DAO's
  and automatically sets the where clause in the sql query.
 
  I tried before advice of spring for DAO's also but problem is if where
  clause is set somewhere within business logic then double where clause is
  set which gives error and because I am using hibernate criteria's to set
  restrictions on queries I have noticed this hibernate critera's are
  immutable* (Is there anyway to change them?)
 
 
  what should be the best way to solve this problem. Any Design Pattern
  or s*omething
  in struts that can help me here* or something other advice for it?
 
 
 
 
  On Tue, Dec 28, 2010 at 10:01 PM, Dave Newton davelnew...@gmail.com
  wrote:
 
   On Tue, Dec 28, 2010 at 11:10 AM, Amol Ghotankar 
  ghotankaru...@gmail.com
   wrote:
  
Even I am searching for some better way in which authentication can
 be
   done
using struts2 or spring security toghether.
   
No direct or simple example to explain it working together.
   
Specially for these two cases where
   
1. which user can access which action,  is stored in database -
authorization table
2. which user can access how much data from a table in database,  is
decided
by authorization logic.
   
How to implement this any example or references welcomed.
   
  
   There are essentially unlimited ways this can be implemented.
  
   It also depends what technology you want to use. I haven't used Spring
   Security for some time, so I won't be much help there, but I *do* know
  it's
   incredibly granular and flexible, occasionally a bit too much so for my
   taste, but it can be made to look simple.
  
   How much data can be accessed has multiple meanings: do you mean
   *quantity* of data? I've never even considered trying to implement
 that.
   *Which* data would be handled the same way as everything else, however
  it's
   being handled.
  
   When I've dealt with legacy authentication mechanisms I usually just do
   something like a filter/interceptor that checks the action for an
   annotation
   (or a known action method naming convention to map action method =
  access
   control). After the user logs in their user info is available in the
   session, and if they're allowed access the interceptor just moves
 along,
   and
   if they're not, they're redirected somewhere reasonable.
  
   For Spring Security stuff I would refer you to the Spring
 documentation,
   since it's not directly related to Struts 2.
  
   Dave
  
 
 
 
  --
 
 
  With Best Regards,
 
  Amol Ghotankar
  Cursive Technologies Pvt. Ltd.
  www.cursivetech.com
 



Re: RE: How do a create an Object of standalone java class in my JSP page.

2010-12-23 Thread Brian Thompson
How could you tell he was using Struts 1?

-Brian


On Thu, Dec 23, 2010 at 8:20 AM, Dave Newton davelnew...@gmail.com wrote:

 No no, I was asking why you're learning Struts 1 when there are a number of
 substantially better options available in today's modern era.

 Dave

 On Thu, Dec 23, 2010 at 8:51 AM, Amit Oberoi aobe...@techmahindra.com
 wrote:

  Dave,
 
  I have just started few days back and am still picking it up. The only
  reference I have is the tips and tricks available on different forums and
  that is where I got this information.
 
  Do you have a better suggestion; or at least you can point me to a link
  where I can go through few examples.
 
  Amit Oberoi
 
 
  -Original Message-
  From: Dave Newton [mailto:davelnew...@gmail.com]
  Sent: Thursday, December 23, 2010 6:33 PM
  To: Struts Users Mailing List
  Subject: Re: RE: How do a create an Object of standalone java class in my
  JSP page.
 
  Is there a reason you're using such old, clunky technology to write a new
  app?
 
  Dave
  On Dec 23, 2010 5:35 AM, Amit Oberoi aobe...@techmahindra.com wrote:
   Thanks Paul.
  
   I finally got to the html:options tag and has added the
  getStreamNames()
  function o the Action Form. I am sure this should work and would try as
  soon
  as I'm done fixing the current issues with my code.
  
   Amit Oberoi
  
  
   -Original Message-
   From: Paweł Wielgus [mailto:poulw...@gmail.com]
   Sent: Thursday, December 23, 2010 3:43 PM
   To: Struts Users Mailing List
   Subject: Re: How do a create an Object of standalone java class in my
 JSP
  page.
  
   Hi Armit,
   put this logic into getStreamNames() method located in your Action
   that leads to your jsp.
  
   Best greetings,
   Paweł Wielgus.
  
  
   2010/12/23 Amit Oberoi aobe...@techmahindra.com:
   Greeting All,
  
  
  
   I am new to Struts and developing my first web application. I have
 stuck
   into a decisive loop where-in I'm confused as to how should I create
 an
   object of a class in my standalone JSP page.
  
  
  
   What I want to do:
  
  
  
   1.   I have a registerUser.jsp page which will accept userId,
   Password, email and other relevant attributes to create an account.
  
   2.   On the same page I am having a drop down (html:select) as
   Stream Name which requests user to specify which Stream does he
 comes
   from.
  
   3.   The Values for this drop down has to come from the database;
   for which I have create a standalone Java Class StreamList with a
   function getStreamNames() which would return an ArrayList
  
   4.   I want to create an object of the StreamList class and call
 the
   function getStreamNames to populate the values for html: select drop
   down.
  
  
  
   Can anyone assist me with a better approach to achieve this; my only
   intention is to avoid writing snippets.
  
  
  
   Regards
  
  
  
   Amit Oberoi
  
  
  
 
 
 Disclaimer:
   This message and the information contained herein is proprietary and
  confidential and subject to the Tech Mahindra policy statement, you may
  review the policy at a href=
 http://www.techmahindra.com/Disclaimer.html
  
  http://www.techmahindra.com/Disclaimer.html/a externally and a href=
  http://tim.techmahindra.com/Disclaimer.html;
  http://tim.techmahindra.com/Disclaimer.html/a internally within Tech
 
 
 Mahindra.
  
  
   -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
 
 
 Disclaimer:
  This message and the information contained herein is proprietary and
  confidential and subject to the Tech Mahindra policy statement, you may
  review the policy at a href=
 http://www.techmahindra.com/Disclaimer.html
  
  http://www.techmahindra.com/Disclaimer.html/a externally and a href=
  http://tim.techmahindra.com/Disclaimer.html;
  http://tim.techmahindra.com/Disclaimer.html/a internally within Tech
 
 
 Mahindra.
 
 
 Disclaimer:
   This message and the information contained herein is proprietary and
  confidential and subject to the Tech Mahindra policy statement, you may
  review the policy at a href=
 http://www.techmahindra.com/Disclaimer.html
  http://www.techmahindra.com/Disclaimer.html/a externally and a
 href=
  

Re: RE: How do a create an Object of standalone java class in my JSP page.

2010-12-23 Thread Brian Thompson
On Thu, Dec 23, 2010 at 1:12 PM, Dave Newton davelnew...@gmail.com wrote:

 On Thu, Dec 23, 2010 at 12:29 PM, Brian Thompson wrote:

  How could you tell he was using Struts 1?
 

 Because of these:

  html:select
  html:options

 Besides the taglib prefix (which is a /strong/ hint, but not conclusive),
 there's no s:options tag in S2.

 http://struts.apache.org/2.x/docs/tag-reference.html

 Furthermore, the smear of mud on the bottom of the fine gentleman's shoe
 came clearly *not* from a quarry as he has claimed, but rather a cricket
 pitch built on soil found *only* in County Limpshire. And not *only* that,
 but more specifically located, coincidentally, on the very grounds upon
 which our beloved Ms. Barnacle's life was so rudely interrupted.

 This, plus the contents of the good sir's left vest pocket, which I believe
 to contain nothing other than the earring missing from our poor, deceased
 Barnacle's left ear, prove *conclusively* that the good sir *was*, in fact,
 on the grounds of Barnacle Manors, and did, also in fact, bludgeon our dear
 Barnacle with her own facial massager.

 To the pub, Watson, I has a thirst!



LOL ... are you sure today isn't Punchy Friday? :P




 Dave



Re: web application response time is too large.

2010-12-21 Thread Brian Thompson
Good points.  However, I'd caution people to be careful of denormalization
-- if you don't normalize in the first place, you run the risk of degrading
performance in *other* ways ... not to mention opening the door for some
ugly data-consistency issues.

Like all things, there's a balance somewhere.  Sometimes, a fully-normalized
table structure is the best approach, and sometimes, it isn't.

-Brian


On Tue, Dec 21, 2010 at 11:03 PM, Dave Newton davelnew...@gmail.com wrote:

 On Tue, Dec 21, 2010 at 11:56 PM, wrote:

  Are you sure that database is normalised as well..
 

 Normalization can often *increase* response time, particularly for some
 types of operations, because of the join overhead. The DB needs to be
 correct for what it's being used for, and sometimes normalization isn't the
 best approach.

 (Although I try to isolate that kind of stuff behind triggers and a
 reporting table since that's where I often run in to it. But
 over-normalization can be a performance drag under some circumstances.)

 Dave



Re: web application response time is too large.

2010-12-21 Thread Brian Thompson
I love Firebug.  It's quite possibly the single best tool in my web
development toolbox.

-Brian



On Tue, Dec 21, 2010 at 11:15 PM, Kushan Jayathilake kusha...@gmail.comwrote:

 Addition to this, you can track response time with Firebug (Third party
 plugin for Firefox) once it installed, open it's Net tab,  and click or
 do
 whatever action in your JSP page,  after the browser received it's response
 you can see how long it has taken to load the content,

 even It will show how long it has taken to load each images of your web
 application  :)

 On Wed, Dec 22, 2010 at 10:32 AM, Kushan Jayathilake kusha...@gmail.com
 wrote:

  Hi,
 
  You can do something like this, take the queries that in pages takes
 longer
  time to load, then write a simple java programs to execute those queries,
  1. print the time before it executes the query
  2. print the time after it executed.
  3. compare the values you get,
  4. if its higher then your query is wrong. if its very low then the
 problem
  is at your JSP pages, it takes longer time
  to build up the pages. then you have to change the way you have
 constructed
  your JSP pages and should do it in efficient way.
 
  Hope this will help. :)
 
  --
  Regards
  Kushan Jayathilake
 
 
  On Tue, Dec 21, 2010 at 10:49 PM, onlysameer_no1else 
  sameer.pa...@gmail.com wrote:
 
  Hi All
 
  I have developed one web application in struts 1,
  database as MS SQL server and it is deployed on tomcat 6 server (Window
  OS).
 
  For certain pages response time is too large.
  Test case:
  (content on web page is too large like text box, buttons, images.)
  Total Number of records: 284
  total Columns in single table  : 168
 
  I need your help in finding actual cause of problem.
  Whether Problem is at database side Or while building a actual page
 (HTML
  Content).
 
  How can i resolve this problem ??
  is there any utility Or any software to test web application response
 time
  ?
 
  Thanks in advance
  Sameer
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 
 
 
 


 --
 Regards
 Kushan Jayathilake



Re: EmailValidator

2010-12-13 Thread Brian Thompson
I've looked into this before.  The email validator resolved down to some
really old code in XWork with a regex that looked something like this:

[a-z0-...@[a-z0-9].[a-z]^3

I strongly agree with Dave's advice.  Broken email validators are too common
on the web.

-Brian


On Mon, Dec 13, 2010 at 11:20 AM, Dave Newton davelnew...@gmail.com wrote:

 IIRC the default email validator isn't as robust as the page- long RFC
 email
 regex. I'd suggest either a patch, ora custom validator.

 Dave
  On Dec 13, 2010 12:11 PM, Greg Akins angryg...@gmail.com wrote:
  I just tried to use angrygreg+...@gmail.com angrygreg%2b...@gmail.com
 angrygreg%2b...@gmail.com angrygreg%252b...@gmail.com as
 an email , and the
  Struts EmailValidator doesn't like it (Struts 2.2.1)
 
  I'm not that great at reading regexp.. it looks like maybe the regexp
  should support that email address.. but I'm not sure.
 
  Can anyone comment on whether EmailValidator is the best approach?
 
  --
  Greg Akins
 
  http://insomnia-consulting.org
  http://www.pghcodingdojo.org
  http://pittjug.dev.java.net
  http://twitter.com/akinsgre
  http://www.linkedin.com/in/akinsgre
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 



Re: EmailValidator

2010-12-13 Thread Brian Thompson
TBF, it was a really old version of XWork.  It was addressed and made more
complicated in the most recent version at the time I looked into it (still
not *fixed*, though ... everyone knows how to validate an email address
until they actually read the RFCs!).

-Brian



On Mon, Dec 13, 2010 at 1:00 PM, Greg Akins angryg...@gmail.com wrote:

 On Mon, Dec 13, 2010 at 1:50 PM, Brian Thompson elephant...@gmail.com
 wrote:
  I've looked into this before.  The email validator resolved down to some
  really old code in XWork with a regex that looked something like this:
 
  [a-z0-...@[a-z0-9].[a-z]^3

 Thanks.. I hadn't looked at the source.. It looks like the API docs
 don't quite match the source then, either.
 --
 Greg Akins

 http://insomnia-consulting.org
 http://www.pghcodingdojo.org
 http://pittjug.dev.java.net
 http://twitter.com/akinsgre
 http://www.linkedin.com/in/akinsgre



Re: Using Dojo with Struts 2

2010-12-02 Thread Brian Thompson
I don't think Dojo quite has what it takes to replace Struts 2.

-Brian



On Thu, Dec 2, 2010 at 7:32 PM, Dean Schulze dean_w_schu...@yahoo.comwrote:


 When you say Just use Dojo do you mean to drop Struts 2, or to just use
 Dojo in the JSPs that I create for Struts 2?


 --- On Thu, 12/2/10, Dave Newton davelnew...@gmail.com wrote:

 From: Dave Newton davelnew...@gmail.com
 Subject: Re: Using Dojo with Struts 2
 To: Struts Users Mailing List user@struts.apache.org
 Date: Thursday, December 2, 2010, 6:21 PM

 On Thu, Dec 2, 2010 at 7:47 PM, Dean Schulze wrote:

  How do I use Dojo with Struts 2?


 Just use Dojo.


  Struts 2.2.1 has a Dojo plugin with it, but I've heard several people say
  not to use the plugin.  No one says what the problem is, however.
 

 Antiquated version of Dojo (0.4.3). More difficult than practical to
 customize tag-based Dojo: personally, I'd rather just write pure
 JavaScript-based Dojo--I'm pretty good with JavaScript, and can fit the
 pieces together more smoothly.


  What is the Dojo plugin?  Is it based on an old version of Dojo?  Why
 does
  it have such a bad reputation?
 

 It's a layer between Dojo and S2, with a bunch of JavaScript abstracted
 away
 in a JSP tag library. Yes. Because of the version of Dojo, because of the
 complexity of customization (that may just be my opinion, by the way),
 because of the daunting complexity of rewriting the plugin for the newer
 version of Dojo (lots of changes; would have been easier to start over, and
 nobody signed up to tackle that), because of the maintenance challenges.
 There are probably a few other reasons.

 I'd appreciate any pointers on how to use Dojo with Struts 2.
 

 Just use Dojo--it's framework-neutral.

 Dave







Re: S2 and Sitemesh basic configuration

2010-11-30 Thread Brian Thompson
Re: Question 1 -

No, you can use other taglibs inside a decorator file.  My user.jsp
(decorator) has the following lines:

%-- Include struts tag declaration --%
%@ include file=/common/taglibs.jsp%

titledecorator:title/ - s:text name=webapp.name//title

(it also uses c:if in places.  All you need to do is declare the taglib
with e.g.
%@ taglib uri=/struts-tags prefix=s %
Simple!)



Re: Question 4 -

In my project, I have the filters mapped like this:

filter-mapping
filter-namestruts-cleanup/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-namesitemesh/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-namestruts/filter-name
url-pattern/*/url-pattern
/filter-mapping


Hope this helps,

Brian


On Tue, Nov 30, 2010 at 9:35 AM, Greg Lindholm greg.lindh...@gmail.comwrote:

 I'm working on my first project that will use sitemesh and have some
 questions on basic configuration with Struts2.

 Info:
 struts 2.2.1
 sitemesh 2.4.1
 My decorators will be JSP files

 I'm looking at the struts2-sitemesh-plugin doc
 http://struts.apache.org/2.2.1/docs/sitemesh-plugin.html

 Question 1) If I want to access struts2 resources (from the action or
 value stack) and use struts2 tags from the decorator JSP then I need
 to use the sitemesh plugin, is that correct?

 Question 2) Do I need to configure the FreemarkerDecoratorServlet and
 VelocityDecoratorServlet since I'm only using JSP decorators? (I think
 not, but better ask.)

 Question 3) Do I need to configure the JspSupportServlet?  It's listed
 under the Full Integration section with no mapping and no description?
 What does it do?

 Question 4) In the Example section of the doc the sitemesh filter
 appears after the two struts filters, is this correct? I was under the
 impression that the sitemesh filter must be declared between the
 struts-prepare and struts-execute filters.  Is this the example wrong?


 Thanks

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: S2 and Sitemesh basic configuration

2010-11-30 Thread Brian Thompson
Hmm, I just took a second look.  We do actually have
struts2-sitemesh-plugin.jar in our classpath.  OTOH, it doesn't seem to be
used anywhere.  From the documentation available (
http://struts.apache.org/2.x/docs/sitemesh-plugin.html), it sounds like the
plugin is only important if you're using Velocity or Freemarker.

I might be missing something here, but based on my project files, it seems
to make sense.  Someone more experienced with Sitemesh could probably give
you a better answer than I can.

-Brian



On Tue, Nov 30, 2010 at 11:02 AM, Greg Lindholm greg.lindh...@gmail.comwrote:

 Brian, you are saying I can use struts tags and access the action etc
 in my JSP decorator without needing the struts2-sitemesh-plugin?
 (This would be great, but then what is the plugin for?)

 Thanks Dave, Brian for the clarification on the filter vs filter-mapping
 order.


 On Tue, Nov 30, 2010 at 10:53 AM, Brian Thompson elephant...@gmail.com
 wrote:
  Re: Question 1 -
 
  No, you can use other taglibs inside a decorator file.  My user.jsp
  (decorator) has the following lines:
 
  %-- Include struts tag declaration --%
  %@ include file=/common/taglibs.jsp%
 
  titledecorator:title/ - s:text name=webapp.name//title
 
  (it also uses c:if in places.  All you need to do is declare the taglib
  with e.g.
  %@ taglib uri=/struts-tags prefix=s %
  Simple!)
 
 
 
  Re: Question 4 -
 
  In my project, I have the filters mapped like this:
 
 filter-mapping
 filter-namestruts-cleanup/filter-name
 url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
 filter-namesitemesh/filter-name
 url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
 filter-namestruts/filter-name
 url-pattern/*/url-pattern
 /filter-mapping
 
 
  Hope this helps,
 
  Brian
 
 
  On Tue, Nov 30, 2010 at 9:35 AM, Greg Lindholm greg.lindh...@gmail.com
 wrote:
 
  I'm working on my first project that will use sitemesh and have some
  questions on basic configuration with Struts2.
 
  Info:
  struts 2.2.1
  sitemesh 2.4.1
  My decorators will be JSP files
 
  I'm looking at the struts2-sitemesh-plugin doc
  http://struts.apache.org/2.2.1/docs/sitemesh-plugin.html
 
  Question 1) If I want to access struts2 resources (from the action or
  value stack) and use struts2 tags from the decorator JSP then I need
  to use the sitemesh plugin, is that correct?
 
  Question 2) Do I need to configure the FreemarkerDecoratorServlet and
  VelocityDecoratorServlet since I'm only using JSP decorators? (I think
  not, but better ask.)
 
  Question 3) Do I need to configure the JspSupportServlet?  It's listed
  under the Full Integration section with no mapping and no description?
  What does it do?
 
  Question 4) In the Example section of the doc the sitemesh filter
  appears after the two struts filters, is this correct? I was under the
  impression that the sitemesh filter must be declared between the
  struts-prepare and struts-execute filters.  Is this the example wrong?
 
 
  Thanks
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: AJAX file upload

2010-11-30 Thread Brian Thompson
I was assuming that he wanted his own custom look and feel for the upload
button rather than just putting an unstyled HTML input type=file on the
page.

-Brian

On Tue, Nov 30, 2010 at 7:57 PM, Tommy Pham tommy...@gmail.com wrote:

  -Original Message-
  From: Harsh C [mailto:hchau...@gmail.com]
  Sent: Tuesday, November 30, 2010 12:59 PM
  To: Struts Users Mailing List
  Subject: AJAX file upload
 
  How can I setup a AJAX-ified file upload page using Struts 2? If there is
 some
  integration with Dojo, it would be even better i.e. not use the OS
 specific
  file upload button etc.
 
  --
  *Thanks,
  Harsh*

 Just curious about your thoughts and question, since when is the web ever
 OS
 specific?  Also, IIRC, I don't recall Java - 'develop anywhere, deploy
 anywhere' - ever being OS specific.  That said, how can Struts (dependent
 upon Java) ever being OS specific?

 Regards,
 Tommy


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: javax.servlet.ServletException: BeanUtils.populate

2010-11-26 Thread Brian Thompson
Just a guy who had a cool idea once ... the web (easily googled for
details).

Brian

Sent via my Droid, Eka.
On Nov 26, 2010 11:53 AM, Maurizio Cucchiara maurizio.cucchi...@gmail.com
wrote:
 you've listed 5 people who are more well known than Tim Berners-Lee
 Who the hell is TimBL?
 Wait... I know is a member of genesis

 2010/11/26 Martin Gainty mgai...@hotmail.com:
 --
 Maurizio Cucchiara

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



Re: result type Jasper [Struts 2]

2010-11-15 Thread Brian Thompson
On Mon, Nov 15, 2010 at 7:08 AM, Dave Newton davelnew...@gmail.com wrote:

 On Mon, Nov 15, 2010 at 2:40 AM, @rju nagarjunabatt...@gmail.com wrote:
  Guys am also getting problem using jasper reports with struts 2.. please
 help
  me ASAP... same tutorial i too followed

 ...

 How can anybody help if we have no idea what problem you're having?

 Dave


Looks like a reply to this 2007 (!) post:

http://old.nabble.com/result-type-Jasper--Struts-2--td11004749.html

but I can't tell from this post whether he's having the same problem as was
detailed in that exchange.

-Brian


Re: Can't get onclick to work with buttons in Struts

2010-10-20 Thread Brian Thompson
Noscript causing trouble is common enough that my boss calls my
configuration Crazyfox!

-Brian



On Wed, Oct 20, 2010 at 1:55 PM, Dave Newton davelnew...@gmail.com wrote:
 :)

 That's never happened to me.

 Honest.

 No, really.

 Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Brian Thompson
On Fri, Oct 15, 2010 at 9:45 AM, Dave Newton davelnew...@gmail.com wrote:
 That's really difficult to read.


Agreed.  More whitespace would be nice, Martin.



 On Fri, Oct 15, 2010 at 10:38 AM, Martin Gainty wrote:
 a database schema represents the entire structure (tables and relationships 
 of
 those tables) of the there is no need for multiple databases when your 
 database
 schema contains the persisted entities (tables)

 That's not necessarily true. Depending on how the database is
 accessed, structured, distributed, etc. there are several reasons why
 it may make sense to have each tenet in their own database.


Tenet?

I'd agree with Martin on this one -- it makes more sense to use one
database and store multiple entities in it than to make one DB per
entity.  I'm not sure what reasons there would be to have it make
sense to store each entity in its own identically-structured DB.

-Brian

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Brian Thompson
On Fri, Oct 15, 2010 at 10:22 AM, Dave Newton davelnew...@gmail.com wrote:
 I'm not sure what reasons there would be to have it make sense
 to store each entity in its own identically-structured DB.

 Ever had a client that wanted/required their data segregated from
 everybody else's (this is not uncommon at all)? Ever wanted to


Apparently, it is uncommon.  I've never encountered such a demand.


 restrict tool access to data without jumping through any hoops
 (here's the DB, here's your username/password, here's your data, and
 nobody else's)?


I haven't been in this type of situation, either.  Projects I've
worked on have always had user-friendly reports on the data, and what
little we host for people hasn't called for constantly available
direct DB access.

That said, I do appreciate seeing a couple of these reasons; after all
it *is* always helpful to get some perspective outside my own
experience.

-Brian

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Brian Thompson
On Fri, Oct 15, 2010 at 11:43 AM, Dave Newton davelnew...@gmail.com wrote:
 On Fri, Oct 15, 2010 at 12:39 PM, Brian Thompson elephant...@gmail.com 
 wrote:
 Ever had a client that wanted/required their data segregated from
 everybody else's (this is not uncommon at all)? Ever wanted to
 Apparently, it is uncommon.  I've never encountered such a demand.

 That... makes it uncommon?!


Oh, right.  That doesn't make it uncommon, that makes it almost unheard of.

(TBF, we're both speaking from biased samples -- but really, whether
data segregation is common or not is beside the point.)


 restrict tool access to data without jumping through any hoops
 (here's the DB, here's your username/password, here's your data, and
 nobody else's)?
 I haven't been in this type of situation, either.  Projects I've
 worked on have always had user-friendly reports on the data, and what
 little we host for people hasn't called for constantly available
 direct DB access.

 I work for companies with thousands of clients: there's no little we
 host for people, only a lot.

 Dave


Most of our projects are deployed on a client's servers rather than
hosted internally.  No big deal, just a different project environment.

-Brian

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: lost URL parameters with s:param tag

2010-07-20 Thread Brian Thompson
We ran into the same problem with our Struts apps; we ended up using
c:url from the JSTL core taglib instead.

-Brian



On Tue, Jul 20, 2010 at 10:58 AM, Emi Lu em...@encs.concordia.ca wrote:
 On 07/20/2010 11:48 AM, Emi Lu wrote:

 Good morning,

 It seems that s:param does not work well when more than one s:param is
 assigned.

 s:url id=url_help namespace=/Action/Global action=ProcessHelp
 s:param name=helpTitle value=example1 /
 s:param name=help_text_name value=contents /
 /s:url


 The second help_text_name is never called. How come? Found one line
 bug report lost URL parameters with s:param tag (bug 1938) at
 http://readlist.com/lists/struts.apache.org/user/9/47016.html

 Does someone know whether the bug has been fixed?

 Another bug link:
 https://issues.apache.org/jira/browse/WW-1938

 Does someone has the fix version?

 Thanks,
 --
 Lu Ying

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: struts2+hibernate+spring - lazyInitaializationException

2010-07-19 Thread Brian Thompson
Looks to me like the session is being closed in the scope of
hibernateTemplate.get().

I don't see a transactionManager mentioned in the XML ... you could
try adding something like this in the XML configuration file:

bean id=transactionManager

class=org.springframework.orm.hibernate.HibernateTransactionManager
property name=sessionFactory ref=sessionFactory /
/bean

tx:annotation-driven transaction-manager=transactionManager /

n.b. I haven't tested the above config, so it probably won't work
as-is.  Hopefully it helps, though.

-Brian

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Authentication and Empty Classes

2010-07-11 Thread Brian Thompson
Couldn't you just declare BaseAction.java as the action's class?

Also; it sounds like you're using a custom security solution; I'd
suggest using Spring Security instead.  Custom security code is likely
to suffer from many of the bugs that Spring Security ran into years
ago.

-Brian

On Sun, Jul 11, 2010 at 8:25 AM, JP Cafaro jcafar...@gmail.com wrote:
 One thing that I don't like (haven't figured out how to get around this) is
 the need for empty classes.  If I have a secure page, like an image upload
 form, let's call it (image-upload-form.jsp), I don't want the user to be
 able to access it if he or she is not logged in.  To accomplish this, I have
 a package defined in my struts.xml that declares a custom interceptor.
  Then, in the actions that need to be secure, I declare this package as
 their ParentPackage using a package-info.java file.  Finally, in order for
 an access to image-upload-form.jsp to be intercepted, I have to have a class
 called ImageUploadForm.java JUST so that the interceptor can be called.
  There's nothing in the class that needs to be done.  It seems like a waste.
  Is there any way around this?

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Authentication and Empty Classes

2010-07-11 Thread Brian Thompson
In my project, I have everything defined as an action in a struts.xml.
 All my action classes extend BaseAction.  Then, for cases where
everything I need really *is* in the jsp, I just have an action set up
something like:

action name=jspOnly class=BaseAction
  result name=successno-action-jsp.jsp/result
/action

Doing it this way, *everything* will be an action (though the
BaseAction execute() method doesn't really do much).

-Brian



On Sun, Jul 11, 2010 at 11:13 AM, JP Cafaro jcafar...@gmail.com wrote:
 I'm not sure I follow.  There isn't an action here.
 Let's say I have a jsp page that I want to be secure, aka you have to be
 logged in to visit.  For all of the secure pages that actually require some
 work to be done, this is ok, because the workflow is: 1) Click link to
 secure page, /secure-page, 2) This triggers action SecurePage.java 3)Then
 successfully direct to /secure-page.jsp.

 Some pages however, don't need any work to be done so there isn't a need for
 a class.  In non secure cases this is fine.  Click link to /insecure-page
 and the result is /insecure-page.jsp.  In secure cases, I don't want
 /secure-page to go to /secure-page.jsp but I also don't want to make an
 empty action class for every page JUST so that an interceptor can say, hey
 that action is being fired but we're not logged in, redirect to login page.

 Is this possible?  I'm not familiar with Spring, I'm still trying to get
 through the basics of struts2.  The book I'm reading uses empty classes.  I
 just don't like the idea that that's the only option.

 Brian Thompson wrote:

 Couldn't you just declare BaseAction.java as the action's class?

 Also; it sounds like you're using a custom security solution; I'd
 suggest using Spring Security instead.  Custom security code is likely
 to suffer from many of the bugs that Spring Security ran into years
 ago.

 -Brian

 On Sun, Jul 11, 2010 at 8:25 AM, JP Cafaro jcafar...@gmail.com wrote:


 One thing that I don't like (haven't figured out how to get around this)
 is
 the need for empty classes.  If I have a secure page, like an image
 upload
 form, let's call it (image-upload-form.jsp), I don't want the user to be
 able to access it if he or she is not logged in.  To accomplish this, I
 have
 a package defined in my struts.xml that declares a custom interceptor.
  Then, in the actions that need to be secure, I declare this package as
 their ParentPackage using a package-info.java file.  Finally, in order
 for
 an access to image-upload-form.jsp to be intercepted, I have to have a
 class
 called ImageUploadForm.java JUST so that the interceptor can be called.
  There's nothing in the class that needs to be done.  It seems like a
 waste.
  Is there any way around this?


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: OutOfMemoryError: PermGen space!!!! Dont know why?

2010-07-09 Thread Brian Thompson
You could also adjust your eclipse.ini to give more memory to the JVM:

-XX:PermSize=64M  -XX:MaxPermSize=128M

Add it to the --vmargs section of the file.

-Brian

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: OutOfMemoryError: PermGen space!!!! Dont know why?

2010-07-09 Thread Brian Thompson
Oh, I misunderstood.  I thought you were seeing this during
development, not when running the app on a remote server.

In this case, you will need to update the Catalina startup script.
These pages have more info:

http://www.gria.org/documentation/5.2/faq/tomcat-outofmemory-error-permgen-space
http://stackoverflow.com/questions/473011/recurring-permgen-in-tomcat-6

-Brian

On Fri, Jul 9, 2010 at 3:01 AM, abhishek jain
abhishek.netj...@gmail.com wrote:
 On Fri, Jul 9, 2010 at 1:13 PM, Brian Thompson elephant...@gmail.comwrote:

 You could also adjust your eclipse.ini to give more memory to the JVM:

 -XX:PermSize=64M  -XX:MaxPermSize=128M

 Add it to the --vmargs section of the file.

 -Brian



 thanks Brian,
 Where will i find eclipse.ini file, i want to tweak the setting in the
 tomcat on server and not on my local system.

 thanks
 abhi


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: hi please help me struts2

2010-07-09 Thread Brian Thompson
For client-side validation:  Just write a javascript function and have
it run for either the onclick event of the form submit button or the
onsubmit event for the form itself.

For Hibernate by property file, I'm not sure what you mean.  I've
always used either hibernate.cfg.xml files or annotations in the model
classes.  Could you post an example of what you're trying to do?

-Brian



On Fri, Jul 9, 2010 at 7:39 AM, Salish S ssal...@gmail.com wrote:
 -- Forwarded message --
 From: Salish S ssal...@gmail.com
 Date: Fri, Jul 9, 2010 at 6:07 PM
 Subject: hi please help me struts2
 To: es...@vaannila.com es...@vaannila.com


 Hi
 i had gone through the struts2 crud in the
 http://www.vaannila.com/struts-2/struts-2-example/struts-2-crud-example-1.html

 its fine and goog pgm for me
 but the problem came when i want to add client side validation how i add
 clientside validation
 i had gone though the hibernate validation also its also fine
 http://www.vaannila.com/struts-2/struts-2-tutorial/struts-2-hibernate-validation-tutorial-1.html

 is that clientside validation is doing therer
 and very important is that
 How can i use hibernate by property file not that by the hibernate.cfg.xml
 file to connectt to db in the same example

 please help me
 thenkuse


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Authorization Best Practices

2010-07-08 Thread Brian Thompson
On Thu, Jul 8, 2010 at 1:09 PM, Burton Rhodes burtonrho...@gmail.com wrote:
 I say we start another thread to discuss more about this ducussion.


I think that would fit best in the struts-users-meta list ;)

-Brian

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Authorization Best Practices

2010-07-07 Thread Brian Thompson
On Wed, Jul 7, 2010 at 8:31 AM, Dale Newfield d...@newfield.org wrote:
 Including a notice like this on a request for help sent to a public,
 archived mailing list is obnoxious.  JSYK, I've been seriously considering
 instituting a personal policy whereby I will never respond to such messages.

 -Dale

I think you mistyped Including a notice like this in an email ;)

I really don't get where all these OMG CONFIDENTIAL notices come
from.  One wouldn't use postcards to snail-mail confidential
information.

As to authorization - I agree that Spring Security is a good way to go.

-Brian

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Two applications, one in a sub folder

2010-06-25 Thread Brian Thompson
On Fri, Jun 25, 2010 at 1:19 AM, abhishek jain
abhishek.netj...@gmail.com wrote:
 On Fri, Jun 18, 2010 at 3:08 PM, abhishek jain
 abhishek.netj...@gmail.comwrote:

 Dear friends,
 I have a website in Struts 1.2 and i want to install another Struts
 application made by me, in a subfolder of the website. I don't know will
 this work,


I know for sure that you can have two Struts applications running in
the same Tomcat instance like this:

http://www.example.com/foo/
http://www.example.com/bar/

or

http://www.example.com/apps/foo/
http://www.example.com/apps/bar/

In each case, you'd configure the web server to pass requests to the
Tomcat connector, and then the context root would function normally.
You'd only need one Tomcat worker, and your Tomcat/webapps directory
would have foo.war and bar.war in it.

I'm not sure if you can configure it to work like this, but there
might be a way:

http://www.example.com/foo/
http://www.example.com/foo/bar/


 Both are struts 1.2 applications.
 I am using apache and  Tomcat on Cpanel , linux centos .

 Pl. advice
 --
 Thanks and kind Regards,
 Abhishek jain



 anyone got any idea,
 I was searching on net,and one of  the possible solution was to map properly
 worker or so,
 Also is it possible to have two tomcat on different ports and then map the
 paths in URL to different ports.


Yes, this would work.  You'd just need to set up two Tomcat workers -
one for each port.

You could also configure it like this:

http://foo.example.com/
http://bar.example.com/

-Brian


 Another possible sol. may be having https and http redireting to diff
 applications
 Please someone help me,

 PS: i know this may not be a direct struts questions, pardon me if you also
 think so,
 --
 Thanks and kind Regards,
 Abhishek jain

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Page composition strategy

2010-06-24 Thread Brian Thompson
Out of curiosity, has anyone on the list actually used both Tiles and
Sitemesh?  I'd really like to read a comparison of the two, not just

Sitemesh is quite easy to use.
vs.
I don't think you can get much more simple than Tiles.

All I really get from Googling is Sitemesh fanboys bashing Tiles as
inferior, but they don't really go into any detail. :(

-Brian



On Thu, Jun 24, 2010 at 4:11 PM, Ken ken.mcwilli...@aerose.com wrote:
 On Wed, 2010-06-23 at 10:36 +0100, Alex Rodriguez Lopez wrote:

 I've been using Tiles and always found it confusing a little bit, now
 that I'm starting to test Sitemesh my vote would be for this last one.
 They accomplish the same thing, only Tiles is like saying each time my
 page is made up of this, this and this. Sitemesh is more about taking a
 piece of a page and decorate it into a full page (more like
 intercepting or filtering).


 I'd say that Tiles is like saying
 only _once_ that my base page is
 made of this and this... and each
 subsequent page you should say
 extends the base page, in my case
 this means that
 a different jsp is embedded into the
 body which means a definition only
 has one line.

 Each definition can of course
 override any of the content in base,
 for instance my base
 has a left menu, header, body and
 footer all defined, a tiles
 definition typically overrides the
 body
 portion, but say I made a
 secureLayout definition then every
 page that a user needs to log in
 to see will simply extend the
 secureLayout definition.  I have a
 layout for displaying records...
 recordLayout which redefines the
 header and footer to provide
 information such as where
 the data was derived and how many
 records and navigation between the
 pages of the table.

 JSP's that then display records over
 ride the body section of
 recordLayout which simply
 overrides
 a different header and footer of the
 Secure Layout.

 I don't think you can get much more
 simple than Tiles.  I'm not sure if
 it is the right approach if
 you had a really modular layout (say
 you needed to let users add widgets
 to any page).  But if the layout is
 really
 hierarchical I'd say it's the way to
 go.




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Page composition strategy

2010-06-22 Thread Brian Thompson
Allow me to throw in a vote for Sitemesh.  I've never used Tiles, so I
can't directly compare the two, but Sitemesh is quite easy to use and
incredibly powerful for this sort of thing.  You define it as a
servlet filter in your project, and it adds decoration to the requests
that come through.  The JSPs never even have to know that they're
being decorated in the first place!

-Brian



On Tue, Jun 22, 2010 at 1:35 PM, satyanarayana katta
saty.pra...@gmail.com wrote:
 U should try tiles for this

 Sent from my iPhone

 On Jun 22, 2010, at 10:03 AM, Antonio S. inganto...@gmail.com wrote:

 Hello.

 I'm a beginner in web development with Struts2 and I'm planning the
 structure of my application. Let me tell you my problem.

 With 'page composition strategy' I mean the strategy for making all
 pages in the application share the same HTML structure (header,
 left-column, content, right column, footer) using template inclusion
 mechanisms or others.

 Currently I'm using inclusion and all my JSPs share the same structure:

 A. 'include' prelude content: header, left-column.
 B. Specific content.
 C. 'include' coda content: right-column, footer.

 I don't like this approach and I'm thinking about alternatives; I wonder
 if Struts2 can help with this:

 i. Use the very same JSP template for all requests. That template would
 include specific content by calling the corresponding segment. This
 would involve a default result pointing to this JSP template and some
 means of specifying the name of the specific segment that will be
 invoked from inside the main template.

 ii. Use result pages as segments and render only specific content. Later
 on, some interceptor or servlet filter would include prelude and coda in
 the output stream.

 So, my questions are:

 1. Can you recommend the best practice for page composition in Struts2?
 2. Can I use Struts2 for implementing above mentioned strategies i. and
 ii.? How?

 Thanks for your time.
 Regards.
 Antonio.



 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Jasper Report Problem in HTML format

2010-06-20 Thread Brian Thompson
Are the images saved as temp files and accessed as files through tomcat, or
are they generated on access by something like /getImage.action?

On Jun 20, 2010 6:12 AM, Amol Ghotankar ghotankaru...@gmail.com wrote:

Dear List members,

When I try to see the HTML page it shows path of images as src=/images/px

But in web content images folder no such images are created, nor they are
created any where on my disk.

Does this means that their is a bug in Struts 2 that it does not properly
create images required for report for HTML format.

Other formats like pdf, xls work perfectly fine.

Generally where are these images stored??? In temp dir or in tomcat server
or in project dir or somewhere else on disk. Can we change it.

I am trying it very hard but not able to get any solution as images are
created dynamically.



On Sun, Jun 20, 2010 at 4:34 PM, Amol Ghotankar ghotankaru...@gmail.com
wrote:


 Dear List members,

 I have successfully embedded jasper reports with struts 2, thanks to the
...


Re: Problem with iterator and images

2010-06-19 Thread Brian Thompson
img src=s:property value=%{idOfsUrl} / /

Brian

On Jun 19, 2010 5:01 AM, Fabio Perfetti perfabi...@gmail.com wrote:

Hi all, before to start, i want say sorry for my bad english.
I am developing an easy social network for a university project

Every User has an image for the profile.

I want to list all friends, and i want display Name, Surname and the image.
So i have an action that retrieve the list of friends:

public String list() {
Utente utente;
utente = (Utente) session
.get(AuthenticationInterceptor.authenticationSessionField);
utenteDao.update(utente.getId());
setListaAmici(utente.getListaAmici());
System.out.println(total friends:  + listaAmici.size());
return SUCCESS;
}

Now I have a list of Users. So in my jsp:

friends : s:property value=listaAmici.size /
br /
s:iterator value=listaAmici var=amico
s:url value=%{#amico.fotoProfilo.path} /
img src= width=200 /
s:property value=#amico.nome / s:property value=#amico.cognome /
/s:iterator

I don't know how do it!
The database save the name of the image.

Sorry for my bad english.
Thanks
Fabio


Re: XML file reloading in JSP (Caching issue)

2010-05-24 Thread Brian Thompson
What extra parameters have you added to the request?  AFAIK the
standard solution to this type of improper caching problem is to
simply append a random number or a timestamp to the request URL.  It's
an ugly hack, but it does work even when the headers don't seem to do
the trick.

Of course, the Right Way is to rely on the no-cache headers, so you
might want to do a bit more troubleshooting on that front.

Hope this helps,

-Brian



On Mon, May 24, 2010 at 9:44 AM, XML User patelsame...@yahoo.com wrote:

 Hi,

 I am running into an issue of caching.

 I have a jsp which generates the tree view from an XML file. This XML file
 are loaded when the jsp is loaded. So whenever I add new child to the tree
 view the xml file is updated by action class and the request reloads the jsp
 page which in turns reload that updated XML file.

 The issue is everytime it reloads the XML file, it gets from the temporary
 internet file which is not getting updated until I kill the browser and
 reload it.

 For example.

 For the first time, I have the xml file with content
 .Parent 1
 ...Child 1
 ...Child 12
 ...Child 13
 .Parent 2
 ...Child 2
 ...Child 21

 When I call the action,to show tree then it calls the jsp file which loads
 the XML file and shows the jsp tree which works perfectly. Shows complete
 tree view based on XML file.

 Then I will add new child Child 22 into .Parent 2 then the action will
 be called and that action will update the XML file which is located into
 ../WEBINF/pages and returns to the same jsp and reloads jsp which also
 needs to reloads the updated XML file.

 Now issue is , its not reloading that updated XML file and still showing the
 tree without newly added child. When I checked internet temporary files, it
 was still old XML file but at ../WEBINF/pages location, the XML has been
 updated. So I figured out that it is an issue of caching.

 I tried to remove caching with http headers setting
 %
 response.setHeader(Cache-Control,no-cache); //HTTP 1.1
 response.setHeader(Pragma,no-cache); //HTTP 1.0
 response.setDateHeader (Expires, 0); //prevents caching at the proxy
 server
 %

 Also tried with adding extra parameters to change the URL request.

 But still doen't work.

 Anyone has any suggestions, what to do next.

 Thanks for your help.

 Sorry.., If any typos or explained in too much detail.
 --
 View this message in context: 
 http://old.nabble.com/XML-file-reloading-in-JSP-%28Caching-issue%29-tp28657737p28657737.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Re : Re : Disappearing Labels

2010-05-21 Thread Brian Thompson
On Fri, May 21, 2010 at 11:23 AM, Martin Gainty mgai...@hotmail.com wrote:

 FYI:YOU SPELLED WIRED WRONG
 __
 do not intercept or modify this transmission



Are you sure about that?  I thought 'weird' looked more appropriate
than 'wired' in that context.

-Brian

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts : Maintaining state of the Form

2010-05-12 Thread Brian Thompson
I wouldn't recommend that approach.  When the user hits the back
button, they'll jump out of the wizard entirely rather than going back
to the previous page (which is what a web user will expect).  Cue the
reports of the wizard is broken! ;)

-Brian






On Wed, May 12, 2010 at 5:25 AM, Rahul Mohan rahul.mo...@tcs.com wrote:
 Hi,

 I would recommend the first option. Session memory usage has a much bigger
 impact than multiple hits to the server as the memory usage grows linearly
 with the number of users.  For retaining the previous view state, the best
 solution I have seen is to use a single page application, where each page
 in the wizard is downloaded as an HTML fragment and added to the divs
 inside the main page. That way, the previous 'pages' are just hidden divs
 and to go 'back' just unhide the previous div. ( Think of it as an  Ajax
 based tabbed pane without the tab buttons. )

 - rahul

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Iterate over an ArrayList of arrays

2010-05-11 Thread Brian Thompson
It just refers to the top of the value stack.

-Brian



On Tue, May 11, 2010 at 9:17 AM, James Cook james.c...@wecomm.com wrote:
 Where does 'top' come from?


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [S2] Welcome Page as Action?

2010-04-14 Thread Brian Thompson
On Wed, Apr 14, 2010 at 4:22 PM, Burton Rhodes burtonrho...@gmail.com wrote:
 I'm sure this answer is trivial, but I can't figure how to do a
 server-side forward to a Struts action from my welcome page
 (index.jsp).  Currently I have index.jsp redirecting the user, but I
 would like to eliminate the roundtrip that a redirect imposes (I've
 had complaints from mobile users).  All my forward attempts give a
 RequestURL file not found error.  Has anyone done this?  Google seems
 to be unhelpful.



Add a default action in your struts xml.  It's what we're doing in our
Struts app where I work.

package name=foo
  default-action-ref name=welcome/
  action name=welcome class=com.example.WelcomeAction
result name=successwelcome.jsp/result
  /action
/package

-Brian



 Currently this works but makes a roundtrip (index.jsp) :
 % response.sendRedirect(Login_show.action); %

 Serverside attempts without success (index.jsp):
 jsp:forward page=Login_show.action/
 jsp:forward page=/Login_show.action/
 jsp:forward page=Login_show/

 Using:
 Struts 2.1.8
 Tomcat 6.x
 Apache 2.2

 Many Thanks,
 Burton

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [S2] Welcome Page as Action?

2010-04-14 Thread Brian Thompson
Struts runs in a filter that applies to requests that come through, so
the welcome file in web.xml doesn't matter.

-Brian

On Wed, Apr 14, 2010 at 9:21 PM, Krunal Dhamelia nkle...@gmail.com wrote:
 I want to do the same thing but I didn't get you clear Brian.
 If we follow your solution then Could you please explain little in brief
 that how web.xml know about struts default action?
 What should we put in web.xml for welcome file?

 Krunal Dhamelia


 On Wed, Apr 14, 2010 at 6:00 PM, Brian Thompson elephant...@gmail.comwrote:

 On Wed, Apr 14, 2010 at 4:22 PM, Burton Rhodes burtonrho...@gmail.com
 wrote:
  I'm sure this answer is trivial, but I can't figure how to do a
  server-side forward to a Struts action from my welcome page
  (index.jsp).  Currently I have index.jsp redirecting the user, but I
  would like to eliminate the roundtrip that a redirect imposes (I've
  had complaints from mobile users).  All my forward attempts give a
  RequestURL file not found error.  Has anyone done this?  Google seems
  to be unhelpful.
 


 Add a default action in your struts xml.  It's what we're doing in our
 Struts app where I work.

 package name=foo
  default-action-ref name=welcome/
  action name=welcome class=com.example.WelcomeAction
    result name=successwelcome.jsp/result
  /action
 /package

 -Brian



  Currently this works but makes a roundtrip (index.jsp) :
  % response.sendRedirect(Login_show.action); %
 
  Serverside attempts without success (index.jsp):
  jsp:forward page=Login_show.action/
  jsp:forward page=/Login_show.action/
  jsp:forward page=Login_show/
 
  Using:
  Struts 2.1.8
  Tomcat 6.x
  Apache 2.2
 
  Many Thanks,
  Burton

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Regular expressions - Email Validation

2010-03-31 Thread Brian Thompson
Have you tried a simpler regex to make sure that validation is wired
up correctly?  The one you're currently using will reject valid email
addresses (e.g. local+p...@example.com), and it will probably allow
invalid ones through (like localp...@example.a.a).

See
http://tools.ietf.org/html/rfc2822#section-3.4.1 and
http://www.regular-expressions.info/email.html.

-Brian



On Wed, Mar 31, 2010 at 12:19 PM, seeking_solution
pankajj.j...@gmail.com wrote:

 tried using -

 constant-value^([a-zA-Z0-9]([\w\.-]*[a-zA-Z0-9])*...@[a-za-z0-9]([\w\.-amp;]*[a-zA-Z0-9])*\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])[\s]*$/constant-value

 OR

 constant-value^([a-zA-Z0-9]([\w\.-]*[a-zA-Z0-9])*...@[a-za-z0-9]([\w\.-\amp;]*[a-zA-Z0-9])*\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])[\s]*$/constant-value

 still not working. validation xml deploys successfully but validation fails.
 not sure whats happening.



 seeking_solution wrote:

 In struts I have regular expression for validating email like this -
 constant
           constant-nameEMail/constant-name

 constant-value^([a-zA-Z0-9]([\w\.-]*[a-zA-Z0-9])*[...@[a-za-z0-9]([\w\.-]*[a-zA-Z0-9])*\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])[\s]*$/constant-value
 /constant

 Now I want to allow  in the email. I tried like this

 constant-value^([a-zA-Z0-9]([\w\.-]*[a-zA-Z0-9])*[...@[a-za-z0-9]([\w\.-]*[a-zA-Z0-9])*\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])[\s]*$/constant-value

 OR

 constant-value^([a-zA-Z0-9]([\w\.-]*[a-zA-Z0-9])*[...@[a-za-z0-9]([\w\.-]*[a-zA-Z0-9])*\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])[\s]*$/constant-value

 I also tried escaping special char using \.

 But its not working. gives error at deploy time.

 Please help



 --
 View this message in context: 
 http://old.nabble.com/Regular-expressions---Email-Validation-tp28097766p28099106.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Regarding download for Hibernate!

2010-03-31 Thread Brian Thompson
Funny, I was going to suggest http://tinyurl.com/y8r4o25.

-Brian



On Wed, Mar 31, 2010 at 1:00 PM, sandeep kotha
sandeep4u.ko...@gmail.com wrote:
 http://sourceforge.net/projects/hibernate/files/hibernate3/

 On 31 March 2010 20:56, reuben swaroop singh reube...@rediffmail.comwrote:

 Hi,


 I wanna download and use Hibernate.Kindly suggest the webpage where i can
 download Hibernate latest version?

 kindly forward this to appropriate mail id.

 In Anticipation

 With Regards


 Reuben Appadurai




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Translation Properties

2010-03-26 Thread Brian Thompson
Check out the Resource Bundle Editor plugin [1] for Eclipse.  It might help.

-Brian

[1] - http://sourceforge.net/projects/eclipse-rbe/

On Fri, Mar 26, 2010 at 12:15 PM, CRANFORD, CHRIS
chris.cranf...@setech.com wrote:

 I was curious if anyone else has come across a wonderful tool to help
 manage your applicationMessages translations for the various locales you
 use in your Struts applications?  Our project continues to expand into
 other locales and trying to manage upwards of 15+ languages with over
 3000 messages per locale is getting to be a slight headache.

 Chris


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [Struts 2.1.8] s:url : how to open in a new window ?

2010-03-23 Thread Brian Thompson
What if I'm using the app, and I want to open the link in a new tab
instead?  Or how about, I want to open it in the same tab and just use
the back button once I'm done looking at the PDF?

-Brian



On Tue, Mar 23, 2010 at 8:02 AM, Celinio Fernandes cel...@yahoo.com wrote:
 Hi,
 I am using Struts 2.1.8.
 In a JSP, I have a link which calls an action. I want to open that link in a 
 new window. The following code works :
  s:url id=genererRapportPDF action=affichePDF windowState= /
   s:a href=%{genererRapportPDF} 
 onclick=javascript:window.open('%{genererRapportPDF}');Generation/s:a


 The problem is that it also calls the action / opens the link in the current 
 window.
 How to avoid that ?
 Thanks.





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [Struts 2.1.8] s:url : how to open in a new window ?

2010-03-23 Thread Brian Thompson
Target blank isn't necessarily available (e.g. writing the site in xhtml 1.1)

-Brian



On Tue, Mar 23, 2010 at 10:06 AM, Robert Graf-Waczenski r...@lsoft.com wrote:
 Hi!

 How about using

 target=_blank

 instead of onclick?

 Robert

 Gustavo Felisberto schrieb:

 Hello,

 This is a JS thing. Try:
 onclick=javascript:window.open('%{genererRapportPDF}'); return false;

 Gustavo

 -Mensagem original-
 De: Celinio Fernandes [mailto:cel...@yahoo.com] Enviada: terça-feira, 23
 de Março de 2010 13:03
 Para: Struts Users Mailing List
 Assunto: [Struts 2.1.8] s:url : how to open in a new window ?

 Hi,
 I am using Struts 2.1.8.
 In a JSP, I have a link which calls an action. I want to open that link in
 a
 new window. The following code works :
  s:url id=genererRapportPDF action=affichePDF windowState= /
 s:a href=%{genererRapportPDF}
 onclick=javascript:window.open('%{genererRapportPDF}');Generation/s:a
      The problem is that it also calls the action / opens the link in the
 current
 window.
 How to avoid that ?
 Thanks.



 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org







 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts 1 log out issue

2010-03-19 Thread Brian Thompson
I'm not 100% sure, but ${property-name} might work.

-Brian


On Fri, Mar 19, 2010 at 3:43 AM, Arpan arpan.deb...@gmail.com wrote:
 Hi,

 I our project we need to put a dynamic log out link,which will come from a
 properties file.
 While logging out we want to invalidate the session also.

 I have written a logout action class where i m invalidating and removing the
 attribute from the session.
 Then after success in struts-config.xml file I am redirecting to the log out
 url,which is hard coded.

 Does any one know how to access properties file constants into
 struts-config.xml.
 And should be the best way to do.

 Thanks


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Catching url for action not defined

2010-03-11 Thread Brian Thompson
Wildcard mapping should do the trick.  See [1].

-Brian

[1] - 
http://struts.apache.org/2.0.14/docs/action-configuration.html#ActionConfiguration-WildcardMethod



On Thu, Mar 11, 2010 at 1:39 AM, Saeed Iqbal saee...@gmail.com wrote:
 Hi Guys

 How would I do http://localhost/some_name

 where some_name is a random name and not defined as an action in struts.xml

 I would like your input on this please.

 Thanks,
 -saeed

 --
 Saeed Iqbal
 Independant Consultant
 J2EE - Application Architect / Developer


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: how to eliminate time in s:textfield

2010-02-18 Thread Brian Thompson
Just add a getter to your train object that translates the startDate into
the format you'd like.  Use a DateFormat object.

-Brian



On Thu, Feb 18, 2010 at 5:07 PM, fireapple taizhang1...@gmail.com wrote:


 Dear all, I'm using
 s:textfield name=train.startDate cssClass=datepicker

 where startDate is a java.util.Date field of an object train.

 The output is something like this:

 http://old.nabble.com/file/p27647328/date.png

 How can I eliminate the 12:00:00 in the textfield? Thanks!
 --
 View this message in context:
 http://old.nabble.com/how-to-eliminate-time-in-%3Cs%3Atextfield%3E-tp27647328p27647328.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Struts 2 - Global Validation

2010-02-04 Thread Brian Thompson
On Thu, Feb 4, 2010 at 6:10 AM, Arulmani V A arulman...@yahoo.com wrote:

 Hi,

 Apologies for having posted the same query 5 times - it was purely
 UNINTENTIONAL. I'm new to this list and when I posted my query for the
 first
 time, I got the following reply :

 Hi. This is the deliver program at bjtu.edu.cn.
 I'm afraid I wasn't able to deliver your message to the following
 addresses.
 This is a permanent error; I've given up. Sorry it didn't work out.

 02211...@mail.bjtu.edu.cn
 quota exceed
 --- Attachment is a copy of the message.

 [这是服务器 bjtu.edu.cn 的投递程序返回的提示信息]

 到下列地址的信件投递失败,对方服务器无法正常接受或者拒绝接受这封邮件,
 这是一个永久性的错误,服务器已经放弃继续投递。
 02211...@mail.bjtu.edu.cn

 对方服务器返回错误提示:
 quota exceed
 --
 [附件是您所发送信件的原件]

 Hence thinking that my message was not posted (owing to length), I went
 about
 modifying my query and tried posting it repeatedly, each time getting the
 same
 reply
  as above. Finally frustrated that my message is not going through at all
 and that I get do not spam replies, I unsubscribed from the mailing list..

 When the message gets posted successfully, why would you send a auto-reply
 like
 above which perplexes the new user... If you could fix this, then there
 won't be confusion to the newbies who post.

 Regards
 Arul




That's definitely not a Struts mailing list message.  Looks more like a
problem with one list-subscriber's mailbox -- like they got mailbombed or
quit checking their mail or something.

(by the way, I'm sorry I can't help with your validation issue.  I normally
hate posting when I don't have anything helpful to say.)

- Brian


Re: dynamic i18n

2010-02-04 Thread Brian Thompson
What do you get when you try s:property value=%{getText(name)} / ?

-Brian

On Thu, Feb 4, 2010 at 10:09 AM, Peter Symoens peter.symo...@approach.bewrote:

 Sorry, my message was incorrect.

 s:property value=%{getText('%{name}')} /  prints out the (non-i18nzed)
 property value.


 s:property value=%{getText(%{name})} /  prints out nothing.






 On 04/02/2010 16:59, Lukasz Lenart wrote:

 2010/2/4 Peter Symoenspeter.symo...@approach.be:


 s:property value=%{getText(%{name})} /  doesn't seem to do the trick.


 Did you try
 s:property value=%{getText(%{name})} /


 Regards



 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Struts 2 - Global Validation

2010-02-03 Thread Brian Thompson
Could you quit spamming the list, please?



On Wed, Feb 3, 2010 at 2:46 PM, Arulmani V A arulman...@yahoo.com wrote:

 Hi,
 How to do global validation in Struts 2 ? For example, in Struts 1, I can
 define all global regular expression validations in a file called
 validation-regexpr.xml such as :

 constant constant-namealpha/constant-name 
 constant-value[A-Za-z]*/constant-value /constant
 The above global regular expressions can be reused in other validation
 files as follows
 : var var-namemask/var-name var-value${alpha}/var-value /var
 Any help in this regard will be greatly appreciated.

 Regards
 Arul




  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
 http://in.yahoo.com/



Re: struts2 and tables

2010-01-27 Thread Brian Thompson
Something like this should do the trick:

display:column title=input .../ escapeXml=false/

-Brian

On Wed, Jan 27, 2010 at 8:13 AM, Saeed Iqbal saee...@gmail.com wrote:

 For header this is an interesting situation i have not come across
 yet. I cannot say anything.

 On Wednesday, January 27, 2010, Arpan arpan.deb...@gmail.com wrote:
  Hi Saeed,
 
  Replacing that with checkbox element will give me checkbox for every row
 for
  that column.
  But still my column header or title  will not have any checkbox.
 
  On Wed, Jan 27, 2010 at 5:58 PM, Saeed Iqbal saee...@gmail.com wrote:
 
  Replace the s:property value=%{getText('titles.edit'
  )} /
 
 
  display:column href=adminaddoreditarticle  title=Edit paramId=id
  paramProperty=id headerClass=listHeader
 s:property value=%{getText('titles.edit'
  )} /
 /display:column
 
 
  On Wed, Jan 27, 2010 at 5:23 PM, Arpan arpan.deb...@gmail.com wrote:
 
   Hi Saeed,
  
   Thanks for the reply. But how can you display your checkbox inside
 that
   column Title?
  
   On Wed, Jan 27, 2010 at 4:45 PM, Saeed Iqbal saee...@gmail.com
 wrote:
  
For display you can close your display tag open and end your tag
separately.
In between you can place your checkbox.
For example:
display:column href=adminaddoreditarticle  title=Edit
 paramId=id
paramProperty=id headerClass=listHeader
   s:property value=%{getText('titles.edit')} /
   /display:column
   
For checking all (javascript) include an id with each checkbox and
 have
onclick with the top one to be able to code in javascript to check
 all
others.
   
On Wed, Jan 27, 2010 at 4:11 PM, Arpan arpan.deb...@gmail.com
 wrote:
   
 My scenario is that I need a column only for checkboxes. In the
 title
there
 will be a checkbox and a link Delete. How can I show these using
display
 tag.
 When the user will select the top checkbox, all other checkboxes
 in
   that
 column should be selected or unselected accordingly.


 On Thu, Jan 7, 2010 at 6:35 AM, Chris Pratt 
 thechrispr...@gmail.com
  
 wrote:

  Maybe this will clear things up.  This is a working example from
  our
 site:
 
   s:url action=reset-password-csr id=reset
 escapeAmp=false/
   display:table uid=user name=${users.list} pagesize=20
  requestURI=csr-search-results.html class=tableWithHeaderBG
  cellpadding=0 cellspacing=0 summary=This table lists Users
  resulting from a previous search export=false
 display:setProperty name=basic.msg.empty_listNo Users
  Found/display:setProperty
 display:column title=Last Name property=name.lastname
  class=tdLeft scope=row/
 display:column title=First Name property=name.firstname
  class=tdLeftNoPad/
 display:column title=User ID property=userid
  paramId=userid
  value=%{'userid'} paramProperty=userid class=tdLeft
  scope=row/
 display:column title=Email property=email
 paramId=email
  paramProperty=email class=tdLeftNoPad/
 display:column title=Security Questio

 --
 Saeed Iqbal
 Independant Consultant
 J2EE - Application Architect / Developer

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Chain Getting Original URI

2010-01-27 Thread Brian Thompson
The original Action that threw the exception ought to be included in the
stack trace.  That wouldn't easily lend itself to auto-parsing though.

You might be able to pass the request URI to teh error-handler with
something like this in struts.xml:

result name=error type=chain
param name=actionNameerrorHandler/param
param name=namespace//param
param name=methodexecute/param
param name=requestUri${request.requestURI}/param
/result

(making sure that your original action classes have an appropriate public
getRequest() method)

* I haven't tested the above error-handling config, but I am using the
param name=foo${bar}/param format in some other results.

-Brian



On Wed, Jan 27, 2010 at 8:05 AM, CRANFORD, CHRIS
chris.cranf...@setech.comwrote:


 That doesn't solve my original problem Gabriel.

 What I need is a way that I can determine which Action threw the exception
 so that I could include that Request URI in the exception email and logged
 entry.

 I think if I use a redirect result type, to Struts when it redirects it is
 considered a new request and thus I loose what the original action was that
 created the exception in the first place.

 Hmm - Anyone else have any thoughts or suggestions?

 Chris


 -Original Message-
 From: Gabriel Belingueres [mailto:belingue...@gmail.com]
 Sent: Tuesday, January 26, 2010 8:06 PM
 To: Struts Users Mailing List
 Subject: Re: Chain Getting Original URI

 (I found the chain result type somewhat problematic, so I avoid it
 every time I can.)

 Having said that, if your action ONLY captures the exception, log it,
 email it and then forward the output to an error.jsp page, AND you are
 using Log4J you may find useful to attach more than one appender to
 the log category (one that logs it to some file, and other that emails
 it, see the SMTPAppender), then you could avoid the chained action
 execution.

 2010/1/26 CRANFORD, CHRIS chris.cranf...@setech.com:
 
  Our Struts2 application has java.lang.Exception mapped to a global
  result called 'error'.  Our 'error' global result is setup as a CHAIN
  type to send the user to our ExceptionHandlerAction.  This action is
  designed to capture the exception, log it, email it to an administration
  mailbox and then forward the user to our error.jsp page.
 
  When ExceptionHandlerAction is invoked, I need to be able to find out
  what the original request URI was so that it can be included in the log
  and notification.  Is there a way to get the chain history and get the
  first action invoked?  If so, could someone explain it to me?
 
  I had originally set our base action to implement ServletRequestAware
  and set the HttpServletRequest object, but unfortunately I was getting
  NullPointerExceptions with findStaticResource() method.
 
  Thoughts?
  Chris
 
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Chain Getting Original URI

2010-01-27 Thread Brian Thompson
On Wed, Jan 27, 2010 at 9:25 AM, Dale Newfield d...@newfield.org wrote:


 P.S.:
 Patient:  Doctor, doctor!  It hurts when I do *this*.
 Doctor:  Stop doing that.




Hopefully *this* isn't something like walking ;)


Re: Tomcat 5.5 + Struts2 : Erreur lancement Application Web

2010-01-26 Thread Brian Thompson
Je pense que ces deux lignes regard suspect:

   Theme theme = param.displayTheme (user);
   themeActuel = theme.getTheme();

Si la première ligne renvoie null, alors la deuxième ligne jettera NPE (bien
sûr!). Est quelque chose va mal dans param.displayTheme()?

Vous avez mes excuses pour mon mauvais français.

-Brian


2010/1/26 Cimballi cimballi.cimba...@gmail.com

 Je doute que le problème soit sur return success, comme tu as un
 NPE, c'est obligatoirement sur une ligne avec un accès à un objet.
 Peut-être as-tu changé la classe entre temps, tu devrais réexécuter
 ton code et vérifier le numéro de ligne.
 A part ça, dans la variable user tu as mis admnin et non admin,
 est-ce normal ?

 Cimballi


 2010/1/26 canardo972 canardo...@yahoo.fr:
 
  Bonjour Cimballi,
 
  voici le code de la classe ChargementParamAction (la ligne 66 est dans la
  fonction execute : le return SUCCESS:
  public class ChargementParamAction extends ActionSupport {
 
 private static final long serialVersionUID = 1L;
 //utilisateur concern�
 private String user=admnin;
 
 //parametrage simple
 private ParametrageSimple parametrageActuel;
 //theme d'affichage
 private String themeActuel;
 private Configuration configuration;
 //pour les requetes sur la base parametrage
 private ParametrageDao param = new ParametrageHibernateDao();
 
 public void setParametrageActuel(ParametrageSimple
 parametrageActuel) {
 this.parametrageActuel = parametrageActuel;
 }
 
 public String execute()
 {
 //on r�cup�re le param�trage simple
 //(relations, niveau)
 parametrageActuel=param.displayParametrageSimple(user);
 //on r�cup�re le th�me d'affchage
 Theme theme = param.displayTheme(user);
 themeActuel = theme.getTheme();
 //on r�cup�re la configuration
 configuration  = param.displayConfiguration(user);
 return SUCCESS;
 }
 
 //on retourne les param�tres simples
 public ParametrageSimple getParametrageActuel() {
 return parametrageActuel;
 }
 
 //on retourne le th�me d'affichage
 public String getThemeActuel(){
 
 return themeActuel;
 }
 
 //on renvoi la configuration
 public Configuration getConfiguration(){
 
 return configuration;
 }
 
 ...
 ..
  }
 
  Une information supplémentaire :
  Après tests, l'application Web se déploie et fonctionne très bien sous
  Windows sous apache Tomcat 6 et apache tomcat 5.5...
  De même sous Ubuntu en version tomcat 6...
  Je ne suis donc pas sûr que cela vienne du développement et je pense
 (sans
  être sûr) que cela vienne d'une configuration particulière à faire...ou
  d'une librairie à mettre à jour...
  enfin je sais plus trop quoi en penser :-p...
 
  merci en tout cas pour l'intérêt que tu portes à ce problème!
 
 
 
  Cimballi-2 wrote:
 
  Tu as quoi comme code à cette ligne :
  action.ChargementParamAction.execute(ChargementParamAction.java:66) ?
 
  Cimballi
 
 
  2010/1/25 canardo972 canardo...@yahoo.fr:
 
  Bonjour,
 
  Contexte :
  Après installation de tomcat 5.5 et le déploiement de mon application
  Web,
  je rencontre une erreur suivante dès le lancement de l'application...
  Il semble que l'action init ne soit pas trouvée mais après une
  multitude
  de tests suite à des conseils sur des forums, je n'en suis même plus
 sûr
 
  En faisant les mêmes tests sous Windows (déploiement du même .war sous
  une
  version tomcat5.5 ), l'application se lance correctement...même chose
  sous
  windows pour une version tomcat6...
  Je commence à désespérer :-(
 
  [U]version des outils : [/U]
  Debian 5.0.3
  Tomcat 5.5
  Struts 2.0.14
 
  fichier struts.xml:
 
  ?xml version=1.0 encoding=UTF-8 ?
  !DOCTYPE struts PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 2.0//EN
 http://struts.apache.org/dtds/struts-2.0.dtd;
 
  struts
include file=struts-default.xml/
 
  package name=default extends=struts-default
 
 action name=carteConcept
 class=action.ConceptAction
 result type=xslt name=successConcept
 /xsl/Concept.xsl
 /result
 result type=xslt name=successEntity
 /xsl/Entity.xsl
 /result
 /action
 
 
 action name=notice class=action.NoticeAction
 result name=successNotice.jsp/result
 /action
 
 action name=param class=action.ParametrageAction
  method=save/
 action name=paramAv class=action.ParametrageAvAction
  method=save
 result name=success type=redirect-actioninit/result
 /action
[b] action name=init 

Re: Struts2 Validation with Spring convention plugin

2010-01-26 Thread Brian Thompson
You might look into using the Preparable interface [1].  It's useful for
these types of situations; just add the code to generate the list into a
prepare() method on your action class instead of in execute().

Hope this helps,

-Brian

[1] -
http://www.opensymphony.com/xwork/api/com/opensymphony/xwork2/Preparable.html



On Tue, Jan 26, 2010 at 7:22 AM, nani2ratna nani2ra...@gmail.com wrote:


 Hi,

 I am using struts2, spring with spring convention plugin.
 SO all my action classes has been specified in application-Context.xml.
 One of my action class got Bean as a property. So I can dealt with the bean
 properties in JSP.

 The problem, when I am working with my validation i am getting Error
 messages repeated problem.
 Solution for this one is change scope to prototype.

 Now I got another problem, I got a list box in jsp page. If validation
 fails
 I am getting the following error.
 could not be resolved as a collection/array/map/enumeration/iterator type

 This is happening because, list in Javabean becoming null when validation
 fails.

 Then i changed scope=request. And i have added cglib.jar.
 Now i am getting following error.

 org.springframework.beans.factory.BeanCreationException: Error creating
 bean
 with name 'scopedTarget.pmaction': Scope 'request' is not active for the
 current thread; consider defining a scoped proxy for this bean if you
 intend
 to refer to it from a singleton; nested exception is
 java.lang.IllegalStateException: No thread-bound request found: Are you
 referring to request attributes outside of an actual web request, or
 processing a request outside of the originally receiving thread? If you are
 actually operating within a web request and still receive this message,
 your
 code is probably running outside of DispatcherServlet/DispatcherPortlet: In
 this case, use RequestContextListener or RequestContextFilter to expose the
 current request.


 So if you have list box in jsp page and need to do validation on that jsp
 page. ANd you configured all your action classes in Spring appContext file.
 You wont succeed.

 Is that correct. Or is there any solution.

 Thanks and Regards
 RS
 --
 View this message in context:
 http://old.nabble.com/Struts2-Validation-with-Spring-convention-plugin-tp27322517p27322517.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




Re: Struts2 Validation with Spring convention plugin

2010-01-26 Thread Brian Thompson
I'm guessing that you have something like

this.myList = populateList();

inside your execute() method.  When validation fails, it just sends you back
to the jsp without redoing execute(), so of course the list will be null.

-Brian



On Tue, Jan 26, 2010 at 10:26 AM, nani2ratna nani2ra...@gmail.com wrote:


 Hi Brian,
 I have seen that interface.
 If I got more than one action method in one action class.
 Then when ever you execute/call method(action) in that action class,
 this prepare method will be called and this setting of list will be
 executed.

 But My main question why the list setting to null value.
 Isn't it a big, can't we fix it.

 And in my company i fought with everybody to bring struts2 into project.
 And now i don't have any answer to this, untill any guys help me.

 Thanks
 RS



 Brian Thompson-5 wrote:
 
  You might look into using the Preparable interface [1].  It's useful for
  these types of situations; just add the code to generate the list into a
  prepare() method on your action class instead of in execute().
 
  Hope this helps,
 
  -Brian
 
  [1] -
 
 http://www.opensymphony.com/xwork/api/com/opensymphony/xwork2/Preparable.html
 
 
 
  On Tue, Jan 26, 2010 at 7:22 AM, nani2ratna nani2ra...@gmail.com
 wrote:
 
 
  Hi,
 
  I am using struts2, spring with spring convention plugin.
  SO all my action classes has been specified in application-Context.xml.
  One of my action class got Bean as a property. So I can dealt with the
  bean
  properties in JSP.
 
  The problem, when I am working with my validation i am getting Error
  messages repeated problem.
  Solution for this one is change scope to prototype.
 
  Now I got another problem, I got a list box in jsp page. If validation
  fails
  I am getting the following error.
  could not be resolved as a collection/array/map/enumeration/iterator
 type
 
  This is happening because, list in Javabean becoming null when
 validation
  fails.
 
  Then i changed scope=request. And i have added cglib.jar.
  Now i am getting following error.
 
  org.springframework.beans.factory.BeanCreationException: Error creating
  bean
  with name 'scopedTarget.pmaction': Scope 'request' is not active for the
  current thread; consider defining a scoped proxy for this bean if you
  intend
  to refer to it from a singleton; nested exception is
  java.lang.IllegalStateException: No thread-bound request found: Are you
  referring to request attributes outside of an actual web request, or
  processing a request outside of the originally receiving thread? If you
  are
  actually operating within a web request and still receive this message,
  your
  code is probably running outside of DispatcherServlet/DispatcherPortlet:
  In
  this case, use RequestContextListener or RequestContextFilter to expose
  the
  current request.
 
 
  So if you have list box in jsp page and need to do validation on that
 jsp
  page. ANd you configured all your action classes in Spring appContext
  file.
  You wont succeed.
 
  Is that correct. Or is there any solution.
 
  Thanks and Regards
  RS
  --
  View this message in context:
 
 http://old.nabble.com/Struts2-Validation-with-Spring-convention-plugin-tp27322517p27322517.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Struts2-Validation-with-Spring-convention-plugin-tp27322517p27325427.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org




  1   2   >