Author Login
Post Reply
user Digest 11 Feb 2008 20:20:58 -0000 Issue 7857
Topics (messages 182457 through 182486):
Populating dropdown
182457 by: Jayaveeran
182460 by: Rushikesh Thakkar
182462 by: Dave Newton
182463 by: Roger Varley
182472 by: Jorge Martín Cuervo
[SOLVED] Re: How to iterate session variable
182458 by: Rushikesh Thakkar
<html:select> takes more time for populating values.
182459 by: Jayaveeran
182470 by: Randy Burgess
Re: sending param as part of action
182461 by: Dave Newton
182464 by: Anubhav Gupta
182465 by: Dave Newton
182467 by: Anubhav Gupta
[S2] Subsitute variable in i18n properties file
182466 by: hezjing
182476 by: Chris Pratt
Re: [OT] Re: Javascript problem
182468 by: Pablo Vázquez Blázquez
182469 by: Lukasz Lenart
182473 by: Dave Newton
182477 by: Pablo Vázquez Blázquez
[ANN] Struts2 Workshop: April 28-30, Sunnyvale CA
182471 by: Ian Roughley
Re: What cd be wrong?
182474 by: Sam Karl
[probably OT] Default locale on login page
182475 by: Christopher Loschen
Basic setup question (tiles 2)
182478 by: Allen, Daniel
182479 by: Lukasz Lenart
182481 by: Allen, Daniel
Re: validation for <s:select> tag
182480 by: Raghuveer Rawat
Re: [S2] ajax themed submits
182482 by: Laurie Harper
Interceptor Method Filtering
182483 by: stanlick
Re: CharacterEncoding bug in Struts2?
182484 by: Laurie Harper
Not escaping '&' when passing urls as http params
182485 by: Srinivas.N.
[S2] Not escaping '&' when passing urls as http params
182486 by: Srinivas.N.
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_182457.ezm (zipped)
Hi all,
I am populating a dropdown in my jsp which has more than 10,000 elements in
it. Since the record size is very huge the time taken for the JSP to load is
very high. I am using the folowing snippet to populate the dropdown. I am
using struts framework. Is there any other way that I can populate the
dropdown to make it faster ? Please help.
<html:select property ='id' name="Form"
onchange='<%="fnDoCheck("+rowIndex.intValue()+")"%>' style="width:300px">
<bean:define id ="List" property='id' name= "Object"/>
<html:options collection="List" labelProperty="value" property="name"/>
</html:select>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182460.ezm (zipped)Better option would be: using *autocompleter* instead of select.
On Feb 11, 2008 3:01 PM, Jayaveeran <jayaveeran@(protected):
>
> Hi all,
>
> I am populating a dropdown in my jsp which has more than 10,000 elements
> in
> it. Since the record size is very huge the time taken for the JSP to load
> is
> very high. I am using the folowing snippet to populate the dropdown. I am
> using struts framework. Is there any other way that I can populate the
> dropdown to make it faster ? Please help.
>
>
> <html:select property ='id' name="Form"
> onchange='<%="fnDoCheck("+rowIndex.intValue()+")"%>' style="width:300px">
> <bean:define id ="List" property='id' name= "Object"/>
> <html:options collection="List" labelProperty="value" property="name"/>
> </html:select>
> --
> View this message in context:
> http://www.nabble.com/Populating-dropdown-tp15412021p15412021.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182462.ezm (zipped)--- Jayaveeran <jayaveeran@(protected):
> I am populating a dropdown in my jsp which has more
> than 10,000 elements in it.
That's your first problem.
> Since the record size is very huge the time taken for the JSP to load
> is very high. I am using the folowing snippet to populate the dropdown.
> I am using struts framework. Is there any other way that I can populate
> the dropdown to make it faster?
Not really... As suggested, using some form of autocompleter might be a good
idea, depending on how the back end is implemented.
A dropdown with that many elements is going to cause problems on several
fronts; it might make the JSP to big (some (all?) app servers won't handle a
JSP larger than 64K), it may cause an issue in some browsers due to sheer
size, and it'll almost always render fairly slowly.
Dave

Attachment:
user_182463.ezm (zipped)On Monday 11 February 2008 12:01, Jayaveeran wrote:
> Hi all,
>
> I am populating a dropdown in my jsp which has more than 10,000 elements in
> it. Since the record size is very huge the time taken for the JSP to load
> is very high. I am using the folowing snippet to populate the dropdown. I
> am using struts framework. Is there any other way that I can populate the
> dropdown to make it faster ? Please help.
>
I'd recommend re-thinking your design. Even if you could make the population
of your drop-down faster, you're still going to have some serious useability
issues with a dropdown of that size.
Regards
Roger

Attachment:
user_182472.ezm (zipped)Hi,
Maybe you can divide your options in categories and use several
dropdowns with an ajax loading.
>From the user point of view, large data in dropdowns are not very
usefull.
El lun, 11-02-2008 a las 06:01 -0800, Jayaveeran escribió:
> Hi all,
>
> I am populating a dropdown in my jsp which has more than 10,000 elements in
> it. Since the record size is very huge the time taken for the JSP to load is
> very high. I am using the folowing snippet to populate the dropdown. I am
> using struts framework. Is there any other way that I can populate the
> dropdown to make it faster ? Please help.
>
>
> <html:select property ='id' name="Form"
> onchange='<%="fnDoCheck("+rowIndex.intValue()+")"%>' style="width:300px">
> <bean:define id ="List" property='id' name= "Object"/>
> <html:options collection="List" labelProperty="value" property="name"/>
> </html:select>
--
____________________________________
Jorge Martin Cuervo
Outsourcing Emarketplace
deFacto Powered by Standards
email <jorge.martin@(protected)>
voice +34 985 129 820
voice +34 660 026 384
____________________________________
[...]

Attachment:
user_182458.ezm (zipped)This code is just fine. I made a mistake in selecting session variable for
iteration. Kindly excuse me..
On Feb 11, 2008 1:50 PM, Rushikesh Thakkar <thakkar.rushikesh@(protected)>
wrote:
> Hi all,
>
> I am trying to iterate the a session variable of type HashMap<String,
> List> using the following code:
>
> <s:iterator value="#session.physicalArchives">
> <s:property value="key" />
> <s:property value="value"/>
> </s:iterator>
>
> It is not producing any markup. I have made sure that the variable is
> present in the session and has valid values within.
> Kindly help me..
>

Attachment:
user_182459.ezm (zipped)
Hi all,
I am populating a dropdown in my jsp which has more than 10,000 elements in
it. Since the record size is very huge the time taken for the JSP to load is
very high. I am using the folowing snippet to populate the dropdown. I am
using struts framework. Is there any other way that I can populate the
dropdown to make it faster ? Please help.
<html:select property ='id' name="Form"
onchange='<%="fnDoCheck("+rowIndex.intValue()+")"%>' style="width:300px">
<bean:define id ="List" property='id' name= "Object"/>
<html:options collection="List" labelProperty="value" property="name"/>
</html:select>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182470.ezm (zipped)Don't put 10,000 items in a drop down list. There is no way that a human is
going to read 10,000 items in a list and there is a good chance you will
crash their browser. I suggest making the user select some options, through
more drop down lists or input methods, to narrow down the final list before
displaying it.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: Jayaveeran <jayaveeran@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Mon, 11 Feb 2008 06:03:47 -0800 (PST)
> To: <user@(protected)>
> Subject: <html:select> takes more time for populating values.
>
>
> Hi all,
>
> I am populating a dropdown in my jsp which has more than 10,000 elements in
> it. Since the record size is very huge the time taken for the JSP to load is
> very high. I am using the folowing snippet to populate the dropdown. I am
> using struts framework. Is there any other way that I can populate the
> dropdown to make it faster ? Please help.
>
>
> <html:select property ='id' name="Form"
> onchange='<%="fnDoCheck("+rowIndex.intValue()+")"%>' style="width:300px">
> <bean:define id ="List" property='id' name= "Object"/>
> <html:options collection="List" labelProperty="value" property="name"/>
> </html:select>
> --
> View this message in context:
> http://www.nabble.com/%3Chtml%3Aselect%3E-takes-more-time-for-populating-value
> s.-tp15412021p15412021.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment:
user_182461.ezm (zipped)--- Anubhav Gupta <gupta.anubhav@(protected):
> But passing property as value to s:param does not work.
In general, it's a good idea to give more of a hint than "it doesn't work".
> <s:param name="id" value="<s:property value="id"/>"/>
That's not valid XML.
Dave

Attachment:
user_182464.ezm (zipped)I get
Servlet Exception: equal symbol expected on that line.
On Feb 11, 2008, at 8:06 AM, Dave Newton wrote:
> --- Anubhav Gupta <gupta.anubhav@(protected):
>> But passing property as value to s:param does not work.
>
> In general, it's a good idea to give more of a hint than "it
> doesn't work".
>
>> <s:param name="id" value="<s:property value="id"/>"/>
>
> That's not valid XML.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_182465.ezm (zipped)--- Anubhav Gupta <gupta.anubhav@(protected):
> I get Servlet Exception: equal symbol expected on that line.
Right; it's not valid XML.
Dave
> On Feb 11, 2008, at 8:06 AM, Dave Newton wrote:
> > --- Anubhav Gupta <gupta.anubhav@(protected):
> >> But passing property as value to s:param does not work.
> >
> > In general, it's a good idea to give more of a hint than "it
> > doesn't work".
> >
> >> <s:param name="id" value="<s:property value="id"/>"/>
> >
> > That's not valid XML.

Attachment:
user_182467.ezm (zipped)Oh, got it. thanks.
On Feb 11, 2008 8:35 AM, Dave Newton <newton.dave@(protected):
> --- Anubhav Gupta <gupta.anubhav@(protected):
> > I get Servlet Exception: equal symbol expected on that line.
>
> Right; it's not valid XML.
>
> Dave
>
> > On Feb 11, 2008, at 8:06 AM, Dave Newton wrote:
> > > --- Anubhav Gupta <gupta.anubhav@(protected):
> > >> But passing property as value to s:param does not work.
> > >
> > > In general, it's a good idea to give more of a hint than "it
> > > doesn't work".
> > >
> > >> <s:param name="id" value="<s:property value="id"/>"/>
> > >
> > > That's not valid XML.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182466.ezm (zipped)Hi
If I have a message defined in i18n properties file shown below,
label.welcome = Welcome ${name}
How can I subsitute the variable "name" in the JSP?
I tried the following and obviously it doesn't work!
<s:label key="label.welcome">
<s:param name="name">John</s:param>
</s:label>
May be it is a good idea to describe the solution in
http://struts.apache.org/2.x/docs/localization.html?
--
Hez

Attachment:
user_182476.ezm (zipped)Change your property to
label.welcome = Welcome {0}
Then you might try:
<s:label key="label.welcome">
<s:param>John</s:param>
</s:label>
If that doesn't work, you should be able to use:
<label><s:text name="label.welcome"><s:param>John</s:param></s:text></label>
(*Chris*)
On Feb 11, 2008 7:13 AM, hezjing <hezjing@(protected):
> Hi
>
> If I have a message defined in i18n properties file shown below,
>
> label.welcome = Welcome ${name}
>
> How can I subsitute the variable "name" in the JSP?
> I tried the following and obviously it doesn't work!
>
> <s:label key="label.welcome">
> <s:param name="name">John</s:param>
> </s:label>
>
>
> May be it is a good idea to describe the solution in
> http://struts.apache.org/2.x/docs/localization.html?
>
>
> --
>
> Hez
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182468.ezm (zipped)<script type="text/javascript">
function init() {
alert(document.getElementById('name[0]'));
}
dojo.addOnLoad(init);
</script>
It is the same as:
<script type="text/javascript">
alert(document.getElementById('name[0]'));
</script>
It is executed before the page loads.
Dave Newton escribió:
> --- Pablo Vázquez Blázquez <pvazquez@(protected):
>
>> Anyone knows why my javascript code is executed at the loading of a page
>> instead when it *should*??
>>
>
> Mostly because of your definition of "should" ;)
>
>
>> For example, I have a .jspx page with a form:
>> <form>
>> ...
>> <input id="id" ...>
>> ...
>> <form>
>>
>> <script>
>> alert('hi');
>> alert(document.getElementById('id'));
>> </script>
>>
>> 'hi' is shown before the form and then 'undefined'.
>> But my js code is at the end of the page. How can it be possible?
>>
>
> Just because your JavaScript is at the end of the page doesn't mean the
> entire page (thus the DOM) will be rendered before your JavaScript executes,
> and it may be browser-dependent.
>
> As was pointed out you can put your JavaScript in a window.onload section;
> IIRC this will wait until *everything* has loaded, including images etc.
>
> However, putting such JavaScript in an "window.onload" handler *may*
> interfere with Dojo's own onload handler, which may do DOM rewriting and so
> on.
>
> Instead try using Dojo's:
>
> dojo.addOnLoad(aFunction)
>
> where "aFunction" is either a function reference or an anonymous function.
>
> See dojo.addOnLoad [1] and a short blog post [2] for some further
> information.
>
> Dave
>
> [1] Dojo's dojo.addOnLoad function:
> http://redesign.dojotoolkit.org/jsdoc/dojo/HEAD/dojo.addOnLoad
> [2]
> http://www.dev411.com/blog/2006/07/13/dojo-dojo-addonload-vs-body-onload-and-window-onload
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182469.ezm (zipped)Did you put such code inside page header's tags?
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart

Attachment:
user_182473.ezm (zipped)--- Pablo Vázquez Blázquez <pvazquez@(protected):
> <script type="text/javascript">
> function init() {
> alert(document.getElementById('name[0]'));
> }
>
> dojo.addOnLoad(init);
> </script>
>
> It is the same as:
>
> <script type="text/javascript">
> alert(document.getElementById('name[0]'));
> </script>
>
> It is executed before the page loads.
Are you saying there's still a problem? AFAICT there are no issues with
dojo.addOnLoad. When you look at the DOM w/ Firebug does the ID match what
you expect? Is it legal to give an element an ID with brackets in it?
Dave

Attachment:
user_182477.ezm (zipped)If I use a hidden iframe to do the same, it works.
I didn´t put the script tag in the <head>. I don´t understand why I
should do it... I´m using Tiles and my header is reused in several
pages, and this script is only valid for few ones.
Thanks.
Dave Newton escribió:
> --- Pablo Vázquez Blázquez <pvazquez@(protected):
>
>> <script type="text/javascript">
>> function init() {
>> alert(document.getElementById('name[0]'));
>> }
>>
>> dojo.addOnLoad(init);
>> </script>
>>
>> It is the same as:
>>
>> <script type="text/javascript">
>> alert(document.getElementById('name[0]'));
>> </script>
>>
>> It is executed before the page loads.
>>
>
> Are you saying there's still a problem? AFAICT there are no issues with
> dojo.addOnLoad. When you look at the DOM w/ Firebug does the ID match what
> you expect? Is it legal to give an element an ID with brackets in it?
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182471.ezm (zipped)We are pleased to announce a Struts2 workshop, from April 28-30 in
Sunnyvale, CA. Join us the week before JavaOne to learn about the next
generation of evolution of the Struts web framework.
In this three day workshop-style training course you'll learn everything
you need to know to effectively write applications using Struts2. We'll
take a practical and hands-on approach, dividing the time into 40%
theory and 60% exercises. Our instructor, Ian Roughley, has extensive
experience developing Struts2 applications; is a committer on the Apache
Struts2 project; and is the author of "Practical Apache Struts2 Web 2.0
Projects".
Over this three day workshop you'll learn:
- Struts2 architecture and how you can take advantage of the features in
your applications
- How to use existing domain models in your actions
- XML, annotation, and convention-based configuration
- How to create user-friendly URLs and REST interfaces
- Strategies for storing application state
- Techniques for creating wizards and using conversation scopes
- How to test your web applications
- Ways to expedite user interface creation using themes and templates
- How to secure your applications
- Available Ajax tags, how to integrate Ajax libraries, and how to
return JSON & XML data
- Creating plug-ins to reuse common code
- How to integrate Struts2 into Spring and J2EE application stacks
- Getting the most out of Struts2 with tips, tricks, and best practices
As a special promotion, if you register before March 14th, you will
receive a discounted price of $1350 - a $300 savings off the regular
workshop price of $1650.
For more information and to register, visit
http://www.fdar.com/training/struts2.
--
From Down & Around, Inc.
Consulting * Training / Mentoring * Agile Process * Open Source
web: http://www.fdar.com - email: iinfo@(protected)

Attachment:
user_182474.ezm (zipped)Yes. I do have that hidden field oldName. I tried with the downloaded prj
too. Didn't work for me. I'm not sure what I'm missing. Thx. for the reply.
Sam
On Feb 9, 2008 12:26 PM, Nils-Helge Garli Hegvik <nilsga@(protected):
> Have you remembered the "oldName" hidden field in the edit form? And
> have you tried downloading the source for the tutorial and see if you
> get the same behaviour with it?
>
> Nils-H
>
> On Feb 8, 2008 8:28 PM, Sam Karl <samckarl@(protected):
> > Hi,
> >
> > I'm new to struts and portlets. I tried out the this tutorial as
> a
> > start.
> >
> >
> http://struts.apache.org/2.x/docs/struts-2-portlet-tutorial.html
> >
> > After implementing all functionalities described in that tutorial, the
> > "editBookMark" option doesn't work. I get the following exception when
> I
> > try to edit the newly added link
> >
> >
javax.portlet.PortletException: Error executing action editBookmark
> >
> > Caused by:
java.lang.IllegalArgumentException: Null object: Preference
> key
> >
> >
> >
> > My EditBookmarkAction class does implement PortletPreferencesAware and
> has a
> > setter for the preference and everything. So I'm guessing the reason is
> the
> > edit action class gets called before it loads the jsp if that makes
> sense.
> > But I'm not sure how to fix it :) Or is it a different issue? Could any
> one
> > shed some light on that?
> >
> >
> > Thanks,
> > Sam
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182475.ezm (zipped)Hi all,
My best guess is that this is happening before Struts gets involved, but
I wondered if anyone might have some suggestions or places for me to
look. I'm having some strange i18n behavior on our initial login page.
Our app is still using Struts 1.1 (don't ask..). We're using form-based
authentication through WebLogic, set up pretty much plain vanilla from
what I can tell (from the web.xml):
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login_error.jsp</form-error-page>
</form-login-config>
</login-config>
User gets redirected to the login page, it appears, before the Struts
actions are called at all, because I can't seem to find anyplace to put
a breakpoint in my debugger.
The problem is that when I have more than one locale defined in my
browser preferences (either in IE or FF), it doesn't take the default
first choice (which is en_us) but one of the others instead. I don't
have the same problem on other internationalized web sites, so I presume
it's a problem in my code or configuration or something, but I'm not
sure where to start looking. Oh, by the way, once the user logs in,
there are user preferences for locale which kick in, but those obviously
don't apply to this page because there's no user in the session as of
yet, so it has to be getting the locale from the browser preferences.
Any ideas, anyone? Thanks!
Chris Loschen

Attachment:
user_182478.ezm (zipped)Hi.
I'm completely new at Struts and Tiles, but was given the task of
converting an app that relied on the first versions of those to the the
newer version.
We build with Maven 2, and as instructed by the documentation at
http://tiles.apache.org/dev/snapshots.html, I added
<dependency>
<groupId>org.apache.struts.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
To my pom.xml file. This downloaded tiles-api.jar and tiles-core.jar.
However, at http://tiles.apache.org/migration/index.html, it says that
there are three jars needed (tiles-jsp.jar being the third). When I try
to access a site, I get an exception that
"http://tiles.apache.org/tags-tiles" was not found, and it seems likely
that the missing JSP jar is the cause. Can anyone tell me where I can
find that jar, and what I need to give Maven as a <dependency>? I tried
copying the above and replacing the artifact ID with "tiles-jar" but
that gave me an error saying that the artifact was not found in the
repositor (which is set as per the snapshots link above).
Does anyone know what the dependency for tiles-jsp.jar is?
Thanks,
~Dan Allen
--
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP").
This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.

Attachment:
user_182479.ezm (zipped)It is better to add dependency for Tiles plugin, it will download all
needed jars for you:
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>2.0.9</version>
</dependency>
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart

Attachment:
user_182481.ezm (zipped)I replaced the dependency I had before with the dependency you gave, but
Maven's generated /lib directory still does not contain tiles-jsp.jar,
and the error message has not changed:
javax.servlet.ServletException: The absolute uri:
http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml
or the jar files deployed with this application
org.apache.struts2.dispatcher.Dispatcher.serviceAction (
Dispatcher.java:5
18)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:421)
org.apache.jasper.JasperException: The absolute uri:
http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml
or the jar files deployed with this application
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
tWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile (
JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service (
JspServlet.java:264)
javax.servlet.http.HttpServlet.service (
HttpServlet.java:802)
org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletD
ispatcherResult.java:139)
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:178)
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:343)
.
.
.
Is that the correct URI? Is there some setup or XML file somewhere that
I need to edit before I can drop "<%@(protected)
uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>" into my JSP
files and expect it to work?
~Dan Allen
-----Original Message-----
From: Lukasz Lenart [mailto:lukasz.lenart@(protected)]
Sent: Monday, February 11, 2008 2:41 PM
To: Struts Users Mailing List
Subject: Re: Basic setup question (tiles 2)
It is better to add dependency for Tiles plugin, it will download all
needed jars for you:
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-tiles-plugin</artifactId>
<version>2.0.9</version>
</dependency>
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
--
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP").
This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.

Attachment:
user_182480.ezm (zipped)Thanks Jeromy, Sorry, I did not provide enough detail.
Only Header Key value is numeric '-1' so first option can be ruled out for
me.
For rest of the values Key is ISO Code e.g. USA and Value is Country Name
e.g. 'United States'
Below expression is not working for me.
<param name="expression"><![CDATA[user.country ==
> '-1']]></param>
This condition is returning true whether I select a value in list box or
not..
What can be other ways to check drop down values?
Thanks
On Feb 10, 2008 10:50 PM, Jeromy Evans <jeromy.evans@(protected)>
wrote:
> If your keys are just numbers, perhaps you could use the Int Validator
>
> <field-validator type="int">
> <param name="min">0</param>
> <message key="required.country"></message>
> </field-validator>
>
> http://struts.apache.org/2.x/docs/int-validator.html
>
> Otherwise I'd try some variations of the expression. It's operating on
> the getUser().getCountry() property of your action so the expression
> (user.country == '-1') must be valid for its type.
>
> Raghuveer Rawat wrote:
> > Hi, I need help for mandatory field validation for s:select.
> > I am trying to do client side xml validation.
> >
> > jsp code for country list:
> >
> > <s:select name="user.country" headerKey="-1" headerValue="Select
> Country"
> > list="countryList" listKey="code"
> > listValue="name" required="true" />
> >
> > I tried with below validation code but it is not working.. Not sure what
> > will be other approach..
> >
> > <field name="user.country">
> > <field-validator type="fieldexpression">
> > <param name="expression"><![CDATA[user.country ==
> > '-1']]></param>
> > <message key="required.country"></message>
> > </field-validator>
> > </field>
> >
> > Thanks a lot...
> >
> >
> > ------------------------------------------------------------------------
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.516 / Virus Database: 269.19.21/1267 - Release Date:
> 8/02/2008 8:12 PM
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182482.ezm (zipped)Jason Wyatt wrote:
> I raised a JIRA ticket a while ago (
> <https://issues.apache.org/struts/browse/WW-1930> WW-1930 ) about the value
> of a <s:submit> tag not being set on the Action if the submit was ajax
> themed... apparently the problem was fixed in Struts2 release 2.1.
>
> I'm hoping to get my hands on the fix, but, although 2.1 has been released,
> it doesn't seem to be marked as a GA or "Best available" release on the
> apache S2 website. I'm wondering, is release 2.1 generally considered
> production ready, or still needing some revisions?
There has not yet been any release of the 2.1 stream. 2.1.0 is available
as a Test Build but is not considered 'GA' (or even beta) quality.
Anyone interested in forthcoming releases should follow the dev list.
All development discussions take place on the dev list, and anyone who
follows the dev list knows as much as the rest of us :)
A good way to check-in without bothering with another list is through
the nabble forum
* http://www.nabble.com/Struts---Dev-f205.html
L.

Attachment:
user_182483.ezm (zipped)
I would like to add more granular interceptor filtering that is sensitive to
the package and name elements but do not want to violate the DRY principle.
Does anyone know if there is such a capability either in 2.0.11 or slated
for 2.1?
Thanks,
Scott
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182484.ezm (zipped)Asgaut wrote:
> I have recently been struggling with a utf-8 to ISO-8859-1 problem with Ajax
> and Struts2.
>
> The problem is basically that our application requires iso-8859-1 characters
> and Ajax is configured to only post utf-8 (ajax is utf-8 either way, can not
> be changed). So some kind of conversion has to take place at some level.
>
> My problem can be divided into two parts:
> 1. Make Struts2 understand that there is a incoming utf-8 POST, even though
> struts.xml (which set the struts2 default encoding) is configured to use
> iso-8859-1
> 2. Convert the characters from utf-8 to iso-8859-1
3. Change your default encoding to utf-8, which should have no effect on
any of your code but will allow greater flexibility in the range of
characters you can display and read. Is there any reason you must use
iso-8859-1?
> [...]
>
> If you take a look at this piece of code, you can see that it overrides the
> encoding if it is set as defaultEncoding (from struts.xml). This is OK, the
> problem is this check:
> if (encoding != null) {
> try {
> request.setCharacterEncoding(encoding);
> } catch (Exception e) {
> LOG.error("Error setting character encoding to '" + encoding
> + "' - ignoring.", e);
> }
> }
>
> I think the correct thing would be to also do a check if the
> request.getCharacterEncoding was already set. I should look like this:
> if (encoding != null && request.getCharacterEncoding() == null ) {
> try {
> request.setCharacterEncoding(encoding);
> } catch (Exception e) {
> LOG.error("Error setting character encoding to '" + encoding
> + "' - ignoring.", e);
> }
> }
> With this change utf-8 would be kept as the request character encoding and I
> could do my conversion in my interceptor.
> This would solve my problem number 1. Am I correct when I say this is a bug?
I don't know if I'd call that a bug, but it does seem like a reasonable
enhancement. It would probably require some testing with different
browsers to make sure getCharacterEncoding() really is returning null in
the 'normal' cases, but assuming that's true you could open a ticket in
JIRA and attach a patch.
> The way I went around it was to create a filter which is executed before
> FilterDispatcher in struts2. In this filter I check if it is a uft-8 post
> and if it is, I wrap the HttpServletRequest into my own
> CharsetRequestWrapper. In my wrapper I will override getParameterMap which
> converts my characters, put them back into the map and return them. I also
> run a req.getParameter("foo"); after my wrapping to populate the parameters
> on the request.
>
> It works, but it took me a couple of days to work it out.
>
> Any comments on this?
It might be simpler for your filter to call
setCharacterEncoding("utf-8") and use a trivial request wrapper that
delegates all calls to the wrapped request *except*
setCharacterEncoding(), making that a no-op. It would make it clearer
what the filter was acutaly doing with less code :-) Otherwise, seems
like a reasonable work-around.
L.

Attachment:
user_182485.ezm (zipped)
When I pass URLs as parameters, is there a way to not html escape the '&'
characters?
Example: Lets say I have a JSP where I want to pass a URL as a param within
another URL. Example:
Some JSP
---------
<!-- Get the current URL -->
<s:url id="currentUrl" includeParams="get"/>
<!-- Construct a new url passing the current URL as the backLink" -->
<s:url id="newUrl" action="newAction">
<s:param name="backLink" value="%{currentUrl}"/>
</s:url>
Lets say current URL is something like http://mydomain/action1?p1=1&p2=2
The problem is that when newUrl is constructed, struts2 is escaping the '&'
character in the URL. So, the backLink says p1=1 & amp ;p2=2 instead of
p1=1&p2=2 (note: i put the spaces between & amp and ; just for clarity here
so that this editor doesnt convert it to a '&') . This is preventing the
parameter p2 from being parsed correctly when that URL is requested.
Is there an escape property on s:url like the one on <s:property> ? Any
workarounds?
Thanks
SN
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182486.ezm (zipped)
When I pass URLs as parameters, is there a way to not html escape the '&'
characters?
Example: Lets say I have a JSP where I want to pass a URL as a param within
another URL. Example:
Some JSP
---------
<!-- Get the current URL -->
<s:url id="currentUrl" includeParams="get"/>
<!-- Construct a new url passing the current URL as the backLink" -->
<s:url id="newUrl" action="newAction">
<s:param name="backLink" value="%{currentUrl}"/>
</s:url>
Lets say current URL is something like http://mydomain/action1?p1=1&p2=2
The problem is that when newUrl is constructed, struts2 is escaping the '&'
character in the URL. So, the backLink says p1=1 & amp ;p2=2 instead of
p1=1&p2=2 (note: i put the spaces between & amp and ; just for clarity here
so that this editor doesnt convert it to a '&') . This is preventing the
parameter p2 from being parsed correctly when that URL is requested.
Is there an escape property on s:url like the one on <s:property> ? Any
workarounds?
Thanks
SN
--
Sent from the Struts - User mailing list archive at Nabble.com.