[ANN-OT] Dojo 1.0.0 release

2007-11-08 Thread Pedro Herrera


Dojo 1.0
Mon, 11/05/2007 - 14:31 — alex

Today is the day the Dojo has been working toward steadily for more than 3
years: Dojo 1.0.

-- 
View this message in context: 
http://www.nabble.com/-ANN-OT--Dojo-1.0.0-release-tf4770042.html#a13644271
Sent from the Struts - User mailing list archive at Nabble.com.


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



OGNL struts property

2007-11-08 Thread JM

Hi,

Can any body explain the following to me, I don't quite grok it. I have
added a property value via my action

ActionContext ctx = ActionContext.getContext();
ctx.put(contextKey, developer.page.logout);

In the jsp I have the following:

1 s:property value=%{contextKey}/
2 s:property value='%{contextKey+.title}'/
3 s:property value='%{#contextKey+.title}'/
4 s:property value='%{string1+.title}'/

This results in an output:

1 developer.page.logout
2 null.title
3 developer.page.logout.title
4 string1.title

Why does 2 give me a null output and 1 not, and 3 give me what I want. 
What is the significance of the # in this case?

Cheers
Caleb.

-- 
View this message in context: 
http://www.nabble.com/OGNL-struts-property-tf4770568.html#a13645884
Sent from the Struts - User mailing list archive at Nabble.com.


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



Remove uploaded file

2007-11-08 Thread Odelya Glick
Hello,

I have a code to upload a file using FromFile and 
html:file property=photoLink accept=image/jpeg,image/gif /

I would like to add a remove button to the file. 
How do I do it?

Thanks

Odelya
 


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



Re: ajax integration with struts

2007-11-08 Thread Ted Husted
On Nov 7, 2007 7:54 PM, Lalchandra Rampersaud
[EMAIL PROTECTED] wrote:
 I  would like to integrate ajax within a struts app, but I have no idea how
 to go about doing that.

The key point is that when a script makes an Ajax request (XHR), the
server doesn't know it came from a script, and handles it like any
other response. One reason Ajax is so successful is that it works just
fine with existing server technologies, including Struts.

It's not the Ajax request that is different, but the Ajax response.
Instead of returning an entire page for the browser to display (or
redisplay), an Ajax response will just return a portion of a page. The
response can take the form of XML, or HTML, or plain text, another
script, or whatever else the calling script may want.

Both Struts 1 and Struts 2 can return any type of response. We are not
limited to forwarding to a server page. In Struts 1, you can just do
something like

{
  response.setContentType(text/html);
  PrintWriter out = response.getWriter();
  out.println(Hello World!  This is an AJAX response from a Struts Action.);
  out.flush();
  return null;
}

In Struts 2, we can do the same thing with a Stream result.

package actions;
import java.io.InputStream;
import java.io.StringBufferInputStream;
import com.opensymphony.xwork2.ActionSupport;public class TextResult
extends ActionSupport  {
  private InputStream inputStream;
  public InputStream getInputStream() {
return inputStream;
   }
  public String execute() throws Exception {
inputStream = new StringBufferInputStream(
  Hello World! This is a text string response from a Struts 2 Action.);   
return SUCCESS;
  }

action name=text-result class=actions.TextResult
  result type=stream
 param name=contentTypetext/html/param
 param name=inputNameinputStream/param
   /result
/action

On the client side, as Frank indicated, there are two basic
strategies, which can be mixed and matched.

First, you can use some type of JSP tag, like the AjaxParts Taglib.
Here, you don't have to know very much at all about Ajax or
JavaScript. The taglib does all the work, and you just have to figure
out how to use the taglib. :)

Alternatively, you can use a plain-old Ajax widget on a plain-old HTML
page. Here, the sky's the limit, but you have to actually learn
something about JavaScript as a language.

If it helps, my slides form Ajax Experience are on up at Struts University.

 * http://www.StrutsUniversity.org/

The Retrofitting presentation covers using taglibs, and the Coding
presentation covers using Ajax widgets.

HTH, Ted
http://husted.com/ted/blog/

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



Struts 2.1 release date?

2007-11-08 Thread Crocker, Patrick

Working with Struts 2.0.x as an MVC framework has been a very enjoyable
experience.  Working with Struts 2.0.x with the built-in Dojo
integration has been a frustrating experience to say the least.

Looking at the 2.x docs, I see that the struts-dojo-tags taglib
(http://struts.apache.org/2.x/docs/ajax-tags.html,
http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html)
solve a lot of the 2.0.x issues (I LOVE the separation of the ajax
taglib from the 'normal' taglib!)

I'd love to play with 2.1... but I work in a corporate environment where
Maven snapshot repositories are not allowed...

I read that (http://struts.apache.org/2.x/docs/release-notes-210.html)
The proposed tag date for the build is 7 Oct 2007...  do we have any
idea of when 2.1 will be released on the Central Maven repository...
even if it at only a release candidate level?

Thanks, and keep up the great work!

Patrick Crocker



***
Bear Stearns is not responsible for any recommendation, solicitation, 
offer or agreement or any information about any transaction, customer 
account or account activity contained in this communication.
***


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

Re: confirm subscribe to user@struts.apache.org

2007-11-08 Thread Heidy Gutiérrez Guzmán
On Oct 22, 2007 8:47 AM, Martin Wilmes [EMAIL PROTECTED] wrote:
 On Monday 22 October 2007 15:39:49 [EMAIL PROTECTED] wrote:
  Hi! This is the ezmlm program. I'm managing the
  user@struts.apache.org mailing list.
 
  I'm working for my owner, who can be reached
  at [EMAIL PROTECTED]
 
  To confirm that you would like
 
 [EMAIL PROTECTED]
 
  added to the user mailing list, please send
  a short reply to this address:
 
 
  [EMAIL PROTECTED]
 ache.org
 
  Usually, this happens when you just hit the reply button.
  If this does not work, simply copy the address and paste it into
  the To: field of a new message.
 
  or click here:
mailto:[EMAIL PROTECTED]
 truts.apache.org
 
  This confirmation serves two purposes. First, it verifies that I am able
  to get mail through to you. Second, it protects you in case someone
  forges a subscription request in your name.
 
  Some mail programs are broken and cannot handle long addresses. If you
  cannot reply to this request, instead send a message to
  [EMAIL PROTECTED] and put the
  entire address listed above into the Subject: line.
 
 
  --- Administrative commands for the user list ---
 
  I can handle administrative requests automatically. Please
  do not send them to the list address! Instead, send
  your message to the correct command address:
 
  To subscribe to the list, send a message to:
 [EMAIL PROTECTED]
 
  To remove your address from the list, send a message to:
 [EMAIL PROTECTED]
 
  Send mail to the following for info and FAQ for this list:
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
  Similar addresses exist for the digest list:
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
  To get messages 123 through 145 (a maximum of 100 per request), mail:
 [EMAIL PROTECTED]
 
  To get an index with subject and author for messages 123-456 , mail:
 [EMAIL PROTECTED]
 
  They are always returned as sets of 100, max 2000 per request,
  so you'll actually get 100-499.
 
  To receive all messages with the same subject as message 12345,
  send a short message to:
 [EMAIL PROTECTED]
 
  The messages do not really need to be empty, but I will ignore
  their content. Only the ADDRESS you send to is important.
 
  You can start a subscription for an alternate address,
  for example [EMAIL PROTECTED], just add a hyphen and your
  address (with '=' instead of '@') after the command word:
  [EMAIL PROTECTED]
 
  To stop subscription for this address, mail:
  [EMAIL PROTECTED]
 
  In both cases, I'll send a confirmation message to that address. When
  you receive it, simply reply to it to complete your subscription.
 
  If despite following these instructions, you do not get the
  desired results, please contact my owner at
  [EMAIL PROTECTED] Please be patient, my owner is a
  lot slower than I am ;-)
 
  --- Enclosed is a copy of the request I received.
 
  Return-Path: [EMAIL PROTECTED]
  Received: (qmail 93308 invoked by uid 99); 22 Oct 2007 13:39:49 -
  Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
  by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2007 06:39:49
  -0700 X-ASF-Spam-Status: No, hits=1.0 required=10.0
tests=ASF_LIST_OPS,SPF_PASS
  X-Spam-Check-By: apache.org
  Received-SPF: pass (athena.apache.org: local policy)
  Received: from [81.169.183.84] (HELO java-cup.de) (81.169.183.84)
  by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2007 13:39:52
  + Received: from localhost (localhost [127.0.0.1])
by java-cup.de (Postfix) with ESMTP id C127F230050
for [EMAIL PROTECTED]; Mon, 22 Oct 2007 15:39:29 +0200
  (CEST) Received: from java-cup.de ([127.0.0.1])
   by localhost (java-cup.de [127.0.0.1]) (amavisd-new, port 10024) with
  ESMTP id 16380-07; Mon, 22 Oct 2007 15:39:27 +0200 (CEST)
  Received: from noname (p54A3487F.dip.t-dialin.net [84.163.72.127])
by java-cup.de (Postfix) with ESMTP id 6274823004E;
Mon, 22 Oct 2007 15:39:27 +0200 (CEST)
  From: Martin Wilmes [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: subscribe
  Date: Mon, 22 Oct 2007 15:38:35 +0200
  User-Agent: KMail/1.9.7
  MIME-Version: 1.0
  Content-Type: text/plain;
charset=utf-8
  Content-Transfer-Encoding: quoted-printable
  Content-Disposition: inline
  Message-Id: [EMAIL PROTECTED]
  X-Virus-Checked: Checked by ClamAV on apache.org
 
  subscribe
  =2D-=20
  Martin Wilmes   [EMAIL PROTECTED]
  L=C3=B6gelbergring 17Tel.: +49 721 9415097, mob: +49 163
  49= 49311
  76287 Rheinstetten  Fax : +49 721 47639171



 --
 Martin Wilmes   [EMAIL PROTECTED]
 Lögelbergring 17Tel.: +49 721 9415097, mob: +49 163 4949311
 76287 Rheinstetten  Fax : +49 721 47639171

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




Re: Manually obtain previous action parameters after action chaining?

2007-11-08 Thread jjgould

There was a good suggestion about using the MessageStoreInterceptor, but I am
really trying to avoid using Session-based storage for my application,
having been indoctrinated into the RESTful camp at the 2007 Colorado
Software Summit :)

I just discovered that both actions (the one that gets the validation errors
and the target of the chain result) are on the OGNL stack.  So, here is what
I did:



 @Override
 public String execute()
 throws Exception
 {
 ValueStack stack = ActionContext.getContext().getValueStack();
 Object penultimate = stack.findValue( [1].top );
 if( penultimate instanceof ValidationAware )
 {
 ValidationAware previousAction = (ValidationAware)
 penultimate;
 this.setActionErrors( previousAction.getActionErrors() );
 this.setActionMessages( previousAction.getActionMessages() );
 this.setFieldErrors( previousAction.getFieldErrors() );
 }
 return SUCCESS;
 }
 

I like this approach because it seems clean.  But, I am wondering, given the
fact that bean properties are set in the second action, why aren't
actionErrors, actionMessages, and fieldErrors seen as bean properties
that get automatically set by the ChainingInterceptor?

Anyway, this solution is working for me, and I think I should abstract this
out into an interceptor so that I don't have to pollute my action methods
with this logic.  Does anyone have any feedback about this approach?  Am I
abusing the OGNL stack?  Am I breaking semantics of validation handling?  Is
it possible that the first action will not be located on the stack as
[1].top?

Thanks for your help!


jjgould wrote:
 
 Ted, et. al.,
 
 I am also interested in accessing the previous action from the target
 action of a chain result.  But, the reason I want to get to that action
 is not because of any bean properties, but because I need the action
 errors, action messages, and field errors that may have been placed there
 by my validation.
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Manually-obtain-previous-action-parameters-after-action-%22chaining%22--tf4601173.html#a13647964
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [S2] Retrieving values from the valuestack for the s:iterator tag

2007-11-08 Thread Justin Frost

I want to iterate over the dataColumns to get the value from each
dataColumn.

I am trying to add S2 to an existing project.  So the Vector code is old,
circa 2001.

Thanks for you help.



newton.dave wrote:
 
 --- Justin Frost [EMAIL PROTECTED] wrote:
  private String value;
 
 public String getValue() {
   return value;
 }
 I want to use the s:iterator tag on value. 
 
 What? Do you mean you want to iterate over the rows in
 the report? value is a string; nothing to iterate
 over.
 
 report.headerRow will iterate over each item in the
 headerRow Vector. (Consider naming it as a plural.)
 
 Then iterate over the dataColumns in each headerRow
 item, and the value will be visible.
 
 Haven't seen a Vector for awhile.
 
 d.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Retrieving-values-from-the-valuestack-for-the-%3Cs%3Aiterator%3E-tag-tf4767834.html#a13647619
Sent from the Struts - User mailing list archive at Nabble.com.


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



dynamic use of uiwidgets:swapper and struts bean:write

2007-11-08 Thread Ingo Villnow
Hello,

i want to use the swapper with dynamic filled values, like this:

uiwidgets:swapper id=swapper boxWidth=150 divStyle=border:2 solid
#017fff; boxStyle=color:#ff;
logic:iterate id=element name=databean property=employeevector
option value=TESTbean:write name=element
property=value//option
 /logic:iterate
/uiwidgets:swapper

Now i want to fill the TEST-value dynamically from a JavaBean. Is
there any way, for example: option value=%. %/option??

Any ideas?

Thank you very much.

Ingo from Berlin

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

Re: ajax integration with struts

2007-11-08 Thread Ingo Villnow
I would suggest you to view the javawebparts tools
(http://javawebparts.sourceforge.net/)
After integration, you can render a calendar like this:

html:form action=type in your action styleId=projectForm
html:text property=begin /
html:button property=beginbutton value=calendar
onclick=showCalendar(projectForm.begin);/
uiwidgets:calendar minYear=2005 maxYear=2012
styleOverrides=none /
 /html:form

Greetings, Ingo

Lalchandra Rampersaud schrieb:
 I am making a calendar so I just want to update parts of the page.

 -Original Message-
 From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 07, 2007 2:32 PM
 To: Struts Users Mailing List
 Subject: Re: ajax integration with struts

 Lalchandra Rampersaud wrote:
   I  would like to integrate ajax within a struts app, but I have no 
 idea how
   to go about doing that.

 Is there a question in there somewhere?

 Ah, never mind, I was going to leave you with just the wise-a** answer, 
 but I'll be nice :)

 AJAX isn't something you integrate into an app per se, it's a 
 technique you make use of.  What are you trying to accomplish?  We can 
 give you some options, because there's many in the AJAX space, once you 
 tell us what it is you'll actually trying to do.

 Frank

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



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



 __ NOD32 2644 (20071107) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com




 __

 Participe en Universidad 2008.
 11 al 15 de febrero del 2008.
 Palacio de las Convenciones, Ciudad de la Habana, Cuba
 http://www.universidad2008.cu

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


   

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

Write text in HTML format

2007-11-08 Thread Odelya Glick

Hi,

I have a text in Oracle DB separated to new lines.

I would like to write it in the bead:write with the lines separated as in
HTML.

So I added a method in the bean propert:
public String getBody() {
String convertedBody =
IOTextUtil.convertPlainTextToHTML(body);
return convertedBody;
}

Where IOTextUtil. convertPlainTextToHTML method is:
public static String convertPlainTextToHTML(String body) {
// First replace double \n's with \nP
Regex html1Replacer = new Regex(\n\n, \nP);
String strPreOutput1 = html1Replacer.replaceAll(body);

// Next replace single \n with BR (find \n NOT followed
by
// the code P (which we just put in). We shouldn't need to
worry
// about double \n's at this point - they should have been
converted
// by the previous replace action
Regex html2Replacer = new Regex(\n(?!P), BR /);
return html2Replacer.replaceAll(strPreOutput1);

}

But struts print it with br / instead of breading it into new lines!!!

Where is the place to convert it to new lines? Or how do I do it?

Thanks

Odelya 
 



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



Re: Struts 2.1 release date?

2007-11-08 Thread Antonio Petrelli
You can download the test build:
http://people.apache.org/builds/struts/2.1.0/
But beware that no vote has been called to declare its quality. IMHO it
won't be more than beta.

Ciao
Antonio

2007/11/8, Crocker, Patrick [EMAIL PROTECTED]:


 Working with Struts 2.0.x as an MVC framework has been a very enjoyable
 experience.  Working with Struts 2.0.x with the built-in Dojo integration
 has been a frustrating experience to say the least.

 Looking at the 2.x docs, I see that the struts-dojo-tags taglib (*
 http://struts.apache.org/2.x/docs/ajax-tags.html*http://struts.apache.org/2.x/docs/ajax-tags.html,
 *http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html*http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html)
 solve a lot of the 2.0.x issues (I LOVE the separation of the ajax taglib
 from the 'normal' taglib!)

 I'd love to play with 2.1… but I work in a corporate environment where
 Maven snapshot repositories are not allowed…

 I read that 
 (*http://struts.apache.org/2.x/docs/release-notes-210.html*http://struts.apache.org/2.x/docs/release-notes-210.html)
 The proposed tag date for the build is 7 Oct 2007…  do we have any idea of
 when 2.1 will be released on the Central Maven repository… even if it at
 only a release candidate level?

 Thanks, and keep up the great work!

 Patrick Crocker



 ***
 Bear Stearns is not responsible for any recommendation, solicitation,
 offer or agreement or any information about any transaction, customer
 account or account activity contained in this communication.
 ***



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



Re: [S2] Retrieving values from the valuestack for the s:iterator tag

2007-11-08 Thread Gary Affonso

So your container heirarchy is...

 Report
 - contains a Vector of ReportRow (called headerRow)
   - contains a Vector of ReportCell (called dataColumn)

Shouldn't this just be a matter of a couple of nested loops?  Something 
like...



s:iterator value=report.getHeaderRow()
  s:iterator value=getDataColumns
s:property value=value/
  /s:iterator
/s:iterator

Does that (or the corrected syntax for that idea) not work?

For myself, I'd probably be tempted to *not* do the nested loop in the 
view and do it in the Report itself.  Something like...


 public List getAllReportCells() {
   List allReportCells = new ArrayList();

   .. nested looping here adding each ReportCell to the list

   return allReportCells
 }

s:iterator value=report.getAllReportCells
  s:property value=value/
/s:iterator

--

This is all off the top of my head so don't expect a copy-and-paste of 
this to actually work. :-)


What's confusing you, specifically?  Is it how to refer to a property of 
the action in the s:iterator value part?  Is it what to put in the 
value part of the property tag?  Are you worried that the fact this is 
a Vector makes it not work with standard iteration techniques?


Seems like a very straightforward task, so I'm thinking that I'm not 
understanding what the problem really is.


- Gary

Justin Frost wrote:

I am having a difficult time figuring out a solution to my problem.

I think I will start out with my class structure first.  I only put in this
message what I thought was valuable.

public class Report implements java.io.Serializable {

private java.lang.String title = ;
private Vector headerRow = new Vector();  //Vector of ReportRow objects

public Vector getHeaderRow() {
return headerRow;
}

public String getTitle() {
return title;
}
}

public class ReportRow implements java.io.Serializable {

private Vector dataColumns= new Vector(); // Vector of ReportCell 
Objects

public Vector getDataColumns() {
 return dataColumns;
}
}


public class ReportCell implements java.io.Serializable  {

private String value;

public String getValue() {
 return value;
}
}

public class ReportAction extends ActionSupport{

private ReportNew report;

public ReportNew getReport() {  // This gives me access to title
return report;
}

// I need some other getter to retrieve my value attribute
   // But I am unsure of how to go about it.

}

I want to use the s:iterator tag on value.  Something like below.

s:iterator value=??
th
s:property value=value/
/th
/s:iterator


I can not figure out what method I need in my Action class to allow the
values to be visible.
Can someone help me out.  Or is there a good example out there that I can
reference?

Thanks in advance.



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



Dynamic tree

2007-11-08 Thread Peter Bliznak
Hi 
new to 2.0 ajax tags so I need some help on tree tag.
I am trying to build tree and since it rather big one I would like to get data 
from server incrementally -- only when I click on tree node. I found tree docs 
at http://struts.apache.org/2.x/docs/tree.html and at the very bottom of the 
page there is Dynamic tree loaded with AJAX (one request is made for each 
node): but example of how to make one is missing.
I just want to ask if anyone would be able to help me on this. I guess my next 
question is -- is this available at the current 2.0.11 build? and finally 
to achieve what I've described can I just use ajax tag or do I have to use some 
additional dojo tags or coding?
Thanks
Peter.



Dojo custom build and Struts ComboBox widget

2007-11-08 Thread Max Pimm
I am trying to make a custom build of dojo for my application in order 
to speed it up a bit.


(See threads [s2] Struts head tag KILLS ( 10s) page load time and 
How to improve dojo performance in Struts 2.0.9)


I have followed the instructions for doing this are carefully as 
possible from 
http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-209.html.


My custom build appears to have worked. dojo.js is generated with the 
struts widgets Internalized, each page i load makes minimal requests 
for other dojo scripts and the basic bind functionality of dojo works.


However the Struts:Combobox component used in my autocompleters does not 
work. Some code is executed when i edit the field but it does not result 
in a petition to the server y hence no autocomplete list is shown. Dojo 
is configured in debug mode but gives no errors. The struts folder 
containing the widgets is present in contextroot/struts/dojo. Dojo 
correctly finds the dropdown image for the input and uses the styles in 
ComboBox.css the only problem is that it does not issue petitions to the 
server when the onKeyUp event fires.


I am using the 2.011 build of struts, is the process for building a 
custom dojo build the same as in 2.09? I can't find any changes in the 
ComboBox between these versions but is there anything else that might be 
causing these problems.


Does anyone have any advice for how to start debugging this?

Thanks,

max





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



Re: [struts] [S1.3]Strange problem with validation.xml's Regex

2007-11-08 Thread Dale Newfield

enthucoder wrote:

I am validating a condition : Input should not contain any of these
characters  %,(,) 


And to achieve this my RegEx is : ^[^(\%|\(|\))]+$


That should be: ^[%()]*$
(using + instead of * at the end adds the restriction that the field 
must contain at least one character).


The other problem you're having is that you're putting this in an XML 
document.  Either it must be valid XML (for example,  - amp;), or it 
must be enclosed in a CDATA block.


-Dale

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



Re: [struts] [S1.3]Strange problem with validation.xml's Regex

2007-11-08 Thread Dale Newfield

Dale Newfield wrote:

enthucoder wrote:

I am validating a condition : Input should not contain any of these
characters  %,(,)
And to achieve this my RegEx is : ^[^(\%|\(|\))]+$



 That should be: ^[%()]*$
D'oh!  That should be: ^[^%()]*$

-Dale

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



Re: [struts] Thanks! Works also with redirect actions...

2007-11-08 Thread Dale Newfield

Gunnar Hillert wrote:

Thanks for your helpful post! Interestingly, this also works with redirect
actions.


Hrm...

The javadoc for ServletActionRedirectResult says:

This result uses the ActionMapper provided by the ActionMapperFactory
to redirect the browser to a URL that invokes the specified action
and (optional) namespace. This is better than the
ServletRedirectResult because it does not require you to encode the
URL patterns processed by the ActionMapper in to your struts.xml
configuration files. This means you can change your URL patterns at
any point and your application will still work. It is strongly
recommended that if you are redirecting to another action, you use
this result rather than the standard redirect result.


So it is clearly indicated that redirectAction is recommended over 
redirect, but I neither understand why, nor quite what it is that this 
 result type does...
...it's still sending a redirect to the browser and causing the browser 
to send a new request, correct?  If so, the new request needs to have 
the same URL (which must be encoded) no matter which result type 
generated the redirect, correct?  So what is it that this does better 
than plain old redirect?  Is it just that you can use structure the 
request params in xml instead of constructing them inline from ognl 
expressions?


If so, shouldn't this example:


result name=success type=redirectAction
  mySuccess?fooId=${fooId}${bartId ? amp;barId= + barId : }
/result


instead be:

result name=success type=redirectAction
  param name=actionNamemySuccess/param
  param name=fooId${fooId}/param
  param name=barId${barId}/param
/result

-Dale

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



Re: Struts 2.1 release date?

2007-11-08 Thread Dave Newton
Just to be clear, this is not a release in the
strict sense of the word; it is currently a test
build.

Dave

--- Pedro Herrera [EMAIL PROTECTED] wrote:

 
 I´m using 2.1 release. No problems...(to me). Dojo
 plugin is working very
 well !!!
 
 Herrera
 
 
 
 
 Crocker, Patrick-2 wrote:
  
  
  Working with Struts 2.0.x as an MVC framework has
 been a very enjoyable
  experience.  Working with Struts 2.0.x with the
 built-in Dojo
  integration has been a frustrating experience to
 say the least.
  
  Looking at the 2.x docs, I see that the
 struts-dojo-tags taglib
  (http://struts.apache.org/2.x/docs/ajax-tags.html,
 

http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html)
  solve a lot of the 2.0.x issues (I LOVE the
 separation of the ajax
  taglib from the 'normal' taglib!)
  
  I'd love to play with 2.1... but I work in a
 corporate environment where
  Maven snapshot repositories are not allowed...
  
  I read that

(http://struts.apache.org/2.x/docs/release-notes-210.html)
  The proposed tag date for the build is 7 Oct
 2007...  do we have any
  idea of when 2.1 will be released on the Central
 Maven repository...
  even if it at only a release candidate level?
  
  Thanks, and keep up the great work!
  
  Patrick Crocker
  
  
  
  
 

***
  Bear Stearns is not responsible for any
 recommendation, solicitation, 
  offer or agreement or any information about any
 transaction, customer 
  account or account activity contained in this
 communication.
 

***
  
  
  
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
  
 
 -- 
 View this message in context:

http://www.nabble.com/Struts-2.1-release-date--tf4771404.html#a13650950
 Sent from the Struts - User mailing list archive at
 Nabble.com.
 
 

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


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



Re: [S2] Retrieving values from the valuestack for the s:iterator tag

2007-11-08 Thread Gary Affonso

Justin Frost wrote:

s:iterator value=report.headerRow
s:iterator value=dataColumns
th
s:property value=value/
/th
/s:iterator
/s:iterator


Well, you're doing exactly (almost) what I suggested so obviously more 
digging needs to be done.


Here's where I'd start to dig:

1) Does the struts taglib iterator support Vectors?  It should (if 
you're running this on a recent JVM), but it would be good to double-check.


Speaking of JVM's, what JVM are you running this on?  Vector was updated 
at some point to support the standard Collection stuff but I don't know 
when that happened.  I suppose if you're running under an old JVM, 
Vector might not be able to do what you hope it can do.


2) Are your OGNL references working the way you think?
Your first iterator refers to a property of the report object: 
report.headerRow.


Is that the right syntax?  Should be, but you might also try 
report.getHeaderRow().  Perhaps some vagary of OGNL is tripping you up.


3) Does the OGNL stack have on it what you think it has on it?  You can 
use either the DebuggingInterceptor or the debug tag to get 
behind-the-scenes info.


The debug tag is poorly documented, I think it requires the dojo 
library.  Or something.  :-)


You might be better off with the interceptor:

http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.html

---

That's all I got. :-)

- Gary

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



Re: [struts] Thanks! Works also with redirect actions...

2007-11-08 Thread Dave Newton
--- Dale Newfield [EMAIL PROTECTED] wrote:
 So it is clearly indicated that redirectAction is
 recommended over redirect, but I neither 
 understand why, nor quite what it is that this 
   result type does...

Precisely for the reasons stated; it adds a layer of
abstraction that understands action configuration.
Rather than specifying an actual URL with the
namespace, action name, and action suffix you just
give it an action name (and namespace param if
necessary).

It looks up the action in the config.

It's not like it's *hugely* better than redirect, it's
just that it keeps things in the framework.

 instead be:
 
 result name=success type=redirectAction
param name=actionNamemySuccess/param
param name=fooId${fooId}/param
param name=barId${barId}/param
 /result

Arguably, yes, and for a couple of reasons. Off the
top of my head I don't recall what will happen if the
param isn't found, though (or is null, etc.)
d.


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



Re: Struts 2.1 release date?

2007-11-08 Thread Ted Husted
And it will probably stay that way. We just wanted to get something
out for people to try, while we work toward applying the rest of the
outstanding patches. So far, we're about half-way through that
process.

 * https://issues.apache.org/struts/browse/WW/fixforversion/21863

Of course even with all the patches applied, there's no way to tell
when there will be a General Availability release, since much depends
on whether subsequent betas generate any showstoppers. The best way to
help the process along is for more volunteers to give the test builds
a try in a development environment, and report any findings (good or
ill) to the dev list.

-Ted.


On Nov 8, 2007 12:35 PM, Dave Newton [EMAIL PROTECTED] wrote:
 Just to be clear, this is not a release in the
 strict sense of the word; it is currently a test
 build.

 Dave


 --- Pedro Herrera [EMAIL PROTECTED] wrote:

 
  I´m using 2.1 release. No problems...(to me). Dojo
  plugin is working very
  well !!!
 
  Herrera
 
 
 
 
  Crocker, Patrick-2 wrote:
  
  
   Working with Struts 2.0.x as an MVC framework has
  been a very enjoyable
   experience.  Working with Struts 2.0.x with the
  built-in Dojo
   integration has been a frustrating experience to
  say the least.
  
   Looking at the 2.x docs, I see that the
  struts-dojo-tags taglib
   (http://struts.apache.org/2.x/docs/ajax-tags.html,
  
 
 http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html)
   solve a lot of the 2.0.x issues (I LOVE the
  separation of the ajax
   taglib from the 'normal' taglib!)
  
   I'd love to play with 2.1... but I work in a
  corporate environment where
   Maven snapshot repositories are not allowed...
  
   I read that
 
 (http://struts.apache.org/2.x/docs/release-notes-210.html)
   The proposed tag date for the build is 7 Oct
  2007...  do we have any
   idea of when 2.1 will be released on the Central
  Maven repository...
   even if it at only a release candidate level?
  
   Thanks, and keep up the great work!
  
   Patrick Crocker
  
  
  
  
  
 
 ***
   Bear Stearns is not responsible for any
  recommendation, solicitation,
   offer or agreement or any information about any
  transaction, customer
   account or account activity contained in this
  communication.
  
 
 ***
  
  
  
  
 
 -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Struts-2.1-release-date--tf4771404.html#a13650950
  Sent from the Struts - User mailing list archive at
  Nabble.com.
 
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 


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





-- 
HTH, Ted http://www.husted.com/ted/blog/

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



ServletRedirect vs ServletActionRedirect (was: [struts] Thanks! Works also with redirect actions...)

2007-11-08 Thread Gary Affonso

Dale Newfield wrote:
So it is clearly indicated that redirectAction is recommended over 
redirect, but I neither understand why, nor quite what it is that this 
 result type does...

If so, the new request needs to have the same URL (which must be encoded)
no matter which result type generated the redirect, correct?  So what is
it that this does better than plain old redirect?  Is it just that you
can use structure the request params in xml instead of constructing them
inline from ognl expressions? 


I don't use it (yet), but I think the intent here is to avoid the 
developer putting the .action string on the end of the urls you're 
redirecting to.  Or, for that matter, specifying the any part of the url 
fragment in detail at all.  You specify what goes into the URL and then 
let the ActionMapper generate it.


If you don't do that and specify the url fragment along with the 
.action suffix then any time you change the mapping (say you want your 
actions to have .do on the end instead of .action) then you have to 
go through and fix all your redirect urls.


Going through the RedirectAction result type shields you a bit from that 
change.  You don't specify the actual url (you let the ActionMapper 
generate it) so when the configuration of the ActionMapper changes your 
redirect Urls automatically reflect that change.


The above example (changing .action to .do) is probably not a very 
convincing example, when would you ever do that?


But you can get really fancy with the ActionMapper and start doing stuff 
like SEO friendly URL recognition (and generation) to eliminate the 
?key=value search engines like.


That's something we *are* looking at doing and, I suspect, that we'll 
benefit from not having written our redirects as hardcoded url fragments.


- Gary

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



Re: [S2] Retrieving values from the valuestack for the s:iterator tag

2007-11-08 Thread Dave Newton
--- Gary Affonso [EMAIL PROTECTED] wrote:
 The debug tag is poorly documented, I think it
 requires the dojo library.  Or something.  :-)

You can't tell me that
http://struts.apache.org/2.x/docs/debug.html isn't the
acme of documentation (I'll add something).

In any case, no, it doesn't require Dojo--it just
drops a bunch of info into a hidden DIV and gives you
a link to show it.

d.


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



Re: [S2] Retrieving values from the valuestack for the s:iterator tag

2007-11-08 Thread Justin Frost

This is the jsp I am using with no success.  I thought it would be straight
forward.
Obviously I am missing something.
s:iterator value=report.headerRow
s:iterator value=dataColumns
th
s:property value=value/
/th
/s:iterator
/s:iterator





Justin Frost wrote:
 
 I want to iterate over the dataColumns to get the value from each
 dataColumn.
 
 I am trying to add S2 to an existing project.  So the Vector code is old,
 circa 2001.
 
 Thanks for you help.
 
 
 
 newton.dave wrote:
 
 --- Justin Frost [EMAIL PROTECTED] wrote:
 private String value;
 
 public String getValue() {
  return value;
 }
 I want to use the s:iterator tag on value. 
 
 What? Do you mean you want to iterate over the rows in
 the report? value is a string; nothing to iterate
 over.
 
 report.headerRow will iterate over each item in the
 headerRow Vector. (Consider naming it as a plural.)
 
 Then iterate over the dataColumns in each headerRow
 item, and the value will be visible.
 
 Haven't seen a Vector for awhile.
 
 d.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Retrieving-values-from-the-valuestack-for-the-%3Cs%3Aiterator%3E-tag-tf4767834.html#a13650450
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts 2.1 release date?

2007-11-08 Thread Pedro Herrera

I´m using 2.1 release. No problems...(to me). Dojo plugin is working very
well !!!

Herrera




Crocker, Patrick-2 wrote:
 
 
 Working with Struts 2.0.x as an MVC framework has been a very enjoyable
 experience.  Working with Struts 2.0.x with the built-in Dojo
 integration has been a frustrating experience to say the least.
 
 Looking at the 2.x docs, I see that the struts-dojo-tags taglib
 (http://struts.apache.org/2.x/docs/ajax-tags.html,
 http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html)
 solve a lot of the 2.0.x issues (I LOVE the separation of the ajax
 taglib from the 'normal' taglib!)
 
 I'd love to play with 2.1... but I work in a corporate environment where
 Maven snapshot repositories are not allowed...
 
 I read that (http://struts.apache.org/2.x/docs/release-notes-210.html)
 The proposed tag date for the build is 7 Oct 2007...  do we have any
 idea of when 2.1 will be released on the Central Maven repository...
 even if it at only a release candidate level?
 
 Thanks, and keep up the great work!
 
 Patrick Crocker
 
 
 
 
 ***
 Bear Stearns is not responsible for any recommendation, solicitation, 
 offer or agreement or any information about any transaction, customer 
 account or account activity contained in this communication.
 ***
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
View this message in context: 
http://www.nabble.com/Struts-2.1-release-date--tf4771404.html#a13650950
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: help with struts 2 + jfreechart plugin example

2007-11-08 Thread swaddee



swaddee wrote:
 
 I recently started using struts 2 by experimenting with webwork and then
 moving to struts 2. I want to produce some charts using jfreechart.  After
 getting the example
 (http://wiki.opensymphony.com/display/WW/JFreeChartResult) to work using
 the webwork framework I tried it with struts
 2(http://struts.apache.org/2.x/docs/jfreechart-plugin.html).  I have not
 had any success.
 
 I'd really appreciate it if someone could help get me past this obstacle.
 (the first action is working correctly)
 
 Thanks in advance!
 
 
 =
 Here is my struts.xml
 
 ?xml version=1.0 encoding=UTF-8 ?   
   
 
 !DOCTYPE struts PUBLIC   
   
 
 -//Apache Software Foundation//DTD Struts Configuration 2.0//EN 
   
 
 http://struts.apache.org/dtds/struts-2.0.dtd;   
   
 
   
   
 
 struts  
   
 
   
   
 
 constant name=struts.enable.DynamicMethodInvocation value=false /   
   
 
 constant name=struts.devMode value=true /   
   
 
   
   
 
 package name=ccbill namespace=/ccbill extends=struts-default  
   
 
   
   
 
 action name=UserAgentForm class=com.ccbill.IncludeTag   
   
 
 result/pages/UserAgentStringForm.jsp/result   
   
 
 /action 
   
 
   
   
 
 !-- Add actions here -- 
   
 
 !--  
   
 
 action name=viewModerationChart
 class=charts.ViewModerationChartAction 

 result name=success type=chart  
   
 
 400   
   
 300   
  
 /result 
   
 
 /action 
   
 
 --   

Re: OGNL struts property

2007-11-08 Thread Dave Newton
To continue, the first one (probably; I'm still a
little fuzzy on OGNL sometimes) works because if a
property isn't found in the action it will continue
looking on the stack until it finds it or runs out.

Now, as to why #2 doesn't work, I'm a little hazier
on that: perhaps when OGNL has an expression tree it
does lookup a bit differently or something?

d.

--- Musachy Barroso [EMAIL PROTECTED] wrote:

 in OGNL there is always an object that is the
 root, so %{name} is
 actually calling root.getName(). The # is used to
 reference
 something else than the root. In your views, your
 action will be the
 OGNL root (unless some tag pushes something to the
 stack), to refer to
 your property you would need #contextKey.
 
 
 musachy
 
 On Nov 8, 2007 7:13 AM, JM [EMAIL PROTECTED]
 wrote:
 
  Hi,
 
  Can any body explain the following to me, I don't
 quite grok it. I have
  added a property value via my action
 
  ActionContext ctx = ActionContext.getContext();
  ctx.put(contextKey, developer.page.logout);
 
  In the jsp I have the following:
 
  1 s:property value=%{contextKey}/
  2 s:property value='%{contextKey+.title}'/
  3 s:property value='%{#contextKey+.title}'/
  4 s:property value='%{string1+.title}'/
 
  This results in an output:
 
  1 developer.page.logout
  2 null.title
  3 developer.page.logout.title
  4 string1.title
 
  Why does 2 give me a null output and 1 not, and 3
 give me what I want.
  What is the significance of the # in this case?
 
  Cheers
  Caleb.
 
  --
  View this message in context:

http://www.nabble.com/OGNL-struts-property-tf4770568.html#a13645884
  Sent from the Struts - User mailing list archive
 at Nabble.com.
 
 
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
 
 -- 
 Hey you! Would you help me to carry the stone?
 Pink Floyd
 

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


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



Re: Dojo custom build and Struts ComboBox widget

2007-11-08 Thread Jeromy Evans

Max Pimm wrote:
I am trying to make a custom build of dojo for my application in order 
to speed it up a bit.


(See threads [s2] Struts head tag KILLS ( 10s) page load time and 
How to improve dojo performance in Struts 2.0.9)


I have followed the instructions for doing this are carefully as 
possible from 
http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-209.html. 



My custom build appears to have worked. dojo.js is generated with the 
struts widgets Internalized, each page i load makes minimal requests 
for other dojo scripts and the basic bind functionality of dojo works.


However the Struts:Combobox component used in my autocompleters does 
not work. Some code is executed when i edit the field but it does not 
result in a petition to the server y hence no autocomplete list is 
shown. Dojo is configured in debug mode but gives no errors. The 
struts folder containing the widgets is present in 
contextroot/struts/dojo. Dojo correctly finds the dropdown image for 
the input and uses the styles in ComboBox.css the only problem is that 
it does not issue petitions to the server when the onKeyUp event fires.


I am using the 2.011 build of struts, is the process for building a 
custom dojo build the same as in 2.09? I can't find any changes in the 
ComboBox between these versions but is there anything else that might 
be causing these problems.


Does anyone have any advice for how to start debugging this?

Thanks,

max


I'm not sure what is wrong, but the approach I'd take to debug it is:
 - Use firebug to see if the page is getting a 404 trying to load any 
of the resources required by dojo.  This is the most likely cause if it 
was working before you created the custom build
 - Replace your dojo.js file with the dojo.js-uncompressed.js file also 
created by the build process.  This one contains comments and debug 
info.  See if any errors are now displayed
 - Find the combobox code in dojo.js-uncompressed.js and use 
breakpoints in firebug to find out exactly what's happening.


Let me know how you go. 


cheers,
Jeormy Evans






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



Re: [OT] Tomcat 5.0.28

2007-11-08 Thread Dave Newton
I believe the OP mentioned that the port was changed
on one of the server instances.

However, there are also several other ports that might
conflict depending on the setup, so it's still a good
idea to do a sanity check on port assignments.

That said, this is really better address on a
Tomcat-related list.

d.

--- [EMAIL PROTECTED] wrote:

 The problems should be thrown up in the logs, when
 you start the Tomcat.
 
 My first guess would be, both instances are pointing
 to the Default port 
 i.e. http 8080. 
 
 You would need to change the default port to a
 different port .
 
 
 
 
 
 Shabada, Gnaneshwer [EMAIL PROTECTED] 
 11/08/2007 12:02 PM
 
 Please respond to
 Struts Users Mailing List user@struts.apache.org
 
 
 To
 'Struts Users Mailing List'
 user@struts.apache.org
 cc
 
 Subject
 Tomcat 5.0.28
 
 
 
 
 
 
 Hello
 I am going off the topic, but wanted to know if you
 gurus out there tried 
 to
 install multiple instances of Tomcat on single
 windows XP machine. I
 downloaded the zip file and extracted then created
 two diff folders for 2
 intended tomcat instances under my main installation
 dir. Copied conf, 
 temp,
 logs, webapps, work into both these dirs and changed
 ports on server.xml 
 in
 one of the directories. Now ran the following
 command from bin directory
 with no success. 
 startup -Dcatalina.base=
 D:\jakarta-tomcat-5.0.28\Tomcat-A
 
 I followed what RUNNING.TXT said but not sure where
 I went wrong...
 
 Anyone had this working before, please share your
 thoughts..
 
 Thanks
 G
 


 
 This email message is for the sole use of the
 intended recipient (s) and 
 may
 contain confidential and privileged information. Any
 unauthorized review,
 use, disclosure or distribution is prohibited. If
 you are not the intended
 recipient, please contact the sender by reply email
 and destroy all copies
 of the original message. To reply to our email
 administrator directly, 
 send
 an email to [EMAIL PROTECTED] 
 Toys R Us, Inc.
 

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


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



Re: [OT] Tomcat 5.0.28

2007-11-08 Thread sriharsha . chevuru
The problems should be thrown up in the logs, when you start the Tomcat.

My first guess would be, both instances are pointing to the Default port 
i.e. http 8080. 

You would need to change the default port to a different port .





Shabada, Gnaneshwer [EMAIL PROTECTED] 
11/08/2007 12:02 PM

Please respond to
Struts Users Mailing List user@struts.apache.org


To
'Struts Users Mailing List' user@struts.apache.org
cc

Subject
Tomcat 5.0.28






Hello
I am going off the topic, but wanted to know if you gurus out there tried 
to
install multiple instances of Tomcat on single windows XP machine. I
downloaded the zip file and extracted then created two diff folders for 2
intended tomcat instances under my main installation dir. Copied conf, 
temp,
logs, webapps, work into both these dirs and changed ports on server.xml 
in
one of the directories. Now ran the following command from bin directory
with no success. 
startup -Dcatalina.base= D:\jakarta-tomcat-5.0.28\Tomcat-A

I followed what RUNNING.TXT said but not sure where I went wrong...

Anyone had this working before, please share your thoughts..

Thanks
G

 
This email message is for the sole use of the intended recipient (s) and 
may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, 
send
an email to [EMAIL PROTECTED] 
Toys R Us, Inc.

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


ForwardSourceID:NTE7BE 


Tomcat 5.0.28

2007-11-08 Thread Shabada, Gnaneshwer
Hello
I am going off the topic, but wanted to know if you gurus out there tried to
install multiple instances of Tomcat on single windows XP machine. I
downloaded the zip file and extracted then created two diff folders for 2
intended tomcat instances under my main installation dir. Copied conf, temp,
logs, webapps, work into both these dirs and changed ports on server.xml in
one of the directories. Now ran the following command from bin directory
with no success. 
startup -Dcatalina.base= D:\jakarta-tomcat-5.0.28\Tomcat-A

I followed what RUNNING.TXT said but not sure where I went wrong...

Anyone had this working before, please share your thoughts..

Thanks
G

 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to [EMAIL PROTECTED] 
Toys R Us, Inc.

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



Re: OGNL struts property

2007-11-08 Thread Musachy Barroso
in OGNL there is always an object that is the root, so %{name} is
actually calling root.getName(). The # is used to reference
something else than the root. In your views, your action will be the
OGNL root (unless some tag pushes something to the stack), to refer to
your property you would need #contextKey.


musachy

On Nov 8, 2007 7:13 AM, JM [EMAIL PROTECTED] wrote:

 Hi,

 Can any body explain the following to me, I don't quite grok it. I have
 added a property value via my action

 ActionContext ctx = ActionContext.getContext();
 ctx.put(contextKey, developer.page.logout);

 In the jsp I have the following:

 1 s:property value=%{contextKey}/
 2 s:property value='%{contextKey+.title}'/
 3 s:property value='%{#contextKey+.title}'/
 4 s:property value='%{string1+.title}'/

 This results in an output:

 1 developer.page.logout
 2 null.title
 3 developer.page.logout.title
 4 string1.title

 Why does 2 give me a null output and 1 not, and 3 give me what I want.
 What is the significance of the # in this case?

 Cheers
 Caleb.

 --
 View this message in context: 
 http://www.nabble.com/OGNL-struts-property-tf4770568.html#a13645884
 Sent from the Struts - User mailing list archive at Nabble.com.


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





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

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



[Solved] [S2] Retrieving values from the valuestack for the s:iterator tag

2007-11-08 Thread Justin Frost

Here is what I figured out so far.
headerRow is a vector of ReportCell, not ReportRow. 

So for the headerRow I had to create a getHeaderRow method in my action
class.
public Vector getHeaderRow(){
Report report = getReport();
return report.getHeaderRow();
}

Then my jsp to display it looks like:
s:iterator value=headerRow
th
s:property value=value/
/th
/s:iterator


There was also a dataRows vector in Report.  Using my previous iterator
setup on dataRows worked as expected.

-Justin


newton.dave wrote:
 
 --- Gary Affonso [EMAIL PROTECTED] wrote:
 The debug tag is poorly documented, I think it
 requires the dojo library.  Or something.  :-)
 
 You can't tell me that
 http://struts.apache.org/2.x/docs/debug.html isn't the
 acme of documentation (I'll add something).
 
 In any case, no, it doesn't require Dojo--it just
 drops a bunch of info into a hidden DIV and gives you
 a link to show it.
 
 d.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Retrieving-values-from-the-valuestack-for-the-%3Cs%3Aiterator%3E-tag-tf4767834.html#a13655120
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-08 Thread j alex
Can you paste the entire struts.xml ; ensure that you have :

package name=mypackage extends=struts-default,jasperreports-default



On Nov 7, 2007 8:51 PM, carmi_cd [EMAIL PROTECTED] wrote:


 hi actually i tried using that tutorial and got a pdf with no data in it
 only
 page and column titles.
 i dont know why..

 Stacktrace of my sun application server, it has no problem. i dont know
 why
 the report is not filled with the data. here is my code:

 public class EIS_HR_004_JASPER extends eisSupport {
private String reportId;
private String dateStart = null;
private String dateEnd = null;
private String pdfFile;
private final static String _REPORT_FOLDER = EIS_HR_003;
private Report thisReport;
private String dateRange;
private ArrayListPersonnel reportData = new ArrayListPersonnel();

public String execute(ActionMapping mapping,ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ReportBean reportBean = new ReportBean();
setThisReport(reportBean.getReport(getReportId()));
setReportData();
try {
JasperCompileManager.compileReportToFile(
apps/reports/templates/hr004.jrxml,
apps/reports/templates/hr004.jasper);
} catch (Exception e) {
System.out.println(empty);
e.printStackTrace();
return ERROR;
}
 return SUCCESS;
}

public String getReportId() {
return reportId;
}

public void setReportId(String reportId) {
this.reportId = reportId;
}

public String getDateStart() {
if (this.dateStart == null || this.dateStart.equals()) {
ResourceBundle eisProperty=ResourceBundle.getBundle(eis);
this.dateStart = eisProperty.getString(eis.minimum.date);
}
return this.dateStart;
}

public void setDateStart(String dateStart) {
this.dateStart = dateStart;
}

public String getDateEnd() {
if (this.dateEnd == null || this.dateEnd.equals()) {
Calendar cal = Calendar.getInstance(TimeZone.getDefault());
this.dateEnd = (new SimpleDateFormat(MMM d,
 ).format(cal.getTime()));
}
return this.dateEnd;
}

public void setDateEnd(String dateEnd) {
this.dateEnd = dateEnd;
}

public String getPdfFile() {
//setPdfFile();
return pdfFile;
}

public Report getThisReport() {
return thisReport;
}

public void setThisReport(Report thisReport) {
this.thisReport = thisReport;
}

public String getDateRange() {
setDateRange();
return dateRange;
}

public void setDateRange() {
this.dateRange = (  + getDateStart() +  -  + getDateEnd() + 
 );
}

public ArrayListPersonnel getReportData() {
   // setReportData();
return reportData;
}

public void setReportData() {
Personnel p1=new Personnel();
p1.setSurname(Dela Cruz);
p1.setFirstname(Juan);
p1.setExamcode(CSC111);
p1.setExamdate(January 1,2003);
Personnel p2=new Personnel();
p2.setSurname(Cruz);
p2.setFirstname(Miguel);
p2.setExamcode(CSC222);
p2.setExamdate(December 2,2003);
reportData.add(p1);
reportData.add(p2);
}

 }

 here is part of my struts.xml

 action name=EIS-HR-004_JASPER class=eis.report.EIS_HR_004_JASPER
result name=error/apps/reports/ReportNotFound.jsp/result
result name=success type=jasper
apps/reports/templates/hr004.jasper
reportData
PDF
/result
/action

 i hope you could help me..thanks a lot.




 strutstwouser wrote:
 
  http://struts.apache.org/2.x/docs/jasperreports-tutorial.html ; I was
 able
  to use this as-is and get a report fine.
 
  -Joseph
 
 
  carmi_cd wrote:
 
 
  I need a tutorial that uses ArrayList of Object as datasource
  for JasperReports..do you know any?
 
 
 

 --
 View this message in context:
 http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13639836
 Sent from the Struts - User mailing list archive at Nabble.com.


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




Re: [S2] ArrayList of Object as datasource in JasperReports

2007-11-08 Thread carmi_cd

here is the complete struts.xml
struts  
package name=apps namespace=/apps
extends=struts-default,jasperreports-default
!-- APPLICATION/GENERAL actions here --
action name=Logout class=apps.Logout
result type=redirect-actionLogin_input/result
/action
action name=Menu class=apps.Menu
result/apps/Menu.jsp/result
/action

!-- APPLICATION MODULE actions here --
action name=Toolbar class=eis.module.Toolbar
result/apps/modules/Toolbar.jsp/result
/action
action name=Hrmis class=eis.module.Hrmis
result name=error/apps/SessionExpired.jsp/result
result/apps/modules/Hrmis.jsp/result
/action
action name=FNU class=eis.module.FNU
result name=error/apps/SessionExpired.jsp/result
result/apps/modules/FNU.jsp/result
/action
action name=Engineering class=eis.module.Engineering
result name=error/apps/SessionExpired.jsp/result
result/apps/modules/Engineering.jsp/result
/action
action name=UserMgt class=eis.module.UserMgt method=list
result name=success/apps/modules/UserMgt/List.jsp/result  
  
interceptor-ref name=basicStack/
/action
action name=UserMgt_* class=eis.module.UserMgt method={1}
result name=success type=redirect-actionUserMgt/result
result
name=input/apps/modules/UserMgt/EntryForm.jsp/result
result name=error/apps/modules/UserMgt/Error.jsp/result
/action
action name=ReportGenerator class=eis.report.ReportGenerator
result name=error/apps/SessionExpired.jsp/result
result/apps/reports/ReportGenerator.jsp/result
/action

!-- REPORT FILTER FORM actions here --
action name=ReportFilterForm_*
class=eis.report.ReportFilterForm_{1}
result/apps/reports/ReportFilterForm_{1}.jsp/result
/action

!-- REPORT actions here --
action name=EIS-HR-* class=eis.report.EIS_HR_{1}
result name=error/apps/reports/ReportNotFound.jsp/result
result/apps/reports/EIS_HR_{1}.jsp/result
/action
action name=EIS-FN-* class=eis.report.EIS_FN_{1}
result name=error/apps/reports/ReportNotFound.jsp/result
result/apps/reports/EIS_FN_{1}.jsp/result
/action
action name=EIS-EG-* class=eis.report.EIS_EG_{1}
result name=error/apps/reports/ReportNotFound.jsp/result
result/apps/reports/EIS_EG_{1}.jsp/result
/action
action name=EIS-HR-004_JASPER
class=eis.report.EIS_HR_004_JASPER
result name=error/apps/reports/ReportNotFound.jsp/result
result name=success type=jasper
apps/reports/templates/hr004.jasper
reportData
PDF
/result
/action 

!-- Add actions here --

action name=Login_* method={1} class=apps.Login
result name=input/apps/Login.jsp/result
result type=redirect-actionHome/result 
/action
action name=* class=apps.eisSupport
result/apps/{1}.jsp/result
/action
/package
/struts

please help me i've been thinking of it for a long time now..thanks again..


strutstwouser wrote:
 
 Can you paste the entire struts.xml ; ensure that you have :
 
 package name=mypackage extends=struts-default,jasperreports-default
 
 
 
 On Nov 7, 2007 8:51 PM, carmi_cd [EMAIL PROTECTED] wrote:
 

 hi actually i tried using that tutorial and got a pdf with no data in it
 only
 page and column titles.
 i dont know why..

 Stacktrace of my sun application server, it has no problem. i dont know
 why
 the report is not filled with the data. here is my code:

 public class EIS_HR_004_JASPER extends eisSupport {
private String reportId;
private String dateStart = null;
private String dateEnd = null;
private String pdfFile;
private final static String _REPORT_FOLDER = EIS_HR_003;
private Report thisReport;
private String dateRange;
private ArrayListPersonnel reportData = new ArrayListPersonnel();

public String execute(ActionMapping mapping,ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ReportBean reportBean = new ReportBean();
setThisReport(reportBean.getReport(getReportId()));
setReportData();
try {
JasperCompileManager.compileReportToFile(
apps/reports/templates/hr004.jrxml,
apps/reports/templates/hr004.jasper);
} catch (Exception e) {
System.out.println(empty);

[S2] Action can not redirect with extend pattern?

2007-11-08 Thread TANG Xigen
Hi All


I write a simple self PlatformActionSupport to let it's children can
redirect to result start when url like *!start.action, but when i
test my code, i find some works fine, some doesn't!

[ Father  PlatformActionSupport ]
@SuppressWarnings(serial)
public abstract class PlatformActionSupport extends ActionSupport {

public String doStart() {
return start;
}
}

[ ChildA loginAction extend PlatformActionSupport ]
@SuppressWarnings(serial)
public class LoginAction extends PlatformActionSupport {}

[ ChildB RegistAction extend PlatformActionSupport ]
@SuppressWarnings(serial)
public class RegistAction extends PlatformActionSupport {}

[ Struts.xml ]

package name=com.dztalk.client.webflow.struts.pojos
extends=struts-default
interceptors
interceptor name=LanguageFocusInterceptor
class=com.dztalk.client.webflow.struts.interceptors.LanguageFocusInterc
eptor/interceptor
interceptor-stack name=default

interceptor-ref
name=LanguageFocusInterceptor/interceptor-ref
interceptor-ref
name=defaultStack/interceptor-ref
/interceptor-stack
/interceptors

action name=Logon!* method={1}
class=com.dztalk.client.webflow.struts.pojos.LoginAction
interceptor-ref
name=default/interceptor-ref
result
name=start/pages/generals/Logon.jsp/result
/action

action name=Regist!* method={1}
class=com.dztalk.client.webflow.struts.pojos.RegistAction
interceptor-ref
name=default/interceptor-ref
result
name=start/pages/generals/Regist.jsp/result
/action
/package


urlA:http://localhost:8080/dztalk-webflow/Regist!start.action;   ---
works fine
urlB:http://localhost:8080/dztalk-webflow/Logon!start.action;  ---
failed

exception trace below

Could not find action or result
No result defined for action
com.dztalk.client.webflow.struts.pojos.LoginAction and result input -
action


[S]: i find urlA call dostart() method in PlatformActionSupport but
urlB not!
As struts doc, i think LogonRegist in my conf are almost
sameness action defition with just different name. why Logon doesn't
work in my way? can anyone do me a favor about this topic!





Re: [S2] Action can not redirect with extend pattern?

2007-11-08 Thread Dave Newton
Hello,

Most likely your logon action is failing validation
and trys to find the input result (which doesn't
exist).

If you have action methods that should not be
validated you have several options, including:

- create method-specific (action alias specific)
validations

- exclude additional methods from the validation
interceptor

- restructure things a little bit to avoid the issue
altogether (for instance, if you're executing the
input() method validation won't be run)

There are probably other solutions too that might be a
better fit for your application.

Dave

--- TANG Xigen [EMAIL PROTECTED]
wrote:

 Hi All
 
 
 I write a simple self PlatformActionSupport to let
 it's children can
 redirect to result start when url like
 *!start.action, but when i
 test my code, i find some works fine, some doesn't!
 
 [ Father  PlatformActionSupport ]
 @SuppressWarnings(serial)
 public abstract class PlatformActionSupport extends
 ActionSupport {
 
   public String doStart() {
   return start;
   }
 }
 
 [ ChildA loginAction extend PlatformActionSupport ]
 @SuppressWarnings(serial)
 public class LoginAction extends
 PlatformActionSupport {}
 
 [ ChildB RegistAction extend PlatformActionSupport ]
 @SuppressWarnings(serial)
 public class RegistAction extends
 PlatformActionSupport {}
 
 [ Struts.xml ]
 
   package
 name=com.dztalk.client.webflow.struts.pojos
 extends=struts-default
   interceptors
   interceptor name=LanguageFocusInterceptor

class=com.dztalk.client.webflow.struts.interceptors.LanguageFocusInterc
 eptor/interceptor
   interceptor-stack name=default
 
   interceptor-ref
 name=LanguageFocusInterceptor/interceptor-ref
   interceptor-ref
 name=defaultStack/interceptor-ref
   /interceptor-stack
   /interceptors
   
   action name=Logon!* method={1}

class=com.dztalk.client.webflow.struts.pojos.LoginAction
   interceptor-ref
 name=default/interceptor-ref
   result
 name=start/pages/generals/Logon.jsp/result
   /action
   
   action name=Regist!* method={1}

class=com.dztalk.client.webflow.struts.pojos.RegistAction
   interceptor-ref
 name=default/interceptor-ref
   result
 name=start/pages/generals/Regist.jsp/result
   /action
   /package
 
 

urlA:http://localhost:8080/dztalk-webflow/Regist!start.action;
   ---
 works fine

urlB:http://localhost:8080/dztalk-webflow/Logon!start.action;
  ---
 failed
 
 exception trace below
 
 Could not find action or result
 No result defined for action
 com.dztalk.client.webflow.struts.pojos.LoginAction
 and result input -
 action
 
 
 [S]: i find urlA call dostart() method in
 PlatformActionSupport but
 urlB not!
   As struts doc, i think LogonRegist in my conf are
 almost
 sameness action defition with just different name.
 why Logon doesn't
 work in my way? can anyone do me a favor about this
 topic!
 
 
 
 


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



Fw: [S2] ArrayList of Object as datasource in JasperReports

2007-11-08 Thread Martin Gainty
can we see your copy of apps/reports/templates/hr004.jrxml

M--
- Original Message -
From: carmi_cd [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Thursday, November 08, 2007 8:31 PM
Subject: Re: [S2] ArrayList of Object as datasource in JasperReports



 here is the complete struts.xml
 struts
 package name=apps namespace=/apps
 extends=struts-default,jasperreports-default
 !-- APPLICATION/GENERAL actions here --
 action name=Logout class=apps.Logout
 result type=redirect-actionLogin_input/result
 /action
 action name=Menu class=apps.Menu
 result/apps/Menu.jsp/result
 /action

 !-- APPLICATION MODULE actions here --
 action name=Toolbar class=eis.module.Toolbar
 result/apps/modules/Toolbar.jsp/result
 /action
 action name=Hrmis class=eis.module.Hrmis
 result name=error/apps/SessionExpired.jsp/result
 result/apps/modules/Hrmis.jsp/result
 /action
 action name=FNU class=eis.module.FNU
 result name=error/apps/SessionExpired.jsp/result
 result/apps/modules/FNU.jsp/result
 /action
 action name=Engineering class=eis.module.Engineering
 result name=error/apps/SessionExpired.jsp/result
 result/apps/modules/Engineering.jsp/result
 /action
 action name=UserMgt class=eis.module.UserMgt method=list
 result name=success/apps/modules/UserMgt/List.jsp/result
 interceptor-ref name=basicStack/
 /action
 action name=UserMgt_* class=eis.module.UserMgt method={1}
 result name=success type=redirect-actionUserMgt/result
 result
 name=input/apps/modules/UserMgt/EntryForm.jsp/result
 result name=error/apps/modules/UserMgt/Error.jsp/result
 /action
 action name=ReportGenerator class=eis.report.ReportGenerator
 result name=error/apps/SessionExpired.jsp/result
 result/apps/reports/ReportGenerator.jsp/result
 /action

 !-- REPORT FILTER FORM actions here --
 action name=ReportFilterForm_*
 class=eis.report.ReportFilterForm_{1}
 result/apps/reports/ReportFilterForm_{1}.jsp/result
 /action

 !-- REPORT actions here --
 action name=EIS-HR-* class=eis.report.EIS_HR_{1}
 result name=error/apps/reports/ReportNotFound.jsp/result
 result/apps/reports/EIS_HR_{1}.jsp/result
 /action
 action name=EIS-FN-* class=eis.report.EIS_FN_{1}
 result name=error/apps/reports/ReportNotFound.jsp/result
 result/apps/reports/EIS_FN_{1}.jsp/result
 /action
 action name=EIS-EG-* class=eis.report.EIS_EG_{1}
 result name=error/apps/reports/ReportNotFound.jsp/result
 result/apps/reports/EIS_EG_{1}.jsp/result
 /action
 action name=EIS-HR-004_JASPER
 class=eis.report.EIS_HR_004_JASPER
 result name=error/apps/reports/ReportNotFound.jsp/result
 result name=success type=jasper
 apps/reports/templates/hr004.jasper
 reportData
 PDF
 /result
 /action

 !-- Add actions here --

 action name=Login_* method={1} class=apps.Login
 result name=input/apps/Login.jsp/result
 result type=redirect-actionHome/result
 /action
 action name=* class=apps.eisSupport
 result/apps/{1}.jsp/result
 /action
 /package
 /struts

 please help me i've been thinking of it for a long time now..thanks
again..


 strutstwouser wrote:
 
  Can you paste the entire struts.xml ; ensure that you have :
 
  package name=mypackage
extends=struts-default,jasperreports-default
 
 
 
  On Nov 7, 2007 8:51 PM, carmi_cd [EMAIL PROTECTED] wrote:
 
 
  hi actually i tried using that tutorial and got a pdf with no data in
it
  only
  page and column titles.
  i dont know why..
 
  Stacktrace of my sun application server, it has no problem. i dont know
  why
  the report is not filled with the data. here is my code:
 
  public class EIS_HR_004_JASPER extends eisSupport {
 private String reportId;
 private String dateStart = null;
 private String dateEnd = null;
 private String pdfFile;
 private final static String _REPORT_FOLDER = EIS_HR_003;
 private Report thisReport;
 private String dateRange;
 private ArrayListPersonnel reportData = new
ArrayListPersonnel();
 
 public String execute(ActionMapping mapping,ActionForm form,
 HttpServletRequest request, HttpServletResponse response)
 throws Exception {
 ReportBean reportBean = new ReportBean();
 setThisReport(reportBean.getReport(getReportId()));
 setReportData();
 try {
 JasperCompileManager.compileReportToFile(
 

RE: [S2] Action can not redirect with extend pattern?

2007-11-08 Thread TANG Xigen
thanks very much again!


i forgot i add a validation  module!

thanks!

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: 2007年11月9日 10:59
To: Struts Users Mailing List
Subject: Re: [S2] Action can not redirect with extend pattern?

Hello,

Most likely your logon action is failing validation and trys to find the 
input result (which doesn't exist).

If you have action methods that should not be validated you have several 
options, including:

- create method-specific (action alias specific) validations

- exclude additional methods from the validation interceptor

- restructure things a little bit to avoid the issue altogether (for instance, 
if you're executing the
input() method validation won't be run)

There are probably other solutions too that might be a better fit for your 
application.

Dave

--- TANG Xigen [EMAIL PROTECTED]
wrote:

 Hi All
 
 
 I write a simple self PlatformActionSupport to let it's children can 
 redirect to result start when url like *!start.action, but when i 
 test my code, i find some works fine, some doesn't!
 
 [ Father  PlatformActionSupport ]
 @SuppressWarnings(serial)
 public abstract class PlatformActionSupport extends ActionSupport {
 
   public String doStart() {
   return start;
   }
 }
 
 [ ChildA loginAction extend PlatformActionSupport ]
 @SuppressWarnings(serial)
 public class LoginAction extends
 PlatformActionSupport {}
 
 [ ChildB RegistAction extend PlatformActionSupport ]
 @SuppressWarnings(serial)
 public class RegistAction extends
 PlatformActionSupport {}
 
 [ Struts.xml ]
 
   package
 name=com.dztalk.client.webflow.struts.pojos
 extends=struts-default
   interceptors
   interceptor name=LanguageFocusInterceptor

class=com.dztalk.client.webflow.struts.interceptors.LanguageFocusInterc
 eptor/interceptor
   interceptor-stack name=default
 
   interceptor-ref
 name=LanguageFocusInterceptor/interceptor-ref
   interceptor-ref
 name=defaultStack/interceptor-ref
   /interceptor-stack
   /interceptors
   
   action name=Logon!* method={1}

class=com.dztalk.client.webflow.struts.pojos.LoginAction
   interceptor-ref
 name=default/interceptor-ref
   result
 name=start/pages/generals/Logon.jsp/result
   /action
   
   action name=Regist!* method={1}

class=com.dztalk.client.webflow.struts.pojos.RegistAction
   interceptor-ref
 name=default/interceptor-ref
   result
 name=start/pages/generals/Regist.jsp/result
   /action
   /package
 
 

urlA:http://localhost:8080/dztalk-webflow/Regist!start.action;
   ---
 works fine

urlB:http://localhost:8080/dztalk-webflow/Logon!start.action;
  ---
 failed
 
 exception trace below
 
 Could not find action or result
 No result defined for action
 com.dztalk.client.webflow.struts.pojos.LoginAction
 and result input -
 action
 
 
 [S]: i find urlA call dostart() method in PlatformActionSupport but 
 urlB not!
   As struts doc, i think LogonRegist in my conf are almost sameness 
 action defition with just different name.
 why Logon doesn't
 work in my way? can anyone do me a favor about this topic!
 
 
 
 


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


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



RE: [S2] Action can not redirect with extend pattern?

2007-11-08 Thread Dave Newton
???

--- TANG Xigen [EMAIL PROTECTED]
wrote:

 thanks very much again!
 
 
 i forgot i add a validation  module!
 
 thanks!
 
 -Original Message-
 From: Dave Newton [mailto:[EMAIL PROTECTED] 
 Sent: 2007Äê11ÔÂ9ÈÕ 10:59
 To: Struts Users Mailing List
 Subject: Re: [S2] Action can not redirect with
 extend pattern?
 
 Hello,
 
 Most likely your logon action is failing validation
 and trys to find the input result (which doesn't
 exist).
 
 If you have action methods that should not be
 validated you have several options, including:
 
 - create method-specific (action alias specific)
 validations
 
 - exclude additional methods from the validation
 interceptor
 
 - restructure things a little bit to avoid the issue
 altogether (for instance, if you're executing the
 input() method validation won't be run)
 
 There are probably other solutions too that might be
 a better fit for your application.
 
 Dave
 
 --- TANG Xigen [EMAIL PROTECTED]
 wrote:
 
  Hi All
  
  
  I write a simple self PlatformActionSupport to
 let it's children can 
  redirect to result start when url like
 *!start.action, but when i 
  test my code, i find some works fine, some
 doesn't!
  
  [ Father  PlatformActionSupport ]
  @SuppressWarnings(serial)
  public abstract class PlatformActionSupport
 extends ActionSupport {
  
  public String doStart() {
  return start;
  }
  }
  
  [ ChildA loginAction extend PlatformActionSupport
 ]
  @SuppressWarnings(serial)
  public class LoginAction extends
  PlatformActionSupport {}
  
  [ ChildB RegistAction extend PlatformActionSupport
 ]
  @SuppressWarnings(serial)
  public class RegistAction extends
  PlatformActionSupport {}
  
  [ Struts.xml ]
  
  package
  name=com.dztalk.client.webflow.struts.pojos
  extends=struts-default
  interceptors
  interceptor name=LanguageFocusInterceptor
 

class=com.dztalk.client.webflow.struts.interceptors.LanguageFocusInterc
  eptor/interceptor
  interceptor-stack name=default
  
  interceptor-ref
  name=LanguageFocusInterceptor/interceptor-ref
  interceptor-ref
  name=defaultStack/interceptor-ref
  /interceptor-stack
  /interceptors
  
  action name=Logon!* method={1}
 

class=com.dztalk.client.webflow.struts.pojos.LoginAction
  interceptor-ref
  name=default/interceptor-ref
  result
  name=start/pages/generals/Logon.jsp/result
  /action
  
  action name=Regist!* method={1}
 

class=com.dztalk.client.webflow.struts.pojos.RegistAction
  interceptor-ref
  name=default/interceptor-ref
  result
  name=start/pages/generals/Regist.jsp/result
  /action
  /package
  
  
 

urlA:http://localhost:8080/dztalk-webflow/Regist!start.action;
---
  works fine
 

urlB:http://localhost:8080/dztalk-webflow/Logon!start.action;
   ---
  failed
  
  exception trace below
  
  Could not find action or result
  No result defined for action
  com.dztalk.client.webflow.struts.pojos.LoginAction
  and result input -
  action
  
  
  [S]: i find urlA call dostart() method in
 PlatformActionSupport but 
  urlB not!
  As struts doc, i think LogonRegist in my conf
 are almost sameness 
  action defition with just different name.
  why Logon doesn't
  work in my way? can anyone do me a favor about
 this topic!
  
  
  
  
 
 

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

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


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



Re: [struts] Thanks! Works also with redirect actions...

2007-11-08 Thread Dale Newfield

Dave Newton wrote:

result name=success type=redirectAction
   param name=actionNamemySuccess/param
   param name=fooId${fooId}/param
   param name=barId${barId}/param
/result


Arguably, yes, and for a couple of reasons. Off the
top of my head I don't recall what will happen if the
param isn't found, though (or is null, etc.)


From reading the code it adds param= even if the param has no value, 
which differs from the result of the OGNL code from which this was 
translated...

...if there were a flag to control that I might use this...
...any struts committers reading this:  If I provided a patch for an 
extra specially named parameter like supressEmptyParameters that did 
just what you'd expect, what are the chances that someone would commit it?


-Dale

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