[s1] action paths not resolving correctly

2007-08-01 Thread robinbajaj

Hi All, 
I have done this before with success, don't know where am I missing some bit
this time. 

I have a dispatchAction with the following mapping.
URL:http://rafb.net/p/jFxDHr62.html

when I call this dispatch action from a link
URL: http://rafb.net/p/DeTaSj43.html

it works fine, the url requested when i click on this link is 
URL: http://rafb.net/p/c3wPVg22.html

however, when I call the same dispatch action from a regular button, like
shown below:
URL: http://rafb.net/p/9OCLhQ65.html

where setup and defaultsetup are two javascript functions that only setup
some parameters.
But the problem is the url being requested in the browser in this case is :
URL: http://rafb.net/p/DDmG3T15.html

please note that the  is missing here, which is why i get the
http 404 error message.

I don't understand why is the  missing in the second url
request. 

here's my form tag for this form..which seems to be fine too 
URL: http://rafb.net/p/UGazSg74.html

any helpful pointers will be much appreciated, 
thanks,
robin
-- 
View this message in context: 
http://www.nabble.com/-s1--action-paths-not-resolving-correctly-tf4204252.html#a11958775
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with server side validation

2007-08-01 Thread Vamsi

Hi all,

  I am doing validations using struts2 validation framework.
Validations(Server-side validations) are working fine but my problem is
error messages are not getting displayed.when I am doing client-side
validations messages were getting displayed but the samething was not
working with server side validations

More Info on this : I am not redirecting the result it's a normal result
(Not using type="redirect" or "redirect-action")

All inputs are welcome and thankful to everyone 

regards
Vamsi Krishna

 
regards

Vamsi Krishna

-- 
View this message in context: 
http://www.nabble.com/Problem-with-server-side-validation-tf4204157.html#a11958534
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where does /struts look?

2007-08-01 Thread Struts2 Fan

Ok so When I put a  it creates some js scripts such as
the below.






when I write http://localhost:8080/struts/dojo/dojo.js on the address bar It
shows an empty page. But the other 3 js files can be seen properly.

I looked with firebug, too. It cannot display "/struts/dojo/dojo.js"

Any thoughts?
-- 
View this message in context: 
http://www.nabble.com/Where-does--struts-look--tf4200169.html#a11958581
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Accessing ActionForm from JSP

2007-08-01 Thread Aram Mkhitaryan
Try this

   ${actionFormName.propertyName}

Best,
Aram

Aram Mkhitaryan

52, 25 Lvovyan, Yerevan 375000, Armenia

Mobile: +374 91 518456
E-mail: [EMAIL PROTECTED]


Re: [S2] Parameterized File Downloading

2007-08-01 Thread Dale Newfield

Grish wrote:


  

Get image


So does this generate a link relative to your webapp of 
filedownload/download.action?inputPath=/images/test.gif


?

( note, ".action" could be ".do", ".html" or whatever you have that 
extension set to, apparently even "".  (I may have to try that in my 
app...) )


If so, then the problem is somewhere between the receipt of the request 
and the handoff after the execute() method is run from the bean defined 
as fileDownloadAction.  I leave it to you to trace through the process.
Is the setter being called?  In the execute method is there a value?  Is 
it using the class you think it's using?  You can specify a method 
(other than the default execute) if you'd like to put your checks there.


-Dale

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [s1] security filter for EventDispatchAction

2007-08-01 Thread Paul Benedict

Why would you filter on the event? You should filter on the URL.

Strachan, Paul wrote:

Hi,

Does Struts1 provide an example anywhere of how to use Servlet Filter to
access the struts config?

Thanks,
Paul

 
-Original Message-
From: Strachan, Paul [mailto:[EMAIL PROTECTED] 
Sent: Friday, 27 July 2007 3:47 PM

To: user@struts.apache.org
Subject: [s1] security filter for EventDispatchAction

Hi,

 


For security/authorisation we use a servlet filter which checks the url
against our security database.  We've recently upgraded to Struts 1.2.9
and tried using EventDispatchAction, but the problem is the filter does
not know which event to secure against (as the event name is arbitory
value and only struts knows about it in the mapping).

 


The problem with using EventDispatchAction is we don't know the event
parameter name is (ie what method Struts is going to execute) - to check
if the user has access to this action/event/method.

 


I think I will need to access the struts-config (module relative) and
EventDispatch logic from the Filter in order to deduce the current
event.  Does this sound feasible and is there any good example to do
this.

 


Thanks,

Paul

 


Note - our approach works fine for urls mapped with
MappingDispatchAction and DispatchAction (eg for the latter we know what
the dispatch param name is)


**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**
**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exception Handling and Logging

2007-08-01 Thread Paul Benedict
My applications do not catch any errors. I let them bubble out of the 
Action and into an ExceptionHandler object for logging. You can log 
whatever you want -- including the user -- in the handler.


Paul

Richard Sayre wrote:

After reading the Mail Reader walk through, it would seem the best
practice for handling exceptions is throwing them back to your Action
and having a result mapped to handle each specific exception.

Is this the best way to do this?

If I use this method how can I log the stack of each exception that
was thrown?  I know there is a logging interceptor but I have not
found any docs on how to use it.  I would like to make an error log of
everything that happens in the application.  Is it possible to log
other information with the Exception such as the current user?

Thank you,

Rich

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Global Exceptions in Struts

2007-08-01 Thread Pallavi Shetty
Hi All,

When ever there is an error I need to handle the exceptions gracefully.
Since I'm using struts frame work I'm using global-exceptions declarative.

Here is the struts-config.xml where I have included 




I have written ActionExceptionHandler.java class which is the subclass of
ExceptionHandler. In execute function of this I'm logging the error then
forwarding it to chrs_error.jsp.
public ActionForward execute(Exception ex, ExceptionConfig ae,
ActionMapping mapping,
ActionForm formInstance,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException {
System.out.println("Inside execute of ActionExceptionHandler");
logError(ex);
//forward to the jsp
ActionForward forward =
super.execute(ex, ae, mapping, formInstance, request, response);
}
When ever an error occurs chrs_error.jsp is displayed. But it is not going
to ActionExceptionHandler.java class.

What my unerstanding is whenever error occurs it should go to
ActionExceptionHandler and then display chrs_error.jsp.

Any inputs are welcome

Thanks in Advance


Accessing ActionForm from JSP

2007-08-01 Thread Oleg Konovalov
Hi,

How can I access an ActionForm from my JSP in Struts 1.2-1.3 ?

Thank you,
Oleg.


Re: [S2] Parameterized File Downloading

2007-08-01 Thread Grish

Good ideas! I try them out, my only problem now is that if i try to pass the
parameter via the link, I still get the following error:

Can not find a java.io.InputStream with the name [inputStream] in the
invocation stack. Check the  tag specified for this action.

this is my action:






image/gif
inputStream
filename="test.gif"
4096





Same as in the struts 2 showcase example but I removed the set parameter for
the action.

Then I defined my link like so:


  

Get image

I check the logs and I notice my inputPath parameter in my
fileDownloadAction is null. I have a setter for my inputPath parameter so I
don't understand why it's null or why I get this error.

Is there something wrong with my setup? If I do put a parameter for the
inputPath in my action definition like in the Struts 2 showcase example, it
works fine. Any ideas?



DNewfield wrote:
> 
> Grish wrote:
>> Hmmm good point. So does this mean that the only secure way of having
>> downloads is to have specific actions for each download? Or is there a
>> better approach?
> 
> I don't claim to know what the best approach is.  As long as your action 
> does sufficient validation of the specified input path (like checking 
> against a whitelist, or only allowing from certain directories (check 
> for ".." path segments!)), your approach may be OK.  I tend to have a 
> separate action for each "category" of stuff downloaded from my app 
> (along with category-specific validation).  Since I don't know your 
> requirements, I cannot know that that is applicable for you.
> 
> -Dale
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Parameterized-File-Downloading-tf4191759.html#a11957463
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] dojo 0.9 and ***-conversion.properties

2007-08-01 Thread Oguz Kologlu

Hi all,

It seems when doing a dojo.xhrPost any collection object eg: contacts 
[0].firstName gets encoded to  contacts %5B0%5D.firstName.


The ***-conversion.properties don't seem to recognise the element as  
person so the person collection remains null and with lots of  
intercepter errors:


Unexpected Exception caught setting 'contacts%5B0%5D.firstName' on  
'class easybed.web.struts2.ContactsAction: Error setting expression  
'contacts%5B0%5D.firstName' with value '[Ljava.lang.String;@284bf3'


Dojo 0.4.3 used to work ok (probably it didn't encode `[`  
characters). I realise this is a borderline S2 issue since it ships  
with 0.4.3 but it will eventually have to support 0.9 and will have  
to solve the issue.


Has anyone come across this and have a workaround/solution for the  
time being?


Thanks,
Oz

Re: Accessing Request URI using struts tags

2007-08-01 Thread Mon Cab
It works.  Thanks Chris. 


--- Chris Pratt <[EMAIL PROTECTED]> wrote:

> Try
> 
> 
>   <%@ include file="bla.jsp"%>
> 
> 
>   (*Chris*)
> 
> On 8/1/07, Mon Cab <[EMAIL PROTECTED]> wrote:
> > I am trying to do the following from within a jsp, using Struts
> tags
> >
> > 
> >   <%@ include file="bla.jsp" %>
> > 
> >
> > However, I cant seem to find the tags to do do this.
> >
> > I would have imagined that one could do something like:
> >
> >  />
> >  
> >   <%@ include file="bla.jsp" %>
> >  
> >
> > but this does not work.
> > Any adivice would be helpful.  Sorry for the newbie question.
> >
> >
> >
> >  
>

> > Luggage? GPS? Comic books?
> > Check out fitting gifts for grads at Yahoo! Search
> >
>
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DownloadAction and a normal Forward

2007-08-01 Thread Frank W. Zammetti

Hehe, your going after the *right* answer Paul :)

It's clear the caller of getStreamInfo() doesn't like getting null back, 
that was the case originally... now, the NPE must be getting thrown from 
elsewhere after Richard returned the "dummied" StreamInfo object (I 
would have been surprised if constructing one with two null arguments 
*didn't* move the NPE elsewhere, but I was hoping!).


Frank

Paul Benedict wrote:

Who is throwing the NPE? I can't tell by your code what's causing it.

On 8/1/07, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:

You know, I just reread what your trying to do... have you tried using a
global exception handler?  I'm not sure you'll be able to catch the
exception with one, but if you give it a try and you can, there you go,
you can forward as desired from there.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
(2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
(2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

On Wed, August 1, 2007 10:38 am, Gundersen, Richard wrote:

Hi

Thanks for the reply. Tried it and it still gives me a NullPointer.
Maybe that's not such a problem though - since the browser still
redirects to the JSP I want.

However, I was wondering if it's possible to use a ResourceStreamInfo to
redirect to an ActionForward (which ultimately leads to a JSP). Would
this be preferable to using RequestDispatcher.forward(request,
response)?

Richard Gundersen
Java Developer

Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 01, 2007 2:47 PM
To: Struts Users Mailing List
Cc: user@struts.apache.org
Subject: Re: DownloadAction and a normal Forward

It's not the *right* answer, and I'm not sure it won't cause some other
exception anyway (in fact, I'd bet it would), but what if instead of
returning null you instead do:

return new ByteArrayStreamInfo(null, null);

?

Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Wed, August 1, 2007 9:24 am, Gundersen, Richard wrote:

Hi

I'm using a DownloadAction to generate a PDF and return it the the
browser. If there is a problem generating the PDF however, I want to
redirect the user to a specific JSP.

What's the best way of doing this? At the moment I am using


protected StreamInfo getStreamInfo(ActionMapping mapping, ActionForm
form,
   HttpServletRequest request,
HttpServletResponse response) {
...
...
...
 if(problem)



servlet.getServletContext().getRequestDispatcher("/admin.do?doAction=alr

eadyPrinted").forward(request, response);
 return null;
 }
 else {
 return new ByteArrayStreamInfo(contentType, myPdfBytes);
 }
}

This works, but I always get a NullPointer, because I'm returning null
to satisfy the method signature. The exception doesn't cause a problem
for the user though, because the forward has already happened by then
(and the user is happily viewing the JSP)

Is there a better way to do this though - perhaps with
ResourceStreamInfo instead?

Regards

Richard Gundersen
Java Developer

Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS


*** Disclaimer ***

This electronic communication is confidential and for the exclusive

use of

the addressee. It may contain private and confidential information.

The

information, attachments and opinions contained in this E-mail are

those

of its author only and do not necessarily represent those of London
Scottish Bank PLC or any other members of the London Scottish Group.

If you are not the intended addressee, you are prohibited from any
disclosure, distribution or further copying or use of this

communication

or the information in it or taking any action in reliance on it. If

you

have received this communication in error please notify the

Information

Security Manager at [EMAIL PROTECTED] as soon as possible and

delete

the message from all places in your computer where it is stored.

We utilise virus scanning software but we cannot guarantee the

security of

electronic communications and you are advised to check any attachments

for

viruses. We do not accept liability for any loss resulting 

Re: html:text inside logic:iterate

2007-08-01 Thread Hiroyuki Suzuki

hello..it works properly now.

Ive changed html:text syntax to
" size="25"/>

and declared bitrateTxt in my actionform as
private String[] bitrateTxt = {"","","","",""};
public String[] getBitrateTxt() {
return this.bitrateTxt;
}
public void setBitrateTxt(String[] bitrateTxt) {
this.bitrateTxt = bitrateTxt;
}

Hiroyuki Suzuki wrote:
> 
> here is the declaration of bitrateTxt in my actionform
> 
>   private String bitrateTxt;
>   public String getBitrateTxt() {
>   return this.bitrateTxt;
>   }
>   public void setBitrateTxt(String bitrateTxt) {
>   this.bitrateTxt = bitrateTxt;
>   }
>   private String[] bitratebox = {};
>   private String[] items1 = {"500k","1M","2M","5M","6M"};
>   public String[] getBitratebox() {
>   return this.bitratebox;
>   }
>   public void setBitratebox(String[] bitratebox) {
>   this.bitratebox = bitratebox;
>   }   
>   public String[] getItems1(){
>   return this.items1;
>   }
> 
> 
> Hiroyuki Suzuki wrote:
>> 
>> hi but I also declares bitrateText in my actionform..
>> Thank you for your reply..
>> 
>> nuwan chandrasoma-2 wrote:
>>> 
>>> Hi,
>>> 
>>> You dont have a getter method for bitrateTxt property in the bean your 
>>> trying to access (item1).
>>> 
>>> Thanks,
>>> 
>>> Nuwan
>>> 
>>> Hiroyuki Suzuki wrote:
 hello guys..Im Hiroyuki and im new here..
 Hope you could help me with some of my inquiries.

 I have this JSP
 >>> property="items1">  
  
   >>> name="item1"/>
>>> size="25"/>
>>> value="<%="goohigashi"+index%>"/>
>>> value="<%="goonishi"+index%>"/>
>>> value="<%="gooBB"+index%>"/>  
 
 

 my action form contains:
private String[] bitratebox = {};
private String[] items1 = {"500k","1M","2M","5M","6M"};
public String[] getBitratebox() {
return this.bitratebox;
}
public void setBitratebox(String[] bitratebox) {
this.bitratebox = bitratebox;
}   
public String[] getItems1(){
return this.items1;
}

 When i try to run it,  it produces the ff error
 javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
 に対するゲッターメソッドがありません
 which means no getter method for Bean item1 property bitrate.

 What is wrong with my code?
 please help me

   
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/html%3Atext-inside-logic%3Aiterate-tf4199265.html#a11957193
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DownloadAction and a normal Forward

2007-08-01 Thread Paul Benedict
Who is throwing the NPE? I can't tell by your code what's causing it.

On 8/1/07, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>
> You know, I just reread what your trying to do... have you tried using a
> global exception handler?  I'm not sure you'll be able to catch the
> exception with one, but if you give it a try and you can, there you go,
> you can forward as desired from there.
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM/Yahoo: fzammetti
> MSN: [EMAIL PROTECTED]
> Author of "Practical Ajax Projects With Java Technology"
> (2006, Apress, ISBN 1-59059-695-1)
> and "JavaScript, DOM Scripting and Ajax Projects"
> (2007, Apress, ISBN 1-59059-816-4)
> Java Web Parts - http://javawebparts.sourceforge.net
> Supplying the wheel, so you don't have to reinvent it!
>
> On Wed, August 1, 2007 10:38 am, Gundersen, Richard wrote:
> > Hi
> >
> > Thanks for the reply. Tried it and it still gives me a NullPointer.
> > Maybe that's not such a problem though - since the browser still
> > redirects to the JSP I want.
> >
> > However, I was wondering if it's possible to use a ResourceStreamInfo to
> > redirect to an ActionForward (which ultimately leads to a JSP). Would
> > this be preferable to using RequestDispatcher.forward(request,
> > response)?
> >
> > Richard Gundersen
> > Java Developer
> >
> > Email: [EMAIL PROTECTED]
> > Phone: 01618302398
> > Fax: 01618342536
> > London Scottish Bank plc
> > 24 Mount Street
> > Manchester
> > M2 3LS
> >
> > -Original Message-
> > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 01, 2007 2:47 PM
> > To: Struts Users Mailing List
> > Cc: user@struts.apache.org
> > Subject: Re: DownloadAction and a normal Forward
> >
> > It's not the *right* answer, and I'm not sure it won't cause some other
> > exception anyway (in fact, I'd bet it would), but what if instead of
> > returning null you instead do:
> >
> > return new ByteArrayStreamInfo(null, null);
> >
> > ?
> >
> > Frank
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.com
> > AIM/Yahoo: fzammetti
> > MSN: [EMAIL PROTECTED]
> > Author of "Practical Ajax Projects With Java Technology"
> >  (2006, Apress, ISBN 1-59059-695-1)
> > and "JavaScript, DOM Scripting and Ajax Projects"
> >  (2007, Apress, ISBN 1-59059-816-4)
> > Java Web Parts - http://javawebparts.sourceforge.net
> >  Supplying the wheel, so you don't have to reinvent it!
> >
> > On Wed, August 1, 2007 9:24 am, Gundersen, Richard wrote:
> >> Hi
> >>
> >> I'm using a DownloadAction to generate a PDF and return it the the
> >> browser. If there is a problem generating the PDF however, I want to
> >> redirect the user to a specific JSP.
> >>
> >> What's the best way of doing this? At the moment I am using
> >>
> >>
> >> protected StreamInfo getStreamInfo(ActionMapping mapping, ActionForm
> >> form,
> >>HttpServletRequest request,
> >> HttpServletResponse response) {
> >> ...
> >> ...
> >> ...
> >>  if(problem)
> >>
> >>
> > servlet.getServletContext().getRequestDispatcher("/admin.do?doAction=alr
> >> eadyPrinted").forward(request, response);
> >>  return null;
> >>  }
> >>  else {
> >>  return new ByteArrayStreamInfo(contentType, myPdfBytes);
> >>  }
> >> }
> >>
> >> This works, but I always get a NullPointer, because I'm returning null
> >> to satisfy the method signature. The exception doesn't cause a problem
> >> for the user though, because the forward has already happened by then
> >> (and the user is happily viewing the JSP)
> >>
> >> Is there a better way to do this though - perhaps with
> >> ResourceStreamInfo instead?
> >>
> >> Regards
> >>
> >> Richard Gundersen
> >> Java Developer
> >>
> >> Email: [EMAIL PROTECTED]
> >> Phone: 01618302398
> >> Fax: 01618342536
> >> London Scottish Bank plc
> >> 24 Mount Street
> >> Manchester
> >> M2 3LS
> >>
> >>
> >> *** Disclaimer ***
> >>
> >> This electronic communication is confidential and for the exclusive
> > use of
> >> the addressee. It may contain private and confidential information.
> > The
> >> information, attachments and opinions contained in this E-mail are
> > those
> >> of its author only and do not necessarily represent those of London
> >> Scottish Bank PLC or any other members of the London Scottish Group.
> >>
> >> If you are not the intended addressee, you are prohibited from any
> >> disclosure, distribution or further copying or use of this
> > communication
> >> or the information in it or taking any action in reliance on it. If
> > you
> >> have received this communication in error please notify the
> > Information
> >> Security Manager at [EMAIL PROTECTED] as soon as possible and
> > delete
> >> the message from all places in your computer where it is stored.
> >>
> >> We utilise virus scanning software but we cannot guarantee the
> > sec

Re: Not validating in IE 6

2007-08-01 Thread Paul Benedict
Rodrigo, did you solve this problem? What is its status?

On 7/20/07, Paul Benedict <[EMAIL PROTECTED]> wrote:
>
> I'd like to know more about this. Do you have a sample app online that
> demonstrates this? Or an example war?
>
> Rodrigo Reyes wrote:
> > Hi all. I am having a really annoying problem. I have Validation
> > activated
> > for a couple of my forms and it works great in Firefox. Still, for some
> > reason I am not aware of, in Internet Explorer it just goes through the
> > validation process without actually executing the configured
> > validations and
> > the info gets to my action. That causes some awful stack traces you all
> > should know pretty good by now.
> >
> > I am using Struts 1.3, by the way. Any help would be greatly
> appreciated.
> > Thanx
> >
> > Rodrigo
> >
>


Re: html:text inside logic:iterate

2007-08-01 Thread Hiroyuki Suzuki

here is the declaration of bitrateTxt in my actionform

private String bitrateTxt;
public String getBitrateTxt() {
return this.bitrateTxt;
}
public void setBitrateTxt(String bitrateTxt) {
this.bitrateTxt = bitrateTxt;
}
private String[] bitratebox = {};
private String[] items1 = {"500k","1M","2M","5M","6M"};
public String[] getBitratebox() {
return this.bitratebox;
}
public void setBitratebox(String[] bitratebox) {
this.bitratebox = bitratebox;
}   
public String[] getItems1(){
return this.items1;
}


Hiroyuki Suzuki wrote:
> 
> hi but I also declares bitrateText in my actionform..
> Thank you for your reply..
> 
> nuwan chandrasoma-2 wrote:
>> 
>> Hi,
>> 
>> You dont have a getter method for bitrateTxt property in the bean your 
>> trying to access (item1).
>> 
>> Thanks,
>> 
>> Nuwan
>> 
>> Hiroyuki Suzuki wrote:
>>> hello guys..Im Hiroyuki and im new here..
>>> Hope you could help me with some of my inquiries.
>>>
>>> I have this JSP
>>> >> property="items1">  
>>>  
>>>   >> name="item1"/>
>>>>> size="25"/>
>>>>> value="<%="goohigashi"+index%>"/>
>>>>> value="<%="goonishi"+index%>"/>
>>>>> value="<%="gooBB"+index%>"/>  
>>> 
>>> 
>>>
>>> my action form contains:
>>> private String[] bitratebox = {};
>>> private String[] items1 = {"500k","1M","2M","5M","6M"};
>>> public String[] getBitratebox() {
>>> return this.bitratebox;
>>> }
>>> public void setBitratebox(String[] bitratebox) {
>>> this.bitratebox = bitratebox;
>>> }   
>>> public String[] getItems1(){
>>> return this.items1;
>>> }
>>>
>>> When i try to run it,  it produces the ff error
>>> javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
>>> に対するゲッターメソッドがありません
>>> which means no getter method for Bean item1 property bitrate.
>>>
>>> What is wrong with my code?
>>> please help me
>>>
>>>   
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/html%3Atext-inside-logic%3Aiterate-tf4199265.html#a11956936
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Accessing Request URI using struts tags

2007-08-01 Thread Chris Pratt
Try


  <%@ include file="bla.jsp"%>


  (*Chris*)

On 8/1/07, Mon Cab <[EMAIL PROTECTED]> wrote:
> I am trying to do the following from within a jsp, using Struts tags
>
> 
>   <%@ include file="bla.jsp" %>
> 
>
> However, I cant seem to find the tags to do do this.
>
> I would have imagined that one could do something like:
>
> 
>  
>   <%@ include file="bla.jsp" %>
>  
>
> but this does not work.
> Any adivice would be helpful.  Sorry for the newbie question.
>
>
>
>   
> 
> Luggage? GPS? Comic books?
> Check out fitting gifts for grads at Yahoo! Search
> http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Accessing Request URI using struts tags

2007-08-01 Thread Mon Cab
I am trying to do the following from within a jsp, using Struts tags


  <%@ include file="bla.jsp" %>


However, I cant seem to find the tags to do do this. 

I would have imagined that one could do something like:


 
  <%@ include file="bla.jsp" %>
 

but this does not work.  
Any adivice would be helpful.  Sorry for the newbie question. 



  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: including a JavaScript present on my hard disk

2007-08-01 Thread Pierre Goupil
It works ! Thank you very much. As we would say in french : "simplicity is
the highest of smartness". ;-)

Regards,

Pierre



2007/8/1, Hassan Schroeder <[EMAIL PROTECTED]>:
>
> On 8/1/07, Pierre Goupil <[EMAIL PROTECTED]> wrote:
>
> > I have a very simple question to ask : how do I include a JavaScript
> file in
> > a Struts JSP ? I mean : I know how to include it from the Web but I
> would
> > like to download it and include it from my hard disk
>
> > But unfortunately, if I put a direct link to my hard disk, it displays
> it,
> > instead of just including it into my page for me to be able to call it.
> The
> > same applies if the script directive is in the head of my document, FYI.
>
> If I understand your use case, not guaranteed :-), something like this
> using JSTL would probably be your best bet.
>
> 
>   
> 
>
> Depending on what you're trying to do with the JS, you might run into
> some cross-site-scripting problems...
>
> FWIW!
> --
> Hassan Schroeder  [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
"Si le sang ne coule pas assez chaud dans tes veines,
je le répandrais sur le sable pour qu'il bouille au soleil."

(Maraxus de Kelde)


[S2] Is there some BigDecimal validator and conversion routines?

2007-08-01 Thread Gabriel Belingueres
Hi,

I want to enter numeric data in my form and I want it to go into a
BigDecimal action value, however it seems that I can't validate it
using some "bigdecimal" validator in the *-validation.xml file.

There is a double validator, but I don't know if it will introduce
rounding or truncation errors into my BigDecimal value.

Any ideas?

TIA,
Gabriel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: including a JavaScript present on my hard disk

2007-08-01 Thread Hassan Schroeder
On 8/1/07, Pierre Goupil <[EMAIL PROTECTED]> wrote:

> I have a very simple question to ask : how do I include a JavaScript file in
> a Struts JSP ? I mean : I know how to include it from the Web but I would
> like to download it and include it from my hard disk

> But unfortunately, if I put a direct link to my hard disk, it displays it,
> instead of just including it into my page for me to be able to call it. The
> same applies if the script directive is in the head of my document, FYI.

If I understand your use case, not guaranteed :-), something like this
using JSTL would probably be your best bet.


  


Depending on what you're trying to do with the JS, you might run into
some cross-site-scripting problems...

FWIW!
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 URL parameters lost - update (no solution yet)

2007-08-01 Thread JBL

An update for those interested: struts.properties defines
"struts.dispatcher.parametersWorkaround" (false by default), and says it's
for some app servers that don't handle HttpServletRequest.getParameterMap()
(including mine, OC4J):

http://struts.apache.org/2.x/docs/strutsproperties.html

This sounds very closely related, but changing it to true didn't solve the
problem. I made sure the relevant boolean flag got set and affected behavior
in org.apache.struts2.Dispatcher, where the prepare(HttpServletRequest,
HttpServletResponse) method executes request.getParameter("foo") if
paramsWorkaroundEnabled is set. The comment: 'simply read any parameter
(existing or not) to "prime" the request'.

My guess is that this forces the request to process the ServletInputStream
and build the parameter map; not sure, though. No (URL) parameters have yet
appeared. Looking at the byte[] in the ServletInputStream, it's easy to find
the original URL with all parameters intact, but the offset (several
hundred) seems to indicate that something has already processed it.


JBL wrote:
> 
> We have a link to a Struts 2 action that includes a URL parameter
> (.../something_method.action?name=NAME), and the URL parameter is getting
> lost -- it doesn't show up in the action, the request map (when we
> implement RequestAware), the parameter map (when we implement
> ParameterAware), or a custom interceptor we put at the top of the
> interceptor stack.
> 
> When we submit a form to the same action with the same parameter ( type="text" name="name" value="NAME"/>), it comes through just fine for
> both maps (request and parameters), and ParametersInterceptor transfers
> the form parameter values to the action just as you'd expect.
> 
> We've tried hard-coding the method name in struts.xml, figuring the
> wildcard processor might chop off the request parameter; no luck. As early
> as we can pick things out of the request cycle, the URL parameters appear
> to be gone.
> 
> struts.xml looks like:
> 
> 
>   
> ...
> 
>   /WEB-INF/... .jsp
> 
>   
> 
> 
> We're using Struts 2.0.8.
> 
> There's a similar question in the Struts 2 FAQs about the
> ParametersInterceptor not setting values, but the answer there turns out
> to be that your setter and getter have to use the same type. (See
> http://struts.apache.org/2.x/docs/faqs.html, in the Interceptors section.)
> 
> Ian Roughley has a handy book available as a free PDF on InfoQ.com
> (http://www.infoq.com/minibooks/starting-struts2 - please forgive the
> plug); it suggests on page 23 that you should be able to see URL
> parameters via the ParametersInterceptor. Nothing I've seen elsewhere
> contradicts this, though the ParametersInterceptor page
> (http://struts.apache.org/2.x/docs/parameters-interceptor.html) says that
> it would "typically" be used to apply form parameters to an action.
> 
> Any help would be appreciated.
> 
> Thanks,
> 
> Jon
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2-URL-parameters-lost-tf4196254.html#a11953312
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Neil Aggarwal
Dave:

OK, so I added this to my struts.xml:



and I defined application.properties with this
content:

format.money={0,number,currency} 

But, I still get format.money for the output.

Do I need to use the Il8n interceptor somewhere?

Thanks,
Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 3:10 PM
To: Struts Users Mailing List
Subject: RE: [S2] How to apply formatting to s:property?

--- Neil Aggarwal <[EMAIL PROTECTED]> wrote:
> So, is there no way to define a global format
> for currency?

http://struts.apache.org/2.x/docs/localization.html

d.



 


Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel
and lay it on us.
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Big Stick
D- 

Should that doc be updated? 


I thought you could simply use the "key" attr now. 

Scott 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Dave Newton
--- Neil Aggarwal <[EMAIL PROTECTED]> wrote:
> So, is there no way to define a global format
> for currency?

http://struts.apache.org/2.x/docs/localization.html

d.



  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Dave Newton
--- Neil Aggarwal <[EMAIL PROTECTED]> wrote:
> I moved it to a struts.properties file:
> 
> format.money={0,number,currency}
> 
> with no change to the output.
> 
> Also, according to this page, I should be able
> to put it in either struts.xml or struts.properties:
> 
>
http://struts.apache.org/2.x/docs/constant-configuration.html
> 
> Any ideas?

Yes.

Put it in a properties file used by an *action*, not
an *S2 configuration file*. See, the point of putting
a format into a properties file is so it can be
locale-specific. AFAIK config files are not
localization files.

d.



   

Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.
http://autos.yahoo.com/carfinder/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Neil Aggarwal
Dave:

So, is there no way to define a global format
for currency?

Thanks,
Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 2:56 PM
To: Struts Users Mailing List
Subject: RE: [S2] How to apply formatting to s:property?

--- Neil Aggarwal <[EMAIL PROTECTED]> wrote:
> I moved it to a struts.properties file:
> 
> format.money={0,number,currency}
> 
> with no change to the output.
> 
> Also, according to this page, I should be able
> to put it in either struts.xml or struts.properties:
> 
>
http://struts.apache.org/2.x/docs/constant-configuration.html
> 
> Any ideas?

Yes.

Put it in a properties file used by an *action*, not
an *S2 configuration file*. See, the point of putting
a format into a properties file is so it can be
locale-specific. AFAIK config files are not
localization files.

d.



   


Choose the right car based on your needs.  Check out Yahoo! Autos new Car
Finder tool.
http://autos.yahoo.com/carfinder/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Neil Aggarwal
Dave:

I moved it to a struts.properties file:

format.money={0,number,currency}

with no change to the output.

Also, according to this page, I should be able
to put it in either struts.xml or struts.properties:

http://struts.apache.org/2.x/docs/constant-configuration.html

Any ideas?

Thanks,
Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 2:42 PM
To: Struts Users Mailing List
Subject: RE: [S2] How to apply formatting to s:property?

--- Neil Aggarwal <[EMAIL PROTECTED]> wrote:
>  value="12345"/>
> 
> The outputs format.money instead of $12.345.00 which
> I expected.
> 
> I defined the format in the struts.xml file like
> this:
> 
>  value="{0,number,currency}" /> 
> 
> Any ideas?

Try putting it in a properties file.

http://struts.apache.org/2.x/docs/text.html

d.



   

Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



including a JavaScript present on my hard disk

2007-08-01 Thread Pierre Goupil
Hello all,

I have a very simple question to ask : how do I include a JavaScript file in
a Struts JSP ? I mean : I know how to include it from the Web but I would
like to download it and include it from my hard disk, the first reason of
this being that I'm using SSL. Here is my code :

http://yui.yahooapis.com/2.2.0/build/yahoo/yahoo-min.js";>

But unfortunately, if I put a direct link to my hard disk, it displays it,
instead of just including it into my page for me to be able to call it. The
same applies if the script directive is in the head of my document, FYI.

Cheers,

Pierre


-- 
"Si le sang ne coule pas assez chaud dans tes veines,
je le répandrais sur le sable pour qu'il bouille au soleil."

(Maraxus de Kelde)


RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Dave Newton
--- Neil Aggarwal <[EMAIL PROTECTED]> wrote:
>  value="12345"/>
> 
> The outputs format.money instead of $12.345.00 which
> I expected.
> 
> I defined the format in the struts.xml file like
> this:
> 
>  value="{0,number,currency}" /> 
> 
> Any ideas?

Try putting it in a properties file.

http://struts.apache.org/2.x/docs/text.html

d.



   
Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [S2] How to apply formatting to s:property?

2007-08-01 Thread Neil Aggarwal
Hello:

I did some more testing.

I tried this:



The outputs format.money instead of $12.345.00 which
I expected.

I defined the format in the struts.xml file like
this:

 

Any ideas?

Thanks,
Neil


--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.
-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 2:20 PM
To: 'Struts Users Mailing List'
Subject: [S2] How to apply formatting to s:property?

Hello:

I am trying to apply formatting to a value
from s:property.

I tried this:



but that did not format the value.  It only outputs
it unchanged.

Any ideas how to do this?

Thanks, 
Neil


--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] How to apply formatting to s:property?

2007-08-01 Thread Dave Newton
--- Neil Aggarwal <[EMAIL PROTECTED]> wrote:
> I am trying to apply formatting to a value
> from s:property.
> 
> I tried this:
> 
>  value="retailProductsCount"/>
> 
> but that did not format the value.  It only outputs
> it unchanged.

What does your format.currency property look like?

d.



  

Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] How to apply formatting to s:property?

2007-08-01 Thread Neil Aggarwal
Hello:

I am trying to apply formatting to a value
from s:property.

I tried this:



but that did not format the value.  It only outputs
it unchanged.

Any ideas how to do this?

Thanks, 
Neil


--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Spring 2.0 Session scope beans

2007-08-01 Thread Chris Pratt
Your best bet is to write it as an Interceptor and add it to your
default interceptor stack.
  (*Chris*)

On 8/1/07, Jiang, Jane (NIH/NCI) [C] <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am experimenting with the Session scope beans.  I was able to define
> on and verify that one bean is created and associated with each session.
>
> Could I get access to the session from the bean?  I plan to use this
> bean to store user information.  I need to get the user id from the
> request header and populate this object.
>
> I can also check from the action and populate the bean if it is not
> initialized.  But then I will have to check from many places.
>
> Thanks in advance for your help,
>
> Jane
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Spring 2.0 Session scope beans

2007-08-01 Thread Jiang, Jane (NIH/NCI) [C]
Hi,

I am experimenting with the Session scope beans.  I was able to define
on and verify that one bean is created and associated with each session.

Could I get access to the session from the bean?  I plan to use this
bean to store user information.  I need to get the user id from the
request header and populate this object.  

I can also check from the action and populate the bean if it is not
initialized.  But then I will have to check from many places.

Thanks in advance for your help,

Jane



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Conditional validation

2007-08-01 Thread mraible

I need to do something similar - is it possible to have conditional visitor
validation in Struts 2? AFAICT, it isn't.

Basically, I'd like to have a couple of validation rules for a drop-down.
One rule is that the user must select at least one choice when the drop-down
has its radio button selected:


reason != 'partner' or (reason == 'partner' and partnerPositionID !=
'_CHOOSE_')
You must choose a position where you worked with this
person, or choose "Other..."


This works. Now I want to require a number of fields if the person selects
the "Other..." option. The validation syntax starts to get complicated at
this point. I'd like to do something like:

reason != 'partner' or (reason == 'partner' and partnerPositionID !=
'OTHER')  -> kick in visitor validation.

I still think the above syntax is confusing (ref http://tinyurl.com/2htw2k),
I'd much rather write something like:

reason == 'partner' and partnerPositionID == 'OTHER' -> show message

I'm guessing it's possible to write my own FieldExpressionValidator that
inverses the true/false outcome?

Why do I need conditional visitor validation? 

I'm trying to create a "component" that can be re-used in the backend (model
object w/ its own validation rules) and on the front-end (using JSP tag
files or the s:component tag). 

If there's an easier way to do this, please let me know. Of course, I could
use JSF/Wicket/Tapestry - and that might be the outcome if this is not
possible.

Thanks,

Matt


Sparecreative wrote:
> 
> Is there a way to setup conditional validation through the validation.xml
> file?
> 
> I'm currently user the visitor validator method where my core user
> validation properties are in a User-validation.xml file. I want to be able
> to use this same file for all my user actions (register, add, update) and
> just have conditional code which looks a user field to determine
> validation.
> 
> At the moment I'm using a combination of the valididation.xml file and the
> validate method in the action.
> 
> I know the following doesn't work, but can I have something like this:
> 
>  1.0.2//EN"
> "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>
> 
> 
>  
> 
>   user.action.equals('insert') || user.action.equals('register')
>  
>  
> 
>   
> 
>   
>   
> 
>   
> 
>   
>  
> 
> 
> 
> 
> resource not found
> 
> 
> 
>   short-circuit="true">
> 
> 
> 
> 
> 
> 
> 
> 
> 10
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Z.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Conditional-validation-tf3678771.html#a11950499
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Help in using regex in Validation.xml

2007-08-01 Thread sriharsha . chevuru
Actually, I managed to get the correct expression for the condition

^(?!000)\d{9}$

Seems to work!!!



"Rod Bollinger" <[EMAIL PROTECTED]> 
08/01/2007 11:05 AM

Please respond to
"Struts Users Mailing List" 


To
"'Struts Users Mailing List'" 
cc

Subject
RE: Help in using regex in Validation.xml






Ouch! You are correct. :-(

I was looking at this a little more and I thought it would be nice to be
able to do something like ^[001-999]\d{6}$ where the first three positions
must be in the range of 001 through 999 (effectively filtering out the 000
case). Unfortunately, the [] operator can not be used in this fashion.

I was not able to figure out how to properly represent this idea but I 
would
be interested if some RegEx guru out there has any ideas.

Thanks,
-Rod

-Original Message-
From: Christopher Loschen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 13:47
To: Struts Users Mailing List
Subject: RE: Help in using regex in Validation.xml

Not quite.

With the regex ^000\d{6}$, if you DON'T get a match, the input could be
any length and might not even be a number: after all, it isn't matching.
All this checks is the particular case where you have a 9-digit number
which starts with 000: any of the other possible problems aren't
addressed.

Chris

-Original Message-
From: Rod Bollinger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 10:33 AM
To: 'Struts Users Mailing List'
Subject: RE: Help in using regex in Validation.xml

This won't actually work. The parentheses should be braces and if you
don't
supply the start ("^") and end ("$") delimiters you will match
nine-digit
patterns within larger patterns as well (which I assume you don't want).

The correct simple syntax is: ^000\d{6}$

In your code, if you DON'T get a match, you have a valid nine-digit
number
(i.e. a number that is nine digits in length and DOES NOT start with
"000").

If you DO match, you have an invalid item.

HTH,
-Rod

-Original Message-
From: Jasper Floor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 06:17
To: Struts Users Mailing List
Subject: Re: Help in using regex in Validation.xml

On 8/1/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> This question can be termed as an OT as it is related to regex. I have
a
> validation criteria which says:
>
> a number cannot start with "000" which is 9 digits in length.
>
> Can somebody help me in writing a regular expression for this?

What exactly are the criteria?
If its only a nine digit number that cannot start with 000 then I
would look for a number which does start with 000

000\d(6)

if it matches you know it's wrong.

If the number of digits are variable, or you want to catch 00, 100
011, then it gets a little more difficult.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT80BA 


RE: Help in using regex in Validation.xml

2007-08-01 Thread Rod Bollinger
Ouch! You are correct. :-(

I was looking at this a little more and I thought it would be nice to be
able to do something like ^[001-999]\d{6}$ where the first three positions
must be in the range of 001 through 999 (effectively filtering out the 000
case). Unfortunately, the [] operator can not be used in this fashion.

I was not able to figure out how to properly represent this idea but I would
be interested if some RegEx guru out there has any ideas.

Thanks,
-Rod

-Original Message-
From: Christopher Loschen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 13:47
To: Struts Users Mailing List
Subject: RE: Help in using regex in Validation.xml

Not quite.

With the regex ^000\d{6}$, if you DON'T get a match, the input could be
any length and might not even be a number: after all, it isn't matching.
All this checks is the particular case where you have a 9-digit number
which starts with 000: any of the other possible problems aren't
addressed.

Chris

-Original Message-
From: Rod Bollinger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 10:33 AM
To: 'Struts Users Mailing List'
Subject: RE: Help in using regex in Validation.xml

This won't actually work. The parentheses should be braces and if you
don't
supply the start ("^") and end ("$") delimiters you will match
nine-digit
patterns within larger patterns as well (which I assume you don't want).

The correct simple syntax is: ^000\d{6}$

In your code, if you DON'T get a match, you have a valid nine-digit
number
(i.e. a number that is nine digits in length and DOES NOT start with
"000").

If you DO match, you have an invalid item.

HTH,
-Rod

-Original Message-
From: Jasper Floor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 06:17
To: Struts Users Mailing List
Subject: Re: Help in using regex in Validation.xml

On 8/1/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> This question can be termed as an OT as it is related to regex. I have
a
> validation criteria which says:
>
> a number cannot start with "000" which is 9 digits in length.
>
> Can somebody help me in writing a regular expression for this?

What exactly are the criteria?
If its only a nine digit number that cannot start with 000 then I
would look for a number which does start with 000

000\d(6)

if it matches you know it's wrong.

If the number of digits are variable, or you want to catch 00, 100
011, then it gets a little more difficult.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ww2.1.7 to ww225 or struts 2 - java 6 or java 5

2007-08-01 Thread Leonidas Papadakis

Greetings to all,

i have developed a project in ww2.1.7 .I wish to upgrade everything to a 
new version either ww2.2.5 or struts 2. I am guessing that i should go 
to Struts2 right away. Although the way to ww2..2.5 is more straight 
forward at some point the support will stop. ..


Also i am planning to run everything under java 6 or ... should i stick 
to java 5 ?


Thanks for your thoughts.

Leonidas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Help in using regex in Validation.xml

2007-08-01 Thread sriharsha . chevuru
I appologise for the incomplete information. 

Let us assume that I address the length to be 9 and type to be digits 
criteria then this expression seems to address the not condition. 

Now, how do i use this expression in validation.xml, without actually 
writing my custom validator?

Some pointers would be of great help. 



"Christopher Loschen" <[EMAIL PROTECTED]> 
08/01/2007 10:47 AM

Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
RE: Help in using regex in Validation.xml






Not quite.

With the regex ^000\d{6}$, if you DON'T get a match, the input could be
any length and might not even be a number: after all, it isn't matching.
All this checks is the particular case where you have a 9-digit number
which starts with 000: any of the other possible problems aren't
addressed.

Chris

-Original Message-
From: Rod Bollinger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 10:33 AM
To: 'Struts Users Mailing List'
Subject: RE: Help in using regex in Validation.xml

This won't actually work. The parentheses should be braces and if you
don't
supply the start ("^") and end ("$") delimiters you will match
nine-digit
patterns within larger patterns as well (which I assume you don't want).

The correct simple syntax is: ^000\d{6}$

In your code, if you DON'T get a match, you have a valid nine-digit
number
(i.e. a number that is nine digits in length and DOES NOT start with
"000").

If you DO match, you have an invalid item.

HTH,
-Rod

-Original Message-
From: Jasper Floor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 06:17
To: Struts Users Mailing List
Subject: Re: Help in using regex in Validation.xml

On 8/1/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> This question can be termed as an OT as it is related to regex. I have
a
> validation criteria which says:
>
> a number cannot start with "000" which is 9 digits in length.
>
> Can somebody help me in writing a regular expression for this?

What exactly are the criteria?
If its only a nine digit number that cannot start with 000 then I
would look for a number which does start with 000

000\d(6)

if it matches you know it's wrong.

If the number of digits are variable, or you want to catch 00, 100
011, then it gets a little more difficult.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT80A2 


RE: Help in using regex in Validation.xml

2007-08-01 Thread Christopher Loschen
Not quite.

With the regex ^000\d{6}$, if you DON'T get a match, the input could be
any length and might not even be a number: after all, it isn't matching.
All this checks is the particular case where you have a 9-digit number
which starts with 000: any of the other possible problems aren't
addressed.

Chris

-Original Message-
From: Rod Bollinger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 10:33 AM
To: 'Struts Users Mailing List'
Subject: RE: Help in using regex in Validation.xml

This won't actually work. The parentheses should be braces and if you
don't
supply the start ("^") and end ("$") delimiters you will match
nine-digit
patterns within larger patterns as well (which I assume you don't want).

The correct simple syntax is: ^000\d{6}$

In your code, if you DON'T get a match, you have a valid nine-digit
number
(i.e. a number that is nine digits in length and DOES NOT start with
"000").

If you DO match, you have an invalid item.

HTH,
-Rod

-Original Message-
From: Jasper Floor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 06:17
To: Struts Users Mailing List
Subject: Re: Help in using regex in Validation.xml

On 8/1/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> This question can be termed as an OT as it is related to regex. I have
a
> validation criteria which says:
>
> a number cannot start with "000" which is 9 digits in length.
>
> Can somebody help me in writing a regular expression for this?

What exactly are the criteria?
If its only a nine digit number that cannot start with 000 then I
would look for a number which does start with 000

000\d(6)

if it matches you know it's wrong.

If the number of digits are variable, or you want to catch 00, 100
011, then it gets a little more difficult.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S1] access values of a Map

2007-08-01 Thread Niall Pemberton
On 8/1/07, Alexander Jede <[EMAIL PROTECTED]> wrote:
> Hallo,
> me bean has a Map attribute.
> Now I want to get access to the values of the Map. But I do not want
> iterate throw the entire Map. In Java I would write something like:
> map.get("key")
> What is the best way to do this in my JSP with struts 1.3.8 ?

If you have a mapped property called "foo" and you want to access the
"bar" key value - then you can use either  JSTL tag or Struts's
:




The following might work (can't remember if it does in BeanUtils 1.7.0
- but it will in the upcoming BeanUtils 1.8.0)



Niall

> Thanks Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: DownloadAction and a normal Forward

2007-08-01 Thread Frank W. Zammetti
You know, I just reread what your trying to do... have you tried using a
global exception handler?  I'm not sure you'll be able to catch the
exception with one, but if you give it a try and you can, there you go,
you can forward as desired from there.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Wed, August 1, 2007 10:38 am, Gundersen, Richard wrote:
> Hi
>
> Thanks for the reply. Tried it and it still gives me a NullPointer.
> Maybe that's not such a problem though - since the browser still
> redirects to the JSP I want.
>
> However, I was wondering if it's possible to use a ResourceStreamInfo to
> redirect to an ActionForward (which ultimately leads to a JSP). Would
> this be preferable to using RequestDispatcher.forward(request,
> response)?
>
> Richard Gundersen
> Java Developer
>
> Email: [EMAIL PROTECTED]
> Phone: 01618302398
> Fax: 01618342536
> London Scottish Bank plc
> 24 Mount Street
> Manchester
> M2 3LS
>
> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 01, 2007 2:47 PM
> To: Struts Users Mailing List
> Cc: user@struts.apache.org
> Subject: Re: DownloadAction and a normal Forward
>
> It's not the *right* answer, and I'm not sure it won't cause some other
> exception anyway (in fact, I'd bet it would), but what if instead of
> returning null you instead do:
>
> return new ByteArrayStreamInfo(null, null);
>
> ?
>
> Frank
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM/Yahoo: fzammetti
> MSN: [EMAIL PROTECTED]
> Author of "Practical Ajax Projects With Java Technology"
>  (2006, Apress, ISBN 1-59059-695-1)
> and "JavaScript, DOM Scripting and Ajax Projects"
>  (2007, Apress, ISBN 1-59059-816-4)
> Java Web Parts - http://javawebparts.sourceforge.net
>  Supplying the wheel, so you don't have to reinvent it!
>
> On Wed, August 1, 2007 9:24 am, Gundersen, Richard wrote:
>> Hi
>>
>> I'm using a DownloadAction to generate a PDF and return it the the
>> browser. If there is a problem generating the PDF however, I want to
>> redirect the user to a specific JSP.
>>
>> What's the best way of doing this? At the moment I am using
>>
>>
>> protected StreamInfo getStreamInfo(ActionMapping mapping, ActionForm
>> form,
>>HttpServletRequest request,
>> HttpServletResponse response) {
>> ...
>> ...
>> ...
>>  if(problem)
>>
>>
> servlet.getServletContext().getRequestDispatcher("/admin.do?doAction=alr
>> eadyPrinted").forward(request, response);
>>  return null;
>>  }
>>  else {
>>  return new ByteArrayStreamInfo(contentType, myPdfBytes);
>>  }
>> }
>>
>> This works, but I always get a NullPointer, because I'm returning null
>> to satisfy the method signature. The exception doesn't cause a problem
>> for the user though, because the forward has already happened by then
>> (and the user is happily viewing the JSP)
>>
>> Is there a better way to do this though - perhaps with
>> ResourceStreamInfo instead?
>>
>> Regards
>>
>> Richard Gundersen
>> Java Developer
>>
>> Email: [EMAIL PROTECTED]
>> Phone: 01618302398
>> Fax: 01618342536
>> London Scottish Bank plc
>> 24 Mount Street
>> Manchester
>> M2 3LS
>>
>>
>> *** Disclaimer ***
>>
>> This electronic communication is confidential and for the exclusive
> use of
>> the addressee. It may contain private and confidential information.
> The
>> information, attachments and opinions contained in this E-mail are
> those
>> of its author only and do not necessarily represent those of London
>> Scottish Bank PLC or any other members of the London Scottish Group.
>>
>> If you are not the intended addressee, you are prohibited from any
>> disclosure, distribution or further copying or use of this
> communication
>> or the information in it or taking any action in reliance on it. If
> you
>> have received this communication in error please notify the
> Information
>> Security Manager at [EMAIL PROTECTED] as soon as possible and
> delete
>> the message from all places in your computer where it is stored.
>>
>> We utilise virus scanning software but we cannot guarantee the
> security of
>> electronic communications and you are advised to check any attachments
> for
>> viruses. We do not accept liability for any loss resulting from any
>> corruption or alteration of data or importation of any virus as a
> result
>> of receiving this electronic communication.
>>
>> Replies to this E-mail may be monitored for operational or business
>> reasons. London Scottish Bank PLC is regulated by the Fin

RE: Struts+Acegi not working

2007-08-01 Thread Gerardo Corro

After changing the login page avoiding the html tag lib like this:


username : password : The login page 
is finally displayed, the html tag libs caused the problem (A bug?); however, 
when trying to get authenticated it appears this DEBUG level message 
:2007-08-01 17:08:19,134-34313   DEBUG [http-8080-Processor25] Returning cached 
instance of singleton bean 'httpSessionContextIntegrationFilter' 
DefaultListableBeanFactory.getBean (lu00EDnea:197 )  2007-08-01 
17:08:19,134-34313   DEBUG [http-8080-Processor25] Returning cached instance of 
singleton bean 'authenticationProcessingFilter' 
DefaultListableBeanFactory.getBean (lu00EDnea:197 )  2007-08-01 
17:08:19,134-34313   DEBUG [http-8080-Processor25] Returning cached instance of 
singleton bean 'exceptionTranslationFilter' DefaultListableBeanFactory.getBean 
(lu00EDnea:197 )  2007-08-01 17:08:19,134-34313   DEBUG [http-8080-Processor25] 
Returning cached instance of singleton bean 'filterInvocationInterceptor' 
DefaultListableBeanFactory.getBean (lu00EDnea:197 )  2007-08-01 
17:08:19,134-34313   DEBUG [http-8080-Processor25] Publishing event in context 
[Root WebApplicationContext]: 
org.acegisecurity.event.authorization.AuthenticationCredentialsNotFoundEvent[source=FilterInvocation:
 URL: /j_acegi_security_check.do] XmlWebApplicationContext.publishEvent 
(lu00EDnea:241 )  And the user is never authenticated.By the way, the security 
file was also changed to this:

/userLogin.jsp?login_error=errors.credenciales.novalidos

/WEB-INF/page/userLoginSuccess.jsp

*j_acegi_security_check.doPlease 
assist.> Date: Tue, 31 Jul 2007 10:41:58 -0700> From: [EMAIL PROTECTED]> To: 
user@struts.apache.org> Subject: Re: Struts+Acegi not working> > It's because 
now your login page is considered a secure page and it's> not allowing you to 
display it.  Try changing your filters to:> >  >
  FiltroFilterChainProxy>  
*.do>  >  
>  
FiltroFilterChainProxy>  
/j_acegi_security_filter>  
> > I believe you could also change some of the settings in 
your security> context and achieve the same effect, but this should get you 
going.> (*Chris*)> > On 7/31/07, Gerardo Corro <[EMAIL PROTECTED]> wrote:> >> > 
Thanks, but not working yet; when invoking the page 
http://localhost:8080/login_demo/ the same error appear time after time, even 
trying to invoke directly the page 
http://localhost:8080/login_demo/userLogin.jsp shows the same error.these are 
the settings right now:#web.xml
FiltroFilterChainProxy
org.acegisecurity.util.FilterToBeanProxy
targetClass
org.acegisecurity.util.FilterChainProxy
  
FiltroFilterChainProxy  
/*
action
org.apache.struts.action.ActionServlet
config
/WEB-INF/struts-config.xml  
  debug
2   
 detail2
validate  
  true
2   
 userLogin.jsp
struts-config.xml###http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>  


 
   
  
#userLogin.jspusername : 
password : 

#securitycontext

/userLogin.jsp?login_error=errors.credenciales.novalidos

/ 
   /j_acegi_security_check
UserLoginAction.java###public 
ActionForward execute(ActionMapping mapping,ActionForm 
form,HttpServletRequest request,HttpServletResponse 
response) {   ActionMessages messages = new 
ActionMessages();ActionMessage message = new ActionMessage(""); 
 Authentication authentication = 
((SecurityContext)request.getSession().getAttribute("ACEGI_SECURITY_CONTEXT")).getAuthentication();
UsuariosDao usuarios = 
(UsuariosDao)SpringFactory.getBean("usuariosDaoHbn");Usuarios usuario;  
  try {usuario = 
usuarios.findWhereUsuarioEquals(authentication.getName());} catch 
(UsuariosDaoException e) {log.error( e);usuario=null;   
 }   if (usuario != null){   
request.getSession().setAttribute("usuario",

RE: DownloadAction and a normal Forward

2007-08-01 Thread Gundersen, Richard
Hi

Thanks for the reply. Tried it and it still gives me a NullPointer.
Maybe that's not such a problem though - since the browser still
redirects to the JSP I want. 

However, I was wondering if it's possible to use a ResourceStreamInfo to
redirect to an ActionForward (which ultimately leads to a JSP). Would
this be preferable to using RequestDispatcher.forward(request,
response)?

Richard Gundersen
Java Developer
 
Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 2:47 PM
To: Struts Users Mailing List
Cc: user@struts.apache.org
Subject: Re: DownloadAction and a normal Forward

It's not the *right* answer, and I'm not sure it won't cause some other
exception anyway (in fact, I'd bet it would), but what if instead of
returning null you instead do:

return new ByteArrayStreamInfo(null, null);

?

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Wed, August 1, 2007 9:24 am, Gundersen, Richard wrote:
> Hi
>
> I'm using a DownloadAction to generate a PDF and return it the the
> browser. If there is a problem generating the PDF however, I want to
> redirect the user to a specific JSP.
>
> What's the best way of doing this? At the moment I am using
>
>
> protected StreamInfo getStreamInfo(ActionMapping mapping, ActionForm
> form,
>HttpServletRequest request,
> HttpServletResponse response) {
> ...
> ...
> ...
>   if(problem)
>
>
servlet.getServletContext().getRequestDispatcher("/admin.do?doAction=alr
> eadyPrinted").forward(request, response);
>   return null;
>   }
>   else {
>   return new ByteArrayStreamInfo(contentType, myPdfBytes);
>   }
> }
>
> This works, but I always get a NullPointer, because I'm returning null
> to satisfy the method signature. The exception doesn't cause a problem
> for the user though, because the forward has already happened by then
> (and the user is happily viewing the JSP)
>
> Is there a better way to do this though - perhaps with
> ResourceStreamInfo instead?
>
> Regards
>
> Richard Gundersen
> Java Developer
>
> Email: [EMAIL PROTECTED]
> Phone: 01618302398
> Fax: 01618342536
> London Scottish Bank plc
> 24 Mount Street
> Manchester
> M2 3LS
>
>
> *** Disclaimer ***
>
> This electronic communication is confidential and for the exclusive
use of
> the addressee. It may contain private and confidential information.
The
> information, attachments and opinions contained in this E-mail are
those
> of its author only and do not necessarily represent those of London
> Scottish Bank PLC or any other members of the London Scottish Group.
>
> If you are not the intended addressee, you are prohibited from any
> disclosure, distribution or further copying or use of this
communication
> or the information in it or taking any action in reliance on it. If
you
> have received this communication in error please notify the
Information
> Security Manager at [EMAIL PROTECTED] as soon as possible and
delete
> the message from all places in your computer where it is stored.
>
> We utilise virus scanning software but we cannot guarantee the
security of
> electronic communications and you are advised to check any attachments
for
> viruses. We do not accept liability for any loss resulting from any
> corruption or alteration of data or importation of any virus as a
result
> of receiving this electronic communication.
>
> Replies to this E-mail may be monitored for operational or business
> reasons. London Scottish Bank PLC is regulated by the Financial
Services
> Authority.
> __
> This email has been scanned by the MessageLabs Email Security System.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

*** Disclaimer *** 

This electronic communication is confidential and for the exclusive use of the 
addressee. It may contain priva

RE: Help in using regex in Validation.xml

2007-08-01 Thread Rod Bollinger
This won't actually work. The parentheses should be braces and if you don't
supply the start ("^") and end ("$") delimiters you will match nine-digit
patterns within larger patterns as well (which I assume you don't want).

The correct simple syntax is: ^000\d{6}$

In your code, if you DON'T get a match, you have a valid nine-digit number
(i.e. a number that is nine digits in length and DOES NOT start with "000").

If you DO match, you have an invalid item.

HTH,
-Rod

-Original Message-
From: Jasper Floor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 01, 2007 06:17
To: Struts Users Mailing List
Subject: Re: Help in using regex in Validation.xml

On 8/1/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> This question can be termed as an OT as it is related to regex. I have a
> validation criteria which says:
>
> a number cannot start with "000" which is 9 digits in length.
>
> Can somebody help me in writing a regular expression for this?

What exactly are the criteria?
If its only a nine digit number that cannot start with 000 then I
would look for a number which does start with 000

000\d(6)

if it matches you know it's wrong.

If the number of digits are variable, or you want to catch 00, 100
011, then it gets a little more difficult.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where does /struts look?

2007-08-01 Thread Musachy Barroso
It is inside the struts-core jar file.

musachy

On 8/1/07, Struts2 Fan <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I am using struts2.0.9 and trying to use s:div tag. I am looking at the
> showcase demo. It works well. But in my project it cannot find this file. I
> put  tag.
>
> I just wonder where is the file in the file system?
>
> http://localhost:8080/struts2-showcase/struts/dojo/dojo.js
>
> Thanks...
> --
> View this message in context: 
> http://www.nabble.com/Where-does--struts-look--tf4200169.html#a11945864
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:text inside logic:iterate

2007-08-01 Thread Hiroyuki Suzuki

hi but I also declares bitrateText in my actionform..
Thank you for your reply..

nuwan chandrasoma-2 wrote:
> 
> Hi,
> 
> You dont have a getter method for bitrateTxt property in the bean your 
> trying to access (item1).
> 
> Thanks,
> 
> Nuwan
> 
> Hiroyuki Suzuki wrote:
>> hello guys..Im Hiroyuki and im new here..
>> Hope you could help me with some of my inquiries.
>>
>> I have this JSP
>> > property="items1">  
>>  
>>   > name="item1"/>
>>> size="25"/>
>>> value="<%="goohigashi"+index%>"/>
>>> value="<%="goonishi"+index%>"/>
>>> value="<%="gooBB"+index%>"/>  
>> 
>> 
>>
>> my action form contains:
>>  private String[] bitratebox = {};
>>  private String[] items1 = {"500k","1M","2M","5M","6M"};
>>  public String[] getBitratebox() {
>>  return this.bitratebox;
>>  }
>>  public void setBitratebox(String[] bitratebox) {
>>  this.bitratebox = bitratebox;
>>  }   
>>  public String[] getItems1(){
>>  return this.items1;
>>  }
>>
>> When i try to run it,  it produces the ff error
>> javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
>> に対するゲッターメソッドがありません
>> which means no getter method for Bean item1 property bitrate.
>>
>> What is wrong with my code?
>> please help me
>>
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/html%3Atext-inside-logic%3Aiterate-tf4199265.html#a11946326
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where does /struts look?

2007-08-01 Thread Struts2 Fan

Hi all,

I am using struts2.0.9 and trying to use s:div tag. I am looking at the
showcase demo. It works well. But in my project it cannot find this file. I
put  tag.

I just wonder where is the file in the file system? 

http://localhost:8080/struts2-showcase/struts/dojo/dojo.js

Thanks...
-- 
View this message in context: 
http://www.nabble.com/Where-does--struts-look--tf4200169.html#a11945864
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DownloadAction and a normal Forward

2007-08-01 Thread Frank W. Zammetti
It's not the *right* answer, and I'm not sure it won't cause some other
exception anyway (in fact, I'd bet it would), but what if instead of
returning null you instead do:

return new ByteArrayStreamInfo(null, null);

?

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Wed, August 1, 2007 9:24 am, Gundersen, Richard wrote:
> Hi
>
> I'm using a DownloadAction to generate a PDF and return it the the
> browser. If there is a problem generating the PDF however, I want to
> redirect the user to a specific JSP.
>
> What's the best way of doing this? At the moment I am using
>
>
> protected StreamInfo getStreamInfo(ActionMapping mapping, ActionForm
> form,
>HttpServletRequest request,
> HttpServletResponse response) {
> ...
> ...
> ...
>   if(problem)
>
> servlet.getServletContext().getRequestDispatcher("/admin.do?doAction=alr
> eadyPrinted").forward(request, response);
>   return null;
>   }
>   else {
>   return new ByteArrayStreamInfo(contentType, myPdfBytes);
>   }
> }
>
> This works, but I always get a NullPointer, because I'm returning null
> to satisfy the method signature. The exception doesn't cause a problem
> for the user though, because the forward has already happened by then
> (and the user is happily viewing the JSP)
>
> Is there a better way to do this though - perhaps with
> ResourceStreamInfo instead?
>
> Regards
>
> Richard Gundersen
> Java Developer
>
> Email: [EMAIL PROTECTED]
> Phone: 01618302398
> Fax: 01618342536
> London Scottish Bank plc
> 24 Mount Street
> Manchester
> M2 3LS
>
>
> *** Disclaimer ***
>
> This electronic communication is confidential and for the exclusive use of
> the addressee. It may contain private and confidential information. The
> information, attachments and opinions contained in this E-mail are those
> of its author only and do not necessarily represent those of London
> Scottish Bank PLC or any other members of the London Scottish Group.
>
> If you are not the intended addressee, you are prohibited from any
> disclosure, distribution or further copying or use of this communication
> or the information in it or taking any action in reliance on it. If you
> have received this communication in error please notify the Information
> Security Manager at [EMAIL PROTECTED] as soon as possible and delete
> the message from all places in your computer where it is stored.
>
> We utilise virus scanning software but we cannot guarantee the security of
> electronic communications and you are advised to check any attachments for
> viruses. We do not accept liability for any loss resulting from any
> corruption or alteration of data or importation of any virus as a result
> of receiving this electronic communication.
>
> Replies to this E-mail may be monitored for operational or business
> reasons. London Scottish Bank PLC is regulated by the Financial Services
> Authority.
> __
> This email has been scanned by the MessageLabs Email Security System.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DownloadAction and a normal Forward

2007-08-01 Thread Gundersen, Richard
Hi

I'm using a DownloadAction to generate a PDF and return it the the
browser. If there is a problem generating the PDF however, I want to
redirect the user to a specific JSP. 

What's the best way of doing this? At the moment I am using 


protected StreamInfo getStreamInfo(ActionMapping mapping, ActionForm
form,
   HttpServletRequest request,
HttpServletResponse response) {
...
...
...
if(problem)

servlet.getServletContext().getRequestDispatcher("/admin.do?doAction=alr
eadyPrinted").forward(request, response);
return null;
}
else {
return new ByteArrayStreamInfo(contentType, myPdfBytes);
}
}

This works, but I always get a NullPointer, because I'm returning null
to satisfy the method signature. The exception doesn't cause a problem
for the user though, because the forward has already happened by then
(and the user is happily viewing the JSP)

Is there a better way to do this though - perhaps with
ResourceStreamInfo instead?

Regards

Richard Gundersen
Java Developer

Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS


*** Disclaimer *** 

This electronic communication is confidential and for the exclusive use of the 
addressee. It may contain private and confidential information. The 
information, attachments and opinions contained in this E-mail are those of its 
author only and do not necessarily represent those of London Scottish Bank PLC 
or any other members of the London Scottish Group. 

If you are not the intended addressee, you are prohibited from any disclosure, 
distribution or further copying or use of this communication or the information 
in it or taking any action in reliance on it. If you have received this 
communication in error please notify the Information Security Manager at [EMAIL 
PROTECTED] as soon as possible and delete the message from all places in your 
computer where it is stored. 

We utilise virus scanning software but we cannot guarantee the security of 
electronic communications and you are advised to check any attachments for 
viruses. We do not accept liability for any loss resulting from any corruption 
or alteration of data or importation of any virus as a result of receiving this 
electronic communication. 

Replies to this E-mail may be monitored for operational or business reasons. 
London Scottish Bank PLC is regulated by the Financial Services Authority.
__
This email has been scanned by the MessageLabs Email Security System.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S1] access values of a Map

2007-08-01 Thread Jasper Floor
On 8/1/07, Alexander Jede <[EMAIL PROTECTED]> wrote:
>
> hmm ok I found it in the package description of bean.
> My problem was, I searched this information in the doc of the taglib (not 
> javadoc).
> Does this work with other tags then  like   ?

In general when using tags I would avoid the javadoc and go for the
taglib doc (actually  always look at the taglib reference, one stop
shop for all you tag needs ;). I believe it also works for other tags,
but don't quote me on thatunless it works.

mvg,
Jasper

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S1] access values of a Map

2007-08-01 Thread Alexander Jede
Hi,

Am Mittwoch, den 01.08.2007, 12:26 +0200 schrieb Jasper Floor:
...
> I believe you can access indexed properties with bean:write through
> the property attribute.
> 
> 
> I believe this because the struts documentation tells me so. ;)

hmm ok I found it in the package description of bean.
My problem was, I searched this information in the doc of the taglib (not 
javadoc).
Does this work with other tags then  like   ?

Thanks
Alex


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] accessing a JSP variable in a tag

2007-08-01 Thread Dave Newton
--- "Fowler, Perryn" <[EMAIL PROTECTED]> wrote:
> <% String foo = "bar" %>
> 
> I want to write out the value of foo using the
> Struts property tag

You need to either (a) put it in one of the normal
scopes and take advantage of S2's ability to look for
stuff their instead of on the OGNL stack or (b) put it
in / on the OGNL stack (whose key escapes me at the
moment, but it's pretty easy to find out).

d.



   
Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 URL parameters lost

2007-08-01 Thread JBL

Mihel, thanks for the suggestion; my immediate response was, "Why didn't I
think of that?" Unfortunately, nothing seems to change. The generated HTML
turns out about the same in any case. Per Ian's posting, I've also tried
removing the wildcard, to no effect. I'll reply again if anything turns up.

Jon


mihel wrote:
> 
> JBL wrote:
>> We have a link to a Struts 2 action that includes a URL parameter
>> (.../something_method.action?name=NAME), and the URL parameter is getting
>> lost -- it doesn't show up in the action, the request map (when we
>> implement
>> RequestAware), the parameter map (when we implement ParameterAware), or a
>> custom interceptor we put at the top of the interceptor stack.
> 
> Have you tried this
> 
>  
> 
> as described here:
> http://struts.apache.org/2.x/docs/url.html
> ?
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2-URL-parameters-lost-tf4196254.html#a11943813
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 URL parameters lost

2007-08-01 Thread JBL

Ian, thanks for the suggestion; unfortunately, it seems to produce the same
result. I've trimmed it to look like:

  
/WEB-INF/... .jsp
  

(Wildcard and method backreference removed, and method name trimmed from URL
in JSP.) It makes it through the execute() method, but still seems to drop
the URL parameters.

Per mihel's suggestions (a later response), I also tried using the  tag, which didn't seem to affect things either. The generated HTML
looked about the same in any case.

You mentioned the action mapper -- someplace to look for more answers? I'll
reply again if anything turns up.

Jon


Ian Roughley wrote:
> 
> Since it works for the form, but not the wildcard action mapping, it 
> might be an issue with the action mapper.  Try using a non-wildcard 
> mapping to see if it makes a difference.
> 
> /Ian
> 
> JBL wrote:
>> We have a link to a Struts 2 action that includes a URL parameter
>> (.../something_method.action?name=NAME), and the URL parameter is getting
>> lost -- it doesn't show up in the action, the request map (when we
>> implement
>> RequestAware), the parameter map (when we implement ParameterAware), or a
>> custom interceptor we put at the top of the interceptor stack.
>>
>> When we submit a form to the same action with the same parameter (> type="text" name="name" value="NAME"/>), it comes through just fine for
>> both
>> maps (request and parameters), and ParametersInterceptor transfers the
>> form
>> parameter values to the action just as you'd expect.
>>
>> We've tried hard-coding the method name in struts.xml, figuring the
>> wildcard
>> processor might chop off the request parameter; no luck. As early as we
>> can
>> pick things out of the request cycle, the URL parameters appear to be
>> gone.
>>
>> struts.xml looks like:
>>
>> 
>>   
>> ...
>> 
>>   /WEB-INF/... .jsp
>> 
>>   
>> 
>>
>> We're using Struts 2.0.8.
>>
>> There's a similar question in the Struts 2 FAQs about the
>> ParametersInterceptor not setting values, but the answer there turns out
>> to
>> be that your setter and getter have to use the same type. (See
>> http://struts.apache.org/2.x/docs/faqs.html, in the Interceptors
>> section.)
>>
>> Ian Roughley has a handy book available as a free PDF on InfoQ.com
>> (http://www.infoq.com/minibooks/starting-struts2 - please forgive the
>> plug);
>> it suggests on page 23 that you should be able to see URL parameters via
>> the
>> ParametersInterceptor. Nothing I've seen elsewhere contradicts this,
>> though
>> the ParametersInterceptor page
>> (http://struts.apache.org/2.x/docs/parameters-interceptor.html) says that
>> it
>> would "typically" be used to apply form parameters to an action.
>>
>> Any help would be appreciated.
>>
>> Thanks,
>>
>> Jon
>>   
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2-URL-parameters-lost-tf4196254.html#a11943812
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:text inside logic:iterate

2007-08-01 Thread Nuwan Chandrasoma

Hi,

You dont have a getter method for bitrateTxt property in the bean your 
trying to access (item1).


Thanks,

Nuwan

Hiroyuki Suzuki wrote:

hello guys..Im Hiroyuki and im new here..
Hope you could help me with some of my inquiries.

I have this JSP
property="items1">  
 
  
name="item1"/>
   
   "/>
   "/>
   value="<%="gooBB"+index%>"/>  




my action form contains:
private String[] bitratebox = {};
private String[] items1 = {"500k","1M","2M","5M","6M"};
public String[] getBitratebox() {
return this.bitratebox;
}
public void setBitratebox(String[] bitratebox) {
this.bitratebox = bitratebox;
}   
public String[] getItems1(){
return this.items1;
}

When i try to run it,  it produces the ff error
javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
に対するゲッターメソッドがありません
which means no getter method for Bean item1 property bitrate.

What is wrong with my code?
please help me

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S1] access values of a Map

2007-08-01 Thread Jasper Floor
On 8/1/07, Alexander Jede <[EMAIL PROTECTED]> wrote:
> Hallo,
> me bean has a Map attribute.
> Now I want to get access to the values of the Map. But I do not want
> iterate throw the entire Map. In Java I would write something like:
> map.get("key")
> What is the best way to do this in my JSP with struts 1.3.8 ?

I believe you can access indexed properties with bean:write through
the property attribute.


I believe this because the struts documentation tells me so. ;)

Obviously you don't want [0] but something that lets you select
whatever index you want at the time. I'll leave that as an exercise
for the reader.

mvg,
Jasper

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



html:text inside logic:iterate

2007-08-01 Thread Hiroyuki Suzuki

hello guys..Im Hiroyuki and im new here..
Hope you could help me with some of my inquiries.

I have this JSP
  
 
  
   
   "/>
   "/>
   "/>  



my action form contains:
private String[] bitratebox = {};
private String[] items1 = {"500k","1M","2M","5M","6M"};
public String[] getBitratebox() {
return this.bitratebox;
}
public void setBitratebox(String[] bitratebox) {
this.bitratebox = bitratebox;
}   
public String[] getItems1(){
return this.items1;
}

When i try to run it,  it produces the ff error
javax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt
に対するゲッターメソッドがありません
which means no getter method for Bean item1 property bitrate.

What is wrong with my code?
please help me

-- 
View this message in context: 
http://www.nabble.com/html%3Atext-inside-logic%3Aiterate-tf4199265.html#a11943047
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help in using regex in Validation.xml

2007-08-01 Thread Jasper Floor
On 8/1/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> This question can be termed as an OT as it is related to regex. I have a
> validation criteria which says:
>
> a number cannot start with "000" which is 9 digits in length.
>
> Can somebody help me in writing a regular expression for this?

What exactly are the criteria?
If its only a nine digit number that cannot start with 000 then I
would look for a number which does start with 000

000\d(6)

if it matches you know it's wrong.

If the number of digits are variable, or you want to catch 00, 100
011, then it gets a little more difficult.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: taglib documentation

2007-08-01 Thread Jasper Floor
On 7/31/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
> yeah I know. I have been fixing them on code as I find them, if you
> guys report them here I will take care of them

http://struts.apache.org/1.3.8/struts-taglib/tagreference.htm

Just about all descriptions on this page are riddled with unmarkedup tags. ;)

mvg,
Jasper

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HTML Encoding in Struts2

2007-08-01 Thread Sawan

THANKS...Its working now...:jumping:
-- 
View this message in context: 
http://www.nabble.com/HTML-Encoding-in-Struts2-tf4198863.html#a11942434
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] accessing a JSP variable in a tag

2007-08-01 Thread Alexander Jede
Hi,

Am Mittwoch, den 01.08.2007, 19:08 +1000 schrieb Fowler, Perryn:
...
> 
> <% String foo = "bar" %>
> 
> I want to write out the value of foo using the Struts property tag ( so
> that I can make use of its handy escaping functionality)
...
I would do this with 
But I think it should also work with  , but if this 
work, I am not sure.

Alex


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S1] access values of a Map

2007-08-01 Thread Alexander Jede
Hallo,
me bean has a Map attribute.
Now I want to get access to the values of the Map. But I do not want
iterate throw the entire Map. In Java I would write something like:
map.get("key")
What is the best way to do this in my JSP with struts 1.3.8 ?

Thanks Alex


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HTML Encoding in Struts2

2007-08-01 Thread Toni Lyytikäinen
http://struts.apache.org/2.x/docs/property.html

The property tag escapes the string by default. Try 

On 8/1/07, Sawan <[EMAIL PROTECTED]> wrote:
>
>
> Hi experts,
>
> I have following code...
>
> JAVA:
> ArrayList obj = new ArrayList();
> obj.add(" www.google.com Visit google ");
> obj.add(" www.yahoo.com Visit yahoo ")
>
> JSP:
> 
> 
> 
>
> On jsp page source, I am getting " href="www.google.com">Visit google" and
> "Visit yahoo"
>
> So it is not linking "Visit google" and "Visit yahoo", instead of it is
> showing the whole string " www.google.com Visit google " and
> www.yahoo.com
> Visit yahoo .
>
> How can I make both linkable..?
>
> Thanks in advance
>
> Sawan
>
>
> --
> View this message in context:
> http://www.nabble.com/HTML-Encoding-in-Struts2-tf4198863.html#a11942087
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: HTML Encoding in Struts2

2007-08-01 Thread Dave Newton
--- Sawan <[EMAIL PROTECTED]> wrote:
> On jsp page source, I am getting " href="www.google.com">Visit
> google" and
> "Visit
> yahoo"
> 
> How can I make both linkable..?

http://struts.apache.org/2.x/docs/property.html

Note the "escape" attribute.

Now you can be an expert too!

d.



   

Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts+Acegi not working

2007-08-01 Thread Gerardo Corro

Nop, still the same error. It's so weird, I really can´t believe it.Is there a 
sample appliaction of Struts + Acegi out there? I have found snippets, but not 
a single complete 
application.Thanks!web.xml#http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
ACI_AME
contextConfigLocation
/WEB-INF/classes/applicationContextSeguridad.xml
/WEB-INF/classes/applicationContext-dao.xml

FiltroFilterChainProxy
org.acegisecurity.util.FilterToBeanProxy
targetClass
org.acegisecurity.util.FilterChainProxy
  
FiltroFilterChainProxy 
*.do  
 
FiltroFilterChainProxy 
/j_acegi_security_filter
 
org.springframework.web.context.ContextLoaderListener  
  
com.xxx.yyy.utils.PropertiesLoader
action 
   org.apache.struts.action.ActionServlet
config
/WEB-INF/struts-config.xml  
  debug
2   
 detail2
validate  
  true
2
This is the description of my J2EE component 
 RedirigirPaginaInicio
com.xxx.yyy.utils.RedirigirPaginaInicio
paginaInicio
/WEB-INF/login.jsp
 
RedirigirPaginaInicio
/paginainicio 
action
*.do
userLogin.jsp
#struts-cofig.xml##http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
 
 
   
security 
contexthttp://www.springframework.org/dtd/spring-beans.dtd";>
   
 CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT  
/*.do*=httpSessionContextIntegrationFilter,authenticationProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
  


/userLogin.jsp?login_error=errors.credenciales.novalidos

/ 
   /j_acegi_security_check 
   

  
  
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON   
 PATTERN_TYPE_APACHE_ANT
/buscadorperfiles.do*=ROLE_ADMIN,ROLE_TODO
/*.do*=ROLE_ADMIN,ROLE_TODO   

 
/userLogin.jsp?login_error=errors.credenciales.novalidos
false 
   
   
 
 
  select idusuario 
as username, password aspassword,'1' as enabled FROM usuarios WHERE 
idusuario=?select idusuario as 
username, CONCAT('ROLE_',idperfil) from usuarios where idusuario=?  
  

 
   userCache


classpath:/ehcache-failsafe.xml
   
/userLogin.jsp 
   
false


false
   
  
   
#login.jsp<%@
 page language="java"%><%@ taglib 
uri="http://jakarta.apache.org/struts/tags-bean"; prefix="bean"%><%@ taglib 
uri="http://jakarta.apache.org/struts/tags-html"; prefix="html"%><%@ taglib 
uri="http://java.sun.com/jstl/fmt"; prefix="fmt"%><%@ taglib 
uri="http://java.sun.com/jstl/core"; prefix="c" %>  



 
   
username : 

password : 

#com.xxx.yyy.struts.action.UserLoginAction
 ##package com.xxx.yyy.struts.action;import 
javax.servlet.http.HttpServletRequest;import 
javax.servl

[S2] accessing a JSP variable in a tag

2007-08-01 Thread Fowler, Perryn

I am probably being dense, but I have a normal old jsp variable in one
of my pages

Eg

<% String foo = "bar" %>

I want to write out the value of foo using the Struts property tag ( so
that I can make use of its handy escaping functionality)

I cant figure out how to do it though :(

Cheers
Perryn


"This e-mail and any attachments to it (the "Communication") is, unless 
otherwise stated, confidential,  may contain copyright material and is for the 
use only of the intended recipient. If you receive the Communication in error, 
please notify the sender immediately by return e-mail, delete the Communication 
and the return e-mail, and do not read, copy, retransmit or otherwise deal with 
it. Any views expressed in the Communication are those of the individual sender 
only, unless expressly stated to be those of Australia and New Zealand Banking 
Group Limited ABN 11 005 357 522, or any of its related entities including ANZ 
National Bank Limited (together "ANZ"). ANZ does not accept liability in 
connection with the integrity of or errors in the Communication, computer 
virus, data corruption, interference or delay arising from or in respect of the 
Communication."

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HTML Encoding in Struts2

2007-08-01 Thread Sawan

Hi experts,

I have following code...

JAVA:
ArrayList obj = new ArrayList();   
obj.add(" www.google.com Visit google ");
obj.add(" www.yahoo.com Visit yahoo ")

JSP:




On jsp page source, I am getting "Visit google" and
"Visit yahoo"

So it is not linking "Visit google" and "Visit yahoo", instead of it is
showing the whole string " www.google.com Visit google " and  www.yahoo.com
Visit yahoo .

How can I make both linkable..?

Thanks in advance

Sawan

   
-- 
View this message in context: 
http://www.nabble.com/HTML-Encoding-in-Struts2-tf4198863.html#a11942087
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [s2] Developing Portlets with Eclipse tutorial available

2007-08-01 Thread Nils-Helge Garli
Now, remember that I'm in a different time zone ;) I just managed to
finish it before I jumped to bed. And it would be nice if someone
could confirm that it works for them as well. Then I'll add it to the
docs and archetype.

Nils-H

On 8/1/07, Don Brown <[EMAIL PROTECTED]> wrote:
> So, what's stopping you from adding the tutorial to the Struts 2 docs
> and updating the archetype? :)
>
> Don
>
> On 8/1/07, Nils-Helge Garli <[EMAIL PROTECTED]> wrote:
> > I think I've managed to get all the steps written down:
> > http://portletwork.blogspot.com/2007/07/mvnjetty-and-portlets.html
> >
> > Also, I took a struts 2 portlet archetype project and added the
> > necessary files and configurations and put it on my site for download.
> > You can find the link in the blog.
> >
> > Please let me know if you find any errors.
> >
> > Nils-H
> >
> > On 7/29/07, Don Brown <[EMAIL PROTECTED]> wrote:
> > > Very cool!  That has been one of those things I keep meaning to work
> > > on.  If nothing else, add the lines (commented out, of course) to our
> > > portlet archetype.
> > >
> > > Don
> > >
> > > On 7/29/07, Nils-Helge Garli <[EMAIL PROTECTED]> wrote:
> > > > Good tutorial, and a nice way to get started with portlet development!
> > > >
> > > > Maybe not entirely on topic, but inspired by your tutorial and some
> > > > information I found earlier in the pluto FAQ about embedding pluto, I
> > > > started playing around with making the maven-jetty-plugin work with a
> > > > portlet project. The goal was to be able to start up and test my
> > > > portlet just by typing "mvn jetty:run". After collecting information
> > > > from various sources, and looking through the pluto-portal-driver and
> > > > the pluto-portal sources, I have finally managed to run my portlet
> > > > with pluto embedded in jetty, as a real portlet, avoiding the need to
> > > > run it emulated as a servlet. It wasn't really that hard (just had to
> > > > add a filter and a listener to the web.xml), and the overhead is
> > > > hardly noticeable.
> > > >
> > > > I'll try to write a tutorial and/or package it as a maven plugin, but
> > > > until then, if anybody is interested in the details, just let me know.
> > > >
> > > > Nils-H
> > > >
> > > > On 7/27/07, Don Brown <[EMAIL PROTECTED]> wrote:
> > > > > I wrote up a simple tutorial showing how to start developing portlets
> > > > > using Struts 2 and Eclipse.  It takes advantage of the fact that
> > > > > Struts 2 portlets can be deployed as normal web applications, the
> > > > > tutorial is more how to use a Maven 2 archetype with Eclipse, but with
> > > > > portlet-specific bits.
> > > > >
> > > > > I'm a newbie with Eclipse, so I'd appreciate any corrections,
> > > > > suggestions, etc.  Or better yet, submit a CLA and get write access to
> > > > > fix it yourself ;)
> > > > >
> > > > > http://struts.apache.org/2.x/docs/developing-a-portlet-using-eclipse.html
> > > > >
> > > > > Don
> > > > >
> > > > > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]