Re: Struts and DreamWeaver

2004-12-23 Thread Antony Paul
I face the same problem. It is more complicated if used with
jsp:include or Tiles.  So I dont give the JSP pages back to graphics
designer for editing because it wont display it properly and no Struts
html tags are understood and no html input elements displayed.  So to
edit HTML I have to go through all the steps of deploying, refreshing
and consumes time.

   And here is the advantage of JSF over Struts because it have tool
vendor support and makes the life of programmers easier by rendering
tags.

   I think that Spring is better than Struts in this repspect. I used
it only for learning only.

rgds
Antony Paul


On Wed, 22 Dec 2004 12:02:21 -0700, Wendy Smoak [EMAIL PROTECTED] wrote:
 This is my first time having someone else do the page design.  I'm thrilled
 to have someone else do it, but they use DreamWeaver and I'm not sure what's
 going to happen if it sees html-el:form.  Then there's the fun of JSTL
 tags embedded within HTML tags, which works fine but can't exactly be
 considered valid syntax.
 
 I checked the archives, but only found suggestions to use something other
 than DreamWeaver.  I don't think that's going to go over well.
 
 My current plan is to have them use plain-old html form elements, and I'll
 automate as much as possible the task of switching them over to
 html-el:... tags.   Not much fun, but far better than having to do the
 page design.
 
 Does anyone have suggestions for coordinating page design with Struts webapp
 development?
 
 --
 Wendy
 
 -
 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: Accessing my form from an included page

2004-12-23 Thread Paul McCulloch
When you execute an action the name of the action from used is set in a
request scope attribute org.apache.struts.action.mapping.instance. It's a
fairly simple matter to get the actual actionform object if you know the
scope. For instance, all my forms are session scope so I can get the
just-used form with:

c:set scope=page var=formBean
value=${sessionScope[requestScope['org.apache.struts.action.mapping.instanc
e'].name]}/

If you don't know the scope then you'll need a bit more logic to get the
formbean.

Does that help?

Paul

 -Original Message-
 From: Donie Kelly [mailto:[EMAIL PROTECTED]
 Sent: 22 December 2004 14:59
 To: Struts Users Mailing List
 Subject: Accessing my form from an included page
 
 
 Hi all
 
  
 
 I have the following jsp layout for my pages
 
  
 
 Included header.jsp
 
 STRUTS PAGE
 
 Included footer.jsp
 
  
 
 Now in the header.jsp I have my site logo and I also want to add
 breadcrumbs. I want to establish and maintain a session 
 throughout the app
 and if the session is invalid i want to redirect to the 
 starting page so
 that I can initialise the app. I presume I need to put code in the
 header.jsp to handle this so no matter which page is accessed 
 it can do
 these checks.
 
  
 
 I also want to access the ActionForm for the current page so 
 that I can
 retrieve the page name to build up the breadcrumb. How can I do this?
 
  
 
 Any pointers would be appreciated.
 
 Donie
 
  
 
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 21/12/2004
  
 

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message, and notify us 
immediately. If you or your employer does not consent to Internet email 
messages of this kind, please advise us immediately. Opinions, conclusions and 
other information expressed in this message are not given or endorsed by my 
Company or employer unless otherwise indicated by an authorised representative 
independent of this message.

WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being 
transmitted via electronic mail attachments we cannot guarantee that 
attachments do not contain computer virus code.  You are therefore strongly 
advised to undertake anti virus checks prior to accessing the attachment to 
this electronic mail.  Axios Systems Ltd grants no warranties regarding 
performance use or quality of any attachment and undertakes no liability for 
loss or damage howsoever caused.


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



Problem with logic:iterate and HashMap

2004-12-23 Thread Peter Neu
Hello all,
I have a problem with the logic:iterate tag. I need to iterate over a
HashMap which stores wrapper objects(which include the actual data).
A wrapper class has for example one attribute velocity. As far
as I know the only way to access such a HashMap is this method:
 logic:iterate id=element name=hashMap indexId=index
bean:write name=element property=key /
bean:write name=element property=value /
 /logic:iterate
Is there any way to get the velocity attribute out of the wrapper class?
Regards,
Peter
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Inheritance of DynaActionForms

2004-12-23 Thread Radu Badita
Regarding the inheritance of DynaActionForms I've once read an very good 
and interesting article of someone who found an workaround. I don't have 
the url though, so maybe you'll get lucky with google ;-)

Hi,
I am looking for a Best practice of using the ActionForms. We are using
lot of Forms(both ActionForm and DynaActionForms) in our application. All
these Forms share some common properties and some validation logic is also
common.
Currently we are using the Inheritance in the ActionForms, to solve this
requirement(Like we have a Super ActionForm and all the other ActionForms
extend that Super ActionForm).
I would like to know, is there any possibility with the DynaActionForms. I
mean, we configure the properties of DynaActionForm in the
struts-config.xml, is there a possibility that we can say that one
DynaActionForm extends other DynaActionForm ? (with out replicating the
properties in all DynaActionForms)
As the struts-config.xml is an XML file, i guess we can imitate this by
using the XML INCLUDES( we include the super DynaActionForm properties in
the child DynaActionForms). Is there any configuration possible in
struts-config.xml ?
I wonder what are the advantages of DynaActionForms(whose properties are
configured in struts-config.xml) over ActionForms(which are Java Classes
created as JavaBeans) except the creation of extra java classes ?
Thanks,
Vijay.


-
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: non-HTML attributes

2004-12-23 Thread Freddy Villalba A.
Well, I'm no guru in this area, but I'd say, from some postings I've read on
the net, that some work has been done in that matter, yet nothing
official. In any case, it's not an issue for me (therefore, my not
worrying at all about that). Despite this, I'm also interested to know if
this has become a stable, robust cross-browser solution...

Cheers,
Freddy.

-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: miercoles, 22 de diciembre de 2004 21:53
Para: [EMAIL PROTECTED]
Asunto: RE: non-HTML attributes


Another consideration is that, I believe, .htc's are IE-only.  At least, I
think that was the case when I built an app using them a year or two ago.
Has that changed?  If not, is being tied to IE an issue for you?

I'd be interested to know if this is across-browser solution, just for my
own knowledge.  I didn't think it was...

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, December 22, 2004 3:47 pm, Freddy Villalba A. said:
 Yes, Frank. Believe it or not, I know what u mean and I agree with u. ;)

 However, in this case, that would mean I'd have to rebuild views (JSP)
 which
 were tightly coupled to Struts tags/forms (time constraints at that time)
 and that would take a while.

 Indeed, for the moment, I'd decided to use plain JavaScript, but I'd
 really
 like to use the behaviours solutions (it's definitely better, more
 robust
 and powerful).

 It's sad how this tiny details can become so important at a given time.

 I remember a Servlet presentation framework I used for previous
 projects...
 PAJES... it wouldn't complain about this kind of things and had some cool
 features. These days, I'm kind of missing it...

 Cheers,
 Freddy.

 P.S.: anybody else? alternatives?

 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Enviado el: miercoles, 22 de diciembre de 2004 20:51
 Para: [EMAIL PROTECTED]
 Asunto: Re: non-HTML attributes


 Solution: Don't use the Struts tags. :)

 Seriously, people tend to forget (or don't know to begin with) that they
 are
 NOT required to use Struts.

 Alternatively, limit the input via Javascript as an onKeyDown event
 handler.

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com

 On Wed, December 22, 2004 2:38 pm, Freddy Villalba A. said:
 Hello everybody,

 Since TEXTAREA doesn't have a MAXLENGTH attribute (which is quite
 useful,
 by
 the way), I wanted to implement my own solution using behaviours (hfc)
 to
 alter the standard TEXTAREA element. However, I've realized that this is
 not
 compatible with Struts' tag, since TLD validation throws a validation
 exception (it detects an attribute that does not belong to the standard
 HTML
 element nor the tag specification). I'd really like to use this
 solution(no
 Validator framework or anything else). Is it possible?

 I've thought about turning off XML validation. Not sure if this is
 possible
 with Struts and, if possible, I'm not sure I'd buy that with the implied
 tradeoff.

 Ideas anybody?

 Regards,
 Freddy.


 -
 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: Problem with logic:iterate and HashMap

2004-12-23 Thread Sunny
logic:iterate id=element name=hashMap indexId=index
   bean:define id = vObj  name=element property=value /
   bean:write name = vObj property = velocity /
/logic:iterate
Peter Neu wrote:
Hello all,
I have a problem with the logic:iterate tag. I need to iterate over a
HashMap which stores wrapper objects(which include the actual data).
A wrapper class has for example one attribute velocity. As far
as I know the only way to access such a HashMap is this method:
 logic:iterate id=element name=hashMap indexId=index
bean:write name=element property=key /
bean:write name=element property=value /
 /logic:iterate
Is there any way to get the velocity attribute out of the wrapper 
class?

Regards,
Peter
-
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]


Which setter do I need in the ActionForm for this example?

2004-12-23 Thread Zsolt Koppany
Hi,

I have tried several setters in the Form class but none of them are called
when the form is terminated. How should me setter look like to the property
dropDownSelection. The getter method is:

public Map getDropDownSelection()
{
  return dropDownSelection;
}

The setter setDropDownSelection(String key, Object value) is never called.


html:select multiple=true size=${selectionSize}   
   styleClass=fixSelectWidth
   property=dropDownSelection(${tracker.id}_${label_id})

c:forEach items=${choiceValues} var=cv
html:option value=${cv.value}
c:out value=${cv.label}
/
/html:option
/c:forEach
/html:select

Zsolt Koppany
Phone: +49-711-722 1874
--
Intland Software GmbH, Schulze-Delitzsch-Strasse 16
D-70565 Stuttgart, Germany
Phone: +49-711-722 1873, e-mail:[EMAIL PROTECTED]
Fax: +49-711-722 1835

 




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



Re: bean:write filter question

2004-12-23 Thread Derek Broughton
On Wednesday 22 December 2004 16:42, Jeff Beal wrote:

 The only thing that I always forget is that nodeValue() only returns a
 value for text nodes.  It's not like XSLT where the text value of an
 element is the text value of all contained text nodes.  So, basically,
 this.nodeValue wouldn't have worked anyway.  The DOM-compliant way of
 doing this.innerText (for an element with only one child node) would be
 this.childNodes.items(0).nodeValue.  this.innerText is a lot neater.

Darn. MS's DHTML reference says that there's no public standard for innerText, 
which means it's only guaranteed to work on IE.
-- 
derek

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



NullPointerException

2004-12-23 Thread uma.k
I get NullPointerException in validate() at this line
errors.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage(error.text.required));

This is my ApplicationResources.properties file with this line
error.text.required=Text is required

What could be the reason for NullPointerException?

Uma


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



Re: bean:write filter question

2004-12-23 Thread Jeff Beal
Here's a quick DOM-compliant function for getting the XSLT-like node 
value for any element or text node in the DOM.  (nodeType property 
returns 1 for elements and 3 for text nodes)

function getText(element) {
  if (element.nodeType == 1) {
var concatenation = '';
for(var i = 0; i  element.childNodes.length; i++) {
  concatenation += getNodeValue(element.childNodes.item(i));
}
return concatenation;
  } else if (element.nodeType == 3) {
return this.nodeValue;
  }
}
Derek Broughton wrote:
On Wednesday 22 December 2004 16:42, Jeff Beal wrote:
The only thing that I always forget is that nodeValue() only returns a
value for text nodes.  It's not like XSLT where the text value of an
element is the text value of all contained text nodes.  So, basically,
this.nodeValue wouldn't have worked anyway.  The DOM-compliant way of
doing this.innerText (for an element with only one child node) would be
this.childNodes.items(0).nodeValue.  this.innerText is a lot neater.

Darn. MS's DHTML reference says that there's no public standard for innerText, 
which means it's only guaranteed to work on IE.

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


Nightly builds after 12/20 are empty

2004-12-23 Thread Robert Taylor
Apologies if this has already been discussed, but I just attempted 
getting the most current
nightly build from here:

http://svn.apache.org/builds/struts/nightly/struts-20041222.zip
And its an empty file.
Also I get an Internal Server Error when trying to get the current GA 
release from here:

http://struts.apache.org/download.cgi
/robert

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


RE:NullPointerException

2004-12-23 Thread uma.k
Hi,
The solution is perfect. I forgot initialization. Now I dont get any error
but nothing is displayed when the error is actually to be thrown. I get
blank page and it doesn't go the actual page and show the error. Here is my
struts-config.xml

action
path=/upload-submit
type=upload.UploadAction
name=uploadForm
scope=request
validate=true
input=/upload/upload.jsp
  forward name=failure path=/upload/upload.jsp /
  forward name=display path=/upload/display.jsp /
/action

Any ideas?

Uma

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, December 23, 2004 6:43 PM
To: Struts Users Mailing List
Subject: Re: NullPointerException


IF the exception is actually being thrown here, then I'm guessing that you
haven't instantiated a instance of ActionErrors e.g. ActionErrors errors =
new ActionErrors();

Dennis



uma.k [EMAIL PROTECTED]
12/23/2004 07:40 AM
Please respond to
Struts Users Mailing List user@struts.apache.org


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

Subject
NullPointerException






I get NullPointerException in validate() at this line
errors.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage(error.text.required));

This is my ApplicationResources.properties file with this line
error.text.required=Text is required

What could be the reason for NullPointerException?

Uma


-
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: Accessing my form from an included page

2004-12-23 Thread Donie Kelly
[Donie Kelly] Hi Guys

OK, I ran through most of what your are telling me and must first thank you
all for the detailed responses.

I'm sure I need to explain my case a bit more clearly and please let me know
if what I am trying to do is easier if I take some other approach as I'm new
to struts.

1) I want to check I have a valid session so that I know the objects I have
been carrying through the session are still there. It they are not, I want
to reestablish them by redirecting back to some starting page which
initialises the session.

2) Need to put page navigation in the header.jsp page to make it easy to
navigate. I guess I will be putting stuff in the session to make so I was
going to use the form to return the breadcrumb name. Is this a good way to
do it?

That's it really.
Donie

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.4 - Release Date: 22/12/2004
 

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



RE: Accessing my form from an included page

2004-12-23 Thread fzlists
That's what one of my solutions was too, although I wasn't 100% sure the 
mapping instance was actually in request (I thought I remembered seeing it, but 
wasn't sure).

The argument against doing that though is that the attribute name could 
conceivably be changed down the road, breaking your code.  If your going to do 
something like this, you might be better off doing...

request.setAttribute(mapping, mapping);

...in your Actions, assuming mapping is the name of the variable passed to 
execute() for the ActionMapping object.  Yes, it's a bit of extra work in all 
the Actions, but it insulates your app from changes to the attribute name down 
the road.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, December 23, 2004 4:29 am, Paul McCulloch said:
 When you execute an action the name of the action from used is set in a
 request scope attribute org.apache.struts.action.mapping.instance. It's
 a
 fairly simple matter to get the actual actionform object if you know the
 scope. For instance, all my forms are session scope so I can get the
 just-used form with:
 
   c:set scope=page var=formBean
 value=${sessionScope[requestScope['org.apache.struts.action.mapping.instanc
 e'].name]}/
 
 If you don't know the scope then you'll need a bit more logic to get the
 formbean.
 
 Does that help?
 
 Paul
 
 -Original Message-
 From: Donie Kelly [mailto:[EMAIL PROTECTED]
 Sent: 22 December 2004 14:59
 To: Struts Users Mailing List
 Subject: Accessing my form from an included page


 Hi all



 I have the following jsp layout for my pages



 Included header.jsp

 STRUTS PAGE

 Included footer.jsp



 Now in the header.jsp I have my site logo and I also want to add
 breadcrumbs. I want to establish and maintain a session
 throughout the app
 and if the session is invalid i want to redirect to the
 starting page so
 that I can initialise the app. I presume I need to put code in the
 header.jsp to handle this so no matter which page is accessed
 it can do
 these checks.



 I also want to access the ActionForm for the current page so
 that I can
 retrieve the page name to build up the breadcrumb. How can I do this?



 Any pointers would be appreciated.

 Donie




 --
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 21/12/2004


 
 Axios Email Confidentiality Footer
 Privileged/Confidential Information may be contained in this message. If
 you are not the addressee indicated in this message (or responsible for
 delivery of the message to such person), you may not copy or deliver this
 message to anyone. In such case, you should destroy this message, and
 notify us immediately. If you or your employer does not consent to
 Internet email messages of this kind, please advise us immediately.
 Opinions, conclusions and other information expressed in this message are
 not given or endorsed by my Company or employer unless otherwise indicated
 by an authorised representative independent of this message.
  
 WARNING:
 While Axios Systems Ltd takes steps to prevent computer viruses from being
 transmitted via electronic mail attachments we cannot guarantee that
 attachments do not contain computer virus code.  You are therefore
 strongly advised to undertake anti virus checks prior to accessing the
 attachment to this electronic mail.  Axios Systems Ltd grants no
 warranties regarding performance use or quality of any attachment and
 undertakes no liability for loss or damage howsoever caused.
 
 
 -
 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: Accessing my form from an included page

2004-12-23 Thread Dakota Jack
On Thu, 23 Dec 2004 09:29:31 -, Paul McCulloch
[EMAIL PROTECTED] wrote:
 When you execute an action the name of the action from used is set in a
 request scope attribute org.apache.struts.action.mapping.instance. It's a
 fairly simple matter to get the actual actionform object if you know the
 scope. For instance, all my forms are session scope so I can get the
 just-used form with:
 
 c:set scope=page var=formBean
 value=${sessionScope[requestScope['org.apache.struts.action.mapping.instanc
 e'].name]}/

Thanks, Paul,

This was helpful.  What Donie was looking for was the name of the
*page*, however.  Why Donie wanted this we don't know.  We sort of got
off onto this stuff, which is interesting and your note is very
helpful.

Jack

--

You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



RE: Accessing my form from an included page

2004-12-23 Thread Paul McCulloch
I didn't notice this in the thread - but I didn't read it in depth as it was
pretty long.

I see more risk in one of my developers forgetting to add the call than in
the attribute name Struts uses changing. If that's a real concern why not
use a custom request processor to put the mapping in an attribute whose name
you define?

Paul

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 23 December 2004 14:27
 To: user@struts.apache.org
 Subject: RE: Accessing my form from an included page
 
 
 That's what one of my solutions was too, although I wasn't 
 100% sure the mapping instance was actually in request (I 
 thought I remembered seeing it, but wasn't sure).
 
 The argument against doing that though is that the attribute 
 name could conceivably be changed down the road, breaking 
 your code.  If your going to do something like this, you 
 might be better off doing...
 
 request.setAttribute(mapping, mapping);
 
 ...in your Actions, assuming mapping is the name of the 
 variable passed to execute() for the ActionMapping object.  
 Yes, it's a bit of extra work in all the Actions, but it 
 insulates your app from changes to the attribute name down the road.
 
 -- 
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 
 On Thu, December 23, 2004 4:29 am, Paul McCulloch said:
  When you execute an action the name of the action from used 
 is set in a
  request scope attribute 
 org.apache.struts.action.mapping.instance. It's
  a
  fairly simple matter to get the actual actionform object if 
 you know the
  scope. For instance, all my forms are session scope so I can get the
  just-used form with:
  
  c:set scope=page var=formBean
  
 value=${sessionScope[requestScope['org.apache.struts.action.m
 apping.instanc
  e'].name]}/
  
  If you don't know the scope then you'll need a bit more 
 logic to get the
  formbean.
  
  Does that help?
  
  Paul
  
  -Original Message-
  From: Donie Kelly [mailto:[EMAIL PROTECTED]
  Sent: 22 December 2004 14:59
  To: Struts Users Mailing List
  Subject: Accessing my form from an included page
 
 
  Hi all
 
 
 
  I have the following jsp layout for my pages
 
 
 
  Included header.jsp
 
  STRUTS PAGE
 
  Included footer.jsp
 
 
 
  Now in the header.jsp I have my site logo and I also want to add
  breadcrumbs. I want to establish and maintain a session
  throughout the app
  and if the session is invalid i want to redirect to the
  starting page so
  that I can initialise the app. I presume I need to put code in the
  header.jsp to handle this so no matter which page is accessed
  it can do
  these checks.
 
 
 
  I also want to access the ActionForm for the current page so
  that I can
  retrieve the page name to build up the breadcrumb. How can 
 I do this?
 
 
 
  Any pointers would be appreciated.
 
  Donie
 
 
 
 
  --
  No virus found in this outgoing message.
  Checked by AVG Anti-Virus.
  Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 
 21/12/2004
 
 
  
  Axios Email Confidentiality Footer
  Privileged/Confidential Information may be contained in 
 this message. If
  you are not the addressee indicated in this message (or 
 responsible for
  delivery of the message to such person), you may not copy 
 or deliver this
  message to anyone. In such case, you should destroy this 
 message, and
  notify us immediately. If you or your employer does not consent to
  Internet email messages of this kind, please advise us immediately.
  Opinions, conclusions and other information expressed in 
 this message are
  not given or endorsed by my Company or employer unless 
 otherwise indicated
  by an authorised representative independent of this message.
   
  WARNING:
  While Axios Systems Ltd takes steps to prevent computer 
 viruses from being
  transmitted via electronic mail attachments we cannot guarantee that
  attachments do not contain computer virus code.  You are therefore
  strongly advised to undertake anti virus checks prior to 
 accessing the
  attachment to this electronic mail.  Axios Systems Ltd grants no
  warranties regarding performance use or quality of any 
 attachment and
  undertakes no liability for loss or damage howsoever caused.
  
  
  
 -
  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: Accessing my form from an included page

2004-12-23 Thread fzlists
On Thu, December 23, 2004 9:13 am, Donie Kelly said:
 [Donie Kelly] Hi Guys
 
 OK, I ran through most of what your are telling me and must first thank
 you
 all for the detailed responses.

You spawned an interesting thread!  The seemingly simple questions are usually 
the ones that do that though. :)

 1) I want to check I have a valid session so that I know the objects I
 have
 been carrying through the session are still there. It they are not, I want
 to reestablish them by redirecting back to some starting page which
 initialises the session.

I can tell you the way I've done this in the past... Firstly, note that the 
best way is with some plug-in to your web server (or app server) that 
externalizes security, something like Netegrity for example.  This would handle 
expiring sessions and such as you want, redirecting to some logon page 
presumably.

In the absence of that though, what I've done is to have an ActionHelpers 
class... This class contains two methods, start() and finish().  start() is 
called at the start of each Action and finish(), you guessed it, is called 
right before returning the ActionForward.

Let's ignore what finish() does because it's not applicable here... start() 
however is... The first thing it does is calls checkSession() (my own method) 
that verifies if the session is valid or not, and redirects to the logon page 
if it's not.

That takes care of one piece of the puzzle... the other is what happens if 
someone accesses a JSP directly?  All I do here is call checkSession() 
directly.  If it's invalid, the page renders a redirect.  So, all the JSP's 
have a structure along these lines:

% if (!ActionHelpers.checkSession()) { %
 HTMLHEADTITLE/TITLE
 META HTTP-EQUIV=refresh CONTENT=0;URL=http://www.mysite.com/logon.do;
 /HEADBODY/BODY/HTML
% } else { %
 ... The actual page goes here
% } %

That does the trick.  I'm in NO WAY saying this is industrial-strength 
security, but it gets the job done.  In the environment I do this in, security 
isn't an issue though, so this is fine.  Also, it wouldn't be trivial I think 
to hack this anyway since you have to get a valid session on the server at some 
point that matches what's on the client, and assuming that can only be done 
through some logon procedure, it should be not completely insecure :)
 
 2) Need to put page navigation in the header.jsp page to make it easy to
 navigate. I guess I will be putting stuff in the session to make so I was
 going to use the form to return the breadcrumb name. Is this a good way to
 do it?

I would suggest looking for a canned breadcrumb solution.  There was a recent 
thread about just that, and some existing solutions were mentioned.

If your going to build your own, you need to determine what information you 
really need to construct your nav bar.  I doesn't sound like you need access to 
the Form Bean, as I had thought you were asking originally (maybe you were, 
maybe I misunderstood... doesn't really matter I guess :) ).  Sounds like what 
you really need is the Action path for all the pages that have been visited in 
order.

I would myself be thinking of a linked list structure, stored in session, with 
each item holding the mapping path.  That should be all you need to construct a 
breakcrumb path.

But again, no sense reinventing the wheel... Solutions for this exist already.

 That's it really.
 Donie
 
 --
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.296 / Virus Database: 265.6.4 - Release Date: 22/12/2004
 
 
 -
 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: some logic help

2004-12-23 Thread Dakota Jack
Oh, I misunderstood.  Sorry!  Off the top of my head without much
thought, I would just create a ThirtyRecordsAction which would have a
boolean switch for downloading the records or maybe create a special
data structure just for this.  I use a fairly standard list iterator
and handler pattern which I grabbed somewhere.  Here are the classes:

package com.crackwillow.util.list;

import java.util.Collection;
import java.util.List;

import com.crackwillow.exception.ChainedException;

public interface ListIterator {
  public void   setList(List list) throws ChainedException;
  public Collection getList();
  public intgetSize() throws ChainedException;
  public void   setIndex(int index) throws ChainedException;
  public intgetCurrentIndex() throws ChainedException;
  public Object getCurrentElement() throws ChainedException;
  public List   getPreviousElements(int count) throws ChainedException;
  public List   getPreviousElements() throws ChainedException;
  public List   getNextElements(int count) throws ChainedException;
  public List   getNextElements() throws ChainedException;
  public void   resetIndex() throws ChainedException;
} /// ;-)

package com.crackwillow.util.list;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.crackwillow.exception.ChainedException;

public class ListHandler
implements com.crackwillow.util.list.ListIterator {
  static Log log = LogFactory.getLog(ListHandler.class);

  private List list;
  private ListIterator listIterator;

  public ListHandler() {
  }

  public void setList(List list)
  throws ChainedException {
this.list = list;
if(list != null) {
  listIterator =  list.listIterator();
} else {
  throw new ChainedException(ListHandler: setList(List) failed:
list empty);
}
  }

  public Collection getList() {
return list;
  }

  public int getSize()
  throws ChainedException{
int size = 0;
if (list != null) {
  size = list.size();
} else {
  throw new ChainedException(ListHandler: getList() failed); //No Data
}
return size;
  }

  public void setIndex(int index)
  throws ChainedException {
index -= getCurrentIndex();
int size = list.size();
if(index  size) {
  throw new ChainedException(ListHandler: setCurrentIndex()
failed -- the current index chosen was greater than size));
}
getNextElements(index);
return;
  }

  public int getCurrentIndex()
  throws ChainedException {
// Will not advance iterator
if (list != null) {
  return listIterator.nextIndex();
} else {
  throw new ChainedException();
}
  }

  public Object getCurrentElement()
  throws ChainedException {
Object obj = null;
// Will not advance iterator
if (list != null) {
  int currIndex = listIterator.nextIndex();
  obj = list.get(currIndex);
} else {
  throw new ChainedException();
}
return obj;
  }

  public List getPreviousElements(int count)
  throws ChainedException {
inti  = 0;
Object object = null;
LinkedList list   = new LinkedList();
if (listIterator != null) {
  while(listIterator.hasPrevious()  (i  count)){
object = listIterator.previous();
list.add(object);
i++;
  }
} else {
  throw new ChainedException(ListHandler:
getPreviousElements(int) failed -- listIterator null.); // No data
}
return list;
  }

  public List getPreviousElements()
  throws ChainedException {
Object object = null;
LinkedList list = new LinkedList();
if(listIterator != null) {
  while(listIterator.hasPrevious()) {
object = listIterator.previous();
list.add(object);
  }
} else {
  throw new ChainedException(ListHandler: getNextElements(int)
failed -- listIterator null);
}
return list;
  }

  public List getNextElements(int count)
  throws ChainedException {
inti  = 0;
Object object = null;
LinkedList list   = new LinkedList();
if(listIterator != null) {
  while(listIterator.hasNext()  (i  count)) {
object = listIterator.next();
list.add(object);
i++;
  }
} else {
  throw new ChainedException(ListHandler: getNextElements(int)
failed -- listIterator null.);
}
return list;
  }

  public List getNextElements()
  throws ChainedException {
Object object = null;
LinkedList list = new LinkedList();
if(listIterator != null) {
  while(listIterator.hasNext()) {
object = listIterator.next();
list.add(object);
  }
} else {
  throw new ChainedException(ListHandler: getNextElements(int)
failed -- listIterator null);
}
return list;
  }

  public List getNext()
  throws ChainedException {

RE: Accessing my form from an included page

2004-12-23 Thread Paul McCulloch
1) You'll pretty much always have a valid session - the container will
create one for you if it isn't already there. What you need to do is
establish if an *initialised* session is there. 

One way to do this would bet to, in your initialise session action, create a
session scope attribute to say so:
request.getSession.setAttribute(ValidSession, Boolean.TRUE);

To check that you have a valid session I'd implement a Filter
(http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/Filter.html)
which would check for the presence of the attribute. In it's absence send
the user back to the initialise action.

All of this pre-suposes that you *don't* have security requirements. If you
do then look into a security framework, such as container managed security,
which will very probably already have things in place to deal with your
scenario.

2) Don't know. Check the group archives
(http://marc.theaimsgroup.com/?l=struts-userr=1w=2) - breadcrumbs have
come up before.

Paul

 -Original Message-
 From: Donie Kelly [mailto:[EMAIL PROTECTED]
 Sent: 23 December 2004 14:14
 To: Struts Users Mailing List
 Subject: RE: Accessing my form from an included page
 
 
 [Donie Kelly] Hi Guys
 
 OK, I ran through most of what your are telling me and must 
 first thank you
 all for the detailed responses.
 
 I'm sure I need to explain my case a bit more clearly and 
 please let me know
 if what I am trying to do is easier if I take some other 
 approach as I'm new
 to struts.
 
 1) I want to check I have a valid session so that I know the 
 objects I have
 been carrying through the session are still there. It they 
 are not, I want
 to reestablish them by redirecting back to some starting page which
 initialises the session.
 
 2) Need to put page navigation in the header.jsp page to make 
 it easy to
 navigate. I guess I will be putting stuff in the session to 
 make so I was
 going to use the form to return the breadcrumb name. Is this 
 a good way to
 do it?
 
 That's it really.
 Donie
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.296 / Virus Database: 265.6.4 - Release Date: 22/12/2004
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message, and notify us 
immediately. If you or your employer does not consent to Internet email 
messages of this kind, please advise us immediately. Opinions, conclusions and 
other information expressed in this message are not given or endorsed by my 
Company or employer unless otherwise indicated by an authorised representative 
independent of this message.

WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being 
transmitted via electronic mail attachments we cannot guarantee that 
attachments do not contain computer virus code.  You are therefore strongly 
advised to undertake anti virus checks prior to accessing the attachment to 
this electronic mail.  Axios Systems Ltd grants no warranties regarding 
performance use or quality of any attachment and undertakes no liability for 
loss or damage howsoever caused.


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



RE: Accessing my form from an included page

2004-12-23 Thread fzlists
On Thu, December 23, 2004 9:36 am, Paul McCulloch said:
 I didn't notice this in the thread - but I didn't read it in depth as it
 was
 pretty long.

A long thread??  With Jack and I involved?!?  Surely you jest... :)

We're probably the two most verbose guys around these parts!
 
 I see more risk in one of my developers forgetting to add the call than in
 the attribute name Struts uses changing. If that's a real concern why not
 use a custom request processor to put the mapping in an attribute whose
 name
 you define?

Fair point.  I didn't mean to imply it was a particular big risk by the way...  
Certainly if the Struts team did change it we're not talking about a 
monstrously difficult task to change it on our side anyway, especially if it's 
just in JSPs as we were talking about.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

 Paul
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 23 December 2004 14:27
 To: user@struts.apache.org
 Subject: RE: Accessing my form from an included page


 That's what one of my solutions was too, although I wasn't
 100% sure the mapping instance was actually in request (I
 thought I remembered seeing it, but wasn't sure).

 The argument against doing that though is that the attribute
 name could conceivably be changed down the road, breaking
 your code.  If your going to do something like this, you
 might be better off doing...

 request.setAttribute(mapping, mapping);

 ...in your Actions, assuming mapping is the name of the
 variable passed to execute() for the ActionMapping object.
 Yes, it's a bit of extra work in all the Actions, but it
 insulates your app from changes to the attribute name down the road.

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com

 On Thu, December 23, 2004 4:29 am, Paul McCulloch said:
  When you execute an action the name of the action from used
 is set in a
  request scope attribute
 org.apache.struts.action.mapping.instance. It's
  a
  fairly simple matter to get the actual actionform object if
 you know the
  scope. For instance, all my forms are session scope so I can get the
  just-used form with:
 
 c:set scope=page var=formBean
 
 value=${sessionScope[requestScope['org.apache.struts.action.m
 apping.instanc
  e'].name]}/
 
  If you don't know the scope then you'll need a bit more
 logic to get the
  formbean.
 
  Does that help?
 
  Paul
 
  -Original Message-
  From: Donie Kelly [mailto:[EMAIL PROTECTED]
  Sent: 22 December 2004 14:59
  To: Struts Users Mailing List
  Subject: Accessing my form from an included page
 
 
  Hi all
 
 
 
  I have the following jsp layout for my pages
 
 
 
  Included header.jsp
 
  STRUTS PAGE
 
  Included footer.jsp
 
 
 
  Now in the header.jsp I have my site logo and I also want to add
  breadcrumbs. I want to establish and maintain a session
  throughout the app
  and if the session is invalid i want to redirect to the
  starting page so
  that I can initialise the app. I presume I need to put code in the
  header.jsp to handle this so no matter which page is accessed
  it can do
  these checks.
 
 
 
  I also want to access the ActionForm for the current page so
  that I can
  retrieve the page name to build up the breadcrumb. How can
 I do this?
 
 
 
  Any pointers would be appreciated.
 
  Donie
 
 
 
 
  --
  No virus found in this outgoing message.
  Checked by AVG Anti-Virus.
  Version: 7.0.296 / Virus Database: 265.6.3 - Release Date:
 21/12/2004
 
 
 
  Axios Email Confidentiality Footer
  Privileged/Confidential Information may be contained in
 this message. If
  you are not the addressee indicated in this message (or
 responsible for
  delivery of the message to such person), you may not copy
 or deliver this
  message to anyone. In such case, you should destroy this
 message, and
  notify us immediately. If you or your employer does not consent to
  Internet email messages of this kind, please advise us immediately.
  Opinions, conclusions and other information expressed in
 this message are
  not given or endorsed by my Company or employer unless
 otherwise indicated
  by an authorised representative independent of this message.
 
  WARNING:
  While Axios Systems Ltd takes steps to prevent computer
 viruses from being
  transmitted via electronic mail attachments we cannot guarantee that
  attachments do not contain computer virus code.  You are therefore
  strongly advised to undertake anti virus checks prior to
 accessing the
  attachment to this electronic mail.  Axios Systems Ltd grants no
  warranties regarding performance use or quality of any
 attachment and
  undertakes no liability for loss or damage howsoever caused.
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 
 

Re: Which setter do I need in the ActionForm for this example?

2004-12-23 Thread Richard Yee
Zsolt,
The selected item in a html:select input is typically a String property. It 
is separate from the collection that is used to populate a dropdown list. 
You should have a getter and setter for a string property and use that 
property as the value of the property  attribute of the html:select tag.

-Richard
At 04:12 AM 12/23/2004, you wrote:
Hi,
I have tried several setters in the Form class but none of them are called
when the form is terminated. How should me setter look like to the property
dropDownSelection. The getter method is:
public Map getDropDownSelection()
{
  return dropDownSelection;
}
The setter setDropDownSelection(String key, Object value) is never called.
Zsolt Koppany Phone: +49-711-722 1874 -- Intland Software GmbH, 
Schulze-Delitzsch-Strasse 16 D-70565 Stuttgart, Germany Phone: +49-711-722 
1873, e-mail:[EMAIL PROTECTED] Fax: +49-711-722 1835 
- 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: Accessing my form from an included page

2004-12-23 Thread fzlists

 Lord, Frank --- no worries.  One of the worst things is people who
 take things too seriously and read jots and tiddles on these lists.
 Relax with me.  Sounds like therapy?  LOL  ;-)

Therapy... I could use that :)

 I did not mean that it was in the response object but accessed within
 the object building the response object, as well as other places.

Ok, gotcha :)
 
 This is the misconception, I think.  ActionForms are not for pages but
 for Actions.  A page can have a multitude of Actions and ActionForms
 in any particular tile.  ActionForms are never tile or page bound.
 Indeed, I think, the same ActionForm and Action can be found in
 various places in a single tile or page.  Right?  The ActionForm and
 Action are part of the framework and not part of the view in the MVC.
 You know this I know.  I am just thinking out loud and not really
 concentrating on the communication aspect.

I absolutely agree.  I also have to say I've only toyed with Tiles 
superficially, so any discussion that brings that in I'm a bit out of my 
element with.  I don't think that applies here though.

It is true however that for any given page, it's only going to use a single 
Form Bean, as far as Struts goes.  What I mean is, unless you yourself pass 
more beans (as I do in one app, via the request object), Struts only allows for 
a single Form Bean, per page, per request.  This is, I think the relevant point 
for this discussion, even though we now agree Donnie wasn't actually asking how 
to access the Form Bean :)  Indeed, if there could be more than one bean 
available, the question would be more difficult because now you'd also have to 
ask which bean to go after in addition to what name to use and in what scope.
 
 The bean is available without being imported.  It is in scope because
 of the framework.  Right?  Importation is just for identification.

Yes, after I wrote that I was worried the use of the word import would be 
confusing... I didn't mean to say or imply that you had to import anything... I 
was using it to refer to one JSP including another... That's something like an 
import... Bad usage of the term :)
 
 Sure you remember the good part.  We have family here for the holidays
 and people were laughing about the town pornographer of some years
 past.  His son was blind.  How ironic, we thought.  H.  Seemed
 funny then and cruel now.  You have to have been there.  My wife's
 brother was talking about how he beat up the blind kid in camp.  Turns
 out this made the blind kid happy because he felt part of the group.
 God knows I must have really been part of the group under the measure.
  LOL

If I'd have known that I could have been beating up handicapped kids for the 
holidays all through school :)  Would have been a great present for them!
 
 True, but all Donie wanted was the *name*, which is passed to the
 ActionForward in creating the ActionForward.

Yep, I WAS playing the Scottrade guy... Always trying to give more than is 
requested :)
 
 This is where we were parting ways.  Donie just said he wanted the
 name. So, that is what I have focused on.

I'm with ya :)

 Yah.  I think we've got this down alright?

For the sake of ever seeing this thread die, I agree :)

 I don't know if I am a fan of taglibs but I develop enough of them
 myself.  They are fairly easy to write once you get the hang of it and
 I build a custom suite pretty quickly.

I've written a couple myself as well.  To say I never use them wouldn't be 
accurate, but to say I think of them first in any given situation also wouldn't 
be accurate.

Then again, my environment is not one where we separate page developers from 
business class developers (although we may be moving in that direction).  In 
such an environment I suspect I would be more in favor of taglibs as I think 
that's where they really start to pull their weight, so to speak.  Absent 
that situation though, I find them more trouble than they are worth 8 times out 
of 10.
 
 I am surprised at this.  I like them for what they are worth.  Why do
 you hate them?

Well, I think my main objection is complexity.  I think they tend to add more 
than they take away.  So long as we're talking about purely presentational 
code, I don't have a problem with scriplets in JSPs, in fact I prefer being 
able to see precisely what's going on in one place without digging through some 
other class somewhere.  Obviously you have to be careful not to let application 
logic sneak in.

Taglibs are just more to configure and more dependencies.  Not a huge amount I 
admit, but I'm a simplicity bigot, I like my apps to rely on as little as 
possible, have as few pieces as possible.  I don't feel like taglibs do this, 
most of the time.

As I said though, I DO use them when I think it's warranted, but they aren't my 
first answer to a given problem, 8 times out of 10.
 
 Oh I have done that too.  I think of ActionForms more as data grabbers
 and do not take them too seriously.  Struts is great but 

Re: Required help to name a worksheet in xls

2004-12-23 Thread Hubert Rabago
Take a look at Jakarta POI.  http://jakarta.apache.org/poi/  
They make it easy to do stuff like this.


On Thu, 23 Dec 2004 12:43:17 +0530, Shiva Narayana
[EMAIL PROTECTED] wrote:
 Hey this is new to me plz send me how u r creating the excel sheet..
 I ll appreciate for it
 
 Regards
 Shiva


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



Re: Struts and DreamWeaver

2004-12-23 Thread Ashish Kulkarni
Hi
I use macro media dreamweaver and can add tag library
and so can support struts or jstl, i explained my
graphical designer to use these tags instead of html
tags and it worked out well, try teaching graphical
designer to use tags..
Ashish
--- Erik Weber [EMAIL PROTECTED] wrote:

 I completed a non-Struts JSP project with a designer
 who used 
 DreamWeaver. I hooked him up with the Tortoise CVS
 client, and we didn't 
 have any problems. Occasionally I would find tabs
 blown out, that was 
 about it. The HTML was fine. The site is in
 production and works in IE 
 and Mozilla. He told me Dreamweaver ignored stuff it
 didn't know how to 
 handle, and he never complained about inability to
 edit layouts.
 
 Erik
 
 
 Wendy Smoak wrote:
 
 This is my first time having someone else do the
 page design.  I'm thrilled
 to have someone else do it, but they use
 DreamWeaver and I'm not sure what's
 going to happen if it sees html-el:form.  Then
 there's the fun of JSTL
 tags embedded within HTML tags, which works fine
 but can't exactly be
 considered valid syntax.
 
 I checked the archives, but only found suggestions
 to use something other
 than DreamWeaver.  I don't think that's going to go
 over well.
 
 My current plan is to have them use plain-old html
 form elements, and I'll
 automate as much as possible the task of switching
 them over to
 html-el:... tags.   Not much fun, but far better
 than having to do the
 page design.
 
 Does anyone have suggestions for coordinating page
 design with Struts webapp
 development?
 
   
 
 

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




__ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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



jars in 1.2.6

2004-12-23 Thread Raphael Gallo
Hi,

I'm migrating from Struts 1.1 to 1.2.6 and I'm missing the
struts_el.jar...is it avaliable in the main struts.jar?

Is there any documentation related to differences in the JARs from 1.1 to
1.2.6


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



Flash buttons in struts???

2004-12-23 Thread Donie Kelly
Hi all

 

I have lovely pages made with flash buttons but does anybody know how to
submit forms etc using flash buttons???

 

Thanks

Donie

 


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.4 - Release Date: 22/12/2004
 


RE: Which setter do I need in the ActionForm for this example?

2004-12-23 Thread Zsolt Koppany

Richard,

Thank you, but did you see that I have set multiple=true ?

Zsolt

 -Original Message-
 From: Richard Yee [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 23, 2004 4:01 PM
 To: Struts Users Mailing List
 Subject: Re: Which setter do I need in the ActionForm for this example?
 
 Zsolt,
 The selected item in a html:select input is typically a String property.
 It
 is separate from the collection that is used to populate a dropdown list.
 You should have a getter and setter for a string property and use that
 property as the value of the property  attribute of the html:select tag.
 
 -Richard
 
 At 04:12 AM 12/23/2004, you wrote:
 Hi,
 
 I have tried several setters in the Form class but none of them are
 called
 when the form is terminated. How should me setter look like to the
 property
 dropDownSelection. The getter method is:
 
 public Map getDropDownSelection()
 {
return dropDownSelection;
 }
 
 The setter setDropDownSelection(String key, Object value) is never
 called.
 
 
 Zsolt Koppany Phone: +49-711-722 1874 -- Intland Software GmbH,
 Schulze-Delitzsch-Strasse 16 D-70565 Stuttgart, Germany Phone: +49-711-
 722
 1873, e-mail:[EMAIL PROTECTED] Fax: +49-711-722 1835
 - 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: jars in 1.2.6

2004-12-23 Thread Mick.Knutson
Isn't this jar in the contrib. directory? It is in mine.


Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

This message may contain confidential and/or privileged information. If you 
are not the addressee or authorized to receive this for the addressee, you must 
not use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.




-Original Message-
From: Raphael Gallo [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 23, 2004 8:22 AM
To: Struts Users Mailing List
Subject: jars in 1.2.6


Hi,

I'm migrating from Struts 1.1 to 1.2.6 and I'm missing the
struts_el.jar...is it avaliable in the main struts.jar?

Is there any documentation related to differences in the JARs from 1.1 to
1.2.6


-
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: Nightly builds after 12/20 are empty

2004-12-23 Thread Craig McClanahan
Last night's nightly builds (20041223) worked correctly -- we had
added a new dependency, and I hadn't picked up configuring it in the
nightly build scripts yet.

Craig


On Thu, 23 Dec 2004 08:32:07 -0500, Robert Taylor [EMAIL PROTECTED] wrote:
 Apologies if this has already been discussed, but I just attempted
 getting the most current
 nightly build from here:
 
 http://svn.apache.org/builds/struts/nightly/struts-20041222.zip
 
 And its an empty file.
 
 Also I get an Internal Server Error when trying to get the current GA
 release from here:
 
 http://struts.apache.org/download.cgi
 
 /robert
 
 -
 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: Which setter do I need in the ActionForm for this example?

2004-12-23 Thread Jeff Beal
With multiple=true, I think that you need a property of type String[] 
in your ActionForm.

-- Jeff
Zsolt Koppany wrote:
Richard,
Thank you, but did you see that I have set multiple=true ?
Zsolt

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 23, 2004 4:01 PM
To: Struts Users Mailing List
Subject: Re: Which setter do I need in the ActionForm for this example?
Zsolt,
The selected item in a html:select input is typically a String property.
It
is separate from the collection that is used to populate a dropdown list.
You should have a getter and setter for a string property and use that
property as the value of the property  attribute of the html:select tag.
-Richard
At 04:12 AM 12/23/2004, you wrote:
Hi,
I have tried several setters in the Form class but none of them are
called
when the form is terminated. How should me setter look like to the
property
dropDownSelection. The getter method is:
public Map getDropDownSelection()
{
 return dropDownSelection;
}
The setter setDropDownSelection(String key, Object value) is never
called.
Zsolt Koppany Phone: +49-711-722 1874 -- Intland Software GmbH,
Schulze-Delitzsch-Strasse 16 D-70565 Stuttgart, Germany Phone: +49-711-
722
1873, e-mail:[EMAIL PROTECTED] Fax: +49-711-722 1835
- 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: Flash buttons in struts???

2004-12-23 Thread Bryce Fischer
Donie Kelly wrote:
I have lovely pages made with flash buttons but does anybody know how to
submit forms etc using flash buttons???
If you are using Dreamweaver, and using its facilities to insert a flash 
button, just set the link to:
javascript:document.formName.submit();

If its a button you created in Flash yourself, then I'm not sure. I 
think you have to set it up to call the JS, but I don't know how.

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

Re: Flash buttons in struts???

2004-12-23 Thread Jeff Beal
You'll need to write a little bit of JavaScript to get that to work 
well.  Try adding 
onclick=document.forms.namedItem('yourFormName').submit()

(See 
http://www.w3.org/TR/2000/WD-DOM-Level-1-2929/level-one-html#ID-26809268 
for reference information)

Donie Kelly wrote:
Hi all
 

I have lovely pages made with flash buttons but does anybody know how to
submit forms etc using flash buttons???
 

Thanks
Donie
 



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


Struts tags / JSTL question

2004-12-23 Thread Vinicius Caldeira Carvalho
Hi there!
I have a collection of beans, and this collection is set to the request. 
I'd like to retreive only the first object of the collection (later on 
I'll iterate over it completely) How can I do this? My Collection is a List.
I tried c:set var=bean value=${collection.get(0)}
and also c:set var=bean value={$collection.iterator.next}

none of 'em seems to work. Any ideas?
Thanks all
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts tags / JSTL question

2004-12-23 Thread Vic
A collection?
c:for each !
.V
Vinicius Caldeira Carvalho wrote:
Hi there!
I have a collection of beans, and this collection is set to the 
request. I'd like to retreive only the first object of the collection 
(later on I'll iterate over it completely) How can I do this? My 
Collection is a List.
I tried c:set var=bean value=${collection.get(0)}
and also c:set var=bean value={$collection.iterator.next}

none of 'em seems to work. Any ideas?
Thanks all

--
RiA-SoA w/JDNC http://www.SandraSF.com forums
- help develop a coomunity
My blog http://www.sandrasf.com/adminBlog
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Flash buttons in struts???

2004-12-23 Thread Dakota Jack
The answer is in Flash not in Struts.  Here is a url to answer most of
your questions on this.

http://www.actionscripts.org/tutorials/beginner/html_forms/index.shtml

Jack


On Thu, 23 Dec 2004 16:21:13 -, Donie Kelly [EMAIL PROTECTED] wrote:
 Hi all
 
 I have lovely pages made with flash buttons but does anybody know how to
 submit forms etc using flash buttons???
 
 Thanks
 
 Donie
 
 --
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.296 / Virus Database: 265.6.4 - Release Date: 22/12/2004
 
 


-- 
--

You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Re: Struts tags / JSTL question

2004-12-23 Thread Robert Taylor
Vinicius Caldeira Carvalho wrote:
Hi there!
I have a collection of beans, and this collection is set to the 
request. I'd like to retreive only the first object of the collection 
(later on I'll iterate over it completely) How can I do this? My 
Collection is a List.
I tried c:set var=bean value=${collection.get(0)}
and also c:set var=bean value={$collection.iterator.next}

none of 'em seems to work. Any ideas?
Thanks all
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

You can try the following although it may not work:
c:forEach var=bean items=collection begin=0 end=0
...
/c:forEach
/robert
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


session form bean problem

2004-12-23 Thread t t
Hi, all,
First, happy holidays to you!
I got a question. I have such action mapping:

action path=/Populate
   type=myClasses.PopulateAction
name=SearchForm
scope=request
   validate=false
   forward name=success path=/search.jsp/
   /action
-
I want to populate SearchForm with some existed values(stored in session) 
before showing search.jsp. This work is done in execute method of 
PopulateAction.
It works well when I use the mapping code shown above. But when I take out the 
line -- scope=request, that is, I want this form bean to be a session bean. 
Then the values were not set. They are  just the initial values of the form 
bean. 
It seems a new form bean object was created after execute method of 
PopulateAction. Or , execute method of PopulateAction was not executed.
Any idea anyone?
 
Thanks in advance.




-
Do you Yahoo!?
 Jazz up your holiday email with celebrity designs. Learn more.

Re: Struts tags / JSTL question

2004-12-23 Thread Dakota Jack
I just sent a couple of classes using a standard list iterator/handler
pattern from the core J2EE design patterns book to Uma.k on this list
that answer this with one solution.  I will send it along to you too. 
I think that when you see the code the answer to your question will
become obvious.  ListHandler allows you to access members of the list
in a very sophisticated way.  This is a very handy and simple design
pattern.

Jack

package com.crackwillow.list;

import java.util.Collection;
import java.util.List;

import com.crackwillow.exception.ChainedException;

public interface ListIterator {
  public void   setList(List list) throws ChainedException;
  public Collection getList();
  public intgetSize() throws ChainedException;
  public void   setIndex(int index) throws ChainedException;
  public intgetCurrentIndex() throws ChainedException;
  public Object getCurrentElement() throws ChainedException;
  public List   getPreviousElements(int count) throws ChainedException;
  public List   getPreviousElements() throws ChainedException;
  public List   getNextElements(int count) throws ChainedException;
  public List   getNextElements() throws ChainedException;
  public void   resetIndex() throws ChainedException;
} /// ;-)

package com.crackwillow.list;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.crackwillow.exception.ChainedException;

public class ListHandler
implements com.crackwillow.list.ListIterator {
  static Log log = LogFactory.getLog(ListHandler.class);

  private List list;
  private ListIterator listIterator;

  public ListHandler() {
  }

  public void setList(List list)
  throws ChainedException {
this.list = list;
if(list != null) {
  listIterator =  list.listIterator();
} else {
  throw new ChainedException(ListHandler: setList(List) failed:
list empty);
}
  }

  public Collection getList() {
return list;
  }

  public int getSize()
  throws ChainedException{
int size = 0;
if (list != null) {
  size = list.size();
} else {
  throw new ChainedException(ListHandler: getList() failed); //No Data
}
return size;
  }

  public void setIndex(int index)
  throws ChainedException {
index -= getCurrentIndex();
int size = list.size();
if(index  size) {
  throw new ChainedException(ListHandler: setCurrentIndex()
failed -- the current index chosen was greater than size));
}
getNextElements(index);
return;
  }

  public int getCurrentIndex()
  throws ChainedException {
// Will not advance iterator
if (list != null) {
  return listIterator.nextIndex();
} else {
  throw new ChainedException();
}
  }

  public Object getCurrentElement()
  throws ChainedException {
Object obj = null;
// Will not advance iterator
if (list != null) {
  int currIndex = listIterator.nextIndex();
  obj = list.get(currIndex);
} else {
  throw new ChainedException();
}
return obj;
  }

  public List getPreviousElements(int count)
  throws ChainedException {
inti  = 0;
Object object = null;
LinkedList list   = new LinkedList();
if (listIterator != null) {
  while(listIterator.hasPrevious()  (i  count)){
object = listIterator.previous();
list.add(object);
i++;
  }
} else {
  throw new ChainedException(ListHandler:
getPreviousElements(int) failed -- listIterator null.); // No data
}
return list;
  }

  public List getPreviousElements()
  throws ChainedException {
Object object = null;
LinkedList list = new LinkedList();
if(listIterator != null) {
  while(listIterator.hasPrevious()) {
object = listIterator.previous();
list.add(object);
  }
} else {
  throw new ChainedException(ListHandler: getNextElements(int)
failed -- listIterator null);
}
return list;
  }

  public List getNextElements(int count)
  throws ChainedException {
inti  = 0;
Object object = null;
LinkedList list   = new LinkedList();
if(listIterator != null) {
  while(listIterator.hasNext()  (i  count)) {
object = listIterator.next();
list.add(object);
i++;
  }
} else {
  throw new ChainedException(ListHandler: getNextElements(int)
failed -- listIterator null.);
}
return list;
  }

  public List getNextElements()
  throws ChainedException {
Object object = null;
LinkedList list = new LinkedList();
if(listIterator != null) {
  while(listIterator.hasNext()) {
object = listIterator.next();
list.add(object);
  }
} else {
  throw new ChainedException(ListHandler: getNextElements(int)
failed -- listIterator null);
}

Re: jars in 1.2.6

2004-12-23 Thread Raphael Gallo
Sorry...I  think I've got the wrong bundle...

By the way...The validator isn't working after migrating from 1.1 to
1.2.6...is there any road map to do this?

Thanks in advance!


- Original Message - 
From: [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Thursday, December 23, 2004 2:58 PM
Subject: RE: jars in 1.2.6


Isn't this jar in the contrib. directory? It is in mine.


Mick Knutson
Wells Fargo Business Direct
(415) 222-1020

This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation.




-Original Message-
From: Raphael Gallo [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 23, 2004 8:22 AM
To: Struts Users Mailing List
Subject: jars in 1.2.6


Hi,

I'm migrating from Struts 1.1 to 1.2.6 and I'm missing the
struts_el.jar...is it avaliable in the main struts.jar?

Is there any documentation related to differences in the JARs from 1.1 to
1.2.6


-
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 and DreamWeaver

2004-12-23 Thread Dakota Jack
But it is good to have the choice between JSF and Struts.  Hopefully
they don't become one as proposed in Shale so that the choice is gone.
 I don't take Dream Weaver people too seriously because I don't run in
that crowd.  I do understand that the Dream Weaver crowd, however, is
real and important and has its own needs.  I cannot imagine a large
scale commercial project on Dream Weaver and consider it a part of the
small site area of the industry, but I probably am mistaken.

Jack


On Thu, 23 Dec 2004 14:46:57 +0530, Antony Paul [EMAIL PROTECTED] wrote:
 I face the same problem. It is more complicated if used with
 jsp:include or Tiles.  So I dont give the JSP pages back to graphics
 designer for editing because it wont display it properly and no Struts
 html tags are understood and no html input elements displayed.  So to
 edit HTML I have to go through all the steps of deploying, refreshing
 and consumes time.
 
And here is the advantage of JSF over Struts because it have tool
 vendor support and makes the life of programmers easier by rendering
 tags.
 
I think that Spring is better than Struts in this repspect. I used
 it only for learning only.
 
 rgds
 Antony Paul
 
 
 On Wed, 22 Dec 2004 12:02:21 -0700, Wendy Smoak [EMAIL PROTECTED] wrote:
  This is my first time having someone else do the page design.  I'm thrilled
  to have someone else do it, but they use DreamWeaver and I'm not sure what's
  going to happen if it sees html-el:form.  Then there's the fun of JSTL
  tags embedded within HTML tags, which works fine but can't exactly be
  considered valid syntax.
 
  I checked the archives, but only found suggestions to use something other
  than DreamWeaver.  I don't think that's going to go over well.
 
  My current plan is to have them use plain-old html form elements, and I'll
  automate as much as possible the task of switching them over to
  html-el:... tags.   Not much fun, but far better than having to do the
  page design.
 
  Does anyone have suggestions for coordinating page design with Struts webapp
  development?
 
  --
  Wendy
 
  -
  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]
 
 


-- 
--

You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be crows.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

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



Help needed - submitting dynamic text boxes to ActionForm

2004-12-23 Thread krishna mohan d
Hi,

I am struck in the middle of one web application. I am using struts 1.1 
framework.

I have a form where I have nearly 12 text boxes per row, which are generated 
dynamically.

means I have a form where I have 12 text boxes per row and I am assigning name 
dynamically.[I am using plain jsp and javascript].
The number of text boxes depends on the value fetched from database.

suppose if my database value is 10, 
my form will be having 12 [Textboxes per row] * 10[no. of rows] = 120 
textboxes. if the database value is 5, I will be having 60 textboxes.

my question is
How to write the action form.

I think it is a bad programming to write 120 properties and 240 methods [getter 
and setter].Also beacuse the textboxes changes depending on the database value, 
I think I cannot define 60 / 120 /200 properties and getter and setter methods.

How to handle this situation and submit the data entered by user to the action 
form, get them into Action class.

Any help on this is appreciated.

Thanks
Krishna. 


Yahoo! India Matrimony: Find your life partneronline.

Input type with map-backed action forms

2004-12-23 Thread icon911
I am trying to have a form built at run time. It seems that map-backed
ActionForms good fit for what I need. Hower I have a problem coming up
with a solution as to what to do when not all input types are text
fields, so this does not work

html:text property=value(foo)/

because the field has to be text, what if its checkbox?

Basically when fields are dynamic and I retrieve them using a loop,
what can I do to determine if it will be a text field or a checkbox or
so on  Is there a way to add to a map a LabelValueBean so label
would be the actual field name and the value its type, or something
like that?


Thanks,
Fedor

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



Re: session form bean problem

2004-12-23 Thread Bill Siggelkow
Hmm .. please include the code from the PopulateAction.
t t wrote:
Hi, all,
First, happy holidays to you!
I got a question. I have such action mapping:

action path=/Populate
   type=myClasses.PopulateAction
name=SearchForm
scope=request
   validate=false
   forward name=success path=/search.jsp/
   /action
-
I want to populate SearchForm with some existed values(stored in session) before showing search.jsp. This work is done in execute method of PopulateAction.
It works well when I use the mapping code shown above. But when I take out the line -- scope=request, that is, I want this form bean to be a session bean. Then the values were not set. They are  just the initial values of the form bean. 
It seems a new form bean object was created after execute method of PopulateAction. Or , execute method of PopulateAction was not executed.
Any idea anyone?
 
Thanks in advance.



-
Do you Yahoo!?
 Jazz up your holiday email with celebrity designs. Learn more.

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


Re: session form bean problem --more code

2004-12-23 Thread t t

Thanks. Here is the code:
---
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

HttpSession session = request.getSession();
User user = (User)
session.getAttribute(Constants.USER_KEY);
SearchForm searchForm=(SearchForm) form;
searchForm.setZipcode(user.getZipcode());
searchForm.setCity(user.getCity());
searchForm.setState(user.getState());
searchForm.setCountry(user.getCountry());

return (mapping.findForward(success));

}
--
--- Bill Siggelkow [EMAIL PROTECTED] wrote:

 Hmm .. please include the code from the
 PopulateAction.
 
 t t wrote:
  Hi, all,
  First, happy holidays to you!
  I got a question. I have such action mapping:
  
  action path=/Populate
 type=myClasses.PopulateAction
  name=SearchForm
  scope=request
 validate=false
 forward name=success
 path=/search.jsp/
 /action
  -
  I want to populate SearchForm with some existed
 values(stored in session) before showing
 search.jsp. This work is done in execute method
 of PopulateAction.
  It works well when I use the mapping code shown
 above. But when I take out the line --
 scope=request, that is, I want this form bean to
 be a session bean. Then the values were not set.
 They are  just the initial values of the form bean. 
  It seems a new form bean object was created after
 execute method of PopulateAction. Or , execute
 method of PopulateAction was not executed.
  Any idea anyone?
   
  Thanks in advance.
  
  
  
  
  -
  Do you Yahoo!?
   Jazz up your holiday email with celebrity
 designs. Learn more.
 
 

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





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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



Re: NullPointerException

2004-12-23 Thread Sunny
Hey Uma,
Kindly attach your logs when you face any exceptions. That'll really 
help in debugging.

regards,
Sunny.
uma.k wrote:
Hi,
The solution is perfect. I forgot initialization. Now I dont get any error
but nothing is displayed when the error is actually to be thrown. I get
blank page and it doesn't go the actual page and show the error. Here is my
struts-config.xml
   action
path=/upload-submit
type=upload.UploadAction
name=uploadForm
scope=request
validate=true
input=/upload/upload.jsp
 forward name=failure path=/upload/upload.jsp /
 forward name=display path=/upload/display.jsp /
   /action
Any ideas?
Uma
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: NullPointerException

2004-12-23 Thread uma.k
Hi Sunny,
Now I dont get any error also when I my form wont redirect to my original
page when I dont enter any value. Here is my validate()

public ActionErrors validate(
ActionMapping mapping,
HttpServletRequest request) {

ActionErrors errors = new ActionErrors();
if(getTheText().equals())
{
errors.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage(error.text.required));

}

return errors;

}

And this is my struts-config.xml file
action
path=/upload-submit
type=upload.UploadAction
name=uploadForm
scope=request
validate=true
input=/upload/upload.jsp
  forward name=failure path=/upload/upload.jsp /
  forward name=display path=/upload/display.jsp /
/action


Why do I get a blank page?

Uma

-Original Message-
From: Sunny [mailto:[EMAIL PROTECTED]
Sent: Friday, December 24, 2004 9:17 AM
To: Struts Users Mailing List
Subject: Re: NullPointerException



Hey Uma,
 Kindly attach your logs when you face any exceptions. That'll really
help in debugging.

regards,
Sunny.

uma.k wrote:

Hi,
The solution is perfect. I forgot initialization. Now I dont get any error
but nothing is displayed when the error is actually to be thrown. I get
blank page and it doesn't go the actual page and show the error. Here is my
struts-config.xml

action
   path=/upload-submit
   type=upload.UploadAction
   name=uploadForm
   scope=request
   validate=true
   input=/upload/upload.jsp
  forward name=failure path=/upload/upload.jsp /
  forward name=display path=/upload/display.jsp /
/action

Any ideas?

Uma


-
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 and DreamWeaver

2004-12-23 Thread Antony Paul
I added Struts html tags to DreamWeaver using the add tag from tld
option. But it is not rendering the tags as html elements. I use
DreamWeaver  for visual display.

rgds
Antony Paul 


On Thu, 23 Dec 2004 07:50:02 -0800 (PST), Ashish Kulkarni
[EMAIL PROTECTED] wrote:
 Hi
 I use macro media dreamweaver and can add tag library
 and so can support struts or jstl, i explained my
 graphical designer to use these tags instead of html
 tags and it worked out well, try teaching graphical
 designer to use tags..
 Ashish
 --- Erik Weber [EMAIL PROTECTED] wrote:
 
  I completed a non-Struts JSP project with a designer
  who used
  DreamWeaver. I hooked him up with the Tortoise CVS
  client, and we didn't
  have any problems. Occasionally I would find tabs
  blown out, that was
  about it. The HTML was fine. The site is in
  production and works in IE
  and Mozilla. He told me Dreamweaver ignored stuff it
  didn't know how to
  handle, and he never complained about inability to
  edit layouts.
 
  Erik
 
 
  Wendy Smoak wrote:
 
  This is my first time having someone else do the
  page design.  I'm thrilled
  to have someone else do it, but they use
  DreamWeaver and I'm not sure what's
  going to happen if it sees html-el:form.  Then
  there's the fun of JSTL
  tags embedded within HTML tags, which works fine
  but can't exactly be
  considered valid syntax.
  
  I checked the archives, but only found suggestions
  to use something other
  than DreamWeaver.  I don't think that's going to go
  over well.
  
  My current plan is to have them use plain-old html
  form elements, and I'll
  automate as much as possible the task of switching
  them over to
  html-el:... tags.   Not much fun, but far better
  than having to do the
  page design.
  
  Does anyone have suggestions for coordinating page
  design with Struts webapp
  development?
  
  
  
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail - 250MB free storage. Do more. Manage less.
 http://info.mail.yahoo.com/mail_250
 
 -
 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]



DB Connection Best practice

2004-12-23 Thread uma.k
Hi,
I wanted to insert a record into the database or
update a record in the database or
get a record from the database.

Where do I make my database connection? Is it in the Action class? Can I
make a single java class handle all of that for me?

If the above are wrong. Please let me know which is the best practice to do
this.

Thanks
Uma


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



Re: DB Connection Best practice

2004-12-23 Thread Sunny
Better practice would be delegating to a handler (application layer)  
class and let it return data in form of some bean and use that in action.
In this way you'll be isolating Controller from Business model.

uma.k wrote:
Hi,
I wanted to insert a record into the database or
update a record in the database or
get a record from the database.
Where do I make my database connection? Is it in the Action class? Can I
make a single java class handle all of that for me?
If the above are wrong. Please let me know which is the best practice to do
this.
Thanks
Uma
-
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]


Steven Lock/ffm01/aps ist außer Haus.

2004-12-23 Thread Steven . Lock
Ich werde ab  24.12.2004 nicht im Büro sein. Ich kehre zurück am
05.01.2005.

Ich werde Ihre Nachricht nach meiner Rückkehr beantworten.
Während meiner Abwesendheit werde ich von Peter Eimann (Dw. 1308)
vertreten.



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



RE: DB Connection Best practice

2004-12-23 Thread uma.k
Thanks Sunny,
I will do that.

Uma

-Original Message-
From: Sunny [mailto:[EMAIL PROTECTED]
Sent: Friday, December 24, 2004 10:27 AM
To: Struts Users Mailing List
Subject: Re: DB Connection Best practice


Better practice would be delegating to a handler (application layer)
class and let it return data in form of some bean and use that in action.
In this way you'll be isolating Controller from Business model.


uma.k wrote:

Hi,
I wanted to insert a record into the database or
update a record in the database or
get a record from the database.

Where do I make my database connection? Is it in the Action class? Can I
make a single java class handle all of that for me?

If the above are wrong. Please let me know which is the best practice to do
this.

Thanks
Uma


-
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: DB Connection Best practice

2004-12-23 Thread Amit Gupta
Hi Uma,

I use DBCP for this. Refer my message that I posted an hour ago on tomcat users 
list. I am forwarding same to you on your personal ID.

  

-Original Message-
From: uma.k [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 24, 2004 10:20 AM
To: 'Struts Users Mailing List'
Subject: DB Connection Best practice

Hi,
I wanted to insert a record into the database or
update a record in the database or
get a record from the database.

Where do I make my database connection? Is it in the Action class? Can I
make a single java class handle all of that for me?

If the above are wrong. Please let me know which is the best practice to do
this.

Thanks
Uma


-
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]



Error when init struts-menu in WebSphere Application Server 4.0.7

2004-12-23 Thread dangmp
Hi all,

I am developing a web application using struts 1.2.4 and struts-menu.

When I am running in JDeveloper 10g, every thing is ok. But when I deploy 
into Test server running WebSphere Application Sever 4.0.7, I have this 
error

==
[12/24/04 15:06:38:066 GMT+08:00] 635d9f0b SystemOut U [24-12-2004 
15:06:38] DEBUG net.sf.navigator.menu.MenuPlugIn - Starting struts-menu 
initialization

[12/24/04 15:06:38:191 GMT+08:00] 635d9f0b SystemOut U [24-12-2004 
15:06:38] ERROR org.apache.commons.digester.Digester - End event threw 
exception
java.lang.reflect.InvocationTargetException: 
java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
  at net.sf.navigator.menu.MenuComponent.equals(MenuComponent.java:94)
  at java.util.ArrayList.indexOf(ArrayList.java:209)
  at java.util.ArrayList.contains(ArrayList.java:190)
  at net.sf.navigator.menu.MenuComponent.setParent(MenuComponent.java:65)
  at 
net.sf.navigator.menu.MenuComponent.addMenuComponent(MenuComponent.java:51)
  at java.lang.reflect.Method.invoke(Native Method)
  at 
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
  at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
  at org.apache.commons.digester.Rule.end(Rule.java:276)
  at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
  at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
  at 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1480)
  at 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1809)
  at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
  at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
  at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
  at org.apache.commons.digester.Digester.parse(Digester.java:1567)
  at net.sf.navigator.menu.MenuRepository.load(MenuRepository.java:214)
  at net.sf.navigator.menu.MenuPlugIn.init(MenuPlugIn.java:59)
  at 
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
  at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
  at javax.servlet.GenericServlet.init(GenericServlet.java:258)
  at 
com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManager.java:802)
  at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleServlet.java:141)
  at 
com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycleServlet.java:254)
  at 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleServlet.java:107)
  at 
com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:388)
  at javax.servlet.GenericServlet.init(GenericServlet.java:258)
  at 
com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.java:84)
  at 
com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:226)
  at 
com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:357)
  at 
com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1010)
  at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:133)
  at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:234)
  at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:139)
  at 
com.ibm.servlet.engine.ServletEngine.addWebApplication(ServletEngine.java:652)
  at com.ibm.ws.runtime.WebContainer.install(WebContainer.java:36)
  at com.ibm.ws.runtime.Server.startModule(Server.java:617)
  at 
com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:333)
  at 
com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java:349)
  at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:884)
  at com.ibm.ws.runtime.StandardServer.main(StandardServer.java:519)
  at java.lang.reflect.Method.invoke(Native Method)
  at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
  at 
com.ibm.etools.websphere.tools.runner.api.ServerRunner$1.run(ServerRunner.java)

java.lang.reflect.InvocationTargetException
  at 
org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
  at 
org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
  at org.apache.commons.digester.Digester.endElement(Digester.java:1061)
  at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
  at 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1480)
  at 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1809)
  at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
  at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
  at