Author Login
Post Reply
user Digest 7 Aug 2008 13:41:43 -0000 Issue 8183
Topics (messages 189789 through 189812):
Re: Struts 2 And JFreeChart
189789 by: dynamicd
189790 by: dynamicd
189791 by: dynamicd
I don't know what to call this SQL Exception.
189792 by: ryan webb
189793 by: Owen Berry
Re: Create multiple struts configuration file problem
189794 by: angelwei
189797 by: Engr. Jherald Gerome Lacambra
Re: Issue with Url mapping with struts-action-extension=""
189795 by: Haulyn R. Jason
ApplicationResources.properties and JavaScript
189796 by: nauke.
189805 by: Balwinder
Tree Control events problem..
189798 by: Narayana S
Server Side caching of .action(s)
189799 by: GF
189801 by: Al Sutton
189802 by: GF
OptionsTransferSelect error
189800 by: Francisco Exposito
Re: [s2] Google XML Pages (GXP) to replace Freemarker in tags?
189803 by: GF
189808 by: Dave Newton
189809 by: Dave Newton
struts-core-2.0.11.2 in two places on the server, causing exceptions
189804 by: Ylva Degerfeldt
Re: Struts 2 AJAX
189806 by: stanlick.gmail.com
[s2] getting checkbox values in nested iterator tags
189807 by: Kevin Wade
189810 by: Gabriel Belingueres
189811 by: Kevin Wade
189812 by: Kevin Wade
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_189789.ezm (zipped)
I am creating a new chart using the ChartFactory
chart = ChartFactory.createBarChart
(reportname,xaxis, yaxis, dataset,
PlotOrientation.VERTICAL, true,true, true);
return chart;
and I am storing it in the session. However the DisplayChart.action that is
in the image src is not called the second time on. It seems like a caching
issue.
Leena Borle wrote:
>
> Hi,
> How are you creating new chart object ? For me every time user clicks on
> submit-DrawChart_draw,action will create New chart object (e.g.
> chart=ChartFactory.createBarChart) and store it in the session which
> afterwards is used by DIV(DrawChart_display.action). You need to refresh
> your chart object.
> Leena
>
> On Wed, Aug 6, 2008 at 11:36 AM, dynamicd <dhaval.parekh@(protected):
>
>> This is cool.. I tried it out. However once the
>> chart_display.jsp is called the first time through the image tag. it does
>> not call the DisplayChart.action again to refresh the image with a new
>> one
>> when clicked on the DrawChart.action. (I added the println statement in
>> the
>> display method to find out that the div is not refreshing) I have to log
>> out and log in (invalidate session) to get the new chart. I am missing
>> something
>>
>>
>>
>> public String display() throws Exception {
>> System.out.println("I AM IN THE DISPLAY NOW ");
>> Map attributes =
>> ActionContext.getContext().getSession();
>> this.chart = (JFreeChart) attributes.get("CHART");
>>
>> if(chart == null) {
>> return Constants.FORWARD_INVALIDACTION;
>> }
>> return Constants.FORWARD_SUCCESS;
>> }
>>
>>
>> private void setChart(JFreeChart chart){
>> Map attributes = ActionContext.getContext().getSession();
>> attributes.put("CHART", null);
>> this.chart = chart;
>> attributes.put("CHART", this.chart);
>> }
>>
>> public JFreeChart getChart() {
>> return chart;
>> }
>>
>>
>>
>> Leena Borle wrote:
>> >
>> > Hello,
>> > See if this helps you.
>> > I have a form with remote DIV which displays chart after user clicks
>> on
>> > submit.
>> > Trick here is to generate chart object, store it in session and display
>> it
>> > in separate JSP. Remove the form part if you want to display just the
>> > dynamic-DIV using Chart image.
>> >
>> > Form.jsp [
>> > <s:form>
>> > <s:url id="display_chart" value="DrawChart_draw.action"
>> > namespace="/user" />
>> >
>> > <s:submit value="Draw chart" href="%{display_chart}"
>> > theme="ajax" targets="*chart_div*" />
>> > <br />
>> > </s:form>
>> >
>> > <h4>Your Running Chart</h4>
>> > <div id="*chart_div*">
>> > </div> <!-- End display chart -->
>> > </div>
>> >
>> > ]
>> >
>> >
>> > display_chart.jsp [
>> > <body>
>> >
>> > /MyApp/user/DrawChart_display.action
>> > </body>
>> >
>> > ]
>> >
>> >
>> > struts.xml[
>> > <package name="user" extends
>> > ="struts-default,jfreechart-default">
>> > <!-- Separate method to draw and display due to Remote
>> > DIV/Button tag contsraints.
>> > -->
>> > <action name="DrawChart_input" method="input"
>> > class=".xxx.DrawChart">
>> > <result name="input">form.jsp </result>
>> > </action>
>> >
>> > <action name="DrawChart_draw" method="draw"
>> > class="xxx..DrawChart">
>> > <result name="success">/jsp/display_chart.jsp
>> > </result>
>> > </action>
>> > <action name="DrawChart_display" method="display"
>> > class="xxx.DrawChart">
>> > <result name="success" type="chart">
>> > 400
>> > 300
>> > </result>
>> > </action>
>> >
>> > </package>
>> > ]
>> >
>> >
>> > DrawChart.java [
>> > JFreeChart chart;
>> > public String draw() throws Exception {
>> > //chart creation logic.
>> > //generate chart object
>> > chart = ....
>> > session = ....
>> > session.put("CHART", chart);
>> > return success;
>> > }
>> >
>> > /**
>> > * returns chart obejct from the session.
>> > This methos is used by display_chart.jsp
>> > */
>> > public String display() throws Exception {
>> > session = ...get session ...
>> > this.chart = (JFreeChart) session.get("CHART");
>> > if(chart == null) {
>> > addActionError(getText("error.nochart"));
>> > return ERROR;
>> > }
>> > return SUCCESS;
>> > }
>> >
>> > // this method will get called if we specify chart
>> > public JFreeChart getChart() {
>> > return chart;
>> > }
>> >
>> > /**
>> > * <p> input action
>> > */
>> > public String input() throws Exception {
>> > return INPUT;
>> > }
>> >
>> > ]
>> >
>> >
>> >
>> > Leena
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-2-And-JFreeChart-tp18740589p18857105.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)
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189790.ezm (zipped)
Alrit got it to work
Could not stop the browsers from caching. so added a param to the link
/Dashboard/DisplayChart.action?p=<%=request.getParameter( " />
Hello Everyone,
Got a quick question regarding the streaming of a JFreeChart (or any image)
and how to be able to handle it on a jsp. I have create a servlet that will
stream out an image to the jsp using a syntax similar to (in my struts.xml):
<action name="testChart"
class="TestBarChart">
<result name="success" type="chart">
350
300
</result>
</action>
So if I, in my html, created an img tag such that testChart.action
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189791.ezm (zipped)
got it to work.. could not stop the caching so added a param to the src
img
src="/Dashboard/DisplayChart.action?p=<%=request.getParameter("RANDOM")%>" /
dynamicd wrote:
>
> I have tried
> <%
> response.setHeader("Cache-Control", "no-cache"); //HTTP 1.1
> response.setHeader("Pragma", "no-cache"); //HTTP 1.0
> response.setDateHeader("Expires", 0); //prevents caching at the proxy
> server
>
> %>
>
> as well..
>
>
>
> newton.dave wrote:
>>
>> --- On Wed, 8/6/08, dynamicd <dhaval.parekh@(protected):
>>> Also tried implementing the SessionAware. However the same thing.
>>
>> Why?
>>
>> Did you try setting the headers for not caching?
>>
>> Dave
>>
>>> dynamicd wrote:
>>> >
>>> > This is cool.. I tried it out. However once the
>>> > chart_display.jsp is called the first time through the
>>> image tag. it does
>>> > not call the DisplayChart.action again to refresh the
>>> image with a new one
>>> > when clicked on the DrawChart.action. (I added the
>>> println statement in
>>> > the display method to find out that the div is not
>>> refreshing) I have to
>>> > log out and log in (invalidate session) to get the new
>>> chart. I am missing
>>> > something
>>> >
>>> >
>>> >
>>> > public String display() throws Exception {
>>> > System.out.println("I AM IN THE DISPLAY
>>> NOW ");
>>> > Map attributes =
>>> ActionContext.getContext().getSession();
>>> > this.chart = (JFreeChart)
>>> attributes.get("CHART");
>>> >
>>> > if(chart == null) {
>>> > return Constants.FORWARD_INVALIDACTION;
>>> > }
>>> > return Constants.FORWARD_SUCCESS;
>>> > }
>>> >
>>> >
>>> > private void setChart(JFreeChart chart){
>>> > Map attributes =
>>> ActionContext.getContext().getSession();
>>> > attributes.put("CHART", null);
>>> > this.chart = chart;
>>> > attributes.put("CHART", this.chart);
>>> > }
>>> >
>>> > public JFreeChart getChart() {
>>> > return chart;
>>> > }
>>> >
>>> >
>>> >
>>> > Leena Borle wrote:
>>> >>
>>> >> Hello,
>>> >> See if this helps you.
>>> >> I have a form with remote DIV which displays
>>> chart after user clicks on
>>> >> submit.
>>> >> Trick here is to generate chart object, store it
>>> in session and display
>>> >> it
>>> >> in separate JSP. Remove the form part if you
>>> want to display just the
>>> >> dynamic-DIV using Chart image.
>>> >>
>>> >> Form.jsp [
>>> >> <s:form>
>>> >> <s:url id="display_chart"
>>> value="DrawChart_draw.action"
>>> >> namespace="/user" />
>>> >>
>>> >> <s:submit value="Draw
>>> chart" href="%{display_chart}"
>>> >> theme="ajax"
>>> targets="*chart_div*" />
>>> >> <br />
>>> >> </s:form>
>>> >>
>>> >> <h4>Your Running Chart</h4>
>>> >> <div id="*chart_div*">
>>> >> </div> <!-- End display chart
>>> -->
>>> >> </div>
>>> >>
>>> >> ]
>>> >>
>>> >>
>>> >> display_chart.jsp [
>>> >> <body>
>>> >>
>>> >> /MyApp/user/DrawChart_display.action
>>> >> </body>
>>> >>
>>> >> ]
>>> >>
>>> >>
>>> >> struts.xml[
>>> >> <package name="user"
>>> extends
>>> >> ="struts-default,jfreechart-default">
>>> >> <!-- Separate method to draw and
>>> display due to Remote
>>> >> DIV/Button tag contsraints.
>>> >> -->
>>> >> <action
>>> name="DrawChart_input" method="input"
>>> >> class=".xxx.DrawChart">
>>> >> <result
>>> name="input">form.jsp </result>
>>> >> </action>
>>> >>
>>> >> <action
>>> name="DrawChart_draw" method="draw"
>>> >> class="xxx..DrawChart">
>>> >> <result
>>> name="success">/jsp/display_chart.jsp
>>> >> </result>
>>> >> </action>
>>> >> <action
>>> name="DrawChart_display"
>>> method="display"
>>> >> class="xxx.DrawChart">
>>> >> <result
>>> name="success" type="chart">
>>> >> 400
>>> >> 300
>>> >> </result>
>>> >> </action>
>>> >>
>>> >> </package>
>>> >> ]
>>> >>
>>> >>
>>> >> DrawChart.java [
>>> >> JFreeChart chart;
>>> >> public String draw() throws Exception {
>>> >> //chart creation logic.
>>> >> //generate chart object
>>> >> chart = ....
>>> >> session = ....
>>> >> session.put("CHART",
>>> chart);
>>> >> return success;
>>> >> }
>>> >>
>>> >> /**
>>> >> * returns chart obejct from the session.
>>> >> This methos is used by display_chart.jsp
>>> >> */
>>> >> public String display() throws Exception {
>>> >> session = ...get session ...
>>> >> this.chart = (JFreeChart)
>>> session.get("CHART");
>>> >> if(chart == null) {
>>> >>
>>> addActionError(getText("error.nochart"));
>>> >> return ERROR;
>>> >> }
>>> >> return SUCCESS;
>>> >> }
>>> >>
>>> >> // this method will get called if we specify
>>> chart
>>> >> public JFreeChart getChart() {
>>> >> return chart;
>>> >> }
>>> >>
>>> >> /**
>>> >> * <p> input action
>>> >> */
>>> >> public String input() throws Exception {
>>> >> return INPUT;
>>> >> }
>>> >>
>>> >> ]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189792.ezm (zipped)Hi!!
I know this is not struts question but I don't know this term so I cannot
search the internet fot it.
Two users are seeing the same page (data from database), and both of them
are editing the same
piece of data however, the other user submits the changes (update/delete)
first.
I need to inform the second user that his/her data is not the latest one.
--
warmest regards,
Ryan Webb - Philippines
email: webb.ryan1@(protected)

Attachment:
user_189793.ezm (zipped)"Optimistic locking" will give you some information. One way to do
this is to have a column in your database table that denotes a version
number, which is incremented every time the row changes. Include that
value in your form, and then you will be able compare the form version
to the database version, making sure they are the same before
performing the update.
Owen
On Wed, Aug 6, 2008 at 8:21 PM, ryan webb <webb.ryan1@(protected):
>
> Hi!!
>
> I know this is not struts question but I don't know this term so I cannot
> search the internet fot it.
>
> Two users are seeing the same page (data from database), and both of them
> are editing the same
> piece of data however, the other user submits the changes (update/delete)
> first.
>
> I need to inform the second user that his/her data is not the latest one.
>
>
> --
> warmest regards,
> Ryan Webb - Philippines
>
> email: webb.ryan1@(protected)

Attachment:
user_189794.ezm (zipped)if i try this on web.xml:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet</
servlet-class>
- <#> <init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml,
/WEB-INF/struts-config-product.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
it can run well. but if i try to use different <init-param> tag
it come out the error.
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /pro.
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/product</param-name>
<param-value>/WEB-INF/product/struts-config-product.xml</param-value>
</init-param>
what's going wrong???
i waste a lot of time to solve it..
Do u have any idea???
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189797.ezm (zipped)try first to use what i have posted. Its different from what you are using
now
2008/8/7 angelwei <goocheewei@(protected)>:
>
> if i try this on web.xml:
>
> <servlet>
> <servlet-name>action</servlet-name>
> <servlet-class>
org.apache.struts.action.ActionServlet</
> servlet-class>
> - <#> <init-param>
> <param-name>config</param-name>
> <param-value>/WEB-INF/struts-config.xml,
> /WEB-INF/struts-config-product.xml</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> it can run well. but if i try to use different <init-param> tag
> it come out the error.
>
>
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /pro.
>
> <init-param>
> <param-name>config</param-name>
> <param-value>/WEB-INF/struts-config.xml</param-value>
> </init-param>
> <init-param>
> <param-name>config/product</param-name>
> <param-value>/WEB-INF/product/struts-config-product.xml</param-value>
> </init-param>
>
> what's going wrong???
> i waste a lot of time to solve it..
> Do u have any idea???
> --
> View this message in context:
> http://www.nabble.com/Create-multiple-struts-configuration-file-problem-tp18748135p18863061.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)
>
>
--
Jherald Gerome Lacambra

Attachment:
user_189795.ezm (zipped)Jeromy Evans 写道:
> Haulyn R. Jason wrote:
>
>>> > In case it is a, I would try the following settings:
>>> >
>>> > struts.action.extension=,,action
>>> >
>>>
>>>
>>>
>> 2.If I use Evans' way, it looks worked well but just need a "."..Struts
>> do not have a solution for these?
>>
>> Thanks
>>
>>
>>
>
> I thought this was supported by this version of Struts 2 but I never use
> the DefaultActionMapper so I maybe a problem does exist there.
>
> To fix:
> 1 create a custom action mapper copied from DefaultActionMapper.java
> [link below]
> 2. enable it in struts.properties or struts.xml : ie.
> struts.mapper.class = com.PatchedDefaultActionMapper
> 3. Apply a patch to the dropExtension method that accepts blank
> extensions. Here is the updated method:
>
> /**
> * Drops the extension from the action name
> *
> * @param name
> * The action name
> * @return The action name without its extension
> */
> String dropExtension(String name) {
> if (extensions == null) {
> return name;
> }
> Iterator it = extensions.iterator();
> while (it.hasNext()) {
> String value = (String) it.next();
> if (value.length() > 0) {
> String extension = "." + value;
> if (name.endsWith(extension)) {
> name = name.substring(0, name.length() - extension.length());
> return name;
> }
> } else {
> // allow a blank extension
> if (!name.contains(".")) {
> return name;
> }
> }
> }
> return null;
> }
>
> regards,
> Jeromy Evans
>
> [source]
> http://svn.apache.org/viewvc/struts/struts2/tags/STRUTS_2_0_11_1/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java?view=markup
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
Thanks Evans, it works well, but I decide to give up!
When I supply your solution, everything work well. But I found all the
urls , when I use <s:url action="" /> , all actions are added a
extension "." by struts. So I add
// allow a blank extension
if (!name.contains(".")) {
return name;
}else if(name.endsWith(".")){
return name.substring(0, name.lastIndexOf("."));
}
}
to your code.
But Some other thing does not work. maybe it's value stack issue, I am
not sure.
So, I will give up. I will not try to remove extensions for struts2 and
use "jsps" instead of "action".
Always thank you Evans and everyone who helped me. Thanks!
--
Thanks!
Mobile: +086-15864011231
EMail>alk:saharabear@(protected)
EMail&yahoo:jia_haolin@(protected)
Skype:saharabear
贾昊林(Haulyn Runner Jason)

Attachment:
user_189796.ezm (zipped)Hi all,
Is there a way to access values in ApplicationResources.properties in
Javascript functions?
I've found a way where I can just pass a value from the app resource file as
a parameter, but discovered that I return alerts with different messages
based on some criteria.
Any ideas?
Thanks heaps

Attachment:
user_189805.ezm (zipped)nauke. wrote:
> Hi all,
>
> Is there a way to access values in ApplicationResources.properties in
> Javascript functions?
> I've found a way where I can just pass a value from the app resource file as
> a parameter, but discovered that I return alerts with different messages
> based on some criteria.
>
> Any ideas?
>
> Thanks heaps
>
>
Try this
<script>
var someVar = '<bean:message key="app.mykey" bundle="MESSAGE">';
</script>
hope this will serve the purpose.

Attachment:
user_189798.ezm (zipped)Hi,
in my project i need to use a tree control, i have started looking
at tree tag of struts, but though i wrote some event handle, it is not at
all executing any events. he is the part of code...
<head>
<title>Showcase - UI Tag Example - Tree Example (Static)</title>
<s:head theme="ajax" debug="true" />
</head>
<body>
*<script>
function treeNodeSelected(nodeId) {
alert("Hi");
}
dojo.event.topic.subscribe("treeSelected", this, "treeNodeSelected");
</script>*
<div style="float:left; margin-right: 50px;">
<s:tree label="parent" id="parentId" theme="ajax"
treeSelectedTopic="treeSelected">
<s:treenode theme="ajax" label="child1" id="child1Id">
<s:treenode theme="ajax" label="grandchild1" id="grandchild1Id"/>
<s:treenode theme="ajax" label="grandchild2" id="grandchild2Id"/>
<s:treenode theme="ajax" label="grandchild3" id="grandchild3Id"/>
</s:treenode>
<s:treenode theme="ajax" label="child2" id="child2Id"/>
<s:treenode theme="ajax" label="child3" id="child3Id"/>
<s:treenode theme="ajax" label="child4" id="child4Id"/>
----
-----
can you please suggest some solution to this? i am using struts
2.0.11

Attachment:
user_189799.ezm (zipped)Hello.
I want to do some server side caching of some specific .action of my
websites.
I am currently working on the CacheFilter of OsCache, but it doesn't seem
very good and has some limitations I don't like.
Can you suggest me some good open source alternatives to analyze?
Thanks

Attachment:
user_189801.ezm (zipped)Apache HTTPD :-
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#forwardreverse
GF wrote:
> Hello.
> I want to do some server side caching of some specific .action of my
> websites.
> I am currently working on the CacheFilter of OsCache, but it doesn't seem
> very good and has some limitations I don't like.
> Can you suggest me some good open source alternatives to analyze?
>
> Thanks
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189802.ezm (zipped)I need something inside Java, since I want to get some cached pages and read
them server side to use them as fragments, I need to handle from a friendly
administration panel which url to cache and how long.. and so on.
thanks anyway :-)
On Thu, Aug 7, 2008 at 11:12 AM, Al Sutton <al.sutton@(protected):
> Apache HTTPD :-
> http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#forwardreverse
>
>
> GF wrote:
>
>> Hello.
>> I want to do some server side caching of some specific .action of my
>> websites.
>> I am currently working on the CacheFilter of OsCache, but it doesn't seem
>> very good and has some limitations I don't like.
>> Can you suggest me some good open source alternatives to analyze?
>>
>> Thanks
>>
>>
>>
>
>
> --
> --
> Al Sutton
>
> W: www.alsutton.com
> T: twitter.com/alsutton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189800.ezm (zipped)
Hi,
I am trying to use the optionsTransferSelect but it shows me the error "moveSelectedOptions is not defined".
I have this jsp page and it works if I open this page directly; but I access to this page using ajax. Any idea?
<%@(protected)" %>
<%@(protected)" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<s:head theme="ajax" />
<link href=".../../src/css/default.css" type=text/css rel=stylesheet>
</head>
<body>
<h1>Añadir usuario a Grupos</h1>
<s:form>
<s:optiontransferselect
tooltip="Select Your Favourite Cartoon Characters"
headerKey="-1"
headerValue="--- Please Select ---"
doubleHeaderKey="-1"
doubleHeaderValue="--- Please Select ---"
emptyOption="true"
doubleEmptyOption="true"
label="Favourite Cartoon Characters"
leftTitle="Favourite Cartoon Characters"
rightTitle="Non Favourite Cartoon Characters"
name="favouriteCartoonCharacters"
list="{'1','2'}"
doubleName="notFavouriteCartoonCharacters"
doubleList="{'4','3'}" />
<br>
<s:submit value="Submit It" />
</s:form>
</body>
</html>
Thanks in advance
_________________________________________________________________
¡Lo mejor de MSN y Windows Live en tu móvil! Hotmail, Messenger, Spaces… Pruébalo ya y disfruta de todas sus ventajas donde quieras
http://serviciosmoviles.es.msn.com/

Attachment:
user_189803.ezm (zipped)I'm curious to know more about this.
Which google apps do use Struts2?
Thanks!
On Sat, Jul 26, 2008 at 7:02 AM, Don Brown <donald.brown@(protected):
> It is pretty well known that Google uses WebWork 2 and Struts 2 in
> many of its applications,

Attachment:
user_189808.ezm (zipped)One of the messages in that thread listed some of the apps.
Dave
--- On Thu, 8/7/08, GF <ganfab@(protected):
> From: GF <ganfab@(protected)>
> Subject: Fwd: [s2] Google XML Pages (GXP) to replace Freemarker in tags?
> To: "Struts Users ML" <user@(protected)>
> Date: Thursday, August 7, 2008, 5:59 AM
> I'm curious to know more about this.
> Which google apps do use Struts2?
> Thanks!
>
> On Sat, Jul 26, 2008 at 7:02 AM, Don Brown
> <donald.brown@(protected):
>
> > It is pretty well known that Google uses WebWork 2 and
> Struts 2 in
> > many of its applications,

Attachment:
user_189809.ezm (zipped)(Hmm, I think that might have been a list of GXP apps, now that I think about it.)
--- On Thu, 8/7/08, Dave Newton <newton.dave@(protected):
> From: Dave Newton <newton.dave@(protected)>
> Subject: Re: Fwd: [s2] Google XML Pages (GXP) to replace Freemarker in tags?
> To: "Struts Users Mailing List" <user@(protected)>
> Date: Thursday, August 7, 2008, 8:26 AM
> One of the messages in that thread listed some of the apps.
>
> Dave
>
>
> --- On Thu, 8/7/08, GF <ganfab@(protected):
>
> > From: GF <ganfab@(protected)>
> > Subject: Fwd: [s2] Google XML Pages (GXP) to replace
> Freemarker in tags?
> > To: "Struts Users ML"
> <user@(protected)>
> > Date: Thursday, August 7, 2008, 5:59 AM
> > I'm curious to know more about this.
> > Which google apps do use Struts2?
> > Thanks!
> >
> > On Sat, Jul 26, 2008 at 7:02 AM, Don Brown
> > <donald.brown@(protected):
> >
> > > It is pretty well known that Google uses WebWork
> 2 and
> > Struts 2 in
> > > many of its applications,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)

Attachment:
user_189804.ezm (zipped)Hi, dear Struts users!
I'm trying to learn and use Struts 2 (actually migrating from Struts 1
to 2) and I have written lots of java and xml code, which should be
working. I just can't run the application! When I try to, I get this
exception:
Caused by: Bean type class
com.opensymphony.xwork2.ObjectFactory with
the name xwork has already been loaded by bean -
jar:file:/C:/Sun/AppServer/domains/domain1/applications/j2ee-apps/Extract_to_cv_2/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72
- bean - jar:file:/C:/Sun/AppServer/domains/domain1/applications/j2ee-apps/Extract_to_cv_2/Extract_to_cv_2-war_war/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72
As the exception said, I found that the struts-core-2.0.11.2.jar file
was located in two places under my application on the server. I tried
to remove the topmost copy of the file but when I tried running the
app. again I got the same exception, and found that the file had been
put back there. Then I tried to remove the struts-core.. file that was
further down, but the same thing happened! (the same exception and the
file had been returned to that location as well).
I'm using NetBeans 5.5.1 and Sun Java System Application Server 9 and
my application is an enterprise application with a web module and an
ejb module. I'm wondering whether this problem is due to that I have
the struts2 jars in both the lib directory of the ejb module and the
lib directory of the web module. This might be stupid, but I needed
the ejb module to know about the struts classes as well and didn't
know how to make them visible to the whole application.
But then again, this (having struts jars in both modules) actually
worked when I was using Struts 1.
I'm really confused about this and I'm hoping that someone can help
me! Maybe this is mostly a NetBeans issue so if someone who has used
NetBeans could answer it would be great.
I feel completely lost when it comes to this kind of things (what's
happening "behind the scenes" in NetBeans and the app. server) but I'm
willing to learn from anyone who wants to explain it to me. But please
explain it very thoroughly then.
Please help me! I'm stuck.
/Ylva

Attachment:
user_189806.ezm (zipped)Thanks Dave. Like Struts 1, I think Struts 2 tags that are not required by
the core framework are largely be ing passed over in favor of JSTL. It is
easier to use tags that are stable, standard and well documented and
duplicate tags that do effectively the same thing are confusing.
StrutsRequestWrapper exposing OGNL allows JSTL easy access to the S2 goods.
Thought (preferably without flames bro)
Peace,
Scott
On Wed, Aug 6, 2008 at 7:02 AM, Dave Newton <newton.dave@(protected):
> --- On Wed, 8/6/08, stanlick@(protected):
> > On Tue, Aug 5, 2008 at 7:45 PM, Dave Newton wrote:
> > > --- On Tue, 8/5/08, stanlick@(protected):
> > > > Is Struts 2.1.x still bound to DOJO?
> > > S2[.1] Ajax/Dojo is a plugin.
> > Is any other js library compatible to be "plugged" in?
>
> To the existing tags? Not even sure how that would work; JavaScript
> libraries are all pretty different.
>
> As someone else mentioned there's talk on the dev list regarding future
> options. I have a (largely abandoned) Google Code project to build a jQuery
> plugin, but with the new talk I'm even less likely to continue working on
> it. There were, at one point, at least two other people who were pursuing
> jQuery plugins, but I don't know the status of those projects.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189807.ezm (zipped)This is probably simple and I think I'm close, but I can't quite get
it to work: the proper ognl expression to use to get the value of a
checkbox w/in nested iterator tags.
I've got an ArrayList of Parent objects called parentList. Each
Parent object contains another array of Child objects called
childList. A Child object has an boolean field called "selected."
If I nest the iterators like so:
<s:iterator value="parentList" status="parentliststatus">
<s:iterator value="childList" status="childliststatus">
Then what would be the correct expression to use for a checkbox to get
the value of selected? I tried the following, but it doesn't seem to
work:
<s:checkbox name="%{'parentList['+#parentliststatus.index
+'].childList['+#childliststatus.index+'].selected'}"
value="selected"></s:checkbox>
That, in turn, produces some html like this:
<input type="checkbox" name="parentList[1].childList[2].selected"
value="true" checked="checked"
id="commentsPrint_parentList_1__childList_2__selected"/>
<input type="hidden"
name="__checkbox_parentList[1].childList[2].selected" value="true" />
But, that doesn't appear to work. I continue to get setParameter
errors when I submit the form:
DEBUG
com.opensymphony.xwork2.interceptor.ParametersInterceptor -
Setting params parentList[1].childList[2].selected => [ true ]
ERROR
com.opensymphony.xwork2.interceptor.ParametersInterceptor -
ParametersInterceptor - [setParameters]: Unexpected Exception caught
setting 'parentList[1].childList[2].selected' on 'class
com.blackstream.yardly.actions.comments.CommentsPrintAction: Error
setting expression 'parentList[1].childList[2].selected' with value
'[Ljava.lang.String;@(protected)'
Any ideas what I'm doing wrong?
Kevin

Attachment:
user_189810.ezm (zipped)Which version of S2 are you using?
The selected field: Is it boolean or Boolean?
Did you write a getSelected() getter? or is it an isSelected() getter?
2008/8/7, Kevin Wade <kwade@(protected)>:
> This is probably simple and I think I'm close, but I can't quite get it to
> work: the proper ognl expression to use to get the value of a checkbox w/in
> nested iterator tags.
>
> I've got an ArrayList of Parent objects called parentList. Each Parent
> object contains another array of Child objects called childList. A Child
> object has an boolean field called "selected."
>
> If I nest the iterators like so:
> <s:iterator value="parentList" status="parentliststatus">
> <s:iterator value="childList" status="childliststatus">
>
> Then what would be the correct expression to use for a checkbox to get the
> value of selected? I tried the following, but it doesn't seem to work:
>
> <s:checkbox
> name="%{'parentList['+#parentliststatus.index+'].childList['+#childliststatus.index+'].selected'}"
> value="selected"></s:checkbox>
>
> That, in turn, produces some html like this:
>
> <input type="checkbox"
> name="parentList[1].childList[2].selected" value="true"
> checked="checked"
> id="commentsPrint_parentList_1__childList_2__selected"/>
> <input type="hidden"
> name="__checkbox_parentList[1].childList[2].selected"
> value="true" />
>
> But, that doesn't appear to work. I continue to get setParameter errors
> when I submit the form:
> DEBUG
>
com.opensymphony.xwork2.interceptor.ParametersInterceptor> - Setting params parentList[1].childList[2].selected => [
> true ]
> ERROR
>
com.opensymphony.xwork2.interceptor.ParametersInterceptor> - ParametersInterceptor - [setParameters]: Unexpected Exception caught
> setting 'parentList[1].childList[2].selected' on 'class
> com.blackstream.yardly.actions.comments.CommentsPrintAction:
> Error setting expression
> 'parentList[1].childList[2].selected' with value
> '[Ljava.lang.String;@(protected)'
>
> Any ideas what I'm doing wrong?
>
> Kevin

Attachment:
user_189811.ezm (zipped)S2 2.0.11. The selected field is a boolean. And there are
isSelected() and setSelected() methods.
Thanks for asking.
On Aug 7, 2008, at Thursday, August 7, 2008 - 9:24 AM, Gabriel
Belingueres wrote:
> Which version of S2 are you using?
> The selected field: Is it boolean or Boolean?
> Did you write a getSelected() getter? or is it an isSelected() getter?
>
> 2008/8/7, Kevin Wade <kwade@(protected)>:
>> This is probably simple and I think I'm close, but I can't quite
>> get it to
>> work: the proper ognl expression to use to get the value of a
>> checkbox w/in
>> nested iterator tags.
>>
>> I've got an ArrayList of Parent objects called parentList. Each
>> Parent
>> object contains another array of Child objects called childList. A
>> Child
>> object has an boolean field called "selected."
>>
>> If I nest the iterators like so:
>> <s:iterator value="parentList" status="parentliststatus">
>> <s:iterator value="childList" status="childliststatus">
>>
>> Then what would be the correct expression to use for a checkbox to
>> get the
>> value of selected? I tried the following, but it doesn't seem to
>> work:
>>
>> <s:checkbox
>> name="%{'parentList['+#parentliststatus.index
>> +'].childList['+#childliststatus.index+'].selected'}"
>> value="selected"></s:checkbox>
>>
>> That, in turn, produces some html like this:
>>
>> <input type="checkbox"
>> name="parentList[1].childList[2].selected" value="true"
>> checked="checked"
>> id="commentsPrint_parentList_1__childList_2__selected"/>
>> <input type="hidden"
>> name="__checkbox_parentList[1].childList[2].selected"
>> value="true" />
>>
>> But, that doesn't appear to work. I continue to get setParameter
>> errors
>> when I submit the form:
>> DEBUG
>>
com.opensymphony.xwork2.interceptor.ParametersInterceptor>> - Setting params parentList[1].childList[2].selected => [
>> true ]
>> ERROR
>>
com.opensymphony.xwork2.interceptor.ParametersInterceptor>> - ParametersInterceptor - [setParameters]: Unexpected Exception
>> caught
>> setting 'parentList[1].childList[2].selected' on 'class
>> com.blackstream.yardly.actions.comments.CommentsPrintAction:
>> Error setting expression
>> 'parentList[1].childList[2].selected' with value
>> '[Ljava.lang.String;@(protected)'
>>
>> Any ideas what I'm doing wrong?
>>
>> Kevin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_189812.ezm (zipped)I re-wrote my ognl expression slightly into this:
parentList[%{#parentliststatus.index}].childList[%
{#childliststatus.index}].selected
It seems to work now. Perhaps I had a typo in my original ognl
statement? I don't know. Probably something dumb. In the immortal
words of Chris Farley: "stupid! stupid! stupid!"
On Aug 7, 2008, at Thursday, August 7, 2008 - 9:28 AM, Kevin Wade
wrote:
> S2 2.0.11. The selected field is a boolean. And there are
> isSelected() and setSelected() methods.
>
> Thanks for asking.
>
>
> On Aug 7, 2008, at Thursday, August 7, 2008 - 9:24 AM, Gabriel
> Belingueres wrote:
>
>> Which version of S2 are you using?
>> The selected field: Is it boolean or Boolean?
>> Did you write a getSelected() getter? or is it an isSelected()
>> getter?
>>
>> 2008/8/7, Kevin Wade <kwade@(protected)>:
>>> This is probably simple and I think I'm close, but I can't quite
>>> get it to
>>> work: the proper ognl expression to use to get the value of a
>>> checkbox w/in
>>> nested iterator tags.
>>>
>>> I've got an ArrayList of Parent objects called parentList. Each
>>> Parent
>>> object contains another array of Child objects called childList.
>>> A Child
>>> object has an boolean field called "selected."
>>>
>>> If I nest the iterators like so:
>>> <s:iterator value="parentList" status="parentliststatus">
>>> <s:iterator value="childList" status="childliststatus">
>>>
>>> Then what would be the correct expression to use for a checkbox to
>>> get the
>>> value of selected? I tried the following, but it doesn't seem to
>>> work:
>>>
>>> <s:checkbox
>>> name="%{'parentList['+#parentliststatus.index
>>> +'].childList['+#childliststatus.index+'].selected'}"
>>> value="selected"></s:checkbox>
>>>
>>> That, in turn, produces some html like this:
>>>
>>> <input type="checkbox"
>>> name="parentList[1].childList[2].selected" value="true"
>>> checked="checked"
>>> id="commentsPrint_parentList_1__childList_2__selected"/>
>>> <input type="hidden"
>>> name="__checkbox_parentList[1].childList[2].selected"
>>> value="true" />
>>>
>>> But, that doesn't appear to work. I continue to get setParameter
>>> errors
>>> when I submit the form:
>>> DEBUG
>>>
com.opensymphony.xwork2.interceptor.ParametersInterceptor>>> - Setting params parentList[1].childList[2].selected => [
>>> true ]
>>> ERROR
>>>
com.opensymphony.xwork2.interceptor.ParametersInterceptor>>> - ParametersInterceptor - [setParameters]: Unexpected Exception
>>> caught
>>> setting 'parentList[1].childList[2].selected' on 'class
>>> com.blackstream.yardly.actions.comments.CommentsPrintAction:
>>> Error setting expression
>>> 'parentList[1].childList[2].selected' with value
>>> '[Ljava.lang.String;@(protected)'
>>>
>>> Any ideas what I'm doing wrong?
>>>
>>> Kevin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>