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
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:
s:iterator value = obj
s:property /
/s:iterator
On jsp page source, I am getting lt;a
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
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#?xml
version=1.0 encoding=UTF-8?web-app
--- Sawan [EMAIL PROTECTED] wrote:
On jsp page source, I am getting lt;a
href=quot;www.google.comquot;gt;Visit
googlelt;/agt; and
lt;a href=quot;www.yahoo.comquot;gt;Visit
yahoolt;/agt;
How can I make both linkable..?
http://struts.apache.org/2.x/docs/property.html
Note the escape
http://struts.apache.org/2.x/docs/property.html
The property tag escapes the string by default. Try s:property
escape=false /
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 );
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
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 bean:write name=${foo}/
But I think it
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
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,
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
hello guys..Im Hiroyuki and im new here..
Hope you could help me with some of my inquiries.
I have this JSP
logic:iterate name=metaEntryConfirmForm indexId=index id=item1
property=items1
tr
tdhtml:multibox property=bitrateboxbean:write
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?
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.
Ian, thanks for the suggestion; unfortunately, it seems to produce the same
result. I've trimmed it to look like:
action name=something class=...SomethingAction
result/WEB-INF/... .jsp/result
/action
(Wildcard and method backreference removed, and method name trimmed from URL
in JSP.)
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
logic:iterate name=metaEntryConfirmForm
--- 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
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 bean:write / like logic:iterate / ?
In general when using tags I
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.
bean:write name=yourbeanhere property=yourindexedpropert[0]/
I believe this because the struts documentation tells me so. ;)
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
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
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 head tag.
I just wonder where is the file in the file system?
http://localhost:8080/struts2-showcase/struts/dojo/dojo.js
Thanks...
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 head tag.
I just wonder where is
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
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
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
After changing the login page avoiding the html tag lib like this:body
html:messages id=message message=truebean:write
name=message /br //html:messages
form method=post action=j_acegi_security_check.do name=userLoginForm
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
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
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
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
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
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
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 user@struts.apache.org
To
'Struts Users Mailing List' user@struts.apache.org
cc
Subject
RE:
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
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
--- Neil Aggarwal [EMAIL PROTECTED] wrote:
I am trying to apply formatting to a value
from s:property.
I tried this:
s:text name=format.currencys:property
value=retailProductsCount//s:text
but that did not format the value. It only outputs
it unchanged.
What does your
Hello:
I am trying to apply formatting to a value
from s:property.
I tried this:
s:text name=format.currencys:property
value=retailProductsCount//s:text
but that did not format the value. It only outputs
it unchanged.
Any ideas how to do this?
Thanks,
Neil
--
Neil Aggarwal,
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
--- 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?
D-
Should that doc be updated?
s:property value=getText('some.key') /
I thought you could simply use the key attr now.
Scott
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Dave:
OK, so I added this to my struts.xml:
constant name=struts.custom.i18n.resources
value=application.properties/
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
--- 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:
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
--- Neil Aggarwal [EMAIL PROTECTED] wrote:
s:text name=format.moneys:param name=value
value=12345//s:text
The outputs format.money instead of $12.345.00 which
I expected.
I defined the format in the struts.xml file like
this:
constant name=format.money
value={0,number,currency} /
Hello:
I did some more testing.
I tried this:
s:text name=format.moneys:param name=value value=12345//s:text
The outputs format.money instead of $12.345.00 which
I expected.
I defined the format in the struts.xml file like
this:
constant name=format.money value={0,number,currency} /
Any
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 :
script
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,
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
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
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
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
I am trying to do the following from within a jsp, using Struts tags
if requestURI.equals(bla)
%@ include file=bla.jsp %
/if
However, I cant seem to find the tags to do do this.
I would have imagined that one could do something like:
bean:define id=request_uri name=request
Try
c:if test=${pageContext.request.requestURI == 'bla'}
%@ include file=bla.jsp%
/c:if
(*Chris*)
On 8/1/07, Mon Cab [EMAIL PROTECTED] wrote:
I am trying to do the following from within a jsp, using Struts tags
if requestURI.equals(bla)
%@ include file=bla.jsp %
/if
However, I cant
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;
}
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
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
It works. Thanks Chris.
--- Chris Pratt [EMAIL PROTECTED] wrote:
Try
c:if test=${pageContext.request.requestURI == 'bla'}
%@ include file=bla.jsp%
/c:if
(*Chris*)
On 8/1/07, Mon Cab [EMAIL PROTECTED] wrote:
I am trying to do the following from within a jsp, using Struts
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
hello..it works properly now.
Ive changed html:text syntax to
tdhtml:text property=%=bitrateTxt[+index+]% size=25//td
and declared bitrateTxt in my actionform as
private String[] bitrateTxt = {};
public String[] getBitrateTxt() {
return this.bitrateTxt;
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:
package
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:
Hi,
How can I access an ActionForm from my JSP in Struts 1.2-1.3 ?
Thank you,
Oleg.
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:
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 global-exceptions
global-exceptions
exception
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
Grish wrote:
s:url id=downloadUrl action=download namespace=/filedownload
s:param name=inputPath value=/images/test.gif /
/s:url
s:a href=%{downloadUrl}Get image/s:a
So does this generate a link relative to your webapp of
filedownload/download.action?inputPath=/images/test.gif
?
( note,
Try this
${actionFormName.propertyName}
Best,
Aram
Aram Mkhitaryan
52, 25 Lvovyan, Yerevan 375000, Armenia
Mobile: +374 91 518456
E-mail: [EMAIL PROTECTED]
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
Ok so When I put a s:head theme=ajax/ it creates some js scripts such as
the below.
script type=text/javascript
src=/struts/dojo/dojo.js/script
script type=text/javascript
src=/struts/simple/dojoRequire.js/script
script type=text/javascript
src=/struts/ajax/dojoRequire.js/script
script
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
71 matches
Mail list logo