RE: html:select / html:options

2003-05-27 Thread Abhinav (Cognizant)
That means we are keeping unsafeValues and unsafeLabels separately in our form-bean. 
(Though they are related -- i think so)
What if these two are kept encapsulated in an object.

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:06 PM
To: Struts Users Mailing List
Subject: RE: html:select / html:options


I used the following with vectors of unsafeValues and unsafeLabels in my incidentForm 
bean.




 







-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:20 AM
To: Struts Users Mailing List
Subject: html:select / html:options


I have a vector of Objects of a class whose attributes are ID and Name.
This vector is set in the form bean.

I want to display that vector as a select/options field.
ID part will form the value and Name the displayable option.

How can this be done.

Thanx a lot.


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



** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not 
the 
intended recipient, please contact the sender by reply e-mail and destroy all copies 
of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited 
and 
may be unlawful.

  Visit us at http://www.cognizant.com

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

SOLVED Re: [OT] unit testing something that uses JNDI

2003-05-27 Thread Erik Price


Erik Price wrote:
Hi,

I would like to write some unit tests for some classes.  Unfortunately 
the classes use some JNDI data so they need to be run from within my app 
server (Tomcat in this case) in order to get the JNDI data from the 
web.xml.  Any suggestions on a good way to go about this?
The solution is to use mock objects, though it will require a small 
refactoring made to the original code:

If I move the code that calls JNDI to its own method (called 
"getJndiData" or something), then I can write an anonymous subclass of 
my class in the unit test and override this method to return a 
predetermined (non-JNDI) mock value to use in the unit test.  This 
obviously doesn't do anything to assure that the JNDI call works, but it 
means I can write my unit test now instead of waiting until my webapp is 
at a point where it is assembled "enough" to deploy and test in the 
container.

Someone else recommended Cactus, it is on my to-do list to learn how to 
use it but for right now I can use JUnit + the mock object.

Just thought I'd share this cool method.

Erik

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


Re: html:select / html:options

2003-05-27 Thread Denis Avdic
use optionsCollection tag

property:  name of the collection in the  form Bean
label :  The property of the bean within the collection which represents 
the label to be rendered for each option. (ie. Name)
value: The property of the bean within the collection which represents 
the value to be rendered for each option. (ie ID)

thus:







Abhinav (Cognizant) wrote:

That means we are keeping unsafeValues and unsafeLabels separately in our form-bean. 
(Though they are related -- i think so)
What if these two are kept encapsulated in an object.
-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:06 PM
To: Struts Users Mailing List
Subject: RE: html:select / html:options
I used the following with vectors of unsafeValues and unsafeLabels in my incidentForm bean.




    
   





-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:20 AM
To: Struts Users Mailing List
Subject: html:select / html:options
I have a vector of Objects of a class whose attributes are ID and Name.
This vector is set in the form bean.
I want to display that vector as a select/options field.
ID part will form the value and Name the displayable option.
How can this be done.

Thanx a lot.

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


 



** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***
 



This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not the 
intended recipient, please contact the sender by reply e-mail and destroy all copies of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited and 
may be unlawful.

 Visit us at http://www.cognizant.com

 



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


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


RE: Issues with Struts and IE 6 SP 1 upgrades?

2003-05-27 Thread Viggio, Alex
Yes, our app is returning pure HTML (no client-side Javascript). We're
setting up a time to troubleshoot the logs.

- Alex

-Original Message-
From: Xu Cheng [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 24, 2003 8:43 AM
To: Struts Users Mailing List
Subject: Re: Issues with Struts and IE 6 SP 1 upgrades?


Did you see anything unusual in your server side log file? What is your 
application returning to clients? Pure HTML pages?

On Saturday 24 May 2003 04:58, Viggio, Alex wrote:
> We've had a client installing a new Windows 2000 image on various
desktops,
> and those PCs can no longer access our Struts-based extranet web app. They
> are offsite and a different company, so I haven't been able to fully
> diagnose their setup via the established communication channels. The
> following are new components in this image:
>
> - Microsoft Windows 2000 Service Pack 3
> - Microsoft Office Pro 2000 SR1a Service Pack 3
> - Microsoft Internet Explorer v6.0 Service Pack 1
> - Symantec Norton AntiVirus v7.61 build 42a
> - Microsoft NetMeeting v3.01
> - Microsoft .NET Framework 1.0.3705 (New)
>
> I thought it was a problem with their IE setup, but they downloaded and
> installed Netscape and claim to be seeing the same problem. They can login
> (which exercises JSPs and Struts Action), but then they experience browser
> hangs at random places inside of the web app.
>
> Any suggestions on debugging this since I can't get onsite (i.e. new proxy
> settings, etc.)? I've never had to troubleshoot this type of problem
beyond
> checking if the web user had their browser cookies enabled (they claim
this
> is correct) and our IT/network folks haven't come up with anything yet.
I'm
> betting its a proxy issue.
>
> A google of their new IE version number (v6.0.2800.1106c0) did pull up a
> Cisco bug (#CSCea02310) at
>
http://www.cisco.com/en/US/products/sw/cscowork/ps150/prod_release_note0918
>6 a008014b21a.html with dynamic web app functionality (a calendar).
>
> - Alex
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
XU Cheng

-
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: The Action, the bean and the JSP

2003-05-27 Thread Gareth Andrew
Torsten Schlabach wrote:

Dear List,

I am working with Struts for some weeks now, but there are just some
concepts that don't become clear to me neither from the docs nor from all that
tutorials. They all stop where my questions start. So first of all, I would like
to ask the list for confirmation on what I found out / understood so far.
Is it right that in a web browser environment:
a) everyhting starts with a request coming in
b) and the result of that is some web page beeing rendered in the browser
c) all that Struts (and other methodologies for application login in such an
environment) are about taking the input from the request to somehow generate
the output being sent to the browser
d) The request - response thing is stateless meaning that while processing a
request neither myself nor the framework should care about the preceeding or
potential following requests (with the little exception of *optionally*
keeing a session state in some session content)
Working from that assumption, I exlained to myself that this is what happens
inside Struts when a request comes in:
- The ActionServlet determines the appropriate action from the
struts-config.xml.
- In case that action has a form bean associated with it, it instantiates
that form bean and fills it with the request parameters.
- After that it calls the execute method on the Action passing the (now
filled) form bean instance in as a parameter.
- The code in the execute method can read information from the FormBean, do
calculations, lookups, whatever and write results back into the form bean.
- The execute method returns control to the ActionServlet letting it know
which JSP page to render (choosing either from local or global forwards).
- The JSP page is rendered using the FormBean (still the same one?!?) as a
data source and sent back to the broser?
Am I right or wrong until here?
 

Sounds fairly correct.

In case I am right (and in case I am wrong, too), please help me understand:

- Why do I need to use a *forward* to display the output page? (My
understand of forward would be: I am being sent somewhere else than I originally
intended to go.) It would be much more logical to me if my  in
stuts-config.xml had a "output" attribute (similar to the "input" attribute) that names
the page that I want to use to render the results of the action.
 

Your definition of forward is closer to the definition of "redirect".  
Forwarding is just transferring control (usually to a JSP page to render 
the view).
The reason its possible to to forward to more than one location, rather 
than just a single "output" attribute is that the action may have 
different outputs depending on some logic (for example I have a search 
action which returns one of three forwards depending on whether 0,1 or 
multiple items are found).

- If the results page contains a form that has an action associated to it
that the user *might* fire by clicking "submit" on the rendered page (he or she
could as well use a link to go somewhere else) Struts will instantiate the
form bean for that potential request already before even rendering the page
containing the form that will enable the user to make that request later (or
leave it). What's the sense in here?
 

There are generally two actions involved in handling user input with forms.

Step 1.  The user follows a link to a page with a form - for example, 
Edit user details.

Request --> Action1 --> EditUserForm.jsp

Step 2.  The user hits the submit button after filling in the form.

Request --> Action2 --> confirmation.jsp

Both actions will be associated with same form  in the struts-config.xml 
- lets call it newUserForm.
Before calling Action1.execute() Struts will instantiate a new 
newUserForm and call execute. The action may then wish to preopulate 
this form with some data from the model ie. from the database.  In this 
case it will be the users current details.  The action then forwards to 
the EditUserForm.jsp via a local forward (if errors occurred when 
loading the user data or some flag was set or something then perhaps the 
action might forward to a different location :-).  The jsp can then 
render the filled in values as HTML form controls.
The Action form instantiated for Action2 will be populated with the 
values that were filled in by the user.  Action2 can then submit these 
to the database.

I am sure I got at least one concept wrong. Please enlighten me.

Torsten

 

Hope this helps (sorry if i spelled things out a bit slowly)

Gareth

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


[ANN] Barracuda 1.2.0 Released!

2003-05-27 Thread Christian Cryder
Hi folks,

I normally wouldn't post this type of info to the Struts list, but since a
number of you have asked to be kept abreast of Barracuda develpments, I
figured I would let you know that the long awaited stable release of
Barracuda 1.2.0 is finally here!

You can download it at:
http://barracudamvc.org/downloads/

A lot has changed since the 1.1.1 release.  Barracuda moved to
http://www.barracudamvc.org , the source has been refactored, there now
exist two contrib packages with reusable code and example webapps to show
off their functionality, numerous bugs have been fixed, quite a few new
features have been added and many features improved, and deployment of
Barracuda and BarracudaDiscRack is now incredibly simplified.

See the most important changes here...
http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Release_Notes
and here...
http://barracudamvc.org/BarracudaDiscRack/docs/changes.html

For a more detailed explanation of the changes, see
http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracuda/A_Changes_H
istory.html

For information on building and deploying Barracuda, see...
http://barracudamvc.org/Barracuda/docs/build_deploy.html

And, of course, don't forget to try out the new contrib apps.  See...
http://barracudamvc.org/Barracuda/docs/contrib_package.html

All this information, and more, is available at:
http://barracudamvc.org/Barracuda/index.html
and here...
http://barracudamvc.org/BarracudaDiscRack/docs/index.html


Thanks to everyone on the BarraucdaMVC team for all your hard work and
thanks to all the users who continue to utilize this great project!  Oh, and
special thanks to those who donated hosting, time, money, and effort to make
barracudamvc.org possible.
http://www.visi.com/~hoju/barracuda/donations.html

Enjoy!

Christian
--
Christian Cryder [EMAIL PROTECTED]
Internet Architect, ATMReports.com
Barracuda - http://barracudamvc.org
--
"Coffee? I could quit anytime, just not today"


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



[OT] I'm tired of restarting tomcat!

2003-05-27 Thread Fabio Mancinelli
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hello all,

this is somewhat off-topic but I don't know why I have this behaviour.
I deployed my struts application on tomcat 4.1.18 and randomly, it stops
serving requests (it waits forever on index.jsp).

In the log files I always notice an exception:
003-05-27 16:30:09 StandardWrapperValve[default]: Servlet.service() for servlet 
default threw exception
java.net.SocketException: Connection reset
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuff
...

The only way to restore the normal behaviour is to restart tomcat.

Does anyone know why I get this behaviour?

A presto,
Fabio

- -- 
- ---
 Fabio Mancinelli, PhD student   EMail : [EMAIL PROTECTED]
 Dipartimento di Informatica   WWW : http://www.di.univaq.it/~mancinel
 Universita' dell'Aquila
- ---

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.75-6

iD8DBQE+04t76dsQbk2R3cMRAgHrAKCjXY+NqIChZrIhZsCNw7/923Fb+ACghEFq
+/DiCrnBlm2xQCZarq9gr+A=
=Yu0y
-END PGP SIGNATURE-


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



RE: The Action, the bean and the JSP

2003-05-27 Thread Krishnakumar N
Hi,

  If I understand you right, you are wondering (a) why the formbean gets
instantiated while building the view and (b) how you can get your data into
the form bean for display.

  The normal processing is as follows: [user enters data in the html form]
-> [HTTP request] -> [form bean] which gets passed to the action class for
processing. Where you are incorrect is in assuming that in order to get
dynamic data into the next view, you need to populate the data into the form
bean of that view's form's action mapping. Not necessary. You can put the
data as beans in request/session scope under some name and you can use
struts' bean: or jstl's c: tags to output data from these beans (referring
to them by name) to html.

  The only case where you will need to meddle with the form bean of the next
view is where the form should come pre-populated to the user. Struts example
contains a simple scenario where this is done; editRegistration page. There
are also long discussions in the user archive regarding the *right* way to
do form pre-population when the action does not have a reference to the form
bean of the next view and you do not want to chain actions. For example,

http://marc.theaimsgroup.com/?l=struts-user&m=105058812426966&w=2
http://marc.theaimsgroup.com/?l=struts-user&m=103712789408751&w=2

HTH,
Krishna

-Original Message-
From: Torsten Schlabach [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 7:57 PM
To: Struts Users Mailing List
Subject: RE: The Action, the bean and the JSP


But in whatever page I want to render I need to have the information that I
put into the bean corresponding to the action. For example, I would have
done
a lookup of the user's full name and want to render a page saying: "Welcome
Joe Sixpack!" and containing a form allowing the user to enter something
(let's say: open a ticket) and submit it to the "new ticket" action.

Of course the bean for the "new ticket" action will be a bean with ticket
attributes; not with the user's login attributes any more. But what Struts
does
is this: It looks up in my JSP form (supposed to render "Welcome Joe
Sixpack") that the user might submit this form to "new ticket", therefore
instantiate a "ticket bean" and put this in the context of the JSP page; so
Joe Sixpack
will be gone.

I don't even have a chance to put Joe's name into the "ticket bean" as an
additional field because that "ticket bean" is instantiated and put in for
the
login bean after the execute() method of the login action has finished; so I
have no access to that new bean and the page has no access to the old bean.

Got it? Does that make sense?

Torsten

> You may need to render different views on basis of different conditions ..
> Say if the login is invalid , then invalidlogin.jsp
> If its a first time user then probably , enteruserpin.jsp ..
> If you have a single attribute called "output" then this may not be
> possible
> ..
> and hence the "forward"
> 
> 
> 
> -Original Message-
> From: Torsten Schlabach [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 7:17 PM
> To: [EMAIL PROTECTED]
> Subject: The Action, the bean and the JSP
> 
> 
> Dear List,
> 
> I am working with Struts for some weeks now, but there are just some
> concepts that don't become clear to me neither from the docs nor from all
> that
> tutorials. They all stop where my questions start. So first of all, I
> would
> like
> to ask the list for confirmation on what I found out / understood so far.
> 
> Is it right that in a web browser environment:
> a) everyhting starts with a request coming in
> b) and the result of that is some web page beeing rendered in the browser
> c) all that Struts (and other methodologies for application login in such
> an
> environment) are about taking the input from the request to somehow
> generate
> the output being sent to the browser
> d) The request - response thing is stateless meaning that while processing
> a
> request neither myself nor the framework should care about the preceeding
> or
> potential following requests (with the little exception of *optionally*
> keeing a session state in some session content)
> 
> Working from that assumption, I exlained to myself that this is what
> happens
> inside Struts when a request comes in:
> 
> - The ActionServlet determines the appropriate action from the
> struts-config.xml.
> - In case that action has a form bean associated with it, it instantiates
> that form bean and fills it with the request parameters.
> - After that it calls the execute method on the Action passing the (now
> filled) form bean instance in as a parameter.
> - The code in the execute method can read information from the FormBean,
> do
> calculations, lookups, whatever and write results back into the form bean.
> - The execute method returns control to the ActionServlet letting it know
> which JSP page to render (choosing either from local or global forwards).
> - The JSP page is rendered using the FormBean (still the same one?!?) a

RE: html:options

2003-05-27 Thread shirishchandra.sakhare
There are other optiosn to use it...
I ahve never used it with Arays but i have used it with Collections...

First i use jsp:useBean tag to get the collection from the form and make it available 
in the page scope and then use html:options with collection="beanName"

where beanName is the eban created through useBean tag..There must eb some way to use 
it with arrays...

Let me know if u dont find anything..May be tomorrow i will find some time to look at 
the doc..
regards,
Shirish

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:44 PM
To: Struts Users Mailing List
Subject: RE: html:options


correct me if I am wrong. 
This would work if getOptionList() returns an array of String.
In my case array is of Objects and one attribute of that object has to be displayed.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:07 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


check the documentation for the tag...

use name="formBeanName" property="optionList"

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:38 PM
To: Struts Users Mailing List
Subject: RE: html:options


Yea...with collection it works. But what if my collection of objects is obtained from 
the form-bean.
(I dont want to use scripting to first take the collection out of the form-bean.)

-Original Message-
From: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:00 PM
To: Struts Users Mailing List
Subject: Re: html:options


In one of my JSPs I have:



 

where locales is an array of beans with getISOCode() and 
getDisplayName() methods.

Hope this helps,

Gareth


Abhinav (Cognizant) wrote:

>I have one form bean with getter/setters for property List.
>getter returns a vector of objects of type { getID(), getDesc(),  setID(), setDesc() }
> 
>I have to use this vector to populate a select box in html using html:select/options
>somehow i am unable to make out labelProperty, labelName
> 
>Can someone gimme an example how this can be done.
> 
> 
> 
>
>  
>
>
>
>-
>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]




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



RE: html:options

2003-05-27 Thread Abhinav (Cognizant)
I was able to do it like that. 




  

Thanks a lot all you ppl.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:39 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


There are other optiosn to use it...
I ahve never used it with Arays but i have used it with Collections...

First i use jsp:useBean tag to get the collection from the form and make it available 
in the page scope and then use html:options with collection="beanName"

where beanName is the eban created through useBean tag..There must eb some way to use 
it with arrays...

Let me know if u dont find anything..May be tomorrow i will find some time to look at 
the doc..
regards,
Shirish

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:44 PM
To: Struts Users Mailing List
Subject: RE: html:options


correct me if I am wrong. 
This would work if getOptionList() returns an array of String.
In my case array is of Objects and one attribute of that object has to be displayed.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:07 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


check the documentation for the tag...

use name="formBeanName" property="optionList"

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:38 PM
To: Struts Users Mailing List
Subject: RE: html:options


Yea...with collection it works. But what if my collection of objects is obtained from 
the form-bean.
(I dont want to use scripting to first take the collection out of the form-bean.)

-Original Message-
From: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:00 PM
To: Struts Users Mailing List
Subject: Re: html:options


In one of my JSPs I have:



 

where locales is an array of beans with getISOCode() and 
getDisplayName() methods.

Hope this helps,

Gareth


Abhinav (Cognizant) wrote:

>I have one form bean with getter/setters for property List.
>getter returns a vector of objects of type { getID(), getDesc(),  setID(), setDesc() }
> 
>I have to use this vector to populate a select box in html using html:select/options
>somehow i am unable to make out labelProperty, labelName
> 
>Can someone gimme an example how this can be done.
> 
> 
> 
>
>  
>
>
>
>-
>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]




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



** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not 
the 
intended recipient, please contact the sender by reply e-mail and destroy all copies 
of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited 
and 
may be unlawful.

  Visit us at http://www.cognizant.com

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

RE: html:select / html:options

2003-05-27 Thread Kandi Potter
I'm just learning here as well.but that is what worked for me.   I actually store 
the vectors in a CollectionForm with the two vectors as members.  I don't know if this 
was the most graceful way to handle the problem, but it worked for me.  I have 
something like this:

I used a CollectionForm for the same purpose as you would like to.  I have several 
drop-down selections so I just create a CollectionForm object for each, and populate 
the labels and values from my business object, which I'm sure you have done already.

also, for state management, the collectionForms are stored in a transaction to be 
re-used during the same session.  This way I can grab them for any action where I need 
the same drop-down list.   

public class CollectionForm   implements Serializable {
private Vector labels;
private Vector values;

...

public class IncidentForm extends ActionForm implements Serializable {
public Vector getUnsafeLabels(){
return CollectionForm.getLabels();

}

public Vector getUnsafeValues(){
return CollectionForm.getValues();
   
}
...



-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:49 AM
To: Struts Users Mailing List
Subject: RE: html:select / html:options


That means we are keeping unsafeValues and unsafeLabels separately in our form-bean. 
(Though they are related -- i think so)
What if these two are kept encapsulated in an object.

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:06 PM
To: Struts Users Mailing List
Subject: RE: html:select / html:options


I used the following with vectors of unsafeValues and unsafeLabels in my incidentForm 
bean.




 







-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:20 AM
To: Struts Users Mailing List
Subject: html:select / html:options


I have a vector of Objects of a class whose attributes are ID and Name.
This vector is set in the form bean.

I want to display that vector as a select/options field.
ID part will form the value and Name the displayable option.

How can this be done.

Thanx a lot.


-
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: html:options

2003-05-27 Thread Kandi Potter
hey thanksmaybe I'll try to minimize my code.

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 12:15 PM
To: Struts Users Mailing List
Subject: RE: html:options


I was able to do it like that. 




  

Thanks a lot all you ppl.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:39 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


There are other optiosn to use it...
I ahve never used it with Arays but i have used it with Collections...

First i use jsp:useBean tag to get the collection from the form and make it available 
in the page scope and then use html:options with collection="beanName"

where beanName is the eban created through useBean tag..There must eb some way to use 
it with arrays...

Let me know if u dont find anything..May be tomorrow i will find some time to look at 
the doc..
regards,
Shirish

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:44 PM
To: Struts Users Mailing List
Subject: RE: html:options


correct me if I am wrong. 
This would work if getOptionList() returns an array of String.
In my case array is of Objects and one attribute of that object has to be displayed.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:07 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


check the documentation for the tag...

use name="formBeanName" property="optionList"

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:38 PM
To: Struts Users Mailing List
Subject: RE: html:options


Yea...with collection it works. But what if my collection of objects is obtained from 
the form-bean.
(I dont want to use scripting to first take the collection out of the form-bean.)

-Original Message-
From: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:00 PM
To: Struts Users Mailing List
Subject: Re: html:options


In one of my JSPs I have:



 

where locales is an array of beans with getISOCode() and 
getDisplayName() methods.

Hope this helps,

Gareth


Abhinav (Cognizant) wrote:

>I have one form bean with getter/setters for property List.
>getter returns a vector of objects of type { getID(), getDesc(),  setID(), setDesc() }
> 
>I have to use this vector to populate a select box in html using html:select/options
>somehow i am unable to make out labelProperty, labelName
> 
>Can someone gimme an example how this can be done.
> 
> 
> 
>
>  
>
>
>
>-
>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]




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



Direct me to the archive about individual error reporting next to fields

2003-05-27 Thread Bailey, Shane C.
 

I was looking at this:

http://husted.com/struts/tips/017.html
 

 

but what ends up happening is I get the

header to show up next to the error as well.

 

 

Is it possible to have 

 

errors.header=The following validation errors occured: 

errors.footer=

errors.prefix=

errors.suffix=

errors.required={0} is required.

 

   //Just show errors.header

 

then have something like this:

 

  //Not sure what to put





//Again not sure





 

Where either the label shows up or a red label shows

up if there is an error for that element.

 

  

 

I keep getting the header showing up next to the name and I

want it to show up only at the top.

 

I saw something similar in the struts-user emails.  Anyone

know the answer?

 



RequestUtils.populate(RequestUtils.java:943)

2003-05-27 Thread Divakar Satyanarayan
Hi,

 My server log is full of following message

5/5/03 10:12 AM CalmsWebApp: Servlet error
java.lang.NullPointerException
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:943)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:777)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1227)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j
ava:
508)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis
patc
her.java:177)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:
576)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
5/5/03 10:13 AM CalmsWebApp: Servlet error

  Does any one have any idea on why this is happening? What's the patch for
this ?

 We used to get the following error earlier

 4/7/03 4:13 PM CalmsWebApp: Servlet error
java.lang.NullPointerException
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:747)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j
ava:
508)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis
patc
her.java:177)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:
576)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
4/7/03 4:14 PM CalmsWebApp: org.apache.struts.action.ActionServlet:
Processing a GET for /WrkqSearch
4/7/03 4:14 PM Calm

 for which the information was found on following URL
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9471.

 We did download the mentioned jar.But the only difference we observed was
it was failing at different point than the earlier one.
 
 Does it have any dependency on JVM version?

 If anybody has right version of struts.jar with patch for above problem
please do mail me.
  
Regards,
Divakar




DISCLAIMER: Information contained and transmitted by this E-MAIL is
proprietary to Mascot Systems Limited and is intended for use only by the
individual or entity to which it is addressed, and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law. If this is a forwarded message, the content of this E-MAIL may not have
been sent with the authority of the Company. If you are not the intended
recipient, an agent of the intended recipient or a person responsible for
delivering the information to the named recipient, you are notified that any
use, distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at [EMAIL PROTECTED] Before opening attachments,
please scan for viruses. 



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


DISCLAIMER: Information contained and transmitted by this E-MAIL is
proprietary to Mascot Systems Limited and is intended for use only by the
individual or entity to which it is addressed, and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law. If this is a forwarded message, the content of this E-MAIL may not have
been sent with the authority of the Company. If you ar

RE: URL missing .do

2003-05-27 Thread Steve Raeburn
> -Original Message-
> From: Marcel Overdijk [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 12:12 AM
>
> I have developed a webapp on Tomcat 4.0.3 and works fine.
> After deploying it at my provider (Tomcat also 4.0.3) my
>  aren't working

If your web host is using Apache, it needs to be configured to send certain
requests to Tomcat.
During your local testing you probably access Tomcat directly
(http://localhost:8080 ?), so you don't need this mapping.

It is likely that your services provider has only set-up mappings for
/servlet/* and *.jsp

Ask your provider to add the following to your configuration.
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /*.do ajp13

This tells Apache to send all requests for /*.do to Tomcat (using the AJP13
connector). You still need your *.do mapping in WEB.XML that tells Tomcat to
send *.do requests to the ActionServlet.

The first two lines are probably already configured. Note that the exact
configuration required will depend on the connector they have installed but
if you ask them to add a the directives and tell them why, they should be
able to figure out what's needed for their particular set-up.

Good luck

Steve




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



Parameters v form beans (again!)

2003-05-27 Thread Mike Whittaker

I know I've been here before, but it is my main sticking point.

Does anyone JUST use the Form Beans as a html form backend,
whether that is for pre population or validation or both.

BUT

Then decide that is easier to use the request parameters as a java.util.Map
in the business layer.

I know I can do this, I'm just looking for some moral support :-)

Is in fact the ONLY reasoning behind ActionForms that you can easily
prepopulate.

--
Mike W


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



Custom Validator not being called

2003-05-27 Thread Brown, Melonie S. - Contractor
I have the standard validation working just fine.  I have attempted to
branch out to use a custom validator for making sure that passwords follow a
certain set of rules.  The custom validation method does not get called.   I
set the logging to debug, but the output only confirmed that my method isn't
being called.  Suggestions for how to debug further would be greatly
appreciated.

[log when standard validations fail]
DEBUG Date = 2003-05-27 12:22:54,543 [Thread-5]
org.apache.struts.action.RequestProcessor Line = 942 -  Validation failed,
returning to '/gotochangepassword.do'

[log when standard validations pass - should call my validator]
DEBUG Date = 2003-05-27 12:19:14,939 [Thread-4]
org.apache.struts.action.RequestProcessor Line = 915 -   No errors detected,
accepting input
 

Following are the relevant snippets of code:

Validator-rules.xml
--


 


Validation.xml
-

   
  
  
  
 minlength
 8

   



  
 minlength
 8
  

 


  
 minlength
 8
  





Validation method


public static boolean validateComplexPassword(
Object bean,
ValidatorAction va,
Field field,
ActionErrors errors,
HttpServletRequest request)
{
String value = null;
if (isString(bean))
{
value = (String)bean;
}
else
{
value = ValidatorUtil.getValueAsString(bean,
field.getProperty());
}
boolean upperCase = false;
boolean lowerCase = false;
boolean digit = false;
for (int i = 0; i < value.length(); i++)
{
if (Character.isLowerCase(value.charAt(i)))
{
lowerCase = true;
}
if (Character.isDigit(value.charAt(i)))
{
digit = true;
}
if (Character.isUpperCase(value.charAt(i)))
{
upperCase = true;
}
}
// verify that the new password has the requisite combination of
elements (1, A, a)
if (!(upperCase && lowerCase && digit))
{
errors.add(
field.getKey(),
Resources.getActionError(request, va, field));
return false;
}
return true;
}

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



RE: Custom Validator not being called

2003-05-27 Thread Bailey, Shane C.

Could it be that it is failing required or minlength
first and therefore isn't getting to your method?

-Original Message-
From: Brown, Melonie S. - Contractor [mailto:[EMAIL PROTECTED]

Sent: Tuesday, May 27, 2003 12:32 PM
To: '[EMAIL PROTECTED]'
Subject: Custom Validator not being called

I have the standard validation working just fine.  I have attempted to
branch out to use a custom validator for making sure that passwords follow a
certain set of rules.  The custom validation method does not get called.   I
set the logging to debug, but the output only confirmed that my method isn't
being called.  Suggestions for how to debug further would be greatly
appreciated.

[log when standard validations fail]
DEBUG Date = 2003-05-27 12:22:54,543 [Thread-5]
org.apache.struts.action.RequestProcessor Line = 942 -  Validation failed,
returning to '/gotochangepassword.do'

[log when standard validations pass - should call my validator]
DEBUG Date = 2003-05-27 12:19:14,939 [Thread-4]
org.apache.struts.action.RequestProcessor Line = 915 -   No errors detected,
accepting input
 

Following are the relevant snippets of code:

Validator-rules.xml
--


 


Validation.xml
-

   
  
  
  
 minlength
 8

   



  
 minlength
 8
  

 


  
 minlength
 8
  





Validation method


public static boolean validateComplexPassword(
Object bean,
ValidatorAction va,
Field field,
ActionErrors errors,
HttpServletRequest request)
{
String value = null;
if (isString(bean))
{
value = (String)bean;
}
else
{
value = ValidatorUtil.getValueAsString(bean,
field.getProperty());
}
boolean upperCase = false;
boolean lowerCase = false;
boolean digit = false;
for (int i = 0; i < value.length(); i++)
{
if (Character.isLowerCase(value.charAt(i)))
{
lowerCase = true;
}
if (Character.isDigit(value.charAt(i)))
{
digit = true;
}
if (Character.isUpperCase(value.charAt(i)))
{
upperCase = true;
}
}
// verify that the new password has the requisite combination of
elements (1, A, a)
if (!(upperCase && lowerCase && digit))
{
errors.add(
field.getKey(),
Resources.getActionError(request, va, field));
return false;
}
return true;
}

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



Having problems with DynaValidatorForm

2003-05-27 Thread sannabel
I'm a struts novice trying to use DynaValidatorForm.  I am getting this
error.

javax.servlet.ServletException: Exception creating bean of class
org.apache.struts.action.DynaValidatorForm: {1}
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:530)
at org.apache.jsp.Search_jsp._jspService(Search_jsp.java:78)

It appears that it can't find the searchForm from my xml declarations.
In my logs I don't see any other errors that might have put it into this
state. I have searched the list archive for this problem and have not
found any answers.  Any help is very much appreciated.

Thanks
Seth

Here is my setup.

Struts-config.xml

  
  
  
  
  
  
  





 


   




  
-
/jsp/Search.jsp
My form tag.


-
validator.xml






   

   
   
   
  mask
  ^[0-9a-zA-Z]*$
   


   
   
  mask
  ^[A-Z]*$
   
   
  min
  2
   
   
  max
  2
   


   
   
  mask
  ^[0-9]*$
   
   
  max
  5
   




--
web.xml action mapping


  
action
*.do
  



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



Bean input

2003-05-27 Thread Kamholz, Keith (corp-staff) USX
Hi everyone,

I'm creating a web app that uses struts and tiles.  I have a question about
my action mapping

When you specify the input attribute for an action mapping, should I use the
name of the JSP that forwards to my form page, or the tiles name of that
entire page?

Thanks in advance.

- Keith


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



Validator replace of field value instead of key?

2003-05-27 Thread Bailey, Shane C.
 

I can get "{0} is required." to be replaced with a key like
"label.firstName"

but how do I do a replace for a var like email address as in:

{0} is not a valid email?   A key doesn't go in there but the email
submitted

goes in there.

 

In the validation.xml instead of  what do I
do?

   or something??



Starting subsystems

2003-05-27 Thread Mohan Radhakrishnan
Hi

   Our presentation tier using struts ends right at the business delegate. I
am aware of the load-on-startup tag. Now if I want to start a subsystem like
my messaging (JMS) server which is very loosely coupled to my presentation
tier I think of the startup class provided by almost all application
servers.

   So when the container starts I start my messaging system that struts
interacts with. What are the options of starting subsystems like this which
are completely separate from the presentation tier. I am not using MDB's.

   If I start my messaging system when the ActionServlet loads ( overriding
ProcessPreProcess for example ? ) then this becomes struts coupled.

 What are the ideas regarding this ?

Mohan


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



RE: Having problems with DynaValidatorForm

2003-05-27 Thread Bailey, Shane C.


Try:


...



-Original Message-
From: sannabel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2003 12:46 PM
To: [EMAIL PROTECTED]
Subject: Having problems with DynaValidatorForm

I'm a struts novice trying to use DynaValidatorForm.  I am getting this
error.

javax.servlet.ServletException: Exception creating bean of class
org.apache.struts.action.DynaValidatorForm: {1}
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:530)
at org.apache.jsp.Search_jsp._jspService(Search_jsp.java:78)

It appears that it can't find the searchForm from my xml declarations.
In my logs I don't see any other errors that might have put it into this
state. I have searched the list archive for this problem and have not
found any answers.  Any help is very much appreciated.

Thanks
Seth

Here is my setup.

Struts-config.xml

  
  
  
  
  
  
  





 


   




  
-
/jsp/Search.jsp
My form tag.


-
validator.xml






   

   
   
   
  mask
  ^[0-9a-zA-Z]*$
   


   
   
  mask
  ^[A-Z]*$
   
   
  min
  2
   
   
  max
  2
   


   
   
  mask
  ^[0-9]*$
   
   
  max
  5
   




--
web.xml action mapping


  
action
*.do
  



-
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: Bean input

2003-05-27 Thread Bailey, Shane C.

Tiles def.


-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2003 12:44 PM
To: Struts (E-mail)
Subject: Bean input

Hi everyone,

I'm creating a web app that uses struts and tiles.  I have a question about
my action mapping

When you specify the input attribute for an action mapping, should I use the
name of the JSP that forwards to my form page, or the tiles name of that
entire page?

Thanks in advance.

- Keith


-
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: RequestUtils.populate(RequestUtils.java:943)

2003-05-27 Thread Bailey, Shane C.

Get the source for your version and check out what is
going on at line 943 of RequestUtils.

I tried looking at 1.1b3 source and the line numbers didn't
line up to yours.

Too bad JAD wouldn't help (because it doesn't give original 
source code it just decompiles so lines won't mach either).


-Original Message-
From: Divakar Satyanarayan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2003 12:14 PM
To: 'Struts Users Mailing List'
Subject: RequestUtils.populate(RequestUtils.java:943)

Hi,

 My server log is full of following message

5/5/03 10:12 AM CalmsWebApp: Servlet error
java.lang.NullPointerException
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:943)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:777)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1227)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j
ava:
508)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis
patc
her.java:177)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:
576)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
5/5/03 10:13 AM CalmsWebApp: Servlet error

  Does any one have any idea on why this is happening? What's the patch for
this ?

 We used to get the following error earlier

 4/7/03 4:13 PM CalmsWebApp: Servlet error
java.lang.NullPointerException
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:747)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j
ava:
508)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis
patc
her.java:177)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:
576)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for
J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62)
4/7/03 4:14 PM CalmsWebApp: org.apache.struts.action.ActionServlet:
Processing a GET for /WrkqSearch
4/7/03 4:14 PM Calm

 for which the information was found on following URL
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9471.

 We did download the mentioned jar.But the only difference we observed was
it was failing at different point than the earlier one.
 
 Does it have any dependency on JVM version?

 If anybody has right version of struts.jar with patch for above problem
please do mail me.
  
Regards,
Divakar




DISCLAIMER: Information contained and transmitted by this E-MAIL is
proprietary to Mascot Systems Limited and is intended for use only by the
individual or entity to which it is addressed, and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law. If this is a forwarded message, the content of this E-MAIL may not have
been sent with the authority of the Company. If you are not the intended
recipient, an agent of the intended recipient or a person responsible for
delivering the information to the named recipient, you are notified that any
use, distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at [EMAIL PROTECTED] Before opening attachments,
please scan for viruses. 



-
To unsubscribe, e-

Re: [ANN] Barracuda 1.2.0 Released!

2003-05-27 Thread David Graham
I normally wouldn't post this type of info to the Struts list, but since a
number of you have asked to be kept abreast of Barracuda develpments, I
figured I would let you know that the long awaited stable release of
Barracuda 1.2.0 is finally here!
IMO, people interested in Barracuda developments should subscribe to 
whatever mailing list you publish.  This really has nothing to do with 
Struts and, at best, should be posted as [OT].

Thanks,
David

You can download it at:
http://barracudamvc.org/downloads/
A lot has changed since the 1.1.1 release.  Barracuda moved to
http://www.barracudamvc.org , the source has been refactored, there now
exist two contrib packages with reusable code and example webapps to show
off their functionality, numerous bugs have been fixed, quite a few new
features have been added and many features improved, and deployment of
Barracuda and BarracudaDiscRack is now incredibly simplified.
See the most important changes here...
http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Release_Notes
and here...
http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
For a more detailed explanation of the changes, see
http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracuda/A_Changes_H
istory.html
For information on building and deploying Barracuda, see...
http://barracudamvc.org/Barracuda/docs/build_deploy.html
And, of course, don't forget to try out the new contrib apps.  See...
http://barracudamvc.org/Barracuda/docs/contrib_package.html
All this information, and more, is available at:
http://barracudamvc.org/Barracuda/index.html
and here...
http://barracudamvc.org/BarracudaDiscRack/docs/index.html
Thanks to everyone on the BarraucdaMVC team for all your hard work and
thanks to all the users who continue to utilize this great project!  Oh, 
and
special thanks to those who donated hosting, time, money, and effort to 
make
barracudamvc.org possible.
http://www.visi.com/~hoju/barracuda/donations.html

Enjoy!

Christian
--
Christian Cryder [EMAIL PROTECTED]
Internet Architect, ATMReports.com
Barracuda - http://barracudamvc.org
--
"Coffee? I could quit anytime, just not today"
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

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


RE: Custom Validator not being called

2003-05-27 Thread Brown, Melonie S. - Contractor
I could live with that.  :)

The problem is that the custom validation isn't being called when the
required and minlength pass.

To test that, I changed the field settings to:

 
   
   



  
 minlength
 8
  

 


  
 minlength
 8
  



 Original Message 
Subject: RE: Custom Validator not being called
Date: Tue, 27 May 2003 12:31:04 -0400
From: Bailey, Shane C. <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.jakarta.struts.user


Could it be that it is failing required or minlength
first and therefore isn't getting to your method?

-Original Message-
From: Brown, Melonie S. - Contractor [mailto:[EMAIL PROTECTED]

Sent: Tuesday, May 27, 2003 12:32 PM
To: '[EMAIL PROTECTED]'
Subject: Custom Validator not being called

I have the standard validation working just fine.  I have attempted to
branch out to use a custom validator for making sure that passwords follow a
certain set of rules.  The custom validation method does not get called.   I
set the logging to debug, but the output only confirmed that my method isn't
being called.  Suggestions for how to debug further would be greatly
appreciated.

[log when standard validations fail]
DEBUG Date = 2003-05-27 12:22:54,543 [Thread-5]
org.apache.struts.action.RequestProcessor Line = 942 -  Validation failed,
returning to '/gotochangepassword.do'

[log when standard validations pass - should call my validator]
DEBUG Date = 2003-05-27 12:19:14,939 [Thread-4]
org.apache.struts.action.RequestProcessor Line = 915 -   No errors detected,
accepting input
 

Following are the relevant snippets of code:

Validator-rules.xml
--


 


Validation.xml
-

   
  
  
  
 minlength
 8

   



  
 minlength
 8
  

 


  
 minlength
 8
  





Validation method


public static boolean validateComplexPassword(
Object bean,
ValidatorAction va,
Field field,
ActionErrors errors,
HttpServletRequest request)
{
String value = null;
if (isString(bean))
{
value = (String)bean;
}
else
{
value = ValidatorUtil.getValueAsString(bean,
field.getProperty());
}
boolean upperCase = false;
boolean lowerCase = false;
boolean digit = false;
for (int i = 0; i < value.length(); i++)
{
if (Character.isLowerCase(value.charAt(i)))
{
lowerCase = true;
}
if (Character.isDigit(value.charAt(i)))
{
digit = true;
}
if (Character.isUpperCase(value.charAt(i)))
{
upperCase = true;
}
}
// verify that the new password has the requisite combination of
elements (1, A, a)
if (!(upperCase && lowerCase && digit))
{
errors.add(
field.getKey(),
Resources.getActionError(request, va, field));
return false;
}
return true;
}

-
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: Starting subsystems

2003-05-27 Thread Robert Taylor
Take a look at javax.servlet.ServletContextListener. They are bootstraps for
web applications.

robert

-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 12:54 PM
To: 'Struts Users Mailing List'
Subject: Starting subsystems


Hi

   Our presentation tier using struts ends right at the business delegate. I
am aware of the load-on-startup tag. Now if I want to start a subsystem like
my messaging (JMS) server which is very loosely coupled to my presentation
tier I think of the startup class provided by almost all application
servers.

   So when the container starts I start my messaging system that struts
interacts with. What are the options of starting subsystems like this which
are completely separate from the presentation tier. I am not using MDB's.

   If I start my messaging system when the ActionServlet loads ( overriding
ProcessPreProcess for example ? ) then this becomes struts coupled.

 What are the ideas regarding this ?

Mohan


-
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: Custom Validator not being called

2003-05-27 Thread Bailey, Shane C.

Is your form subclassing either ValidatorForm (or DynaValidatorForm
depending on how you are defining your form)?

And not ValidatorActionForm (or DynaValidatorActionForm) since you
are basing your validation off of a form and not an action?

If these tests fail then I am out of suggestions :(

-Original Message-
From: Brown, Melonie S. - Contractor [mailto:[EMAIL PROTECTED]

Sent: Tuesday, May 27, 2003 1:20 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Custom Validator not being called

I could live with that.  :)

The problem is that the custom validation isn't being called when the
required and minlength pass.

To test that, I changed the field settings to:

 
   
   



  
 minlength
 8
  

 


  
 minlength
 8
  



 Original Message 
Subject: RE: Custom Validator not being called
Date: Tue, 27 May 2003 12:31:04 -0400
From: Bailey, Shane C. <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.jakarta.struts.user


Could it be that it is failing required or minlength
first and therefore isn't getting to your method?

-Original Message-
From: Brown, Melonie S. - Contractor [mailto:[EMAIL PROTECTED]

Sent: Tuesday, May 27, 2003 12:32 PM
To: '[EMAIL PROTECTED]'
Subject: Custom Validator not being called

I have the standard validation working just fine.  I have attempted to
branch out to use a custom validator for making sure that passwords follow a
certain set of rules.  The custom validation method does not get called.   I
set the logging to debug, but the output only confirmed that my method isn't
being called.  Suggestions for how to debug further would be greatly
appreciated.

[log when standard validations fail]
DEBUG Date = 2003-05-27 12:22:54,543 [Thread-5]
org.apache.struts.action.RequestProcessor Line = 942 -  Validation failed,
returning to '/gotochangepassword.do'

[log when standard validations pass - should call my validator]
DEBUG Date = 2003-05-27 12:19:14,939 [Thread-4]
org.apache.struts.action.RequestProcessor Line = 915 -   No errors detected,
accepting input
 

Following are the relevant snippets of code:

Validator-rules.xml
--


 


Validation.xml
-

   
  
  
  
 minlength
 8

   



  
 minlength
 8
  

 


  
 minlength
 8
  





Validation method


public static boolean validateComplexPassword(
Object bean,
ValidatorAction va,
Field field,
ActionErrors errors,
HttpServletRequest request)
{
String value = null;
if (isString(bean))
{
value = (String)bean;
}
else
{
value = ValidatorUtil.getValueAsString(bean,
field.getProperty());
}
boolean upperCase = false;
boolean lowerCase = false;
boolean digit = false;
for (int i = 0; i < value.length(); i++)
{
if (Character.isLowerCase(value.charAt(i)))
{
lowerCase = true;
}
if (Character.isDigit(value.charAt(i)))
{
digit = true;
}
if (Character.isUpperCase(value.charAt(i)))
{
upperCase = true;
}
}
// verify that the new password has the requisite combination of
elements (1, A, a)
if (!(upperCase && lowerCase && digit))
{
errors.add(
field.getKey(),
Resources.getActionError(request, va, field));
return false;
}
return true;
}

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

-
To unsubscribe, e-mail: [EMAIL PR

RE: Having problems with DynaValidatorForm

2003-05-27 Thread sannabel
Thanks a bunch. I knew my eyes were just missing something that like
that.

Seth

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2003 10:48 AM
To: 'Struts Users Mailing List'
Subject: RE: Having problems with DynaValidatorForm



Try:


...



-Original Message-
From: sannabel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2003 12:46 PM
To: [EMAIL PROTECTED]
Subject: Having problems with DynaValidatorForm

I'm a struts novice trying to use DynaValidatorForm.  I am getting this
error.

javax.servlet.ServletException: Exception creating bean of class
org.apache.struts.action.DynaValidatorForm: {1}
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:530)
at org.apache.jsp.Search_jsp._jspService(Search_jsp.java:78)

It appears that it can't find the searchForm from my xml declarations.
In my logs I don't see any other errors that might have put it into this
state. I have searched the list archive for this problem and have not
found any answers.  Any help is very much appreciated.

Thanks
Seth

Here is my setup.

Struts-config.xml

  
  
  
  
  
  
  





 


   




  
-
/jsp/Search.jsp
My form tag.


-
validator.xml






   

   
   
   
  mask
  ^[0-9a-zA-Z]*$
   


   
   
  mask
  ^[A-Z]*$
   
   
  min
  2
   
   
  max
  2
   


   
   
  mask
  ^[0-9]*$
   
   
  max
  5
   




--
web.xml action mapping


  
action
*.do
  



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



Newbie question: how does MyAction class handle Exceptions?

2003-05-27 Thread Leon
Hi,

I have DataAccessException thrown by DAO class and catched by
BusinessDeligate class. ApplicationException thrown by BusinessDeligate
class and catched by MyAction class. I want to send a jsp to clients to
display a message that the clients submit a duplicate entry in their
request. What should I do for this?
Thanx.

Leon

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



Problem Validating Integer

2003-05-27 Thread Victor J. Soares
Hello,
I am learning how to use the DynaValidatorForm and Validtor, but I have 
run into a problem I can't figure out:

One of the fields in the form is of type "Integer". The validation rules 
I set up check to see if (1) the a value has been given (required) (2) 
the value given is an integer.

I submit the form, but the validation doesn't catch either of those 
cases and return the form populated with "0".

Can somebody clue me in on Integer validation?

thanks,
- vic
Below are the snippets from the pertinent configs:

struts-config.xml-




---
validation.xml---







resource="false"/>


maxlength
16


minlength
3






---




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


RE: Newbie question: how does MyAction class handle Exceptions?

2003-05-27 Thread Mike Jasnowski
Return a forward appropriate to the exception caught? 

-Original Message-
From: Leon [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 2:45 PM
To: Struts Users Mailing List
Subject: Newbie question: how does MyAction class handle Exceptions?


Hi,

I have DataAccessException thrown by DAO class and catched by
BusinessDeligate class. ApplicationException thrown by BusinessDeligate
class and catched by MyAction class. I want to send a jsp to clients to
display a message that the clients submit a duplicate entry in their
request. What should I do for this?
Thanx.

Leon

-
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: [ANN] Barracuda 1.2.0 Released!

2003-05-27 Thread Chappell, Simon P
Wow, give the guy a break! He prefixed the post with [ANN] and he indicates that a 
number of Struts users have encouraged him to post this information here.

Simon

>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 27, 2003 12:09 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [ANN] Barracuda 1.2.0 Released!
>
>
>>I normally wouldn't post this type of info to the Struts 
>list, but since a
>>number of you have asked to be kept abreast of Barracuda 
>develpments, I
>>figured I would let you know that the long awaited stable release of
>>Barracuda 1.2.0 is finally here!
>
>IMO, people interested in Barracuda developments should subscribe to 
>whatever mailing list you publish.  This really has nothing to do with 
>Struts and, at best, should be posted as [OT].
>
>Thanks,
>David
>
>
>>
>>You can download it at:
>>http://barracudamvc.org/downloads/
>>
>>A lot has changed since the 1.1.1 release.  Barracuda moved to
>>http://www.barracudamvc.org , the source has been refactored, 
>there now
>>exist two contrib packages with reusable code and example 
>webapps to show
>>off their functionality, numerous bugs have been fixed, quite 
>a few new
>>features have been added and many features improved, and deployment of
>>Barracuda and BarracudaDiscRack is now incredibly simplified.
>>
>>See the most important changes here...
>>http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Rele
>ase_Notes
>>and here...
>>http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
>>
>>For a more detailed explanation of the changes, see
>>http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracu
>da/A_Changes_H
>>istory.html
>>
>>For information on building and deploying Barracuda, see...
>>http://barracudamvc.org/Barracuda/docs/build_deploy.html
>>
>>And, of course, don't forget to try out the new contrib apps.  See...
>>http://barracudamvc.org/Barracuda/docs/contrib_package.html
>>
>>All this information, and more, is available at:
>>http://barracudamvc.org/Barracuda/index.html
>>and here...
>>http://barracudamvc.org/BarracudaDiscRack/docs/index.html
>>
>>
>>Thanks to everyone on the BarraucdaMVC team for all your hard work and
>>thanks to all the users who continue to utilize this great 
>project!  Oh, 
>>and
>>special thanks to those who donated hosting, time, money, and 
>effort to 
>>make
>>barracudamvc.org possible.
>>http://www.visi.com/~hoju/barracuda/donations.html
>>
>>Enjoy!
>>
>>Christian
>>--
>>Christian Cryder [EMAIL PROTECTED]
>>Internet Architect, ATMReports.com
>>Barracuda - http://barracudamvc.org
>>--
>>"Coffee? I could quit anytime, just not today"
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>_
>Tired of spam? Get advanced junk mail protection with MSN 8. 
>http://join.msn.com/?page=features/junkmail
>
>
>-
>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: [ANN] Barracuda 1.2.0 Released!

2003-05-27 Thread Brandon Goodin
We post JavaServerFaces stuff here and it appears to me that Barracuda
presents itself as a similar sort of product.

Brandon Goodin

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 12:47 PM
To: Struts Users Mailing List
Subject: RE: [ANN] Barracuda 1.2.0 Released!


Wow, give the guy a break! He prefixed the post with [ANN] and he indicates
that a number of Struts users have encouraged him to post this information
here.

Simon

>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 27, 2003 12:09 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [ANN] Barracuda 1.2.0 Released!
>
>
>>I normally wouldn't post this type of info to the Struts
>list, but since a
>>number of you have asked to be kept abreast of Barracuda
>develpments, I
>>figured I would let you know that the long awaited stable release of
>>Barracuda 1.2.0 is finally here!
>
>IMO, people interested in Barracuda developments should subscribe to
>whatever mailing list you publish.  This really has nothing to do with
>Struts and, at best, should be posted as [OT].
>
>Thanks,
>David
>
>
>>
>>You can download it at:
>>http://barracudamvc.org/downloads/
>>
>>A lot has changed since the 1.1.1 release.  Barracuda moved to
>>http://www.barracudamvc.org , the source has been refactored,
>there now
>>exist two contrib packages with reusable code and example
>webapps to show
>>off their functionality, numerous bugs have been fixed, quite
>a few new
>>features have been added and many features improved, and deployment of
>>Barracuda and BarracudaDiscRack is now incredibly simplified.
>>
>>See the most important changes here...
>>http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Rele
>ase_Notes
>>and here...
>>http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
>>
>>For a more detailed explanation of the changes, see
>>http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracu
>da/A_Changes_H
>>istory.html
>>
>>For information on building and deploying Barracuda, see...
>>http://barracudamvc.org/Barracuda/docs/build_deploy.html
>>
>>And, of course, don't forget to try out the new contrib apps.  See...
>>http://barracudamvc.org/Barracuda/docs/contrib_package.html
>>
>>All this information, and more, is available at:
>>http://barracudamvc.org/Barracuda/index.html
>>and here...
>>http://barracudamvc.org/BarracudaDiscRack/docs/index.html
>>
>>
>>Thanks to everyone on the BarraucdaMVC team for all your hard work and
>>thanks to all the users who continue to utilize this great
>project!  Oh,
>>and
>>special thanks to those who donated hosting, time, money, and
>effort to
>>make
>>barracudamvc.org possible.
>>http://www.visi.com/~hoju/barracuda/donations.html
>>
>>Enjoy!
>>
>>Christian
>>--
>>Christian Cryder [EMAIL PROTECTED]
>>Internet Architect, ATMReports.com
>>Barracuda - http://barracudamvc.org
>>--
>>"Coffee? I could quit anytime, just not today"
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>_
>Tired of spam? Get advanced junk mail protection with MSN 8.
>http://join.msn.com/?page=features/junkmail
>
>
>-
>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: html:link with dynamic javascript confirmation

2003-05-27 Thread Lorrin Nelson
Thanks David! That solved my problem and sounds like something I never 
would have figured out on my own..

-Lorrin

At 12:49 PM 5/24/2003, you wrote:
> "Lorrin" == Lorrin Nelson <[EMAIL PROTECTED]> writes:

Lorrin> I have a table displaying a list of items, and on each row 
there is a "delete"
Lorrin> link that pops up a confirmation dialog and then deletes the 
item. This works:

Lorrin> 
Lorrin> 
Lorrin> 
Lorrin> 
Lorrin> 
Lorrin> paramId="id" paramName="template" 
paramProperty="id"
Lorrin> onclick="return confirm('Really?')">
Lorrin> 
Lorrin> 
Lorrin> 
Lorrin> 
Lorrin> 

Lorrin> My problem is the hardcoded 'Really?' -- instead, I want to 
use a message
Lorrin> resource and plug in the name of the item in the row, like so:

Lorrin>  value="${template.name}"/>
Lorrin> That works fine if it's not inside the  tag, but 
inside the
Lorrin>  it doesn't get parsed at all. In fact, if I do 
'Really <%=4+4%>?' I
Lorrin> don't even get 'Really 8', I get the unparsed text in the 
confirmation dialog..

Lorrin> Any suggestions? I'm not married to this approach; if I've 
gotta use old-skool
Lorrin> Struts tags instead of JSTL or do it as a form instead of a 
html:link that's
Lorrin> alright.

Well, the simple fix is to understand that expression scriptlets have to 
be the
entire attribute value, not just a portion.  Instead of:

  'Really <%=4+4%>?'

you would need

  '<%= "Really" + (4 + 4) + %>?'

Alternatively, if you are using the nightly build of Struts, you could use the
"Struts-EL" contrib library, which gives you the ability to reference EL
expressions in the attributes of the Struts tags.
--
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD


-
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: [ANN] Barracuda 1.2.0 Released!

2003-05-27 Thread David Graham
It's not that I'm upset by post but this is a very high traffic list and I'm 
trying to keep it focused on Struts.

David

Wow, give the guy a break! He prefixed the post with [ANN] and he indicates 
that a number of Struts users have encouraged him to post this information 
here.

Simon

>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 27, 2003 12:09 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [ANN] Barracuda 1.2.0 Released!
>
>
>>I normally wouldn't post this type of info to the Struts
>list, but since a
>>number of you have asked to be kept abreast of Barracuda
>develpments, I
>>figured I would let you know that the long awaited stable release of
>>Barracuda 1.2.0 is finally here!
>
>IMO, people interested in Barracuda developments should subscribe to
>whatever mailing list you publish.  This really has nothing to do with
>Struts and, at best, should be posted as [OT].
>
>Thanks,
>David
>
>
>>
>>You can download it at:
>>http://barracudamvc.org/downloads/
>>
>>A lot has changed since the 1.1.1 release.  Barracuda moved to
>>http://www.barracudamvc.org , the source has been refactored,
>there now
>>exist two contrib packages with reusable code and example
>webapps to show
>>off their functionality, numerous bugs have been fixed, quite
>a few new
>>features have been added and many features improved, and deployment of
>>Barracuda and BarracudaDiscRack is now incredibly simplified.
>>
>>See the most important changes here...
>>http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Rele
>ase_Notes
>>and here...
>>http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
>>
>>For a more detailed explanation of the changes, see
>>http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracu
>da/A_Changes_H
>>istory.html
>>
>>For information on building and deploying Barracuda, see...
>>http://barracudamvc.org/Barracuda/docs/build_deploy.html
>>
>>And, of course, don't forget to try out the new contrib apps.  See...
>>http://barracudamvc.org/Barracuda/docs/contrib_package.html
>>
>>All this information, and more, is available at:
>>http://barracudamvc.org/Barracuda/index.html
>>and here...
>>http://barracudamvc.org/BarracudaDiscRack/docs/index.html
>>
>>
>>Thanks to everyone on the BarraucdaMVC team for all your hard work and
>>thanks to all the users who continue to utilize this great
>project!  Oh,
>>and
>>special thanks to those who donated hosting, time, money, and
>effort to
>>make
>>barracudamvc.org possible.
>>http://www.visi.com/~hoju/barracuda/donations.html
>>
>>Enjoy!
>>
>>Christian
>>--
>>Christian Cryder [EMAIL PROTECTED]
>>Internet Architect, ATMReports.com
>>Barracuda - http://barracudamvc.org
>>--
>>"Coffee? I could quit anytime, just not today"
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>_
>Tired of spam? Get advanced junk mail protection with MSN 8.
>http://join.msn.com/?page=features/junkmail
>
>
>-
>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]
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: [ANN] Barracuda 1.2.0 Released!

2003-05-27 Thread Chappell, Simon P
I understand that, but the Struts mailing list has a history of leniency towards OT 
stuff and doubly so on Fridays! (I should know, I'm one of the offenders! ;-) The list 
is high nineties percent about Struts, so I think that life will continue and the sun 
will still shine! :-)

Simon

>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 27, 2003 1:56 PM
>To: [EMAIL PROTECTED]
>Subject: RE: [ANN] Barracuda 1.2.0 Released!
>
>
>It's not that I'm upset by post but this is a very high 
>traffic list and I'm 
>trying to keep it focused on Struts.
>
>David
>
>>Wow, give the guy a break! He prefixed the post with [ANN] 
>and he indicates 
>>that a number of Struts users have encouraged him to post 
>this information 
>>here.
>>
>>Simon
>>
>> >-Original Message-
>> >From: David Graham [mailto:[EMAIL PROTECTED]
>> >Sent: Tuesday, May 27, 2003 12:09 PM
>> >To: [EMAIL PROTECTED]
>> >Subject: Re: [ANN] Barracuda 1.2.0 Released!
>> >
>> >
>> >>I normally wouldn't post this type of info to the Struts
>> >list, but since a
>> >>number of you have asked to be kept abreast of Barracuda
>> >develpments, I
>> >>figured I would let you know that the long awaited stable 
>release of
>> >>Barracuda 1.2.0 is finally here!
>> >
>> >IMO, people interested in Barracuda developments should subscribe to
>> >whatever mailing list you publish.  This really has nothing 
>to do with
>> >Struts and, at best, should be posted as [OT].
>> >
>> >Thanks,
>> >David
>> >
>> >
>> >>
>> >>You can download it at:
>> >>http://barracudamvc.org/downloads/
>> >>
>> >>A lot has changed since the 1.1.1 release.  Barracuda moved to
>> >>http://www.barracudamvc.org , the source has been refactored,
>> >there now
>> >>exist two contrib packages with reusable code and example
>> >webapps to show
>> >>off their functionality, numerous bugs have been fixed, quite
>> >a few new
>> >>features have been added and many features improved, and 
>deployment of
>> >>Barracuda and BarracudaDiscRack is now incredibly simplified.
>> >>
>> >>See the most important changes here...
>> >>http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Rele
>> >ase_Notes
>> >>and here...
>> >>http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
>> >>
>> >>For a more detailed explanation of the changes, see
>> >>http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracu
>> >da/A_Changes_H
>> >>istory.html
>> >>
>> >>For information on building and deploying Barracuda, see...
>> >>http://barracudamvc.org/Barracuda/docs/build_deploy.html
>> >>
>> >>And, of course, don't forget to try out the new contrib 
>apps.  See...
>> >>http://barracudamvc.org/Barracuda/docs/contrib_package.html
>> >>
>> >>All this information, and more, is available at:
>> >>http://barracudamvc.org/Barracuda/index.html
>> >>and here...
>> >>http://barracudamvc.org/BarracudaDiscRack/docs/index.html
>> >>
>> >>
>> >>Thanks to everyone on the BarraucdaMVC team for all your 
>hard work and
>> >>thanks to all the users who continue to utilize this great
>> >project!  Oh,
>> >>and
>> >>special thanks to those who donated hosting, time, money, and
>> >effort to
>> >>make
>> >>barracudamvc.org possible.
>> >>http://www.visi.com/~hoju/barracuda/donations.html
>> >>
>> >>Enjoy!
>> >>
>> >>Christian
>> >>--
>> >>Christian Cryder [EMAIL PROTECTED]
>> >>Internet Architect, ATMReports.com
>> >>Barracuda - http://barracudamvc.org
>> >>--
>> >>"Coffee? I could quit anytime, just not today"
>> >>
>> >>
>> 
>>>-
>> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>For additional commands, e-mail: 
>[EMAIL PROTECTED]
>> >>
>> >
>> >_
>> >Tired of spam? Get advanced junk mail protection with MSN 8.
>> >http://join.msn.com/?page=features/junkmail
>> >
>> >
>> 
>>-
>> >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]
>>
>
>_
>Protect your PC - get McAfee.com VirusScan Online  
>http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
>-
>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: [ANN] Barracuda 1.2.0 Released!

2003-05-27 Thread Bill Johnson
I'm with Simon.

David, sometimes you spend way too much energy being
the Struts Nazi.

No soup for you!!

-Bill


--- "Chappell, Simon P" <[EMAIL PROTECTED]>
wrote:
> Wow, give the guy a break! He prefixed the post with
> [ANN] and he indicates that a number of Struts users
> have encouraged him to post this information here.
> 
> Simon
> 
> >-Original Message-
> >From: David Graham [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, May 27, 2003 12:09 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: [ANN] Barracuda 1.2.0 Released!
> >
> >
> >>I normally wouldn't post this type of info to the
> Struts 
> >list, but since a
> >>number of you have asked to be kept abreast of
> Barracuda 
> >develpments, I
> >>figured I would let you know that the long awaited
> stable release of
> >>Barracuda 1.2.0 is finally here!
> >
> >IMO, people interested in Barracuda developments
> should subscribe to 
> >whatever mailing list you publish.  This really has
> nothing to do with 
> >Struts and, at best, should be posted as [OT].
> >
> >Thanks,
> >David
> >
> >
> >>
> >>You can download it at:
> >>http://barracudamvc.org/downloads/
> >>
> >>A lot has changed since the 1.1.1 release. 
> Barracuda moved to
> >>http://www.barracudamvc.org , the source has been
> refactored, 
> >there now
> >>exist two contrib packages with reusable code and
> example 
> >webapps to show
> >>off their functionality, numerous bugs have been
> fixed, quite 
> >a few new
> >>features have been added and many features
> improved, and deployment of
> >>Barracuda and BarracudaDiscRack is now incredibly
> simplified.
> >>
> >>See the most important changes here...
>
>>http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Rele
> >ase_Notes
> >>and here...
>
>>http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
> >>
> >>For a more detailed explanation of the changes,
> see
>
>>http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracu
> >da/A_Changes_H
> >>istory.html
> >>
> >>For information on building and deploying
> Barracuda, see...
>
>>http://barracudamvc.org/Barracuda/docs/build_deploy.html
> >>
> >>And, of course, don't forget to try out the new
> contrib apps.  See...
>
>>http://barracudamvc.org/Barracuda/docs/contrib_package.html
> >>
> >>All this information, and more, is available at:
> >>http://barracudamvc.org/Barracuda/index.html
> >>and here...
>
>>http://barracudamvc.org/BarracudaDiscRack/docs/index.html
> >>
> >>
> >>Thanks to everyone on the BarraucdaMVC team for
> all your hard work and
> >>thanks to all the users who continue to utilize
> this great 
> >project!  Oh, 
> >>and
> >>special thanks to those who donated hosting, time,
> money, and 
> >effort to 
> >>make
> >>barracudamvc.org possible.
> >>http://www.visi.com/~hoju/barracuda/donations.html
> >>
> >>Enjoy!
> >>
> >>Christian
> >>--
> >>Christian Cryder [EMAIL PROTECTED]
> >>Internet Architect, ATMReports.com
> >>Barracuda - http://barracudamvc.org
> >>--
> >>"Coffee? I could quit anytime, just not today"
> >>
> >>
>
>>-
> >>To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >>For additional commands, e-mail:
> [EMAIL PROTECTED]
> >>
> >
>
>_
> >Tired of spam? Get advanced junk mail protection
> with MSN 8. 
> >http://join.msn.com/?page=features/junkmail
> >
> >
>
>-
> >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]
> 


__
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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



Re: Direct me to the archive about individual error reporting next tofields

2003-05-27 Thread Carl Walker
You'll need to use your own , scheme or remove the
errors.header/prefix, etc. from the resource file.

"Bailey, Shane C." wrote:

>
>
> I was looking at this:
>
> http://husted.com/struts/tips/017.html
> 
>
>
>
> but what ends up happening is I get the
>
> header to show up next to the error as well.
>
>
>
>
>
> Is it possible to have
>
>
>
> errors.header=The following validation errors occured:
>
> errors.footer=
>
> errors.prefix=
>
> errors.suffix=
>
> errors.required={0} is required.
>
>
>
>//Just show errors.header
>
>
>
> then have something like this:
>
>
>
>   //Not sure what to put
>
> 
>
> 
>
> //Again not sure
>
> 
>
> 
>
>
>
> Where either the label shows up or a red label shows
>
> up if there is an error for that element.
>
>
>
> 
>
>
>
> I keep getting the header showing up next to the name and I
>
> want it to show up only at the top.
>
>
>
> I saw something similar in the struts-user emails.  Anyone
>
> know the answer?
>
>


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



Re: Newbie question: how does MyAction class handle Exceptions?

2003-05-27 Thread Leon
I should forward an ApplicationException to MyAction class and then,
MyAction finds an appropriate jsp based on the message in
ApplicationException. But, how can I know the SQLException thrown by
persistance tire is duplicate entery SQLException or other SQLException?
Thanks.


- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 2:45 PM
Subject: RE: Newbie question: how does MyAction class handle Exceptions?


> Return a forward appropriate to the exception caught?
>
> -Original Message-
> From: Leon [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 2:45 PM
> To: Struts Users Mailing List
> Subject: Newbie question: how does MyAction class handle Exceptions?
>
>
> Hi,
>
> I have DataAccessException thrown by DAO class and catched by
> BusinessDeligate class. ApplicationException thrown by BusinessDeligate
> class and catched by MyAction class. I want to send a jsp to clients to
> display a message that the clients submit a duplicate entry in their
> request. What should I do for this?
> Thanx.
>
> Leon
>
> -
> 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: [ANN] Barracuda 1.2.0 Released!

2003-05-27 Thread Brandon Goodin
That was a great Seinfeld episode. One of the classics.

But, let's not gang up on David too much. I think Simon made his point
pretty clear. It's a Tuesday-Monday. Let's start the week off right. Now why
don't you all stop bickering and go back to your cubicles. ;-)

Brandon Goodin

-Original Message-
From: Bill Johnson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 1:11 PM
To: Struts Users Mailing List
Subject: RE: [ANN] Barracuda 1.2.0 Released!


I'm with Simon.

David, sometimes you spend way too much energy being
the Struts Nazi.

No soup for you!!

-Bill


--- "Chappell, Simon P" <[EMAIL PROTECTED]>
wrote:
> Wow, give the guy a break! He prefixed the post with
> [ANN] and he indicates that a number of Struts users
> have encouraged him to post this information here.
>
> Simon
>
> >-Original Message-
> >From: David Graham [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, May 27, 2003 12:09 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: [ANN] Barracuda 1.2.0 Released!
> >
> >
> >>I normally wouldn't post this type of info to the
> Struts
> >list, but since a
> >>number of you have asked to be kept abreast of
> Barracuda
> >develpments, I
> >>figured I would let you know that the long awaited
> stable release of
> >>Barracuda 1.2.0 is finally here!
> >
> >IMO, people interested in Barracuda developments
> should subscribe to
> >whatever mailing list you publish.  This really has
> nothing to do with
> >Struts and, at best, should be posted as [OT].
> >
> >Thanks,
> >David
> >
> >
> >>
> >>You can download it at:
> >>http://barracudamvc.org/downloads/
> >>
> >>A lot has changed since the 1.1.1 release.
> Barracuda moved to
> >>http://www.barracudamvc.org , the source has been
> refactored,
> >there now
> >>exist two contrib packages with reusable code and
> example
> >webapps to show
> >>off their functionality, numerous bugs have been
> fixed, quite
> >a few new
> >>features have been added and many features
> improved, and deployment of
> >>Barracuda and BarracudaDiscRack is now incredibly
> simplified.
> >>
> >>See the most important changes here...
>
>>http://barracudamvc.org/Barracuda/docs/changes.html#1_2_0_Rele
> >ase_Notes
> >>and here...
>
>>http://barracudamvc.org/BarracudaDiscRack/docs/changes.html
> >>
> >>For a more detailed explanation of the changes,
> see
>
>>http://barracudamvc.org/Barracuda/javadocs/org/enhydra/barracu
> >da/A_Changes_H
> >>istory.html
> >>
> >>For information on building and deploying
> Barracuda, see...
>
>>http://barracudamvc.org/Barracuda/docs/build_deploy.html
> >>
> >>And, of course, don't forget to try out the new
> contrib apps.  See...
>
>>http://barracudamvc.org/Barracuda/docs/contrib_package.html
> >>
> >>All this information, and more, is available at:
> >>http://barracudamvc.org/Barracuda/index.html
> >>and here...
>
>>http://barracudamvc.org/BarracudaDiscRack/docs/index.html
> >>
> >>
> >>Thanks to everyone on the BarraucdaMVC team for
> all your hard work and
> >>thanks to all the users who continue to utilize
> this great
> >project!  Oh,
> >>and
> >>special thanks to those who donated hosting, time,
> money, and
> >effort to
> >>make
> >>barracudamvc.org possible.
> >>http://www.visi.com/~hoju/barracuda/donations.html
> >>
> >>Enjoy!
> >>
> >>Christian
> >>--
> >>Christian Cryder [EMAIL PROTECTED]
> >>Internet Architect, ATMReports.com
> >>Barracuda - http://barracudamvc.org
> >>--
> >>"Coffee? I could quit anytime, just not today"
> >>
> >>
>
>>-
> >>To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >>For additional commands, e-mail:
> [EMAIL PROTECTED]
> >>
> >
>
>_
> >Tired of spam? Get advanced junk mail protection
> with MSN 8.
> >http://join.msn.com/?page=features/junkmail
> >
> >
>
>-
> >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]
>


__
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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



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



Re: Parameters v form beans (again!)

2003-05-27 Thread Carl Walker
I use the request object to deal with parameters whose names aren't known in
advance.  For instance, I had an app that allowed the user to associate
attributes "on-the-fly" with a given record.  So I used the identifier for
these schema-changing attributes to come up with  names like
"attr_54" and "attr_2".  These parameters pointed to a db table of attribute
definitions.  The values of the  were used to populate a
different db table that held the attribute data.

I used the request parameters alongside a DynaValidatorForm for the fields that
I did know ahead of time.

But I think you really take a step back if you are going to tie all of your
code to the request map.  You'll lose the validation capabilities of struts and
the pre-population of forms.  If you were going to use DynaActionForms, you'll
lose some typecasting like with .

Mike Whittaker wrote:

> I know I've been here before, but it is my main sticking point.
>
> Does anyone JUST use the Form Beans as a html form backend,
> whether that is for pre population or validation or both.
>
> BUT
>
> Then decide that is easier to use the request parameters as a java.util.Map
> in the business layer.
>
> I know I can do this, I'm just looking for some moral support :-)
>
> Is in fact the ONLY reasoning behind ActionForms that you can easily
> prepopulate.
>
> --
> Mike W
>
> -
> 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]



from bean to JSP

2003-05-27 Thread Yinti, Deepak

I am new to struts framework. Can somebody let me know ,how to get data
from bean into  which I am using my jsp page
Thanks
Deepak

 
This e-mail may contain confidential or privileged information.  If you
think you have received this e-mail in error, please advise the sender by
reply e-mail and then delete this e-mail immediately.  Thank you.  Aetna

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



Re: Container Managed Authentication

2003-05-27 Thread Erik Price


Hirschmann, Bernhard wrote:
Is there a documentation or a how-to around for CMA support in Struts?
I found this to be helpful, although it is not struts-specific:



If you are not using Tomcat, here is a more general explanation from the 
JWSDP tutorial that should apply to most web containers:



Erik

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


RE: problem with JAASRealm

2003-05-27 Thread Craig R. McClanahan


On Wed, 21 May 2003, Tim Clotworthy wrote:

> Date: Wed, 21 May 2003 17:09:50 -0400
> From: Tim Clotworthy <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: problem with JAASRealm
>
> Right, I do have JAASRealm specified in my context, but I don't have the
>  and  specified in my web xml as you
> say below..
>

Placing JAASRealm (or any other Realm) in your  element just
tells Tomcat *where* to look up users and roles.  It has absolutely
nothing to do with *when* Tomcat should do that.

> I don't think I need the security constraint/auth constraint as you say
> below, because I define role attribute in each of my individual
> action-mappings (as per struts1.1). It sounds like perhaps you are doing
> this part different than me, yes?
>

You are making an incorrect assumption.  Unless you have a
 defined in your web.xml file, the container will
never authenticate the user at all.

> As far as the  there is no mapping you specify below to
> the realm-name. Doesn't it need the realm name?
>

The  in web.xml has nothing to do with Tomcat's "Realm" --
despite the simlarity in names.  It's only useful if you are using Basic
authentication, and is used to configure the message in the pop-up dialog
box that your browser shows you.

>
> Also, what if I have my own login.jsp? Wouldn't it require a specific
> signature in order for the authenticate method in JAASRealm to specify
> the username and password?
>

In a similar manner, configuring security constraints and login methods in
your web.xml file tells the container *when* to authenticate (i.e. the
first time that a user accesses a protected resource), but has absolutely
nothing to do with *where* the container looks up users and roles.  That
part is container-specific (Tomcat's approach is the pluggable ,
other containers will have their own ways to let you manage this).

> Thanks again..

Craig


>
> > -Original Message-
> > From: Mike Thompson [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 21, 2003 4:39 PM
> > To: Struts Users Mailing List
> > Subject: RE: problem with JAASRealm
> >
> > Use container managed security.  Tomcat should contact the JAASRealm
> auto-
> > magically if it is specified for your Context.
> >
> > In your web.xml
> >
> >
> > 
> > 
> > application
> > *.jsp
> > *.do
> > *.html
> > 
> >
> > 
> > some_role_that_can_access_app
> > 
> > 
> >
> > 
> > FORM
> > 
> > /login.jsp
> > /login.jsp?errorMessage=true > page>
> > 
> > 
> >
> >
> >
> > -Original Message-
> > From: Tim Clotworthy [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 21, 2003 3:34 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: problem with JAASRealm
> >
> >
> > Mike,
> > As I look at the source code for JAASRealm, I am confused by the
> > authenticate method. Should I be calling the JAASRealm.authenticate()
> > method explicitly? Up until now, I was performing this with my own
> > authentication mechanism that grabs the user/password info from a
> form,
> > creates a LoginContext and has my custom login module authenticate and
> > return the subject with principals, etc.
> >
> > If so, how do I get the JAASRealm instance to begin with (as the
> various
> > lifecycle methods would already have been called).
> >
> > Still confused.
> >
> >
> > > -Original Message-
> > > From: Mike Thompson [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, May 21, 2003 4:03 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: problem with JAASRealm
> > >
> > > JAAS things to check:
> > > You have the appropriate entry{FESLogin} in your java login config.
> > > Your java.security lists the above login config file as a
> > login.config.url
> > > You have the correct Login Modules specified in that entry
> > > You have the jar for the login module in the appropriate location
> > > $CATALINA_HOME/server/lib (I think???)
> > >
> > > If all this is in place, you could write a wrapper LoginModule that
> > > delegates to the LoginModule specified in FESLogin does a bunch of
> > debug
> > > logging.
> > >
> > > Hope this helps.
> > >   --m
> > >
> > >
> > >
> > > -Original Message-
> > > From: Tim Clotworthy [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, May 21, 2003 2:48 PM
> > > To: Struts Users Mailing List
> > > Subject: problem with JAASRealm
> > >
> > >
> > > Ok, I have been trying to get my user auth to work with JAASRealm
> > > (Tomcat4.1, Struts1.1). I have the following entry in my Tomcat
> > > server.xml file (within the Engine node):
> > >
> > >  > > userClassNames="com.hotapp.jaas.authentication.FESUserPrincipal"
> > > roleClassNames="com.hotapp.jaas.authentication.FESRolePrincipal"
> > > appName="FESLogin" />
> > >
> > > This is the only realm entry in the file. Th

what the wrong withis?

2003-05-27 Thread Anand M S
waht the wrong with following code, it doesn't work.
can't we use  inside any other struts tag?
"



_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

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


Re: Struts Performance - Any Benchmarks?

2003-05-27 Thread Craig R. McClanahan


On Thu, 22 May 2003, Tin Pham wrote:

> Date: Thu, 22 May 2003 00:09:09 -0400
> From: Tin Pham <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Struts Performance - Any Benchmarks?
>
> Hi, I have been scouring the internet with no results.
>
> Does anybody have any resources on the performance of Struts applications.
> Any
> benchmarks versus standard development.
>
> One "bottle-neck" brought up by members of my team is the single action
> servlet everything must pass through. Are there currently or going to be
> programming solutions to this?
>

If your team believes that this issue is a bottleneck, then some training
and a more complete understanding of how multithreading works in Java
might be appropriate -- the fact that a single instance of the action
servlet (and of the actions themselves) has zero impact on performance,
and it reduces memory consumption of your app by avoiding useless extra
copies.

> For example, maybe we can have more than one action servlet and use a
> different mapping.. ie, instead of *.do, *.jspx ? But then would global
> forwards from the two different actions still work?
>

This won't work, but not for performance reasons -- Struts supports only a
single mapping to the controller servlet, and only one controller servlet
per webapp.

> Personally, I argue that we should simply go to load balancing if it comes
> to
> that and adding more servlets wouldn't do much anyway. From my rudimentary
> undestanding of java servlets, other resources will choke on you way before
> the single servlet chokes anyhow.
>

See above -- the most important factors in webapp performance have nothing
to do with this issue at all.  In fact, the most important factors are
typically:

* Overall application architecture (things like caching where it is
  appropriate, but not doing premature optimization -- there are lots
  of good books on optimizing server-side Java apps around to draw
  ideas from).

* Database performance (be sure to use connection pooling effectively)

* Network performance

* The quality of the code generated by your JSP page compiler
  for pages using lots of custom tags.

Craig McClanahan

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



Re: what the wrong withis?

2003-05-27 Thread James Mitchell
#1 - You didn't close your nested tag properly.
#2 - Second, you can't nest tags.


Try this instead:


  







--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org



- Original Message - 
From: "Anand M S" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 4:22 PM
Subject: what the wrong withis?


> waht the wrong with following code, it doesn't work.
> can't we use  inside any other struts tag?
> 
>  property="gender"/>"
>  labelProperty="description" />
> 
> 
> _
> MSN 8 with e-mail virus protection service: 2 months FREE* 
> http://join.msn.com/?page=features/virus
> 
> 
> -
> 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: from bean to JSP

2003-05-27 Thread Steve Raeburn
In an Action that forwards to your form jsp, you do something like this:

  ArrayList flavours = new ArrayList();
  flavours.add(new LabelValueBean("Vanilla", "0"));
  flavours.add(new LabelValueBean("Strawberry", "1"));
  flavours.add(new LabelValueBean("Chocolate", "2"));
  flavours.add(new LabelValueBean("Neopolitan", "3"));
  request.setAttribute("FLAVOURS", flavours);

Then in your form jsp you can access the collection like this:

  

  

Steve


> -Original Message-
> From: Yinti, Deepak [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 12:58 PM
> To: Struts Users Mailing List
> Subject:  from bean to JSP
>
>
>
> I am new to struts framework. Can somebody let me know ,how to get data
> from bean into  which I am using my jsp page
> Thanks
> Deepak
>
>
> This e-mail may contain confidential or privileged information.  If you
> think you have received this e-mail in error, please advise the sender by
> reply e-mail and then delete this e-mail immediately.  Thank you.  Aetna
>
> -
> 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: what the wrong withis?

2003-05-27 Thread Hibbs, David
The problem is because you end up having quotes inside of quotes.
Maybe if you look at this it will make sense:
value=" p="g"/>"

How many quotes are there?  I count 6, where a property must have only 2.

The solution is to put a bean:define ahead of it, 
then use the local bean inside the other tag:




David Hibbs
Staff Programmer / Analyst
Distributed Applications Development and Support
American National Insurance Company

> -Original Message-
> From: Anand M S [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 3:23 PM
> To: [EMAIL PROTECTED]
> Subject: what the wrong withis?
> 
> 
> waht the wrong with following code, it doesn't work.
> can't we use  inside any other struts tag?
> 
>  property="gender"/>"
>  labelProperty="description" />
> 
> 

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



Re: what the wrong withis?

2003-05-27 Thread Anand M S
Thanks, James.


From: "James Mitchell" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: what the wrong withis?
Date: Tue, 27 May 2003 16:29:18 -0400
#1 - You didn't close your nested tag properly.
#2 - Second, you can't nest tags.
Try this instead:


  





--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org


- Original Message -
From: "Anand M S" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 4:22 PM
Subject: what the wrong withis?
> waht the wrong with following code, it doesn't work.
> can't we use  inside any other struts tag?
>
>  property="gender"/>"
>  labelProperty="description" />
> 
>
> _
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> -
> 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]
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


Re: [OT] I'm tired of restarting tomcat!

2003-05-27 Thread Daniel H. F. e Silva
Hi Fabio,
 I know Tomcat is reference implementation and its license is great, but i can't loose 
my time
with issues like that you reported. So, i use Resin at my development environment. Let 
it take a
chance.
 But if you still prefer Tomcat, use 4.1.24. Maybe this issue was solved. I think 
4.1.24 is a nice
try!

Best regards,
 Daniel Silva.

--- Fabio Mancinelli <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> 
> Hello all,
> 
> this is somewhat off-topic but I don't know why I have this behaviour.
> I deployed my struts application on tomcat 4.1.18 and randomly, it stops
> serving requests (it waits forever on index.jsp).
> 
> In the log files I always notice an exception:
> 003-05-27 16:30:09 StandardWrapperValve[default]: Servlet.service() for servlet 
> default threw
> exception
> java.net.SocketException: Connection reset
>   at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuff
>   ...
> 
> The only way to restore the normal behaviour is to restart tomcat.
> 
> Does anyone know why I get this behaviour?
> 
> A presto,
> Fabio
> 
> - -- 
> - ---
>  Fabio Mancinelli, PhD student   EMail : [EMAIL PROTECTED]
>  Dipartimento di Informatica   WWW : http://www.di.univaq.it/~mancinel
>  Universita' dell'Aquila
> - ---
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.1 (GNU/Linux)
> Comment: Made with pgp4pine 1.75-6
> 
> iD8DBQE+04t76dsQbk2R3cMRAgHrAKCjXY+NqIChZrIhZsCNw7/923Fb+ACghEFq
> +/DiCrnBlm2xQCZarq9gr+A=
> =Yu0y
> -END PGP SIGNATURE-
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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



RE: from bean to JSP

2003-05-27 Thread Yinti, Deepak
Thanks Steve for your help
Deepak

-Original Message-
From: Steve Raeburn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2003 4:30 PM
To: Struts Users Mailing List
Subject: RE:  from bean to JSP


In an Action that forwards to your form jsp, you do something like this:

  ArrayList flavours = new ArrayList();
  flavours.add(new LabelValueBean("Vanilla", "0"));
  flavours.add(new LabelValueBean("Strawberry", "1"));
  flavours.add(new LabelValueBean("Chocolate", "2"));
  flavours.add(new LabelValueBean("Neopolitan", "3"));
  request.setAttribute("FLAVOURS", flavours);

Then in your form jsp you can access the collection like this:

  

  

Steve


> -Original Message-
> From: Yinti, Deepak [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 12:58 PM
> To: Struts Users Mailing List
> Subject:  from bean to JSP
>
>
>
> I am new to struts framework. Can somebody let me know ,how to get 
> data from bean into  which I am using my jsp page Thanks
> Deepak
>
>
> This e-mail may contain confidential or privileged information.  If 
> you think you have received this e-mail in error, please advise the 
> sender by reply e-mail and then delete this e-mail immediately.  Thank 
> you.  Aetna
>
> -
> 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]

This e-mail may contain confidential or privileged information.  If you
think you have received this e-mail in error, please advise the sender by
reply e-mail and then delete this e-mail immediately.  Thank you.  Aetna

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



Dynamic key access into a Map?

2003-05-27 Thread Josh McCulloch
Hi,

I have a Map that is currently in application scope (key=String, 
value=Bean).
I'm iterating over a collection of line items, and need to do a lookup 
within the Map for each line item:

object contains a Collection, and a Collection getItems() getter.
objectWithMap contains a Object getBlah(), which contains a Object 
getUser(String key) { return map.get(key); }


   
   @<%= userId %>@
   ##
   


The output will be:
@[EMAIL PROTECTED]
If I change the property to "blah.user(60).fullName", I get the expected 
results...
@[EMAIL PROTECTED]

Anyone see what is wrong? Does the <%= %> get executed after the bean 
tag starts?

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


Re: Newbie question: how does MyAction class handle Exceptions?

2003-05-27 Thread Erik Price


Leon wrote:
I should forward an ApplicationException to MyAction class and then,
MyAction finds an appropriate jsp based on the message in
ApplicationException. But, how can I know the SQLException thrown by
persistance tire is duplicate entery SQLException or other SQLException?
Put an informative message in the DAO code that constructs the SQLException.

Some people then generate an email from the exception message and send 
it to the administrator email account.  Other people might do something 
more technical such as send a JMS message that there is a problem.  Or 
even open a socket and fire a simple XML message to some web service 
containing the contents of the exception.  These ideas require you to 
have established a facility to receive and store such messages (JMS or 
web service), and might not be worth the added complexity.

Other people don't care if the user sees the exception message and they 
just print a message like "Please copy the contents of this stack trace 
into an email and send it to the admin".  This is the easy, if ugly, 
solution.

Erik

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


Re: [OT] Calculating distance using Longitude/Latitude

2003-05-27 Thread Barry Volpe
Micael,

Thanks for your input.  My problem is limited to how far one is willing
to travel to provide a service.  The way I have it setup now is
one can specify up to five locations (cities).  But if someone wants to
provide service to more than five cities they have no way of specifiying
this.  It is a bit more cumbersome to specify individual cities.  On the
other hand specifying a distance would require immediate feedback
to the person providing the service so they can realize what cities
they have specified (through distance).   Another problem is
a city that is included in the distance may want to be excluded.
A solution that comes to mind is to allow the user to enter
the number of cities they want to provide service in.  But what is
reasonable.  5, 10,100.  That would be a pain in the neck to
enter and may utilize an unnecessary amount of the database
(would allow random cities not located adjacent to each other).


Barry


- Original Message -
From: "Micael" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, May 23, 2003 5:20 PM
Subject: Re: [OT] Calculating distance using Longitude/Latitude


> Part of the answer is inevitably tied to your problem.  If it is one kind
> of a problem, then distance is crucial.  If it is another, then popluation
> is critical.  Ten miles to a hotel in N.Y. is not ten miles to a hotel in
> the Mojave Desert.  Know what I mean?  Usually people approach these
> problems as distance problems when the actual area in which such solutions
> will usually be employed make them into topographical problems.  I am not
> sure if that is relevant to you.  If not, sorry for bothering you.  Micael
>
> At 05:11 PM 5/23/03 -0700, you wrote:
> >At 16:10 -0700 5/23/03, Barry Volpe spoke thusly:
> >
> >>Hi,
> >>
> >>I don't know if there is anything particular to struts on this
subject
> >>
> >>What I want to do:
> >>
> >>I have a geo database with city,state and corresponding
longitude,lattitude.
> >>I want to allow a specific city/state location to be specified and a
> >>distance to
> >>be selected.  Then all locations (in my database) within that distance
> >>(square miles I guess)
> >>can be displayed.
> >The equations, for the simple assumptions (see below) do not require more
> >then 10 lines of Java. You'd spend more time finding an implementation
> >than just coding you equations.
> >
> >The simple assumption is to compute a box around the source location with
> >sides equal to half the allowed distance. This will give you a min and
max
> >long and latitude that you could query against. Theoretically you should
> >check against a circle around your source point, so this will include too
> >many results in the query output. If you really need precision, you could
> >also computed the square inscribed within the circle and if query results
> >are inside the outer box, but outside the inner box, you could run
> >additional filtering in Java do to the precise calculation.
> >Off course the earth is not flat and the larger the distance, the more
> >error is introduced. Also, the circle above, is not really a circle for
> >the same reason. A possible modification is to compute the width of the
> >box (longitude) based on the latitude closest to the equator. This would
> >compensate for locations further away from the equator, but is still not
> >100% precise.
> >The trick, in the absence of even smarter approaches, is to do the quick
> >math such that it includes at least all known good answers, so you can do
> >some more filtering in code if necessary.
> >
> >--dolf
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> LEGAL NOTICE
>
> This electronic mail  transmission and any accompanying documents contain
> information belonging to the sender which may be confidential and legally
> privileged.  This information is intended only for the use of the
> individual or entity to whom this electronic mail transmission was sent as
> indicated above. If you are not the intended recipient, any disclosure,
> copying, distribution, or action taken in reliance on the contents of the
> information contained in this transmission is strictly prohibited.  If you
> have received this transmission in error, please delete the message.
Thank
> you
>
>
>
> -
> 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]



WebSphere Application Server weirdness

2003-05-27 Thread Chappell, Simon P
Folks,

Has anyone out there in Strutsville seen this weird behaviour from IBM's WebSphere 
Application Server 4.0.5 running on Solaris.

We are moving our app from JRun 4 to WAS 4.0.5 and so now we are packaging it up as a 
EAR file instead of just a WAR file, but I'm not convinced that is the cause of the 
problem. The problem is that our app name is getting doubled. Where we used to have:

http://my-server/sorterx/my-action.do

we now get:

http://my-server/sorterx/sorterx/my-action.do

Which is seriously messing up our application. No source code changed in this effort.

Any thoughts?

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

"Never give in - never, never, never, never, in nothing great or
small, large or petty, never give in except to convictions of
honor and good sense." - Sir Winston Churchill

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



How to refer to the name of the form within a block?

2003-05-27 Thread Erez Efrati
Is there a way to refer or get the name of the form inside the
 ?
I am trying to do something like the following:



??
Property="items">
...


 

Thanks,

Erez



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



RE: WebSphere Application Server weirdness

2003-05-27 Thread Mounagurusamy, Jayakumar (HAL)
When you build your EAR you would have provided the CONTEXT ROOT, I assume
your context root in this case is /sorters, since you are implementing a EAR
file in Web sphere you need not to provide the context root again. However
if your are implementing the WAR file then you have to. 

Try implementing the EAR file in Web sphere with out providing the Context
Root.

Jay


-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 1:48 PM
To: Struts Mailing List (E-mail)
Subject: WebSphere Application Server weirdness


Folks,

Has anyone out there in Strutsville seen this weird behaviour from IBM's
WebSphere Application Server 4.0.5 running on Solaris.

We are moving our app from JRun 4 to WAS 4.0.5 and so now we are packaging
it up as a EAR file instead of just a WAR file, but I'm not convinced that
is the cause of the problem. The problem is that our app name is getting
doubled. Where we used to have:

http://my-server/sorterx/my-action.do

we now get:

http://my-server/sorterx/sorterx/my-action.do

Which is seriously messing up our application. No source code changed in
this effort.

Any thoughts?

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

"Never give in - never, never, never, never, in nothing great or
small, large or petty, never give in except to convictions of
honor and good sense." - Sir Winston Churchill

-
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: [OT] Calculating distance using Longitude/Latitude

2003-05-27 Thread Barry Volpe
To all interested here are suggested calculations
( I was planning on using this as a baseline):

http://www.meridianworlddata.com/HTML2/distance-formula-2.asp

Thanks,
Barry




- Original Message -
From: "Barry Volpe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 1:46 PM
Subject: Re: [OT] Calculating distance using Longitude/Latitude


> Micael,
>
> Thanks for your input.  My problem is limited to how far one is willing
> to travel to provide a service.  The way I have it setup now is
> one can specify up to five locations (cities).  But if someone wants to
> provide service to more than five cities they have no way of specifiying
> this.  It is a bit more cumbersome to specify individual cities.  On the
> other hand specifying a distance would require immediate feedback
> to the person providing the service so they can realize what cities
> they have specified (through distance).   Another problem is
> a city that is included in the distance may want to be excluded.
> A solution that comes to mind is to allow the user to enter
> the number of cities they want to provide service in.  But what is
> reasonable.  5, 10,100.  That would be a pain in the neck to
> enter and may utilize an unnecessary amount of the database
> (would allow random cities not located adjacent to each other).
>
>
> Barry
>
>
> - Original Message -
> From: "Micael" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, May 23, 2003 5:20 PM
> Subject: Re: [OT] Calculating distance using Longitude/Latitude
>
>
> > Part of the answer is inevitably tied to your problem.  If it is one
kind
> > of a problem, then distance is crucial.  If it is another, then
popluation
> > is critical.  Ten miles to a hotel in N.Y. is not ten miles to a hotel
in
> > the Mojave Desert.  Know what I mean?  Usually people approach these
> > problems as distance problems when the actual area in which such
solutions
> > will usually be employed make them into topographical problems.  I am
not
> > sure if that is relevant to you.  If not, sorry for bothering you.
Micael
> >
> > At 05:11 PM 5/23/03 -0700, you wrote:
> > >At 16:10 -0700 5/23/03, Barry Volpe spoke thusly:
> > >
> > >>Hi,
> > >>
> > >>I don't know if there is anything particular to struts on this
> subject
> > >>
> > >>What I want to do:
> > >>
> > >>I have a geo database with city,state and corresponding
> longitude,lattitude.
> > >>I want to allow a specific city/state location to be specified and a
> > >>distance to
> > >>be selected.  Then all locations (in my database) within that distance
> > >>(square miles I guess)
> > >>can be displayed.
> > >The equations, for the simple assumptions (see below) do not require
more
> > >then 10 lines of Java. You'd spend more time finding an implementation
> > >than just coding you equations.
> > >
> > >The simple assumption is to compute a box around the source location
with
> > >sides equal to half the allowed distance. This will give you a min and
> max
> > >long and latitude that you could query against. Theoretically you
should
> > >check against a circle around your source point, so this will include
too
> > >many results in the query output. If you really need precision, you
could
> > >also computed the square inscribed within the circle and if query
results
> > >are inside the outer box, but outside the inner box, you could run
> > >additional filtering in Java do to the precise calculation.
> > >Off course the earth is not flat and the larger the distance, the more
> > >error is introduced. Also, the circle above, is not really a circle for
> > >the same reason. A possible modification is to compute the width of the
> > >box (longitude) based on the latitude closest to the equator. This
would
> > >compensate for locations further away from the equator, but is still
not
> > >100% precise.
> > >The trick, in the absence of even smarter approaches, is to do the
quick
> > >math such that it includes at least all known good answers, so you can
do
> > >some more filtering in code if necessary.
> > >
> > >--dolf
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> >
> > LEGAL NOTICE
> >
> > This electronic mail  transmission and any accompanying documents
contain
> > information belonging to the sender which may be confidential and
legally
> > privileged.  This information is intended only for the use of the
> > individual or entity to whom this electronic mail transmission was sent
as
> > indicated above. If you are not the intended recipient, any disclosure,
> > copying, distribution, or action taken in reliance on the contents of
the
> > information contained in this transmission is strictly prohibited.  If
you
> > have received this transmission in error, please delete the message.
> Thank
> > you
>

RE: WebSphere Application Server weirdness

2003-05-27 Thread Witbeck, Shane
This is a known issue with WebSphere. I think I answered this question a
while back so search the archive.

Shane

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 4:48 PM
To: Struts Mailing List (E-mail)
Subject: WebSphere Application Server weirdness


Folks,

Has anyone out there in Strutsville seen this weird behaviour from IBM's
WebSphere Application Server 4.0.5 running on Solaris.

We are moving our app from JRun 4 to WAS 4.0.5 and so now we are packaging
it up as a EAR file instead of just a WAR file, but I'm not convinced that
is the cause of the problem. The problem is that our app name is getting
doubled. Where we used to have:

http://my-server/sorterx/my-action.do

we now get:

http://my-server/sorterx/sorterx/my-action.do

Which is seriously messing up our application. No source code changed in
this effort.

Any thoughts?

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526

"Never give in - never, never, never, never, in nothing great or
small, large or petty, never give in except to convictions of
honor and good sense." - Sir Winston Churchill

-
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: Newbie question: how does MyAction class handle Exceptions?

2003-05-27 Thread Bailey, Shane C.

How about catching the database exception in the middle
tier and throwing a more middle tier like Exception (so
your front tier - any of the struts classes - don't have
to deal with anything with SQL in it) that you define like
UserExistsException or InvalidSomethingException or
ThisHappenedException and then in the struts config have 

  

  

  

I like keeping the try catches out of my Action class.


-Original Message-
From: Leon [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2003 3:33 PM
To: Struts Users Mailing List
Subject: Re: Newbie question: how does MyAction class handle Exceptions?

I should forward an ApplicationException to MyAction class and then,
MyAction finds an appropriate jsp based on the message in
ApplicationException. But, how can I know the SQLException thrown by
persistance tire is duplicate entery SQLException or other SQLException?
Thanks.


- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 2:45 PM
Subject: RE: Newbie question: how does MyAction class handle Exceptions?


> Return a forward appropriate to the exception caught?
>
> -Original Message-
> From: Leon [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 2:45 PM
> To: Struts Users Mailing List
> Subject: Newbie question: how does MyAction class handle Exceptions?
>
>
> Hi,
>
> I have DataAccessException thrown by DAO class and catched by
> BusinessDeligate class. ApplicationException thrown by BusinessDeligate
> class and catched by MyAction class. I want to send a jsp to clients to
> display a message that the clients submit a duplicate entry in their
> request. What should I do for this?
> Thanx.
>
> Leon
>
> -
> 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]

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



Struts configuration via api

2003-05-27 Thread Geoff Apps
I am trying to add to the struts configuration file programatically inside a
plugin.

The following plugin code compiles and runs,

public void init(ActionServlet action, ModuleConfig config)
{
actionConfig = new ActionConfig();
actionConfig.setPath("/Login");
actionConfig.setType("com.support.struts.security.LoginAction");
actionConfig.setValidate(false);
config.addActionConfig(actionConfig);
}

however, the path /Login is not recognised at runtime. Does anyone have any
ideas on this ???

I am trying to avoid the need to add mappings like the following to every
struts-config file for each application we build.



   
    
 


My idea was to extend what is defined in the struts-config file for each
application with action mappings that are common. This makes our job a
little easier, and ensures that important areas like security are handled
consistently.

Perhaps there is a better way ???

Cheers,

Geoff Apps



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



RE: what the wrong withis?

2003-05-27 Thread Wendy Smoak
> waht the wrong with following code, it doesn't work.
> can't we use  inside any other struts tag?
>  property="gender"/>"
>  labelProperty="description" />
> 

No, you cannot nest tags like that.  

But if all you're trying to do is pre-select a certain value in your select
list, all you have to do is populate the form bean with the value, and
Struts will render the HTML with the proper one selected.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management


Re: [OT] I'm tired of restarting tomcat!

2003-05-27 Thread Johan
He Fabio,
For answering this question you included not enough data. Since this is 
a question quite of topic you can search the tomcat mailing lists. But 
you can also mail me the complete exception and of cource the server.xml 
of your tomcat installation. If you use tomcat in combination with 
apache be sure you compiled the connector stuff on the computer you're 
using.

I had a lot of trouble with connection reset when using a pre-compiled 
version of the mod_jk for apache. But I can't make up what you're using.

Feel free to mail your stuff.

Johan

Fabio Mancinelli wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello all,

this is somewhat off-topic but I don't know why I have this behaviour.
I deployed my struts application on tomcat 4.1.18 and randomly, it stops
serving requests (it waits forever on index.jsp).
In the log files I always notice an exception:
003-05-27 16:30:09 StandardWrapperValve[default]: Servlet.service() for servlet 
default threw exception
java.net.SocketException: Connection reset
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuff
...
The only way to restore the normal behaviour is to restart tomcat.

Does anyone know why I get this behaviour?

A presto,
Fabio
- -- 
- ---
 Fabio Mancinelli, PhD student   EMail : [EMAIL PROTECTED]
 Dipartimento di Informatica   WWW : http://www.di.univaq.it/~mancinel
 Universita' dell'Aquila
- ---

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.75-6
iD8DBQE+04t76dsQbk2R3cMRAgHrAKCjXY+NqIChZrIhZsCNw7/923Fb+ACghEFq
+/DiCrnBlm2xQCZarq9gr+A=
=Yu0y
-END PGP SIGNATURE-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Nilling Software Design
Postbus 43
2280 AA  Rijswijk ZH
w: http://www.nilling.nl
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: How to refer to the name of the form within a block?

2003-05-27 Thread Sukhenko, Mikhail (Contr)
you don't need to, leave the "name" attribute out, the iterate tag will
automatically associate name with the name of the form that it is inside.

Hope this helps


-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:44 PM
To: 'Struts Users Mailing List'
Subject: How to refer to the name of the form within a 
block?


Is there a way to refer or get the name of the form inside the
 ?
I am trying to do something like the following:



??
Property="items">
...


 

Thanks,

Erez



-
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: Why should I...?[Fwd: Não é possível entregar: Execute some method before tiles redering... HOW?]

2003-05-27 Thread Johan
I contacted the postmaster with instructions how to remove him/her of 
the list or to please check the diskquota

Johan

James Mitchell wrote:

You didn't receive that message from "mailling list service".  It came from
CKhimjee's mail server.

--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org


- Original Message -
From: "José Fortunato H. Tomás" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 4:07 AM
Subject: Why should I...?[Fwd: Não é possível entregar: Execute some method
before tiles redering... HOW?]


Why should I receive this error from mailling list service?
Thanks!
 Original Message 
From: - Tue May 27 09:05:19 2003
X-UIDL: AAArfpHohnbVy9K5ny03w16p2FH5
X-Mozilla-Status: 0001
X-Mozilla-Status2: 1000
Received: from ns.link.pt ([194.117.36.1]) by correio.link.pt with
Microsoft

SMTPSVC(5.0.2195.5329); Tue, 27 May 2003 08:58:47 +0100
Received: from smtp.imperialonline.co.za (outbound.impol.net
[196.25.56.132]

(may be forged)) by ns.link.pt (8.9.1/8.9.1) with ESMTP id IAA01072 for
<[EMAIL PROTECTED]>; Tue, 27 May 2003 08:58:35 +0100
Received: from [192.168.22.14] (helo=lotus_notes.impfleet.co.za) by
smtp.imperialonline.co.za with esmtp (Exim 3.36 #2) id 19KZJN-0007PW-00
for

[EMAIL PROTECTED]; Tue, 27 May 2003 09:55:57 +0200
MIME-Version: 1.0
Content-Type: multipart/report;
boundary="_=_NextPart_001_01C32425.CE446CE4";
report-type=delivery-status

Received: from smtp.imperialonline.co.za ([10.20.30.26])  by
impfleet.co.za (Lotus Domino Release 5.0.2c (Intl))  with ESMTP id
2003052709494341:2536 ;  Tue, 27 May 2003 09:49:43 +0200
Received: from [196.15.171.23] (helo=ns1.impol.net) by
smtp.imperialonline.co.za

with esmtp (Exim 3.36 #2) id 19KZIj-0006Gy-00 for [EMAIL PROTECTED];
Tue,

27 May 2003 09:55:17 +0200
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
Received: from [196.23.15.36] (helo=tanntjhb.bynx.com) by ns1.impol.net
with

esmtp (Exim 4.14) id 19KZ0u-0008CF-N1 for [EMAIL PROTECTED]; Tue, 27
May

2003 09:36:54 +0200
Received: by tanntjhb with Internet Mail Service (5.5.2653.19) id
;

Tue, 27 May 2003 09:52:45 +0200
Received: from apache.org (daedalus.apache.org [208.185.179.12]) by
tanntjhb.bynx.com with SMTP (Microsoft Exchange Internet Mail Service
Version

5.5.2653.13) id LXMPPVTB; Tue, 27 May 2003 09:52:38 +0200
Received: (qmail 70880 invoked by uid 500); 27 May 2003 07:55:57 -
Received: (qmail 70867 invoked from network); 27 May 2003 07:55:56 -
Received: from ns.link.pt (194.117.36.1)  by daedalus.apache.org with
SMTP; 27

May 2003 07:55:56 -
Received: from ns-in.link.pt (ns-in.link.pt [192.168.2.1]) by ns.link.pt
(8.9.1/8.9.1) with ESMTP id IAA01037 for <[EMAIL PROTECTED]>;
Tue,

27 May 2003 08:56:07 +0100
Received: from correio.link.pt (correio.link.pt [192.168.2.26]) by
ns-in.link.pt

(8.9.3/8.9.3) with SMTP id IAA06134 for <[EMAIL PROTECTED]>;
Tue,

27 May 2003 08:56:52 +0100
Received: from link.pt ([192.168.24.11]) by correio.link.pt with Microsoft
SMTPSVC(5.0.2195.5329); Tue, 27 May 2003 08:55:37 +0100
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
List-Post: 
List-Id: "Struts Users Mailing List" 
Delivered-To: mailing list [EMAIL PROTECTED]
Organization: Link Consulting
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a)
Gecko/20030401

X-Accept-Language: en-us, en, pt
X-OriginalArrivalTime: 27 May 2003 07:55:37.0201 (UTC)
FILETIME=[5BFA0E10:01C32425]

X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-MIMETrack: Itemize by SMTP Server on
Impnotes.impfleet.co.za/Impfleet(Release

5.0.2c (Intl)|2 February 2000) at 27/05/2003 09:49:43 AM,Serialize by
Router on

rtgnotes.impfleet.co.za/Impfleet(Release 5.0.8 |June 18, 2001) at
05/27/2003

10:04:01 AM,Serialize complete at 05/27/2003 10:04:01 AM
Return-Path:
content-class: urn:content-classes:dsn
Subject: Não é possível entregar: Execute some method before tiles
redering... HOW?

Date: Tue, 27 May 2003 08:58:48 +0100
Message-ID: <[EMAIL PROTECTED]>
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
Thread-Topic: Execute some method before tiles redering... HOW?
Thread-Index: AcMkJc4/hzgiqU5tSB2+EIcsnfWp8wFr
List-Help: 
List-Subscribe: 
List-Unsubscribe: 
From: Administrador de sistema <[EMAIL PROTECTED]>
To: José Fortunato Henriques Tomás <[EMAIL PROTECTED]>
Your message

  To:  [EMAIL PROTECTED]
  Subject: Execute some method before tiles redering... HOW?
  Sent:Tue, 27 May 2003 08:55:42 +0100
did not reach the following recipient(s):

[EMAIL PROTECTED] on Tue, 27 May 2003 08:55:42 +0100
O sistema de correio electrónico não consegui entregar esta
mensagem, mas não comunicou uma razão específica. Verifique o endereço e
tente novamente. Se continuar a falhar, contacte o administrador de
sistema.



--
José Tomás
LINK Consulting SA - 

RE: How to refer to the name of the form within a blo ck?

2003-05-27 Thread Erez Efrati
Thanks for the reply, but it doesn't work if I remove the
'name=myFormName' part. Should I be using the nested:iterate tag? 

Erez

-Original Message-
From: Sukhenko, Mikhail (Contr) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2003 12:30 AM
To: 'Struts Users Mailing List'
Subject: RE: How to refer to the name of the form within a 
blo ck?

you don't need to, leave the "name" attribute out, the iterate tag will
automatically associate name with the name of the form that it is
inside.

Hope this helps


-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:44 PM
To: 'Struts Users Mailing List'
Subject: How to refer to the name of the form within a 
block?


Is there a way to refer or get the name of the form inside the
 ?
I am trying to do something like the following:



??
Property="items">
...


 

Thanks,

Erez



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



Do I need an Action to call forms from a list box?

2003-05-27 Thread Barry Volpe
Hi,

Creating a list box as follows:

Selection A  (calls form A)
Selection B  (calls form B)
Selection C   (calls form C)

The solution that comes to mind is create an action and depending
on which selection is made define and call the foward for the appropriate form.

Anyway of doing this without an action?  What is the struts way of doing this?


Thanks,
Barry



RE: How to refer to the name of the form within a blo ck?

2003-05-27 Thread Erez Efrati
Ok it's working when I am using the  tag.

-- Erez

-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2003 1:38 AM
To: 'Struts Users Mailing List'
Subject: RE: How to refer to the name of the form within a 
blo ck?

Thanks for the reply, but it doesn't work if I remove the
'name=myFormName' part. Should I be using the nested:iterate tag? 

Erez

-Original Message-
From: Sukhenko, Mikhail (Contr) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2003 12:30 AM
To: 'Struts Users Mailing List'
Subject: RE: How to refer to the name of the form within a 
blo ck?

you don't need to, leave the "name" attribute out, the iterate tag will
automatically associate name with the name of the form that it is
inside.

Hope this helps


-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:44 PM
To: 'Struts Users Mailing List'
Subject: How to refer to the name of the form within a 
block?


Is there a way to refer or get the name of the form inside the
 ?
I am trying to do something like the following:



??
Property="items">
...


 

Thanks,

Erez



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



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



html:link - a real pain!

2003-05-27 Thread brian jf
Hi all,

I've had it with html:link. I just can't get the thing to work how I want.

I have created a String within my jsp which I want to forward to my action 
using html:link

eg:
<% String myString = "some value" %>

 some text

doesn't work - says it can't find a bean named myString

I've tried EVERY possible thing eg:


 some text


doesn't work - it looks for a bean named "some value"

Help please!

thanks,
Brian
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


RE: Parameters v form beans (again!)

2003-05-27 Thread Mike Whittaker
>
>But I think you really take a step back if you are going to tie all of your
>code to the request map.  You'll lose the validation capabilities
>of struts and
>the pre-population of forms.

So in fact the ONLY reasoning behind ActionForms is that you can easily
prepopulate?
And I don't see how validation is made any easier.  Unless of course Struts
magically knows better than I do what my data should look like!

So really if I decide the advantages just don't add up for my use, then I
can ditch the ActionForm and the tags, but I do still like the tags like
, can't see why I can't use those.

So the only tags that rely on a Form Bean are those that accept user input?

>If you were going to use
>DynaActionForms, you'll
>lose some typecasting like with type="java.lang.Integer[]" />.
>
>Mike Whittaker wrote:
>
>> I know I've been here before, but it is my main sticking point.
>>
>> Does anyone JUST use the Form Beans as a html form backend,
>> whether that is for pre population or validation or both.
>>
>> BUT
>>
>> Then decide that is easier to use the request parameters as a
>java.util.Map
>> in the business layer.
>>
>> I know I can do this, I'm just looking for some moral support :-)
>>
>> Is in fact the ONLY reasoning behind ActionForms that you can easily
>> prepopulate.

Any more takers?


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



role - tiles definition?

2003-05-27 Thread "José Fortunato H. Tomás"
Hi!

I read the tilesAdvancedFeatures.pdf in some fast way.
At end I see (9.2) a reference to role for tiles definition. I look backwords in 
the document I could find any mension of how it works, or how it should be used.

Any one has a reference or could tell how this role works, or how I should use it?

Thanks.

--
José Tomás
LINK Consulting SA - http://www.link.pt
UPI - Unidade de Portais e Intranets
Av. Duque D'Ávila 23 5º Dto. - 1000-138 Lisboa
Telf: (+351) 213 100 095
Telm: (+351) 964 324 814


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


RE: html:link - a real pain!

2003-05-27 Thread Steve Raeburn
It wants a bean, so give it a bean ;-)



  some text


Steve

> -Original Message-
> From: brian jf [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 3:55 PM
> To: [EMAIL PROTECTED]
> Subject: html:link - a real pain!
>
>
> Hi all,
>
> I've had it with html:link. I just can't get the thing to work how I want.
>
> I have created a String within my jsp which I want to forward to
> my action
> using html:link
>
> eg:
> <% String myString = "some value" %>
>
> 
>   some text
> 
>
> doesn't work - says it can't find a bean named myString
>
> I've tried EVERY possible thing eg:
>
>  paramName="<%=myString%>">
>   some text
> 
>
> doesn't work - it looks for a bean named "some value"
>
> Help please!
>
> thanks,
> Brian
>
> _
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> -
> 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]



Do I need an Action to call forms from a list box?

2003-05-27 Thread Barry Volpe
Hi,

Creating a list box as follows:

Selection A  (calls form A)
Selection B  (calls form B)
Selection C   (calls form C)

The solution that comes to mind is create an action and depending
on which selection is made define and call the foward for the appropriate form.

Anyway of doing this without an action?  What is the struts way of doing this?


Thanks,
Barry




UnavailableException: Parsing error processing resource path

2003-05-27 Thread ross
Is there a way find out which file is causing the following error.  have been over 
web.xml, tiles-def.xml and struts-config.xml commenting out each section but can't 
find the problem.  Is there somewhere else I should be looking?

What other information would be needed to help me find this?

I am trying to set up stuts/tiles to run on Tomcat 4.1


javax.servlet.UnavailableException: Parsing error processing resource path 
at 
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:952)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
at 
org.apache.struts.tiles.ActionComponentServlet.init(ActionComponentServlet.java:103)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)

Regards

Ross Rotherham

Re: Parameters v form beans (again!)

2003-05-27 Thread Mark Lowe
umm..

i'm afraid you wont have any moral support from me. your not only 
talking about html forms but a way of thinking about systems in an 
understandable way from a number of different perspectives. Form beans 
give a convenient way of representing a form both to programmers and 
site builders.

the principle to my mind is a bit like punks who still talk about 
cookies and not sessions. personally i'm pretty stupid, I don't want to 
think about cookies i want to think about sessions. likewise i prefer 
to think about "forms" not parameter maps.

now thinking in parameters is a handy thing, you can think like this 
and solve problems in asp, php, jsp, and perl (and i imagine others), 
from this point of view i sympathise with your position, just not very 
much.

although i don't use an IDE (because they confuse me) i think its 
important to follow patterns in such a way that folks that do can see 
what's going one with my code. Now to my reckoning using the param map 
isn't going to play the game in the same way (i could be wrong), also 
the struts form tags could also work with an IDE.

there's more.. but i wanna play pool on pogo..

cheers mark

On Wednesday, May 28, 2003, at 00:05 Europe/London, Mike Whittaker 
wrote:

But I think you really take a step back if you are going to tie all 
of your
code to the request map.  You'll lose the validation capabilities
of struts and
the pre-population of forms.
So in fact the ONLY reasoning behind ActionForms is that you can easily
prepopulate?
And I don't see how validation is made any easier.  Unless of course 
Struts
magically knows better than I do what my data should look like!

So really if I decide the advantages just don't add up for my use, 
then I
can ditch the ActionForm and the tags, but I do still like the tags 
like
, can't see why I can't use those.

So the only tags that rely on a Form Bean are those that accept user 
input?

If you were going to use
DynaActionForms, you'll
lose some typecasting like with .
Mike Whittaker wrote:

I know I've been here before, but it is my main sticking point.

Does anyone JUST use the Form Beans as a html form backend,
whether that is for pre population or validation or both.
BUT

Then decide that is easier to use the request parameters as a
java.util.Map
in the business layer.

I know I can do this, I'm just looking for some moral support :-)

Is in fact the ONLY reasoning behind ActionForms that you can easily
prepopulate.
Any more takers?

-
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: UnavailableException: Parsing error processing resource path

2003-05-27 Thread Mark Lowe
if you get stuts console it validates you tiles, struts and validator  
xml files. Might save you some time..

http://www.jamesholmes.com/struts/

cheers mark

On Wednesday, May 28, 2003, at 01:04 Europe/London, <[EMAIL PROTECTED]>  
wrote:

Is there a way find out which file is causing the following error.   
have been over web.xml, tiles-def.xml and struts-config.xml commenting  
out each section but can't find the problem.  Is there somewhere else  
I should be looking?

What other information would be needed to help me find this?

I am trying to set up stuts/tiles to run on Tomcat 4.1

javax.servlet.UnavailableException: Parsing error processing resource  
path
	at  
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.j 
ava:952)
	at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
	at  
org.apache.struts.tiles.ActionComponentServlet.init(ActionComponentServ 
let.java:103)
	at javax.servlet.GenericServlet.init(GenericServlet.java:256)

Regards

Ross Rotherham


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


How can I call forms from a list box?

2003-05-27 Thread Barry Volpe
Hi,

Creating a list box as follows:

Selection A  (calls form A)
Selection B  (calls form B)
Selection C   (calls form C)

The solution that comes to mind is create an action and depending
on which selection is made define and call the foward for the appropriate form.

Anyway of doing this without an action?  What is the struts way of doing this?


Thanks,
Barry



Re: Problem Validating Integer

2003-05-27 Thread Victor J. Soares
FYI for anybody that runs into this same *issue*

I found the problem with my form validation not validating an integer 
field correctly. The problem was in the  for the form 
field. I had declared it as "java.lang.Integer", but when I changed it 
to "java.lang.String" it worked perfect.

In the struts-config.xml it should be:

 
 
 
 
NOT:

 
 
 
 
- vic

Victor J. Soares wrote:
Hello,
I am learning how to use the DynaValidatorForm and Validtor, but I have 
run into a problem I can't figure out:

One of the fields in the form is of type "Integer". The validation rules 
I set up check to see if (1) the a value has been given (required) (2) 
the value given is an integer.

I submit the form, but the validation doesn't catch either of those 
cases and return the form populated with "0".

Can somebody clue me in on Integer validation?

thanks,
- vic
Below are the snippets from the pertinent configs:

struts-config.xml-




---
validation.xml---







resource="false"/>

maxlength
16


minlength
3







---


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


programmatic security w/o JAAS?

2003-05-27 Thread Fisher Trent
This seems like a possiblity to me, but let me
elaborate.  

95% of the security for my application will be
utilizing the concept of Role properties on
ActionMapping objects to limit access to the protected
resource. (this would be declaritive if I'm not
mistaken).

The other 5% of my security involves showing/hiding
links on certain pages based on the user's role (ex:
only show the link to the Admin menu if the user has
the Administrator role).  That task I would assume
would be accomplished using the code:


... show links only a Admin should see ...
  

My question is, if I want to perform minimal
programmatic checks such as above, what is the
generally accepted token that the logic should check
in session?  If the login ActionForm is placed into
session as the "User Object", then that wouldn't
necessarily contain a "Role" attribute and that would
have to be somewhere else?

Thanks in advance

__
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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



what is wrong here?

2003-05-27 Thread Erez Efrati

I keep getting errors on the following: (I am using 1.1 beta 3)



Can someone tell me what is wrong here? 
Thanks,
Erez



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



How to call forms from list box without action?

2003-05-27 Thread Barry Volpe
The following works but I was wondering if there is an easier way?


  
Select-A-Category 
Form A 
Form B 
Form C 

  
 


//In my action

String target = new String(request.getParameter("category"));


//In my action form

public class CategoryForm extends ActionForm {

  protected String category;  

  public void setCategory(String category) {

this.category = category;
  }

  public String getCategory() {

return category;
  }


//Now the ugly part in my STRUTS-CONFIG:



   
   
   
   

Is there an easier way?  Doesn't seem right to define multiple fowards in the 
struts-config.

Thanks,
Barry




RE: what is wrong here?

2003-05-27 Thread Steve Raeburn
I vaguely remember something about the JSP processor not converting to a
String when you use an expression inside a tag like that. Someone els emay
have the details. Anyway this works:



Steve

> -Original Message-
> From: Erez Efrati [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 6:44 PM
> To: 'Struts Users Mailing List'
> Subject: what is wrong here?
>
>
>
> I keep getting errors on the following: (I am using 1.1 beta 3)
>
> 
>
> Can someone tell me what is wrong here?
> Thanks,
> Erez
>
>
>
> -
> 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: problems with Tiles regarding the relative links

2003-05-27 Thread Tin Pham
Well one solution is indeed as Mark mentions, to use exclusively struts tags
for linking.

I solved it by placing the template file at the root of my web folder. I
notice you're using the html base tag so that would make all your links then
relative to the root.

Then you require the forward slash then, so to reference an image in
/images/a.gif  you would use src="images/a.gif"




"Ionel Gardais" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I am facing a problem using tiles.
> If I have a link in a page which is supposed to be relative to the
> holding tile, the effective link is relative to the template JSP file
> path provided in the tiles-def.xml
>
> let say I have two files, template.jsp and link.jsp
>
> template.jsp
> 
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
>
> 
>  
>key="page.title"/><%=request.getUserPrincipal().getName()%>
>   
>  
>  
>
>  
>  
> 
>
> link.jsp
> 
> 
onclick="window.open('choose_date.jsp?for=Debut','date','width=400,height=20
0,toolbar=no,location=no,menubar=no');">click
> the link
>
> tile-def.xml
> 
> 
>   
> 
>   
> 
>
> When I try to click the link declared in link.jsp, it is relative to
> template.jsp instead of link.jsp which is very problematic to me.
>
> Is there a solution to this ?
>
> thanks,
> ionel




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



session

2003-05-27 Thread Susana Ruiz Mata
How do I obtain the session made in one servlet from another servlet??

RE: session

2003-05-27 Thread Steve Raeburn
Just use request.getSession(). The session is not specific to a servlet but
to the user. Each time they send a request to the server their session id is
sent in the request (via a cookie or url rewriting). You can retrieve the
session in any servlet using request.getSession()

Steve


> -Original Message-
> From: Susana Ruiz Mata [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 7:24 PM
> To: [EMAIL PROTECTED]
> Subject: session
>
>
> How do I obtain the session made in one servlet from another servlet??


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



Basic CRUD

2003-05-27 Thread emiles
I am putting together a simple web app that performs CRUD operations on a
database table.  The web app consists of 1 jsp page which handles all CRUD
actions.  The first part of the page contains a form with 2 fields and
'create' and 'retrieve' buttons.  Both these functions work fine.  When a
'retrieve' (select id,field1,field2 from table1) is done, a table is
rendered with the resultset on the same page.  For each record of the
recordset, there exists an 'update' and 'delete' button.  The problem is
how do I tell my action class which record to act on?

class MyFormBean extends ActionForm {
   private MyBean myBean;
   private ArrayList myBeanList;
}

class MyBean {
   private Long id;
   private String field1;
   private String field2;
}


The idea is to manage this 1 particular db table from a single view with a
single action class extended from LookupDispatchAction.  I've tried
several ways with no success.  I've tried using 1 form that includes
everything.  I've tried using a form for each record.  I've tried using
the nested taglib.  I believe this is view/jsp/taglib problem since the
actions are firing correctly.  How can I populate 'myBean' with the data
of the corresponding record from which the 'update' or 'delete' buttons
were clicked?

I prefer not to use checkboxes with a global 'update' and 'delete' button.
 I prefer not to use javascript (I'm not a big fan of this scripting
language and only use it when absolutely necessary, which is rare).  I
prefer not to go to a second page to "edit".

Can this be done exclusively within Struts?

Thanks in advance.
-Eric


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



Basic CRUD

2003-05-27 Thread emiles
I am putting together a simple web app that performs CRUD operations on a
database table.  The web app consists of 1 jsp page which handles all CRUD
actions.  The first part of the page contains a form with 2 fields and
'create' and 'retrieve' buttons.  Both these functions work fine.  When a
'retrieve' (select id,field1,field2 from table1) is done, a table is
rendered with the resultset on the same page.  For each record of the
recordset, there exists an 'update' and 'delete' button.  The problem is
how do I tell my action class which record to act on?

class MyFormBean extends ActionForm {
   private MyBean myBean;
   private ArrayList myBeanList;
}

class MyBean {
   private Long id;
   private String field1;
   private String field2;
}


The idea is to manage this 1 particular db table from a single view with a
single action class extended from LookupDispatchAction.  I've tried
several ways with no success.  I've tried using 1 form that includes
everything.  I've tried using a form for each record.  I've tried using
the nested taglib.  I believe this is view/jsp/taglib problem since the
actions are firing correctly.  How can I populate 'myBean' with the data
of the corresponding record from which the 'update' or 'delete' buttons
were clicked?

I prefer not to use checkboxes with a global 'update' and 'delete' button.
 I prefer not to use javascript (I'm not a big fan of this scripting
language and only use it when absolutely necessary, which is rare).  I
prefer not to go to a second page to "edit".

Can this be done exclusively within Struts?

Thanks in advance.
-Eric


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



LookupDispatchAction and getParameter

2003-05-27 Thread Gregory F. March

Hi all.  Typical standard disclaimers apply... I'm new to struts, I'm
having problems, I hope you all can help, thanks in advance, etc. :-)

Here's my problem.

I have a form with multiple submit buttons.  I'm trying to set up a
LookupDispatchAction.  It seems that

request.getParameter(mapping.getParameter())

is always returning null so I can't get to my actions.

My (highly trimmed down) code is below.  Any help would be appreciated.

Many thanks...

/greg


--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet

--
CreateParticipants.jsp:


  
  

  


--
struts-config.xml:

  
  parameter="action" />
  

  

  
  

--
SaveItemAction.java

public class SaveItemAction extends LookupDispatchAction  {

/**
 * Create a map for the lookup dispatch method
 */

protected Map getKeyMethodMap() {
Map map = new HashMap();

map.put("create.save", "doSave");

return map;
}

public ActionForward execute(ActionMapping   mapping,
 ActionForm  form,
 HttpServletRequest  request,
 HttpServletResponse response)
throws Exception {
DynaActionForm daform= (DynaActionForm) form;
ActionForward  forward   = null;

if(request.getParameter(mapping.getParameter()) == null) {
//required parameter is missing!

// This is ALWAYS null!!!

System.out.println("Failure!");
return(mapping.findForward("Failure"));
}

return(super.execute(mapping, form, request, response));
}

/**
 * Process "save"
 */

public ActionForward doSave(ActionMapping   mapping,
ActionForm  form,
HttpServletRequest  request,
HttpServletResponse response)
throws Exception {

// Return success

return(mapping.findForward("Success"));
}
}

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



RE: what is wrong here?

2003-05-27 Thread Mark Galbreath
Well, for one thing, review your JSP.  <%= xxx %> is a synonym for
"out.println."  It cannot render calculations at runtime.  You have to have
a function to do that, like <%= calculate( 6/4+1 ) %>.

Mark

> -Original Message-
> From: Erez Efrati [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 6:44 PM
> To: 'Struts Users Mailing List'
> Subject: what is wrong here?
>
>
>
> I keep getting errors on the following: (I am using 1.1 beta 3)
>
> 
>
> Can someone tell me what is wrong here?
> Thanks,
> Erez



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



Re: Struts Performance - Any Benchmarks?

2003-05-27 Thread Tin Pham
Hi David, Craig,

Thanks for your replies. I will forward them to my team.

I made the same points about multi-threading verbally and following up with
research and references for the team.

They seem to be itching for benchmarks though, so I'll give it to them by
building a single, then multi-servlet app and using Introscope with some
load test simulators. I was hoping somebody in a situation such as myself
already had done it.

Now the next matter of opposition I'm getting is does struts work well in a
distributed environment for example load balancing. I will post this a
separate thread with what I have told them already.

"Craig R. McClanahan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> On Thu, 22 May 2003, Tin Pham wrote:
>
> > Date: Thu, 22 May 2003 00:09:09 -0400
> > From: Tin Pham <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Struts Performance - Any Benchmarks?
> >
> > Hi, I have been scouring the internet with no results.
> >
> > Does anybody have any resources on the performance of Struts
applications.
> > Any
> > benchmarks versus standard development.
> >
> > One "bottle-neck" brought up by members of my team is the single action
> > servlet everything must pass through. Are there currently or going to be
> > programming solutions to this?
> >
>
> If your team believes that this issue is a bottleneck, then some training
> and a more complete understanding of how multithreading works in Java
> might be appropriate -- the fact that a single instance of the action
> servlet (and of the actions themselves) has zero impact on performance,
> and it reduces memory consumption of your app by avoiding useless extra
> copies.
>
> > For example, maybe we can have more than one action servlet and use a
> > different mapping.. ie, instead of *.do, *.jspx ? But then would global
> > forwards from the two different actions still work?
> >
>
> This won't work, but not for performance reasons -- Struts supports only a
> single mapping to the controller servlet, and only one controller servlet
> per webapp.
>
> > Personally, I argue that we should simply go to load balancing if it
comes
> > to
> > that and adding more servlets wouldn't do much anyway. From my
rudimentary
> > undestanding of java servlets, other resources will choke on you way
before
> > the single servlet chokes anyhow.
> >
>
> See above -- the most important factors in webapp performance have nothing
> to do with this issue at all.  In fact, the most important factors are
> typically:
>
> * Overall application architecture (things like caching where it is
>   appropriate, but not doing premature optimization -- there are lots
>   of good books on optimizing server-side Java apps around to draw
>   ideas from).
>
> * Database performance (be sure to use connection pooling effectively)
>
> * Network performance
>
> * The quality of the code generated by your JSP page compiler
>   for pages using lots of custom tags.
>
> Craig McClanahan




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



Re: LookupDispatchAction and getParameter

2003-05-27 Thread Eric Miles
Don't override the execute method, the LookupDispatchAction will call
'doSave' automatically.  Simply comment out your execute method.

-Eric

--- In [EMAIL PROTECTED], "Gregory F. March" <[EMAIL PROTECTED]> wrote:
> 
> Hi all.  Typical standard disclaimers apply... I'm new to struts, I'm
> having problems, I hope you all can help, thanks in advance, etc. :-)
> 
> Here's my problem.
> 
> I have a form with multiple submit buttons.  I'm trying to set up a
> LookupDispatchAction.  It seems that
> 
> request.getParameter(mapping.getParameter())
> 
> is always returning null so I can't get to my actions.
> 
> My (highly trimmed down) code is below.  Any help would be appreciated.
> 
> Many thanks...
> 
> /greg
> 
> 
> --
> Gregory F. March-=-http://www.gfm.net:81/~march-=-   
AIM:GfmNet
> 
>
--
> CreateParticipants.jsp:
> 
> 
>onChange="javascript:this.value=this.value.toUpperCase();"
> value="" tabindex="5" />
>   
> 
>   
> 
> 
>
--
> struts-config.xml:
> 
>  path="/SaveItem"
>   type="com.mycompany.SaveItemAction"
>   scope="session"
>   name="MyCreateForm"
>   validate="true"
>   input="/CreateParticipants.jsp" >
>   parameter="action" />
>   
> 
>  name="MyCreateForm"
>   type="org.apache.struts.action.DynaActionForm">
> 
>   
>   
> 
>
--
> SaveItemAction.java
> 
> public class SaveItemAction extends LookupDispatchAction  {
> 
> /**
>  * Create a map for the lookup dispatch method
>  */
> 
> protected Map getKeyMethodMap() {
> Map map = new HashMap();
> 
> map.put("create.save", "doSave");
> 
> return map;
> }
> 
> public ActionForward execute(ActionMapping   mapping,
>  ActionForm  form,
>  HttpServletRequest  request,
>  HttpServletResponse response)
> throws Exception {
> DynaActionForm daform= (DynaActionForm) form;
> ActionForward  forward   = null;
> 
> if(request.getParameter(mapping.getParameter()) == null) {
> //required parameter is missing!
> 
> // This is ALWAYS null!!!
> 
> System.out.println("Failure!");
> return(mapping.findForward("Failure"));
> }
> 
> return(super.execute(mapping, form, request, response));
> }
> 
> /**
>  * Process "save"
>  */
> 
> public ActionForward doSave(ActionMapping   mapping,
> ActionForm  form,
> HttpServletRequest  request,
> HttpServletResponse response)
> throws Exception {
> 
> // Return success
> 
> return(mapping.findForward("Success"));
> }
> }
> 
> -
> 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]



Struts In A Distributed\Clustered Environment.

2003-05-27 Thread Tin Pham
Hi,

Has anybody successfully managed to use Struts in a distributed\clustered
environment? If so with what setup? And did you have any Struts related
difficulties?

Thanks,

Tin





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



Re: LookupDispatchAction and getParameter

2003-05-27 Thread Eric Miles
or try getParameter("action") in your execute method.  The URL for the
request looks like "http://...?action=doSave"; internally.

-Eric


--- In [EMAIL PROTECTED], "Eric Miles" <[EMAIL PROTECTED]> wrote:
> Don't override the execute method, the LookupDispatchAction will call
> 'doSave' automatically.  Simply comment out your execute method.
> 
> -Eric
> 
> --- In [EMAIL PROTECTED], "Gregory F. March" <[EMAIL PROTECTED]> wrote:
> > 
> > Hi all.  Typical standard disclaimers apply... I'm new to struts, I'm
> > having problems, I hope you all can help, thanks in advance, etc. :-)
> > 
> > Here's my problem.
> > 
> > I have a form with multiple submit buttons.  I'm trying to set up a
> > LookupDispatchAction.  It seems that
> > 
> > request.getParameter(mapping.getParameter())
> > 
> > is always returning null so I can't get to my actions.
> > 
> > My (highly trimmed down) code is below.  Any help would be
appreciated.
> > 
> > Many thanks...
> > 
> > /greg
> > 
> > 
> > --
> > Gregory F. March-=-http://www.gfm.net:81/~march-=-   
> AIM:GfmNet
> > 
> >
>
--
> > CreateParticipants.jsp:
> > 
> > 
> >> onChange="javascript:this.value=this.value.toUpperCase();"
> > value="" tabindex="5" />
> >   
> > 
> >   
> > 
> > 
> >
>
--
> > struts-config.xml:
> > 
> >>   path="/SaveItem"
> >   type="com.mycompany.SaveItemAction"
> >   scope="session"
> >   name="MyCreateForm"
> >   validate="true"
> >   input="/CreateParticipants.jsp" >
> >   parameter="action" />
> >   
> > 
> >>   name="MyCreateForm"
> >   type="org.apache.struts.action.DynaActionForm">
> > 
> >   
> >   
> > 
> >
>
--
> > SaveItemAction.java
> > 
> > public class SaveItemAction extends LookupDispatchAction  {
> > 
> > /**
> >  * Create a map for the lookup dispatch method
> >  */
> > 
> > protected Map getKeyMethodMap() {
> > Map map = new HashMap();
> > 
> > map.put("create.save", "doSave");
> > 
> > return map;
> > }
> > 
> > public ActionForward execute(ActionMapping   mapping,
> >  ActionForm  form,
> >  HttpServletRequest  request,
> >  HttpServletResponse response)
> > throws Exception {
> > DynaActionForm daform= (DynaActionForm) form;
> > ActionForward  forward   = null;
> > 
> > if(request.getParameter(mapping.getParameter()) == null) {
> > //required parameter is missing!
> > 
> > // This is ALWAYS null!!!
> > 
> > System.out.println("Failure!");
> > return(mapping.findForward("Failure"));
> > }
> > 
> > return(super.execute(mapping, form, request, response));
> > }
> > 
> > /**
> >  * Process "save"
> >  */
> > 
> > public ActionForward doSave(ActionMapping   mapping,
> > ActionForm  form,
> > HttpServletRequest  request,
> > HttpServletResponse response)
> > throws Exception {
> > 
> > // Return success
> > 
> > return(mapping.findForward("Success"));
> > }
> > }
> > 
> > -
> > 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: what is wrong here?

2003-05-27 Thread Steve Raeburn
That's not true. 'System.out.println(6 / 4 + 1 );' outputs 2, as does <%= 6
/ 4 + 1 %>.
It just doesn't work when it's nested like that.

Steve


> -Original Message-
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 8:13 PM
> To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
> Subject: RE: what is wrong here?
>
>
> Well, for one thing, review your JSP.  <%= xxx %> is a synonym for
> "out.println."  It cannot render calculations at runtime.  You
> have to have
> a function to do that, like <%= calculate( 6/4+1 ) %>.
>
> Mark
>


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



Re: Struts Performance - Any Benchmarks?

2003-05-27 Thread David Graham
They seem to be itching for benchmarks though, so I'll give it to them by
building a single, then multi-servlet app and using Introscope with some
load test simulators. I was hoping somebody in a situation such as myself
already had done it.
It's a shame that you're required to do this because an explanation of how 
Java threading works should suffice.  Simply put, it doesn't matter how many 
servlet instances exist, it only matters how many threads are running 
through one instance at a time.

David

Now the next matter of opposition I'm getting is does struts work well in a
distributed environment for example load balancing. I will post this a
separate thread with what I have told them already.
"Craig R. McClanahan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> On Thu, 22 May 2003, Tin Pham wrote:
>
> > Date: Thu, 22 May 2003 00:09:09 -0400
> > From: Tin Pham <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Struts Performance - Any Benchmarks?
> >
> > Hi, I have been scouring the internet with no results.
> >
> > Does anybody have any resources on the performance of Struts
applications.
> > Any
> > benchmarks versus standard development.
> >
> > One "bottle-neck" brought up by members of my team is the single 
action
> > servlet everything must pass through. Are there currently or going to 
be
> > programming solutions to this?
> >
>
> If your team believes that this issue is a bottleneck, then some 
training
> and a more complete understanding of how multithreading works in Java
> might be appropriate -- the fact that a single instance of the action
> servlet (and of the actions themselves) has zero impact on performance,
> and it reduces memory consumption of your app by avoiding useless extra
> copies.
>
> > For example, maybe we can have more than one action servlet and use a
> > different mapping.. ie, instead of *.do, *.jspx ? But then would 
global
> > forwards from the two different actions still work?
> >
>
> This won't work, but not for performance reasons -- Struts supports only 
a
> single mapping to the controller servlet, and only one controller 
servlet
> per webapp.
>
> > Personally, I argue that we should simply go to load balancing if it
comes
> > to
> > that and adding more servlets wouldn't do much anyway. From my
rudimentary
> > undestanding of java servlets, other resources will choke on you way
before
> > the single servlet chokes anyhow.
> >
>
> See above -- the most important factors in webapp performance have 
nothing
> to do with this issue at all.  In fact, the most important factors are
> typically:
>
> * Overall application architecture (things like caching where it is
>   appropriate, but not doing premature optimization -- there are lots
>   of good books on optimizing server-side Java apps around to draw
>   ideas from).
>
> * Database performance (be sure to use connection pooling effectively)
>
> * Network performance
>
> * The quality of the code generated by your JSP page compiler
>   for pages using lots of custom tags.
>
> Craig McClanahan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


RE: what is wrong here?

2003-05-27 Thread Mark Galbreath
Ah f*ck...I've been working 16 hours straight and no end in site; got a
deadline to meet in the AM.  I'll review this tomorrow.

Mark

-Original Message-
From: Steve Raeburn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2003 11:41 PM
To: Struts Users Mailing List
Subject: RE: what is wrong here?


That's not true. 'System.out.println(6 / 4 + 1 );' outputs 2, as does <%= 6
/ 4 + 1 %>. It just doesn't work when it's nested like that.

Steve


> -Original Message-
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 8:13 PM
> To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
> Subject: RE: what is wrong here?
>
>
> Well, for one thing, review your JSP.  <%= xxx %> is a synonym for 
> "out.println."  It cannot render calculations at runtime.  You have to 
> have a function to do that, like <%= calculate( 6/4+1 ) %>.
>
> Mark
>


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



Could someone help me

2003-05-27 Thread Ken
I have two tables:one is question and another is answer. the table structure
list below:
QUESTION(questionId, questionText)
ANSWER(questionId, answerId, answerText)
and I must display the page like this:
Question 1: 
A ...
B ...
C ...

Question 2: 
A ...
B ...
C ...
D ...

I have load the data into Bean  question and answer in JSP,and code like
below:

  
  // retrieve corresponding answer bean here
  

 // how can i do to make radio name is questionId and the
value is answerId


  


Another question is that can i put the radio value into a HashMap which is a
FormBean's attribute and the key is radio's name? how can i implement it?

Best Regards,
ken




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



  1   2   >