RE: form problem

2003-01-02 Thread Sunkara Maheswara Rao
Try this...

U want to populate ur form bean before displaying the page so that those
values should be displayed ur formif this is the case...

Go to ActionBean class  directly where u can populate ur form bean and
forward to the jsp which u wantu can do this by making changes like
this in ur struts-config...

actionpath=/Header
   type=com.sony.squids.filtermenu.MainMenuAction
   name=MainMenuForm
  scope=session
  validate=false 
  forward name=success path=/Header.jsp/


and access the page using Header.do

hope this is helpful..

Mahesh..

-Original Message-
From: ss s ss [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 1:19 PM
To: [EMAIL PROTECTED]
Subject: form problem 

Hello,
   Happy new year to u all.
I needed some help. My problem we are using struts and the form is 
being called for generating some report .
Now this strut is being called from a HREF tag and there is no way 
I can intialise my form to generte the correct report.
I have tried this
% MyForm form = (MyForm)pageContext.getAttribute(form_name, 
PageContext.SOME_SCOPE);
form.setSomething(something); %

But this too gives me problems that it genrates the page on the 
next request
That is the first time i go to the page the form is not 
initialized .Now when i go back using the browser back button and 
click on the href again the report is there :(

Can some one help where I am missing some improtant property of 
struts.

Thanx for ur help in advance.

cheers
ss



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


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***


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


Re: form problem

2003-01-02 Thread Dan Tran
In your action:

snippet
-process your href value and generate report object
-stick the Report object to request object
-forward the action to an JSP page which will read
 out the Report object and display
/snippet

I dont think your sceniao need a form

-Dan
- Original Message -
From: ss s ss [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 01, 2003 11:48 PM
Subject: form problem


 Hello,
Happy new year to u all.
 I needed some help. My problem we are using struts and the form is
 being called for generating some report .
 Now this strut is being called from a HREF tag and there is no way
 I can intialise my form to generte the correct report.
 I have tried this
 % MyForm form = (MyForm)pageContext.getAttribute(form_name,
 PageContext.SOME_SCOPE);
 form.setSomething(something); %

 But this too gives me problems that it genrates the page on the
 next request
 That is the first time i go to the page the form is not
 initialized .Now when i go back using the browser back button and
 click on the href again the report is there :(

 Can some one help where I am missing some improtant property of
 struts.

 Thanx for ur help in advance.

 cheers
 ss



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


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




Refresh Problem

2003-01-02 Thread ashokd
Hi,

In my application, I has a form, after submitting the form, success page is coming.
When I refresh the success page, once again the previous form action is calling.
Anyone has an idea about this.
I tried in Action class putting some variable as false, even though i getting the same 
problem.

Thanks in Advance in resolving this problem.

Thanks  Regards,
Ashok.D




form problem

2003-01-02 Thread ss s ss
Hello agian,
Thanks Dan.
 I think you understood my problem. Let me explain it further. 
Please send me ur comments...

I have a home jsp and the report jsp. Home jsp has a href for 
report jsp. I'm using report form and report action for display 
and editting the values.
The user information after successful login is in the session. I 
need to access this information to intialize my report formso 
that report jsp gets loaded with user data.
Now my question is...initialising the form in the previous step's 
action is the only way? i mean having a home action which loads 
data in reports form and forward to reports jsp.
is there any other way?

I have tried accessing the form from seesion...inside jsp. It 
works ..but have to call the jsp twice.

Thanks again.
ss

On Thu, 02 Jan 2003 Dan Tran wrote :
In your action:

snippet
-process your href value and generate report object
-stick the Report object to request object
-forward the action to an JSP page which will read
 out the Report object and display
/snippet

I dont think your sceniao need a form

-Dan
- Original Message -
From: ss s ss [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 01, 2003 11:48 PM
Subject: form problem


 Hello,
Happy new year to u all.
 I needed some help. My problem we are using struts and the 
form is
 being called for generating some report .
 Now this strut is being called from a HREF tag and there is no 
way
 I can intialise my form to generte the correct report.
 I have tried this
 % MyForm form = 
(MyForm)pageContext.getAttribute(form_name,
 PageContext.SOME_SCOPE);
 form.setSomething(something); %

 But this too gives me problems that it genrates the page on 
the
 next request
 That is the first time i go to the page the form is not
 initialized .Now when i go back using the browser back button 
and
 click on the href again the report is there :(

 Can some one help where I am missing some improtant property 
of
 struts.

 Thanx for ur help in advance.

 cheers
 ss



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


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




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




nested radio button

2003-01-02 Thread Amit Badheka
Hi All,

I have a requirement where I am generating a tree structure. And, with each node I 
have to generate one radio button.

Now, I am able to generate the tree and radio buttons,  but there are two problems I 
am facing -

1. The radio button name comes as beanName.someName.someArray[0..], if I uses nested 
radio button and property is set as someName. (I have to use nested radio as that is 
the only way to assign value of radio buton from the bean.

2. The radio button once checked can not be uncheck. May be b'cos the name of radios 
are different.

Is there anybody has some idea?

Any help will be appreciated.

AB.




popup window

2003-01-02 Thread Amit Badheka
Hi All,

Is there any way to open new window from the action class.

I have a requirement like when one from is submitted I have to pass values of that 
from to another jsp that will open in new window.

please help.

AB.



RE: popup window

2003-01-02 Thread du Plessis, Corneil C
If you want to open a new window when submitting a form you will have to set
the target of the html:form or form using _blank will launch a new
window.

-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: 02 January, 2003 11:26
To: Struts Users Mailing List
Subject: popup window


Hi All,

Is there any way to open new window from the action class.

I have a requirement like when one from is submitted I have to pass values
of that from to another jsp that will open in new window.

please help.

AB.

__

Disclaimer and confidentiality note


Everything in this e-mail and any attachments relating to the official business of 
Standard Bank Group Limited is proprietary to the company. It is confidential, legally 
privileged and protected by law. Standard Bank does not own and endorse any other 
content. 
Views and opinions are those of the sender unless clearly stated as being that of 
Standard Bank. 

The person addressed in the e-mail is the sole authorised recipient. Please notify the 
sender 
immediately if it has unintentionally reached you and do not read, disclose or use the 
content
in any way. 

Standard Bank can not assure that the integrity of this communication has been 
maintained nor 
that it is free of errors, virus, interception or interference.

__

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




Re: popup window

2003-01-02 Thread Puneet Agarwal
Did _blank not work ?

or is it that you want response in both of the windows ?

Regards
Puneet
- Original Message -
From: Amit Badheka [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 9:26 AM
Subject: popup window


Hi All,

Is there any way to open new window from the action class.

I have a requirement like when one from is submitted I have to pass values
of that from to another jsp that will open in new window.

please help.

AB.



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




Re: popup window

2003-01-02 Thread Amit Badheka
Hi Puneet,

It works fine, but my problem is that I am using templates.
So, in the popup window whole template is displaying rather than a single
jsp.

Also, one more problem is that popup jsp contains a tree. so when we try to
explore the tree structure on each event it calls same action(that open new
window) and hence each time new popup generated.

Is there any way to forward request to same window that is newly opened?

Amit Badheka.

- Original Message -
From: Puneet Agarwal [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 4:54 PM
Subject: Re: popup window


 Did _blank not work ?

 or is it that you want response in both of the windows ?

 Regards
 Puneet
 - Original Message -
 From: Amit Badheka [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Thursday, January 02, 2003 9:26 AM
 Subject: popup window


 Hi All,

 Is there any way to open new window from the action class.

 I have a requirement like when one from is submitted I have to pass values
 of that from to another jsp that will open in new window.

 please help.

 AB.



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




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




RE: [OT] IntelliJ sale

2003-01-02 Thread Justin Ashworth
IDEA's brilliant use of hotkeys caused me to switch from Eclipse
initially, but its overwhelming ease of use has kept me using it for
over 6 months now.  Also, IDEA allows for a much more flexible project
directory structure than Eclipse.  It seemed like I was always fighting
with Eclipse to get it to conform to my directory structure, until I
eventually gave up and started doing it the way Eclipse wanted me to.
IDEA makes setting up and maintaining projects a whole lot easier.

...just my 2 cents. :)

Justin

 -Original Message-
 From: Rick Reumann [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, January 01, 2003 12:42 AM
 To: Struts Users Mailing List
 Subject: Re: [OT] IntelliJ sale
 
 
 On Tue, 31 Dec 2002 09:39:09 -0700
 Larry Young [EMAIL PROTECTED] wrote:
 
  Does anyone have an opinion on the Eclipse IDE product?
  
  I've been using IDEA for awhile now and am having problems using 
  Eclipse, it just doesn't seem intuitive to me, and their 
 popup menus 
  are buggy.  However, I'd like some feedback from anyone 
 else who has 
  used both.
 
 I've used both and had used Eclipse for a long time before 
 IDEA. Once I used IDEA for a whole day I was hooked. I'm too 
 lazy to give specifics right now but one thing as you mention 
 above... Intellij's IDEA simply was just so intuitive- you 
 don't even realize you are using an IDE until you try another one:)
 
 -- 
 Rick
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


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




Re: popup window

2003-01-02 Thread Puneet Agarwal
This has nothing to do with action class.

You have JSP -1, which has target defined as _blank.

when you do some operation on this page, it opens a child window this child
window has a tree structure.
it invokes same action class, but the jsp does not have target as blank in
the child window.

now you do some operation in the child window, the response will
automatically come to the same child window.

Where is the problem ?

Regards
Puneet

- Original Message -
From: Amit Badheka [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]; Puneet
Agarwal [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 12:18 PM
Subject: Re: popup window


 Hi Puneet,

 It works fine, but my problem is that I am using templates.
 So, in the popup window whole template is displaying rather than a single
 jsp.

 Also, one more problem is that popup jsp contains a tree. so when we try
to
 explore the tree structure on each event it calls same action(that open
new
 window) and hence each time new popup generated.

 Is there any way to forward request to same window that is newly opened?

 Amit Badheka.

 - Original Message -
 From: Puneet Agarwal [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Thursday, January 02, 2003 4:54 PM
 Subject: Re: popup window


  Did _blank not work ?
 
  or is it that you want response in both of the windows ?
 
  Regards
  Puneet
  - Original Message -
  From: Amit Badheka [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Thursday, January 02, 2003 9:26 AM
  Subject: popup window
 
 
  Hi All,
 
  Is there any way to open new window from the action class.
 
  I have a requirement like when one from is submitted I have to pass
values
  of that from to another jsp that will open in new window.
 
  please help.
 
  AB.
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 


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




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




Beta3: Log4j gone mad

2003-01-02 Thread Davor Cengija
I just upgraded from b2 to b3 and since then Log4j (1.2.6) is acting
strangelly: it ignores the settings and sends everything on stderr.

Here's the log4j.properties (the interesing part):

#log4j.rootLogger=WARN, A1
log4j.logger.com.mycompany=DEBUG, A1
log4j.logger.JBO=WARN, JBO
log4j.logger.org.apache=WARN, A1

log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File=Project.log
log4j.appender.A1.DatePattern='.'-MM-dd

##
# Request logger
log4j.logger.RequestLogger=INFO, REQ1
log4j.appender.REQ1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.REQ1.File=Project.request.log
log4j.appender.REQ1.DatePattern='.'-MM-dd

##
# Oracle JBO
log4j.appender.JBO=org.apache.log4j.DailyRollingFileAppender
log4j.appender.JBO.File=oracle.jbo.trace.log
log4j.appender.JBO.DatePattern='.'-MM-dd


All the categories are covered by their specific loggers (com.mycompany,
org.apache etc) so I don't need the rootLogger. However, when added
(associated with A1) everything actually goes to A1 (Project.log file) and
not to stderr but the correct files are empty.

This might be the commons-logging.jar issue (while upgrading, I copied all
the libraries, including struts.jar and commons-logging.jar to my
WEB-INF/lib dir).

Anyone?

With struts-b2 (and the corresponding commons- libraries) everything was
quite nice.

I'm using WSAD 4.0.3 and its WebSphere test environment (which is actually
WAS 4.0.2 AES, so servlet spec. 2.2), jdk 1.3.1, log4j 1.2.6.

Thanks.





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




Generating html:option tags with JSTL

2003-01-02 Thread Eric Jain
I'm trying to generate a list of options:

  html:select property=year
jstl:forEach var=y begin=1986 end=2003
  html:option value=${y}jstl:out value=${y}//html:option
/jstl:forEach
  /html:select


But this produces the following output:

  option value=${y}1987/option
  ...


Any suggestions how to get this right?


--
Eric Jain


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




RE: Generating html:option tags with JSTL

2003-01-02 Thread ROSSEL Olivier
 I'm trying to generate a list of options:
 
   html:select property=year
 jstl:forEach var=y begin=1986 end=2003
   html:option value=${y}jstl:out value=${y}//html:option
 /jstl:forEach
   /html:select
 
 
 But this produces the following output:
 
   option value=${y}1987/option
   ...

I think you should use html-el as the namespace for your JSTL tags.

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

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




RE: popup window

2003-01-02 Thread ROSSEL Olivier
 If you want to open a new window when submitting a form you 
 will have to set
 the target of the html:form or form using _blank will 
 launch a new
 window.

Newbie question:
can you make this new window a modal window?

can this window appear when you click the Select (submit) button,
but not when you click the Remove (submit) button ?

how do you force reload of original window when you submit the form
of that new window?


This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

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




Prepopulating DynaActionForm

2003-01-02 Thread Senthivel U S
Greetings,
 
I am using DynaAction Form. I want to pre populate Form with multiple
rows. In the form property , I specified
 
form-bean name=exampleForm
type=org.apache.struts.action.DynaActionForm
form-property name=name type=java.lang.String/
form-property name=address type=java.lang.String/
form-property name=country type=java.lang.String/
 
I want to prepopulate the form from database.
 
So what I have done is 
 
ArrayList arraylist = new ArrayList();
 
For (int i = 0; icount; ++i) {
DynaBean exampleForm  = DynaActionFormClass.
 
getDynaActionFormClass(exampleForm).newInstance();
 
 PropertyUtils.setSimpleProperty(exampleForm, name, name);
 PropertyUtils.setSimpleProperty(exampleForm, customerNo,
address);
 PropertyUtils.setSimpleProperty(exampleForm,
beneficiaryNo, country);
 
arraylist.add(exampleForm);
}
 
request.setAttribute(exampleForm, arraylist);
 
Now what I want is , is it correct way of doing or any other better way
is there.
Pls help me.
 
Thanx,
Sen



RE: Updating collections of information

2003-01-02 Thread pqin
1.1b2

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Greg Bearth [mailto:[EMAIL PROTECTED]] 
Sent: December 31, 2002 6:01 PM
To: 'Struts Users Mailing List'
Subject: RE: Updating collections of information

PQ, can I ask one more question...what version of Struts are you using?  I
am using 1.0.2.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 31, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: RE: Updating collections of information


My solution is pretty dumb because it keeps two copies of ActionForm.

1. In orderEntryLoad action (before I load order entry page)

I retrieve line items from database and save two copies of them. One in the
session (see point 2), the other in the request so I have all the initial
values of this ActionForm.

2. In orderEntry action (after I click Submit button)

My guess for struts's behavior is

- Struts instantiates an instance of ActionForm.
- Struts calls reset method to create a new lineItems object. I override it
so as to make it an exact copy of the lineItems I stored in session.
- Struts saves all the values into this object.

Now I can save this ActionForm to database.




Regards,


PQ

This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Greg Bearth [mailto:[EMAIL PROTECTED]]
Sent: December 31, 2002 4:36 PM
To: 'Struts Users Mailing List'
Subject: RE: Updating collections of information

PQ, please bear with me because I think you are doing what I would like to
do.  I sincerely appreciate the hand-holding as this is my first Struts
project.

In your example, the page displays line items and it appears the user could
potentially update stringOrderAmount and mark items for removal.  When the
form is submitted, does your action class simply call getLineItems() and it
returns a collection of line items with the updated stringOrderAmount(s) and
markedForRemoval flags?  I assume so, and this would be analogous to what I
am attempting to do.  I simply have one extra CollectionBean layer because
in reality, this bean has other attributes besides the collection.

Can you elaborate on what getOrder(...) does?  It returns an iterator, so
obviously it has access to a collection, but what collection (lineItems
variable in your form class?) and how did it get populated?  This is the
heart of what I am missing because my form always returns null on the call
to getCollectionBean().  After adding a line, this.collectionBean = new
CollectionBean(), to the CollectionForm constructor, then
getCollectionBean() returns an object, but calling getElements() on the
object returns null.  Does your form have session scope or request scope?
Is my problem related to putting the collection bean directly into the
session?  If so, how do I wrap it inside the form (the
PopulateCollectionAction doesn't know what Form is expected by the
subsequent UpdateCollectionAction)?

Also, you use a prefix of 'nested'.  To what tag library does this refer,
and is it important to the solution?

Sample Code I am using to test:
-

public class PopulateCollectionAction extends Action {
public ActionForward perform(ActionMapping actionMapping, ActionForm
actionForm, HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse) throws IOException, ServletException {
Collection c = new ArrayList();
c.add(new ElementBean(A));
c.add(new ElementBean(B));
c.add(new ElementBean(C));
CollectionBean bean = new CollectionBean();
bean.setElements(c);

httpServletRequest.getSession().setAttribute(theCollectionBean, bean);
return(actionMapping.findForward(displayCollection));
//displayCollection.jsp
}
}

-

public class UpdateCollectionAction extends Action {
public ActionForward perform(ActionMapping actionMapping, ActionForm
actionForm, HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse) throws IOException, ServletException {
CollectionForm f = (CollectionForm) actionForm;
Collection c = f.getCollectionBean().getElements();
//NullPointerException
for (Iterator i = c.iterator(); i.hasNext();)
//NullPointerException
{
ElementBean e = (ElementBean) i.next();
System.out.println(e.getValue());  //This should
print D E F.
}
return(actionMapping.findForward(start));  //index.jsp
}

-

public class CollectionForm extends ActionForm {
CollectionBean collectionBean;

public CollectionForm() {
this.collectionBean = new CollectionBean();
}

public CollectionBean getCollectionBean() {
return 

Re: Generating html:option tags with JSTL

2003-01-02 Thread Eric Jain
 I think you should use html-el as the namespace for your JSTL tags.

Thanks, replacing struts-html with struts-html-el in my application fixed
the problem.


--
Eric Jain


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




REPOST: Forcing the ActionForm to populate a field before the other

2003-01-02 Thread Toni Charlot
I would like to have a setter method called before another.  What's the
best way to do that in the ActionForm

Thank you.



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




Re: datasource problem

2003-01-02 Thread David M. Karr
 Steven == Steven Dahlin [EMAIL PROTECTED] writes:

Steven I am a little unclear what you mean by using modules?

If you don't know what they are, then you probably aren't using them :) .

It's a mechanism that allows you to subdivide your Struts application into
pieces, each with their own config file.

If you're not using modules, then I don't know what the problem could be.
Perhaps you could use your debugger to trace the loading of your
struts-config.xml file, especially when it stores the data-soure configuration?

David - Original Message -
David From: David M. Karr [EMAIL PROTECTED]

  Steven == Steven Dahlin [EMAIL PROTECTED] writes:
 
Steven When I try to get a datasource which has been defined in the
Steven struts-config.xml no matter what I do the datasource returns back null.  My
Steven struts-config.xml for data-sources is:
Steven data-sources
 
Steven data-source key= conPool
 
Steven set-property  property  = autoCommit
Steven value = false/
Steven set-property  property  = description
Steven value = database source/
Steven set-property  property  = driverClass
Steven value =
Steven oracle.jdbc.driver.OracleDriver/
Steven set-property  property  = user
Steven value = theuser/
Steven set-property  property  = password
Steven value = thepassword/
Steven set-property  property  = url
Steven value =
Steven jdbc:oracle:thin:@192.192.192.192:1675:inst/
Steven /data-source
 
Steven /data-sources
 
Steven In the section of code used for initialization of the
Steven datasource there is the following:
 
Steven ServletContext context =
Steven actSrv.getServletContext();
Steven dsSrc= ( DataSource ) context.getAttribute(
Steven ConPool );
 
Steven The context is captured but the datasource remains null.
 
 Are you using modules?  The data-source is put into the ServletContext
David with a
 key that is constructed by appending the module prefix to the given key.


-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



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




Is Struts-EL in Beta 3 release working properly?

2003-01-02 Thread Hohlen, John
Does anyone know if the Struts-EL subproject is working in the Struts 1.1
beta 3 release?  I tried using this subproject in the 12/7 nightly build and
encountered a JSP compilation problem with the HTML-EL tag library.  I'm
not sure if this ever got fixed. 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg51451.html

Are others successfully using Struts-EL with beta 3?

Thanks,

JOHN

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




RE: REPOST: Forcing the ActionForm to populate a field before the other

2003-01-02 Thread James Mitchell
You could do it yourself within your action, but you cannot depend on
the framework to do it in any particular order. (that probably explains
why there is nothing related to 'order' in the dtd)

Hope that helps!!   


--
James Mitchell
Software Engineer/Open Source Evangelist
http://www.open-tools.org

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: Toni Charlot [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 02, 2003 10:11 AM
 To: [EMAIL PROTECTED]
 Subject: REPOST: Forcing the ActionForm to populate a field 
 before the other
 
 
 I would like to have a setter method called before another.  
 What's the
 best way to do that in the ActionForm
 
 Thank you.
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 


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




Re: REPOST: Forcing the ActionForm to populate a field before the other

2003-01-02 Thread Rick Reumann

On Thursday, January 2, 2003, 10:10:32 AM, Toni wrote:

TC I would like to have a setter method called before another.
TC What's the best way to do that in the ActionForm

Do you mean in a FormBean you are using with an Action that is
populated when you submit? If so I'm not certain how you would
guarantee the order, but if you don't mind me prying what is the
business role that would require one of the form bean attributes to be
set before another? I would hesitate having any kind of logic in the
set/get methods in your form beans and move that logic to some other
business part of your application. The form beans should be very
basic.


-- 

Rick
mailto:[EMAIL PROTECTED]


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




Re: form problem

2003-01-02 Thread Dan Tran
Yes that is the way I am using now.  There may be another way but I never
try it before.


Use an  forward action (to your query.jsp) and have your reportForm's reset
method
to initialize the data.

snippet
 action forward=/report.jsp scope=request path=/startReport /
/snippet

before report.jsp is processed, Struts constructs your reportForm and call
reset method for you.


-D
- Original Message -
From: ss s ss [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 12:44 AM
Subject: form problem


 Hello agian,
 Thanks Dan.
   I think you understood my problem. Let me explain it further.
 Please send me ur comments...

 I have a home jsp and the report jsp. Home jsp has a href for
 report jsp. I'm using report form and report action for display
 and editting the values.
 The user information after successful login is in the session. I
 need to access this information to intialize my report formso
 that report jsp gets loaded with user data.
 Now my question is...initialising the form in the previous step's
 action is the only way? i mean having a home action which loads
 data in reports form and forward to reports jsp.
 is there any other way?

 I have tried accessing the form from seesion...inside jsp. It
 works ..but have to call the jsp twice.

 Thanks again.
 ss

 On Thu, 02 Jan 2003 Dan Tran wrote :
 In your action:
 
 snippet
  -process your href value and generate report object
  -stick the Report object to request object
  -forward the action to an JSP page which will read
   out the Report object and display
 /snippet
 
 I dont think your sceniao need a form
 
 -Dan
 - Original Message -
  From: ss s ss [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 01, 2003 11:48 PM
 Subject: form problem
 
 
   Hello,
  Happy new year to u all.
   I needed some help. My problem we are using struts and the
 form is
   being called for generating some report .
   Now this strut is being called from a HREF tag and there is no
 way
   I can intialise my form to generte the correct report.
   I have tried this
   % MyForm form =
 (MyForm)pageContext.getAttribute(form_name,
   PageContext.SOME_SCOPE);
   form.setSomething(something); %
  
   But this too gives me problems that it genrates the page on
 the
   next request
   That is the first time i go to the page the form is not
   initialized .Now when i go back using the browser back button
 and
   click on the href again the report is there :(
  
   Can some one help where I am missing some improtant property
 of
   struts.
  
   Thanx for ur help in advance.
  
   cheers
   ss
  
  
  
   --
   To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
  
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 



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


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




DynaActionForm change with 1.1-beta3 download

2003-01-02 Thread Hemanth Setty
Hello,

Well I just downloaded  1.1 beta 3 today and updated my application with 
the new libraries. There seems to be a difference in the way 
DynaActionForm gets initialized. Before beta 3...and as late as around 
dec 10th nightly build..DynaActionForm properties would get initialized 
to NULL...now in beta3 all the String form properties get initialized 
to empty string. Is this a bug or is this the way it is supposed to be?

More specifically...

pre 1.1b3
[DEBUG] org.apache.struts.util.RequestUtils -  -- 
DynaActionForm[dynaClass=surveyMaintForm,category=NULL,currentNodeId=NULL,cmd=NULL,ranking=NULL,nodeName=NULL] 


1.1b3
[DEBUG] org.apache.struts.util.RequestUtils -  -- 
DynaActionForm[dynaClass=surveyMaintForm,category=NULL,currentNodeId=,cmd=,ranking=NULL,nodeName=] 


category and  ranking still remain NULL as they are defined as 
java.util.Map instead of Strings like the rest of the parameters..

-h



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



Page Anchoring using Tiles Def

2003-01-02 Thread Bhamani, Nizar A TL56E
My struts config is using Tiles definition to forward to a
Page instead of jsp.

i.e. I am using the following :
forward name=DoSomething 
path=.tilesdef.doSomething 
redirect=false 
contextRelative=true /

instead of :
forward name=DoSomething 
path=/jsp/doSomething.jsp 
redirect=false 
contextRelative=true /


Is there a way to jump to an anchor location on the
Page I am forwarding to without using the jsp forward 
And redirect=true ?

i.e. I want to use the tilesdef and jump to an anchored
location. Has anybody done this Or Is there a way to do this ?

Thanks,


Nizar Bhamani



CONFIDENTIALITY
This e-mail and any attachments are confidential and also may be privileged.
If you are not the named recipient, or have otherwise received this 
communication in error, please delete it from your inbox, notify the sender
immediately, and do not disclose its contents to any other person, 
use them for any purpose, or store or copy them in any medium. 
Thank you for your cooperation. 




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




Multiple message-properties

2003-01-02 Thread ROSSEL Olivier
I wish to have my message resources in several files:
   message-resources parameter=java.resources.application /
   message-resources parameter=language /
   message-resources parameter=database /   

When I launch Tomcat, I have realized that the LAST message-resources
is read, but not the others.
Is it a feature?

There is another way to declare several mesage-resources?


---cut here---


This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

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




Re: REPOST: Forcing the ActionForm to populate a field before theother

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Toni Charlot wrote:

 Date: Thu, 2 Jan 2003 10:10:32 -0500
 From: Toni Charlot [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: REPOST: Forcing the ActionForm to populate a field before the
 other

 I would like to have a setter method called before another.  What's the
 best way to do that in the ActionForm

There are no guarantees on the order that the setters are called.  This is
for two reasons:

* There is no rule in the HTTP or HTML specs defining the order
  in which the request parameters are sent, so it's totally up
  to the client.  And they really do operate differently.

* There is no rule in the servlet spec saying that the input order
  has to be preserved, so it's totally up to the container to decide
  how to implement this.  And they really do operate differently.

More fundamentally, though, the only reason that the setter order would
matter is if there are side effects (setting one property affects the
semantics of setting a different one).  Designing your form beans in this
way is a very poor architectural decision -- the whole point of a form
bean is to simply represent the input values that the user actually
entered on the form.  Any functionality that tries to assign meaning to
these inputs should be done in business logic (which can pull data out of
the form bean in any order that you need), not in the form bean itself.


 Thank you.

Craig McClanahan



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




Re: Multiple message-properties

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, ROSSEL Olivier wrote:

 Date: Thu, 02 Jan 2003 17:47:46 +0100
 From: ROSSEL Olivier [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: Multiple message-properties

 I wish to have my message resources in several files:
message-resources parameter=java.resources.application /
message-resources parameter=language /
message-resources parameter=database /

 When I launch Tomcat, I have realized that the LAST message-resources
 is read, but not the others.
 Is it a feature?

 There is another way to declare several mesage-resources?


To use multiple message-resources declarations in a single Struts webapp,
you need to declare the servlet context attribute under which the extra
ones (other than the default) are stored, using the key attributes.
Perhaps something like:

  message-resources parameter=java.resources.application/
  message-resources parameter=language key=lang/
  message-resources parameter=database key=data/

Note that you'll need to explicitly reference the different message
resources bundles when you select particular messages -- for example, to
grab a message from the database resources in a JSP page, you'd need to
say:

  bean:message key=sql.error bundle=data/

It would be technically feasible to write a MessageResources
implementation that combined multiple sources files into a single
application resources bundle, but this is not supported by the standard
implementation.

Craig


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




Re: struts-related exception on tomcat startup

2003-01-02 Thread Craig R. McClanahan


On Wed, 1 Jan 2003, Darrel Riekhof wrote:

 Date: Wed, 01 Jan 2003 20:19:15 -0800
 From: Darrel Riekhof [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: struts-related exception on tomcat startup

 I'm getting the exception below whenever I start tomcat.  It looks like
 it has to be one of the struts apps deployed on tomcat, but I don't know
 which one, and I don't know which file it's complianing about.


The exception report you're seeing was caused by a bug in the XML parser
that was shipped in older versions of Tomcat, and tripped over when
parsing the struts-config_1_0.dtd file (Struts 1.0.2).  The actual error
message text is bogus -- the real problem is that one of the lines in the
DTD was longer than 80 characters (which is legal from an XML perspective,
but was not being handled correctly by Xerces).

The problem was fixed in Xerces, and the version shipped with Tomcat
4.1.18 should no longer have this problem.  If you're still getting it,
that implies you might be including an XML parser in your webapp, or
otherwise modifying the default configuration of Tomcat to include an
older parser that still has the bug.  Try it with an unmodified Tomcat
install and things should work.

 I started getting this as soon as I switched tomcat over to the xml jars
 included with FOP 2.0.5, which I assume are a little more recent that
 the xml jars that come with tomcat.  Btw, the trace seems to be
 harmless, all the webapps I care about still work, but I'd still like to
 fix the bad comment wherever it is to get rid of this exception, just
 for peace of mind. :)  I suspect the tomcat admin webapp as the culprit,
 but I've checked all its config files very carefully, no bad comments on
 line 551...


It's not a totally harmless message -- it seems that Xerces skips
validation (since it could not successfully read thte DTD), even if you
ask for it.

 Does anyone recognize this trace and know which webapp/file is to blame?
  Or, can I get tomcat to tell me more info while it's booting up?

 Darrel


Craig


 -- stacktrace below --

 Starting service Tomcat-Standalone
 Apache Tomcat/4.1.18
 Parse Fatal Error at line 551 column 44: The string -- is not
 permitted within comments.
 org.xml.sax.SAXParseException: The string -- is not permitted within
 comments.
 at
 org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
 Source)
 at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
 Source)
 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
 Source)
 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
 Source)
 at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
 Source)
 at org.apache.xerces.impl.XMLScanner.scanComment(Unknown Source)
 at org.apache.xerces.impl.XMLDTDScannerImpl.scanComment(Unknown
 Source)
 at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
 Source)
 at
 org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown
 Source)
 at
 org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
 Source)
 at
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
 at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
 at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at org.apache.struts.digester.Digester.parse(Digester.java:755)
 at
 org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1434)
 at
 org.apache.struts.action.ActionServlet.init(ActionServlet.java:474)
 at
 org.apache.webapp.admin.ApplicationServlet.init(ApplicationServlet.java:152)
 at javax.servlet.GenericServlet.init(GenericServlet.java:256)
 at
 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
 at
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
 at
 org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
 at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
 at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
 at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
 at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
 at
 org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:529)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 

Re: How to connect a database in SQL Server ?

2003-01-02 Thread aswath satrasala

Following may help

resource-ref
   res-ref-namejdbc/test/res-ref-name
   res-typejavax.sql.DataSource/res-type
   init-param driver-name=com.inet.tds.TdsDriver/
   init-param url=jdbc:inetdae7:VARSHA:1433?database=artimus/
   init-param user=artimus/
   init-param password=artimus/
/resource-ref








From: Tanmaya [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: How to connect a database in SQL Server ?
Date: Fri, 27 Dec 2002 17:44:16 +0530

Hi All,

I am new to Struts.Kindly anyone let me know, what I should do, to connect 
a database in SQL Server.I have the struts-config.xml file where I defined 
the datasource parameters...

data-sources
data-source
  set-property property=autoCommit
 value=false/
   set-property property=description
   value=Example Data Source Configuration/
  set-property property=driverClass
   
value=com.microsoft.jdbc.sqlserver.SQLServerDriver/
  set-property property=maxCount
   value=4/
  set-property property=minCount
   value=2/
  set-property property=password
   value=taapplication/
  set-property property=url
   value=jdbc:microsoft:sqlserver://tanmaya:1433/
  set-property property=user
   value=taapplication/
/data-source
  /data-sources

In the Action class,I tried to access the database in perform method as 
follows...

public ActionForward perform(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) {

Connection connection = null;
DataSource dataSource = null;
Statement statement = null;
ResultSet resultSet = null;
try {
dataSource = servlet.findDataSource(null);
connection = dataSource.getConnection();
statement = connection.createStatement();
resultSet = statement.executeQuery(select * from 
team_shift);
System.out.println(\n\n AFTER EXEcuting the query.);
while (resultSet.next())
{

System.out.println(Shift:+resultSet.getString(shift_code));
}
resultSet.close(); // just a test
} catch (SQLException sqle) {
getServlet().log(Connection.process, sqle);
} finally {

try {
connection.close();
} catch (SQLException e) {
getServlet().log(Connection.close, e);
}
}


In this way I am able to connect to the default database of SQL Server(i.e. 
master) database successfully.I wanna access to my own database.How can I 
achive it ??Where should I mention my database name ?? I tried by 
mentioning my database name in the url property as follow :
set-property property=url 
value=jdbc:microsoft:sqlserver://tanmaya:1433/TAProd/

But in this way I am getting error (org.apache.jasper.JasperException: 
Cannot find ActionMappings or ActionFormBeans collection) while tried to 
access the jsp itself.

Please help me to knock this problem down.

Thanks in advance,
Tanmaya


_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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



defeating caching

2003-01-02 Thread Caoilte O'Connor
Hi,
Can anyone tell me exactly what options I should set for struts1.1 to
defeat web caching. I found the option in the dtd and a few mentions of it
in the archives, but no information anywhere on how to set it for all
pages the webapp returns.

much appreciated,

caoilte

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




problems getting new taglib instructions working with tomcat 4.1.x

2003-01-02 Thread Kirby Vandivort
Hello,

Referring to:

http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_taglib_23

I am running struts 1.1 beta 3, tomcat 4.1.18, and
I have a simple JSP page that starts out like:

%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib uri=http://jakarta.apache.org/struts/tags-html-1.0; prefix=html %
%@ taglib uri=http://jakarta.apache.org/struts/tags-bean-1.0; prefix=bean %
%@ taglib uri=http://jakarta.apache.org/struts/tags-logic-1.0; prefix=logic
%


When I try access the page, I get the following exception:

2003-01-02 12:18:03 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception org.apache.jasper.JasperException: This
absolute uri (http://jakarta.apache.org/struts/tags-html-1.0) cannot be
resolved in either web.xml or the jar files deployed with this
application


I suspect that I'm just doing something stupid, but I'm not sure what
it is.  If you try to go to that URL you get a 404.  Not really
understanding what is going on, I'm not sure if that is expected or
not.

Thanks!




---

(also a note for whoever maintains that documentation.. In the very
next section (5.5) it says to look in section 4.5.3.1 for info on doing
the TLDs in a servlet 2.3 container.  It should be section  5.4.3.1
(the four and the five are reversed.)



-- 

Kirby Vandivort  Theoretical Biophysics Group
Email: [EMAIL PROTECTED]  3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/University of Illinois
Phone: (217) 244-5711405 N. Mathews Ave
Fax  : (217) 244-6078Urbana, IL  61801, USA

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




Re: problems getting new taglib instructions working with tomcat 4.1.x

2003-01-02 Thread Kirby Vandivort
I'll answer my own question (from finding the right subject line
in some of the list archives)

Apparently from beta 3 on, the -version.number is no longer in the URI.

So, I changed it to:
%@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html %
%@ taglib uri=http://jakarta.apache.org/struts/tags-bean; prefix=bean %
%@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic

and it now works.  

 ---
 
 (also a note for whoever maintains that documentation.. In the very
 next section (5.5) it says to look in section 4.5.3.1 for info on doing
 the TLDs in a servlet 2.3 container.  It should be section  5.4.3.1
 (the four and the five are reversed.)
 
 



On Thu, Jan 02, 2003 at 12:30:55PM -0600, Kirby Vandivort wrote:
 Hello,
 
 Referring to:
 
 http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_taglib_23
 
 I am running struts 1.1 beta 3, tomcat 4.1.18, and
 I have a simple JSP page that starts out like:
 
 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=http://jakarta.apache.org/struts/tags-html-1.0; prefix=html %
 %@ taglib uri=http://jakarta.apache.org/struts/tags-bean-1.0; prefix=bean %
 %@ taglib uri=http://jakarta.apache.org/struts/tags-logic-1.0; prefix=logic
 %
 
 
 When I try access the page, I get the following exception:
 
 2003-01-02 12:18:03 StandardWrapperValve[jsp]: Servlet.service() for
 servlet jsp threw exception org.apache.jasper.JasperException: This
 absolute uri (http://jakarta.apache.org/struts/tags-html-1.0) cannot be
 resolved in either web.xml or the jar files deployed with this
 application
 
 
 I suspect that I'm just doing something stupid, but I'm not sure what
 it is.  If you try to go to that URL you get a 404.  Not really
 understanding what is going on, I'm not sure if that is expected or
 not.
 
 Thanks!

-- 

Kirby Vandivort  Theoretical Biophysics Group
Email: [EMAIL PROTECTED]  3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/University of Illinois
Phone: (217) 244-5711405 N. Mathews Ave
Fax  : (217) 244-6078Urbana, IL  61801, USA

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




RE: defeating caching

2003-01-02 Thread Siggelkow, Bill
Add the following stanza to your struts-config.xml ...

  controller
nocache=true/

-Original Message-
From: Caoilte O'Connor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 01, 2003 10:36 PM
To: [EMAIL PROTECTED]
Subject: defeating caching


Hi,
Can anyone tell me exactly what options I should set for struts1.1 to
defeat web caching. I found the option in the dtd and a few mentions of it
in the archives, but no information anywhere on how to set it for all
pages the webapp returns.

much appreciated,

caoilte

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

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




commons-*.jar file Version numbers within Struts Beta 3 Release?

2003-01-02 Thread Scott Reisdorf
I was wondering if anyone knows the version numbers associated with the 
commons-*.jar files that are packaged within the new Struts Beta 3 release?
If you do have the version number to any of the jar files listed below, it 
is much appreciated.

commons-beanutils.jar
commons-collections.jar
commons-dbcp.jar
commons-digester.jar
commons-lang.jar
commons-logging.jar
commons-fileupload.jar
commons-pool.jar
commons-resources.jar
commons-validator.jar


thanks,

-scott


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



Re: commons-*.jar file Version numbers within Struts Beta 3 Release?

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Scott Reisdorf wrote:

 Date: Thu, 02 Jan 2003 11:03:37 -0800
 From: Scott Reisdorf [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: commons-*.jar file Version numbers within Struts Beta 3  Release?

 I was wondering if anyone knows the version numbers associated with the
 commons-*.jar files that are packaged within the new Struts Beta 3 release?
 If you do have the version number to any of the jar files listed below, it
 is much appreciated.

 commons-beanutils.jar
 commons-collections.jar
 commons-dbcp.jar
 commons-digester.jar
 commons-lang.jar
 commons-logging.jar
 commons-fileupload.jar
 commons-pool.jar
 commons-resources.jar
 commons-validator.jar


You can find out the version number of any commons JAR file by unpacking
it's META-INF/MANIFEST.MF and reading it.

What you'll find, however, is that a Struts beta releases use a
corresponding nightly build of the commons packages they depend on (in the
Commons CVS repository, the exact set of files is tagged with
STRUTS_1_1_B3).  The final release of Struts 1.1 will include only
released versions of the dependent JARs, and the version numbers will be
documented in the release notes.


 thanks,

 -scott

Craig


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




Re: struts-related exception on tomcat startup

2003-01-02 Thread Darrel Riekhof
Thanks, that was it.

I put the xercesImpl.jar that came with tomcat 4.1.18 back into its 
common/endorsed dir instead of the xercesImpl-2.2.1.jar that came with 
fop 2.0.5rc.  The startup exception went away, all my webapps work, and 
I can use validation someday!

I didn't realize that tomcat comes with a newer Xerces than 2.2.1, the 
latest official release.  Hopefully it is fully compatible with fop (so 
far it looks like it is).

Darrel

Craig R. McClanahan wrote:

On Wed, 1 Jan 2003, Darrel Riekhof wrote:

 

Date: Wed, 01 Jan 2003 20:19:15 -0800
From: Darrel Riekhof [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: struts-related exception on tomcat startup

I'm getting the exception below whenever I start tomcat.  It looks like
it has to be one of the struts apps deployed on tomcat, but I don't know
which one, and I don't know which file it's complianing about.

   


The exception report you're seeing was caused by a bug in the XML parser
that was shipped in older versions of Tomcat, and tripped over when
parsing the struts-config_1_0.dtd file (Struts 1.0.2).  The actual error
message text is bogus -- the real problem is that one of the lines in the
DTD was longer than 80 characters (which is legal from an XML perspective,
but was not being handled correctly by Xerces).

The problem was fixed in Xerces, and the version shipped with Tomcat
4.1.18 should no longer have this problem.  If you're still getting it,
that implies you might be including an XML parser in your webapp, or
otherwise modifying the default configuration of Tomcat to include an
older parser that still has the bug.  Try it with an unmodified Tomcat
install and things should work.

 

I started getting this as soon as I switched tomcat over to the xml jars
included with FOP 2.0.5, which I assume are a little more recent that
the xml jars that come with tomcat.  Btw, the trace seems to be
harmless, all the webapps I care about still work, but I'd still like to
fix the bad comment wherever it is to get rid of this exception, just
for peace of mind. :)  I suspect the tomcat admin webapp as the culprit,
but I've checked all its config files very carefully, no bad comments on
line 551...

   


It's not a totally harmless message -- it seems that Xerces skips
validation (since it could not successfully read thte DTD), even if you
ask for it.

 

Does anyone recognize this trace and know which webapp/file is to blame?
Or, can I get tomcat to tell me more info while it's booting up?

Darrel

   


Craig
 




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




Re: struts-related exception on tomcat startup

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Darrel Riekhof wrote:

 Date: Thu, 02 Jan 2003 11:24:46 -0800
 From: Darrel Riekhof [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: struts-related exception on tomcat startup

 Thanks, that was it.

 I put the xercesImpl.jar that came with tomcat 4.1.18 back into its
 common/endorsed dir instead of the xercesImpl-2.2.1.jar that came with
 fop 2.0.5rc.  The startup exception went away, all my webapps work, and
 I can use validation someday!

 I didn't realize that tomcat comes with a newer Xerces than 2.2.1, the
 latest official release.

  Hopefully it is fully compatible with fop (so
 far it looks like it is).


For posterity (and searchability in mailing list archives):  messing with
the way that Tomcat exposes an XML parser to web applications is almost
always going to cause you grief.  There are way too many intricate
interdependencies (especially on a JDK 1.4 system when there's an XML
parser implementation inside the JDK) to start replacing things globally.

 Darrel

Craig



 Craig R. McClanahan wrote:

 On Wed, 1 Jan 2003, Darrel Riekhof wrote:
 
 
 
 Date: Wed, 01 Jan 2003 20:19:15 -0800
 From: Darrel Riekhof [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: struts-related exception on tomcat startup
 
 I'm getting the exception below whenever I start tomcat.  It looks like
 it has to be one of the struts apps deployed on tomcat, but I don't know
 which one, and I don't know which file it's complianing about.
 
 
 
 
 The exception report you're seeing was caused by a bug in the XML parser
 that was shipped in older versions of Tomcat, and tripped over when
 parsing the struts-config_1_0.dtd file (Struts 1.0.2).  The actual error
 message text is bogus -- the real problem is that one of the lines in the
 DTD was longer than 80 characters (which is legal from an XML perspective,
 but was not being handled correctly by Xerces).
 
 The problem was fixed in Xerces, and the version shipped with Tomcat
 4.1.18 should no longer have this problem.  If you're still getting it,
 that implies you might be including an XML parser in your webapp, or
 otherwise modifying the default configuration of Tomcat to include an
 older parser that still has the bug.  Try it with an unmodified Tomcat
 install and things should work.
 
 
 
 I started getting this as soon as I switched tomcat over to the xml jars
 included with FOP 2.0.5, which I assume are a little more recent that
 the xml jars that come with tomcat.  Btw, the trace seems to be
 harmless, all the webapps I care about still work, but I'd still like to
 fix the bad comment wherever it is to get rid of this exception, just
 for peace of mind. :)  I suspect the tomcat admin webapp as the culprit,
 but I've checked all its config files very carefully, no bad comments on
 line 551...
 
 
 
 
 It's not a totally harmless message -- it seems that Xerces skips
 validation (since it could not successfully read thte DTD), even if you
 ask for it.
 
 
 
 Does anyone recognize this trace and know which webapp/file is to blame?
  Or, can I get tomcat to tell me more info while it's booting up?
 
 Darrel
 
 
 
 
 Craig
 
 



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




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




2nd field doesn't validate, first one does

2003-01-02 Thread Michelle Harris
Hi all,

I've been trying to get data validation working. Many thanks for earlier 
responses.

I did get a sample login app up and running. However, the oddest thing 
happens. The first field, username, validates correctly. However, the 
second one, password, doesn't validate at all. I'm including my 
validation.xml file -- hoping I have an error.

Any advice would be much appreciated.

Many thanks,
Michelle




form-validation
   global
  constant name=phone value=^\(?(\d{3})\)?[-| ]?(\d{3})[-| 
]?(\d{4})$ /
  constant name=zip value=^\d{5}\d*$ /
   /global
   formset
  constant name=zip value=^\d{5}(-\d{4})?$ /

  formname=loginForm
 fieldproperty=username
   depends=required,mask,minlength
 arg0 key=loginForm.username.displayname/
 arg1 name=minlength key=${var:minlength} 
resource=false/
 var
   var-namemask/var-name
   var-value^\w+$/var-value
 /var
 var
   var-nameminlength/var-name
   var-value5/var-value
 /var
 /field
 fieldproperty=password
   depends=required,mask,maxlength
 msg name=mask key=loginForm.password.maskmsg/
 arg0 key=loginForm.password.displayname/
 arg1 name=maxlength key=${var:maxlength} 
resource=false/
 var
   var-namemask/var-name
   var-value^[a-zA-Z]*$/var-value
 /var
 var
   var-namemaxlength/var-name
   var-value8/var-value
 /var
 /field
  /form
   /formset
/form-validation


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



RE: REPOST: Forcing the ActionForm to populate a field before the other

2003-01-02 Thread Toni
Thank you Rick, James and Craig for your inputs.  The answers is exactly
what I was looking for in order to get off my lazy a** and break things
apart.

I was trying to set a quantity field do indicate how many child forms to
display in one step without using an action with the nested tag lib.

Happy new year.

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 11:56 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: REPOST: Forcing the ActionForm to populate a field before
the other




On Thu, 2 Jan 2003, Toni Charlot wrote:

 Date: Thu, 2 Jan 2003 10:10:32 -0500
 From: Toni Charlot [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: REPOST: Forcing the ActionForm to populate a field before the
 other

 I would like to have a setter method called before another.  What's 
 the best way to do that in the ActionForm

There are no guarantees on the order that the setters are called.  This
is for two reasons:

* There is no rule in the HTTP or HTML specs defining the order
  in which the request parameters are sent, so it's totally up
  to the client.  And they really do operate differently.

* There is no rule in the servlet spec saying that the input order
  has to be preserved, so it's totally up to the container to decide
  how to implement this.  And they really do operate differently.

More fundamentally, though, the only reason that the setter order would
matter is if there are side effects (setting one property affects the
semantics of setting a different one).  Designing your form beans in
this way is a very poor architectural decision -- the whole point of a
form bean is to simply represent the input values that the user actually
entered on the form.  Any functionality that tries to assign meaning
to these inputs should be done in business logic (which can pull data
out of the form bean in any order that you need), not in the form bean
itself.


 Thank you.

Craig McClanahan



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




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




ArrayDescriptor - GenericConnection exception

2003-01-02 Thread yupingw

Hi, Folks:

Happy New Year!

I am having the same problem Eva had. Anyone has a solution?

Many thanks.

Patrick


[Mail Archive]
struts-user
Chronological --
Find 
Thread --
ArrayDescriptor - GenericConnection exception

* From: Eva Garabedian
* Subject: ArrayDescriptor - GenericConnection exception
* Date: Wed, 12 Jun 2002 16:24:31 -0700

Hello List - I've got a question about passing a string array into an
Oracle Procedure. 
Specifically, my ArrayDescriptor assignment line is throwing a struts
exception, whose message is simply
org.apache.struts.util.GenericConnection.
I'm using a CallableStatement in my Java code to pass my String[] to my
Oracle procedure. Before I added the String[] parameter, everything was
working quite nicely. Now when I run this I get the dreaded
NullPointerException in the Tomcat messages in my browser, and the first
System.out.println (found below) shows up, but the GenericConnection
exception is thrown before the second println executes. This leads me to
believe that the ArrayDescriptor is the culprit. In the following code,
please note that the user_type NL_GROUP exists in my database, created
by the user CREATOR.

Thanks in advance for any suggestions about where I should look for
help. 



Here is my related code: 
public boolean addCustomer(String userName, String password,
String[] nlGroup) throws Exception  {
 
   Connection conn = null;
   CallableStatement stmt = null;
   String sql = {call INS_CUSTOMER_AND_CONTACT_INFO(?, ?, ?)};
 
   try {
 conn = dataSource.getConnection();
 
 System.out.println(After getConnection. );
 
 ArrayDescriptor desc =
ArrayDescriptor.createDescriptor(CREATOR.NL_GROUP, conn);
 
 System.out.println(After arrayDescriptor assignment. );
 
 ARRAY newArray = new ARRAY(desc, conn, nlGroup);
 stmt = conn.prepareCall(sql);
 stmt.setString(1, userName);
 stmt.setString(2, password);
 ((OraclePreparedStatement)stmt).setArray(3, newArray);
.
.
.
 

* ArrayDescriptor - GenericConnection exception, Eva Garabedian


Chronological -- Thread --

Reply via email to



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




Actions invoked by links have more flexibility than those driven byforms?

2003-01-02 Thread John Munsch
With an html:link I can embed a reference to a parameter or multiple
parameters:


html:link paramId=id paramName=myBean paramProperty=id 
forward=/testClick Me/html:link


Note that this will call whatever /test maps to with ?id=some #
after it. And if I create /test as a global forward and map that to some
action mapping (e.g. /test points to /test.do) then an action gets
called with either one or more parameters passed through to it.

On the other hand, with html:form I don't seem to have the same
functionality. I don't see a way to refer to a parameter or set of
parameters in the html:form tag so that I can pass through parameters
that way. So I pretty much have to pass through anything I want to send
to an action invoked through a form using the ActionForm that it gets
when it is called.

My question is: Why? Since the action for the form is written into the
HTML in much the same fashion as a link is written, why can't you make
reference to one or even multiple parameters that you want to be written
into that URL via the same mechanisms that are available through
html:link? Why not:

html:form paramId=id paramName=myBean paramProperty=id 
action=/test

Or am I missing something completely?
-- 
John Munsch [EMAIL PROTECTED]
PDX, Inc.


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




Re: Actions invoked by links have more flexibility than those driven by forms?

2003-01-02 Thread Kris Schneider
For a single parameter:

html:hidden name=myBean property=id/

But there's no direct way to use a Map of parameters ala html:link. One
possibility (with JSTL):

c:forEach var=entry items=${paramMap}
  input type=hidden 
 name=c:out value='${entry.key}'/
 value=c:out value='${entry.value}'/
/c:forEach

Quoting John Munsch [EMAIL PROTECTED]:

 With an html:link I can embed a reference to a parameter or multiple
 parameters:
 
 
 html:link paramId=id paramName=myBean paramProperty=id 
 forward=/testClick Me/html:link
 
 
 Note that this will call whatever /test maps to with ?id=some #
 after it. And if I create /test as a global forward and map that to some
 action mapping (e.g. /test points to /test.do) then an action gets
 called with either one or more parameters passed through to it.
 
 On the other hand, with html:form I don't seem to have the same
 functionality. I don't see a way to refer to a parameter or set of
 parameters in the html:form tag so that I can pass through parameters
 that way. So I pretty much have to pass through anything I want to send
 to an action invoked through a form using the ActionForm that it gets
 when it is called.
 
 My question is: Why? Since the action for the form is written into the
 HTML in much the same fashion as a link is written, why can't you make
 reference to one or even multiple parameters that you want to be written
 into that URL via the same mechanisms that are available through
 html:link? Why not:
 
 html:form paramId=id paramName=myBean paramProperty=id 
 action=/test
 
 Or am I missing something completely?
 -- 
 John Munsch [EMAIL PROTECTED]
 PDX, Inc.
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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




RE: Actions invoked by links have more flexibility than those driven by forms?

2003-01-02 Thread mech
 
 On the other hand, with html:form I don't seem to have the 
 same functionality. I don't see a way to refer to a parameter 
 or set of parameters in the html:form tag so that I can pass 
 through parameters that way. So I pretty much have to pass 
 through anything I want to send to an action invoked through 
 a form using the ActionForm that it gets when it is called.

Mmmhh... Strange question indeed... With html:form method=GET you
could deliberately set that every form parameters are added to the
action url.
GET will URL encode the parameters from your form... So an input
type=text name=testfield will become ?testfield=value in your
URL... So really, why should you want to trigger (again) in the
html:form tag? Yoo can already if you use GET.

The only thing is that html:form sets the method to POST by
default... So you usually won't see the form parameters in the URL. 
But for the form processing servlets that's transparent how the
parameters are transfered.
 
 My question is: Why? Since the action for the form is written 
 into the HTML in much the same fashion as a link is written, 
 why can't you make reference to one or even multiple 
 parameters that you want to be written into that URL via the 
 same mechanisms that are available through html:link? Why not:
 
 html:form paramId=id paramName=myBean paramProperty=id 
 action=/test
 
 Or am I missing something completely?

Try html:form method=GET... Then you will see all your form fields
encoded into URL parameters.
But except making links bookmarkable there's hardly any reason to use
GET, IHMO.

Michael


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




Re: Actions invoked by links have more flexibility than those driven by forms?

2003-01-02 Thread Richard Yee
John,
You are missing the fact that form parameters cannot
be submitted using both the HTTP Post and Get methods
simulaneously. The method that is used by the
html:form tag is POST. This means that the form
contents are submitted as name-value pairs in the
contents of the HTTP message as opposed to sending
them as query parameters as would be the case if the
method was GET.
Why not?
If you try and append a query string to a form action
and POST it, the servlet receiving the request will
ignore the query string because the method is POST. I
think the browser will overwrite the query string if
you try and do the same think but set the method to
GET.

Regards,

Richard


--- John Munsch [EMAIL PROTECTED] wrote:
 With an html:link I can embed a reference to a
 parameter or multiple
 parameters:
 
 
 html:link paramId=id paramName=myBean
 paramProperty=id 
 forward=/testClick Me/html:link
 
 
 Note that this will call whatever /test maps to with
 ?id=some #
 after it. And if I create /test as a global forward
 and map that to some
 action mapping (e.g. /test points to /test.do) then
 an action gets
 called with either one or more parameters passed
 through to it.
 
 On the other hand, with html:form I don't seem to
 have the same
 functionality. I don't see a way to refer to a
 parameter or set of
 parameters in the html:form tag so that I can pass
 through parameters
 that way. So I pretty much have to pass through
 anything I want to send
 to an action invoked through a form using the
 ActionForm that it gets
 when it is called.
 
 My question is: Why? Since the action for the form
 is written into the
 HTML in much the same fashion as a link is written,
 why can't you make
 reference to one or even multiple parameters that
 you want to be written
 into that URL via the same mechanisms that are
 available through
 html:link? Why not:
 
 html:form paramId=id paramName=myBean
 paramProperty=id 
 action=/test
 
 Or am I missing something completely?
 -- 
 John Munsch [EMAIL PROTECTED]
 PDX, Inc.
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Ye olde html:options tag?

2003-01-02 Thread Michael P
I apologize for this basic question, but I'm new to struts and Java web
programming in general, and I really can't get the html:options tag to
work...

The error I'm getting, specifically, is:
  javax.servlet.jsp.JspException: No getter method available for property
email for bean under name users

My JSP defines a collection like this:
  bean:define id=users name=adminLoginForm property=users
type=java.util.Collection/

Then tries to use it like this:
  html:select property=email
html:options name=users property=email labelProperty=email/
  /html:select

My understanding of this is that it will call getUsers() on the
adminLoginForm bean to get a Collection, and then on each item within the
collection, will call getEmail() to retrieve the option property and
label.

Do I need to define a bean somewhere (in some XML file?) for the user
objects contained within the collection or something?  The collection
contains UserView objects that /do/, in fact, have a getEmail() method, so
I can't figure out why this won't work.

I have defined a form-bean for the login form:
  form-bean
name=adminLoginForm
type=com.federalresearch.fillouts.login.AdminLoginForm
form-property name=email type=java.lang.String/
  /form-bean

Thanks for any help you can offer...

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




Re: Is Struts-EL in Beta 3 release working properly?

2003-01-02 Thread David M. Karr
 John == John Hohlen Hohlen writes:

John Does anyone know if the Struts-EL subproject is working in the Struts 1.1
John beta 3 release?  I tried using this subproject in the 12/7 nightly build and
John encountered a JSP compilation problem with the HTML-EL tag library.  I'm
John not sure if this ever got fixed. 
John http://www.mail-archive.com/struts-user@jakarta.apache.org/msg51451.html

John Are others successfully using Struts-EL with beta 3?

You'd probably get better results describing your current problem, with
details.  I vaguely remember you had some problem a few weeks ago, but I wasn't
able to repeat your problem.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



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




Problem reloading resources with Beta 3

2003-01-02 Thread David Morris
I just did a quick rebuild of a project using the new Beta 3 version of
Struts 
and started getting an error loading a plugin. The project worked OK
with 
Beta 2. I probably missed something -- here is what I did:

1. Replace Struts Beta 2 related jars in Tomcat 1.1.12 based container

with Beta 3 jars
2. Replace TLDs
3. Started Tomcat and received an error in the
ActionServlet.initModulePlugIns 
while initializing com.fgm.web.menu.MneuPlugIn.init
4. Reverted back to Beta 2 and all works again.
5. Repeated steps 1-4

Does anyone know if there are changes I need to make anywhere else or
if 
there was a change made to the way plugins initialize?

Thanks,

David Morris







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




RE: ArrayDescriptor - GenericConnection exception

2003-01-02 Thread pqin
Oracle requires an explicit OracleConnection. Thus you have to get the
underlying connection of struts/tomcat connection by

((PoolableConnection) getConnection()).getDelegate()

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: January 2, 2003 3:25 PM
To: [EMAIL PROTECTED]
Subject: ArrayDescriptor - GenericConnection exception


Hi, Folks:

Happy New Year!

I am having the same problem Eva had. Anyone has a solution?

Many thanks.

Patrick


[Mail Archive]
struts-user
Chronological --
Find 
Thread --
ArrayDescriptor - GenericConnection exception

* From: Eva Garabedian
* Subject: ArrayDescriptor - GenericConnection exception
* Date: Wed, 12 Jun 2002 16:24:31 -0700

Hello List - I've got a question about passing a string array into an
Oracle Procedure. 
Specifically, my ArrayDescriptor assignment line is throwing a struts
exception, whose message is simply
org.apache.struts.util.GenericConnection.
I'm using a CallableStatement in my Java code to pass my String[] to my
Oracle procedure. Before I added the String[] parameter, everything was
working quite nicely. Now when I run this I get the dreaded
NullPointerException in the Tomcat messages in my browser, and the first
System.out.println (found below) shows up, but the GenericConnection
exception is thrown before the second println executes. This leads me to
believe that the ArrayDescriptor is the culprit. In the following code,
please note that the user_type NL_GROUP exists in my database, created
by the user CREATOR.

Thanks in advance for any suggestions about where I should look for
help. 



Here is my related code: 
public boolean addCustomer(String userName, String password,
String[] nlGroup) throws Exception  {
 
   Connection conn = null;
   CallableStatement stmt = null;
   String sql = {call INS_CUSTOMER_AND_CONTACT_INFO(?, ?, ?)};
 
   try {
 conn = dataSource.getConnection();
 
 System.out.println(After getConnection. );
 
 ArrayDescriptor desc =
ArrayDescriptor.createDescriptor(CREATOR.NL_GROUP, conn);
 
 System.out.println(After arrayDescriptor assignment. );
 
 ARRAY newArray = new ARRAY(desc, conn, nlGroup);
 stmt = conn.prepareCall(sql);
 stmt.setString(1, userName);
 stmt.setString(2, password);
 ((OraclePreparedStatement)stmt).setArray(3, newArray);
.
.
.
 

* ArrayDescriptor - GenericConnection exception, Eva Garabedian


Chronological -- Thread --

Reply via email to



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



RE: Ye olde html:options tag?

2003-01-02 Thread Siggelkow, Bill
Try using the 'collection' attribute instead of 'name' ... otherwise, the tag 
interprets the name/property combination as identifying the collection.

html:options collection=users property=email labelProperty=email/

\-Original Message-
From: Michael P [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 4:17 PM
To: [EMAIL PROTECTED]
Subject: Ye olde html:options tag?


I apologize for this basic question, but I'm new to struts and Java web
programming in general, and I really can't get the html:options tag to
work...

The error I'm getting, specifically, is:
  javax.servlet.jsp.JspException: No getter method available for property
email for bean under name users

My JSP defines a collection like this:
  bean:define id=users name=adminLoginForm property=users
type=java.util.Collection/

Then tries to use it like this:
  html:select property=email
html:options name=users property=email labelProperty=email/
  /html:select

My understanding of this is that it will call getUsers() on the
adminLoginForm bean to get a Collection, and then on each item within the
collection, will call getEmail() to retrieve the option property and
label.

Do I need to define a bean somewhere (in some XML file?) for the user
objects contained within the collection or something?  The collection
contains UserView objects that /do/, in fact, have a getEmail() method, so
I can't figure out why this won't work.

I have defined a form-bean for the login form:
  form-bean
name=adminLoginForm
type=com.federalresearch.fillouts.login.AdminLoginForm
form-property name=email type=java.lang.String/
  /form-bean

Thanks for any help you can offer...

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

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




multi row / multi col input forms

2003-01-02 Thread Mike Ash
Is there a way to get the inputs from an html form that has something like:

col1col2col3
row x   x   x
row x   x   x   
row x   x   x

where x may or may not be entered and the input boxes are named like col1,
col2, col3.  

So if a user enter a number in row2, col1 and row3, col1 how to tell that it
was row 2 and 3 that where entered because hen inputs are named the same the
parameters come back to the server as an array but there is no guarantee
which order they were in especially if the first one was blank as in this
case.  The array looks like I had two entries in col1 but the numbers are in
position 0, and 1.  which they should be in position 1 and 2.

Any thoughts.



Re: multi row / multi col input forms

2003-01-02 Thread Khalid K.
please read the post below from Craig(he answered a similar
question..see question/answer below)



On Thu, 2 Jan 2003, Toni Charlot wrote:

 Date: Thu, 2 Jan 2003 10:10:32 -0500
 From: Toni Charlot [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: REPOST: Forcing the ActionForm to populate a field before the
 other

 I would like to have a setter method called before another.  What's the
 best way to do that in the ActionForm

There are no guarantees on the order that the setters are called.  This is
for two reasons:

* There is no rule in the HTTP or HTML specs defining the order
  in which the request parameters are sent, so it's totally up
  to the client.  And they really do operate differently.

* There is no rule in the servlet spec saying that the input order
  has to be preserved, so it's totally up to the container to decide
  how to implement this.  And they really do operate differently.

More fundamentally, though, the only reason that the setter order would
matter is if there are side effects (setting one property affects the
semantics of setting a different one).  Designing your form beans in this
way is a very poor architectural decision -- the whole point of a form
bean is to simply represent the input values that the user actually
entered on the form.  Any functionality that tries to assign meaning to
these inputs should be done in business logic (which can pull data out of
the form bean in any order that you need), not in the form bean itself.


 Thank you.

Craig McClanahan



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



- Original Message -
From: Mike Ash [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 1:46 PM
Subject: multi row / multi col input forms


 Is there a way to get the inputs from an html form that has something
like:

 col1 col2 col3
 row x x x
 row x x x
 row x x x

 where x may or may not be entered and the input boxes are named like col1,
 col2, col3.

 So if a user enter a number in row2, col1 and row3, col1 how to tell that
it
 was row 2 and 3 that where entered because hen inputs are named the same
the
 parameters come back to the server as an array but there is no guarantee
 which order they were in especially if the first one was blank as in this
 case.  The array looks like I had two entries in col1 but the numbers are
in
 position 0, and 1.  which they should be in position 1 and 2.

 Any thoughts.



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




Struts v1.1b3 download?

2003-01-02 Thread ajTreece
I went to the apache site - milestone build for the subject mentioned 
release, but get a requested url not found error...

Where is the milestone build?


Later, ajTreece


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



(http://jakarta.apache.org/struts/tags-tiles-1.1) cannot be resolved

2003-01-02 Thread Daniel Grey
I am trying to deploy a .ear file to JBOSS and canNot get around this
error:

org.apache.jasper.JasperException: null(-1,-1) This absolute uri
(http://jakarta.apache.org/struts/tags-tiles-1.1) cannot be resolved in
either web.xml or the jar files deployed with this application

There are a bunch of .jsp files that contain this reference:
%@ taglib uri=http://jakarta.apache.org/struts/tags-tiles-1.1;
prefix=tiles %

The web.xml has this reference:
 taglib
 
taglib-urihttp://jakarta.apache.org/struts/tags-tiles-1.1/taglib-uri
taglib-location/WEB-INF/struts-tiles.tld/taglib-location
  /taglib

The lib directory has struts.jar and the classes directory has the
classes
Does anyone have a clue on this?
HELP!
Thanks

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




RE: Struts v1.1b3 download?

2003-01-02 Thread Carl Schwarcz
I get the same message.  You've got the correct url, just the site seems
broken.



-Original Message-
From: ajTreece [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 2:19 PM
To: Struts Users Mailing List
Subject: Struts v1.1b3 download?

I went to the apache site - milestone build for the subject mentioned 
release, but get a requested url not found error...

Where is the milestone build?


Later, ajTreece


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




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




Re: Struts v1.1b3 download?

2003-01-02 Thread David M. Karr
 ajTreece == ajTreece  [EMAIL PROTECTED] writes:

ajTreece I went to the apache site - milestone build for the subject mentioned 
release,
ajTreece but get a requested url not found error...

ajTreece Where is the milestone build?

I don't know why the link is broken, but you can get to the release here:

http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



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




Re: Struts v1.1b3 download?

2003-01-02 Thread Martin Cooper


On 2 Jan 2003, David M. Karr wrote:

  ajTreece == ajTreece  [EMAIL PROTECTED] writes:

 ajTreece I went to the apache site - milestone build for the subject mentioned 
release,
 ajTreece but get a requested url not found error...

 ajTreece Where is the milestone build?

 I don't know why the link is broken, but you can get to the release here:

My fault. The previous link from there for Beta 2 was also broken. That
didn't occur to me when I updated it for Beta 3 (I just changed '2' to
'3'), so it's still broken. ;-(

I'll fix it as soon as I can. In the meantime, you can use the link below,
or get it here:

http://www.apache.org/dist/jakarta/struts/

--
Martin Cooper



 http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/

 --
 ===
 David M. Karr  ; Java/J2EE/XML/Unix/C++
 [EMAIL PROTECTED]   ; SCJP



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




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




RE: multi row / multi col input forms

2003-01-02 Thread Mike Ash
I understand what he is saying about setter methods perhaps I am not
explaining the problem correctly

The exact example is I am trying to display a listing of a dynamic number of
projects with hours assigned to them by day for a given week, the user can
then update any of those fields to make changes, some of those fields may be
blank which means the browser will not send them to the server which puts
the rows / cols out of balance.

I am using the logic iterate tag to build a row which looks like

someText  someMoreText inputBox1 inputBox2 inputBox3 inputBox4

So for two rows I get

someText  someMoreText inputBox1 inputBox2 inputBox3 inputBox4
someText  someMoreText inputBox1 inputBox2 inputBox3 inputBox4

This means that from a vertical perspective the boxes have the same name (
is there a better way to do the names?)
If a inputBox doesn't contain anything I can't tell which one it really was
except which column it didn't come from.

Clear as mud?


-Original Message-
From: Khalid K. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 3:51 PM
To: Struts Users Mailing List
Subject: Re: multi row / multi col input forms


please read the post below from Craig(he answered a similar
question..see question/answer below)



On Thu, 2 Jan 2003, Toni Charlot wrote:

 Date: Thu, 2 Jan 2003 10:10:32 -0500
 From: Toni Charlot [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: REPOST: Forcing the ActionForm to populate a field before the
 other

 I would like to have a setter method called before another.  What's the
 best way to do that in the ActionForm

There are no guarantees on the order that the setters are called.  This is
for two reasons:

* There is no rule in the HTTP or HTML specs defining the order
  in which the request parameters are sent, so it's totally up
  to the client.  And they really do operate differently.

* There is no rule in the servlet spec saying that the input order
  has to be preserved, so it's totally up to the container to decide
  how to implement this.  And they really do operate differently.

More fundamentally, though, the only reason that the setter order would
matter is if there are side effects (setting one property affects the
semantics of setting a different one).  Designing your form beans in this
way is a very poor architectural decision -- the whole point of a form
bean is to simply represent the input values that the user actually
entered on the form.  Any functionality that tries to assign meaning to
these inputs should be done in business logic (which can pull data out of
the form bean in any order that you need), not in the form bean itself.


 Thank you.

Craig McClanahan



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



- Original Message -
From: Mike Ash [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 1:46 PM
Subject: multi row / multi col input forms


 Is there a way to get the inputs from an html form that has something
like:

 col1 col2 col3
 row x x x
 row x x x
 row x x x

 where x may or may not be entered and the input boxes are named like col1,
 col2, col3.

 So if a user enter a number in row2, col1 and row3, col1 how to tell that
it
 was row 2 and 3 that where entered because hen inputs are named the same
the
 parameters come back to the server as an array but there is no guarantee
 which order they were in especially if the first one was blank as in this
 case.  The array looks like I had two entries in col1 but the numbers are
in
 position 0, and 1.  which they should be in position 1 and 2.

 Any thoughts.



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



RE: Is Struts-EL in Beta 3 release working properly?

2003-01-02 Thread Hohlen, John
Here was the original problem:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg51370.html

Thanks,

JOHN
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 3:18 PM
To: [EMAIL PROTECTED]
Subject: Re: Is Struts-EL in Beta 3 release working properly?


 John == John Hohlen Hohlen writes:

John Does anyone know if the Struts-EL subproject is working in the
Struts 1.1
John beta 3 release?  I tried using this subproject in the 12/7 nightly
build and
John encountered a JSP compilation problem with the HTML-EL tag
library.  I'm
John not sure if this ever got fixed. 
John
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg51451.html

John Are others successfully using Struts-EL with beta 3?

You'd probably get better results describing your current problem, with
details.  I vaguely remember you had some problem a few weeks ago, but I
wasn't
able to repeat your problem.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



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

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




FYI: Struts in Action Unavailable at Amazon

2003-01-02 Thread James Watkin
I tried to place an order for Struts in Action just prior to Christmas. 
Here's Amazon's response:

Greetings from Amazon.com.

We are sorry to report that we will not be able to obtain the following
item from your order:

  Ted Husted, et al Struts in Action: Building Web
Applications with the Leading Java Framework

Though we had expected to be able to send this item to you, we've
since found that it is not available from any of our sources at this
time.  We realize this is disappointing news to hear, and we apologize
for any inconvenience we have caused you.

We have cancelled this item from your order.

I'm going for the $22.47 E-book version available at:
http://www.manning.com/ebook_buy.html?project=husted

They also note: ebook purchasers who decide later to purchase the printed 
book online from Manning will receive a discount of $22.47 off the list 
price of the printed book.

- Jim

__
James Watkin
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__


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



RE: multi row / multi col input forms

2003-01-02 Thread James Turner
Here's one way to do it:

Let's say you want to be able to record the grades of some students
across a number of classes.

First define a Bean called StudentGrades:

Package example;

public StudentGrades {
   private String name, biology, chemistry, physics, english, math;

   public String getName () { return this.name; }
   public String getBiology () { return this.biology; }
   public String getChemisty () { return this.chemistry; }
   public String getPhysics () { return this.physics; }
   public String getEnglish () { return this.english; }
   public String getMath () { return this.math; }

   public void setName (String name) { this.name = name; }
   public void setBiology (String grade) { this.biology = grade; }
   public void setChemisty (String grade) { this.chemistry = grade; }
   public void setPhysics (String grade) { this.physics = grade; }
   public void setEnglish (String grade) { this.english = grade; }
   public void setMath (String grade) { this.math = grade; }
}

In your struts-config.xml, define:

form-bean  name=studentGradeForm
type=org.apache.struts.validator.DynaValidatorForm
   form-property name=grades type=example.StudentGrades[]
size=50
/form-bean

Then, presuming that your Action populates the StudentGrades array with
the student names, in your JSP, you'd say:

html:form action=/some/action
TABLETRTDName/TDTDBiology/TDTDChemistry/TDTDPhysics/T
DTDEnglish/TDTDMath/TD/TR
logic:iterate id=student name=studentGradeForm property=grades
type=example.StudentGrades
logic:notEmpty name=student property=name
TRTDbean:write name=student property=name indexed=true//TD
TDhtml:text name=student property=biology indexed=true//TD
TDhtml:text name=student property=chimstry indexed=true//TD
TDhtml:text name=student property=physics indexed=true//TD
TDhtml:text name=student property=english indexed=true//TD
TDhtml:text name=student property=math indexed=true//TD/TR
/logic:notEmpty
/logic:iterate
/TABLE

 -Original Message-
 From: Mike Ash [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 02, 2003 5:04 PM
 To: 'Struts Users Mailing List'
 Subject: RE: multi row / multi col input forms
 
 
 I understand what he is saying about setter methods perhaps I 
 am not explaining the problem correctly
 
 The exact example is I am trying to display a listing of a 
 dynamic number of projects with hours assigned to them by day 
 for a given week, the user can then update any of those 
 fields to make changes, some of those fields may be blank 
 which means the browser will not send them to the server 
 which puts the rows / cols out of balance.
 
 I am using the logic iterate tag to build a row which looks like
 
 someText  someMoreText inputBox1 inputBox2 inputBox3 inputBox4
 
 So for two rows I get
 
 someText  someMoreText inputBox1 inputBox2 inputBox3 
 inputBox4 someText  someMoreText inputBox1 inputBox2 
 inputBox3 inputBox4
 
 This means that from a vertical perspective the boxes have 
 the same name ( is there a better way to do the names?) If a 
 inputBox doesn't contain anything I can't tell which one it 
 really was except which column it didn't come from.
 
 Clear as mud?
 
 
 -Original Message-
 From: Khalid K. [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 02, 2003 3:51 PM
 To: Struts Users Mailing List
 Subject: Re: multi row / multi col input forms
 
 
 please read the post below from Craig(he answered a 
 similar question..see question/answer below)
 
 
 
 On Thu, 2 Jan 2003, Toni Charlot wrote:
 
  Date: Thu, 2 Jan 2003 10:10:32 -0500
  From: Toni Charlot [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED],
   [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: REPOST: Forcing the ActionForm to populate a field 
 before the
  other
 
  I would like to have a setter method called before another.  What's 
  the best way to do that in the ActionForm
 
 There are no guarantees on the order that the setters are 
 called.  This is for two reasons:
 
 * There is no rule in the HTTP or HTML specs defining the order
   in which the request parameters are sent, so it's totally up
   to the client.  And they really do operate differently.
 
 * There is no rule in the servlet spec saying that the input order
   has to be preserved, so it's totally up to the container to decide
   how to implement this.  And they really do operate differently.
 
 More fundamentally, though, the only reason that the setter 
 order would matter is if there are side effects (setting one 
 property affects the semantics of setting a different one).  
 Designing your form beans in this way is a very poor 
 architectural decision -- the whole point of a form bean is 
 to simply represent the input values that the user actually 
 entered on the form.  Any functionality that tries to assign 
 meaning to these inputs should be done in business logic 
 (which can pull data out of the form bean in any order that 
 you need), not in the form bean itself.
 
 
  Thank you.

Re: Is Struts-EL in Beta 3 release working properly?

2003-01-02 Thread David M. Karr
 John == John Hohlen Hohlen writes:

John Here was the original problem:
John http://www.mail-archive.com/struts-user@jakarta.apache.org/msg51370.html

I can only guess that there's some problem with WL 6.1SP2.  Have you actually
tried it yet with 1.1B3?  Are you able to try it with newer patch releases of
WL 6.1?  I believe there was at least one more patch level of 6.1.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



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




RE: multi row / multi col input forms

2003-01-02 Thread Mike Ash
OOPs! If I were to RTFM I would have found it, the tags have the indexed
attribute.  

Thanks!

-Original Message-
From: Khalid K. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 3:51 PM
To: Struts Users Mailing List
Subject: Re: multi row / multi col input forms


please read the post below from Craig(he answered a similar
question..see question/answer below)



On Thu, 2 Jan 2003, Toni Charlot wrote:

 Date: Thu, 2 Jan 2003 10:10:32 -0500
 From: Toni Charlot [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: REPOST: Forcing the ActionForm to populate a field before the
 other

 I would like to have a setter method called before another.  What's the
 best way to do that in the ActionForm

There are no guarantees on the order that the setters are called.  This is
for two reasons:

* There is no rule in the HTTP or HTML specs defining the order
  in which the request parameters are sent, so it's totally up
  to the client.  And they really do operate differently.

* There is no rule in the servlet spec saying that the input order
  has to be preserved, so it's totally up to the container to decide
  how to implement this.  And they really do operate differently.

More fundamentally, though, the only reason that the setter order would
matter is if there are side effects (setting one property affects the
semantics of setting a different one).  Designing your form beans in this
way is a very poor architectural decision -- the whole point of a form
bean is to simply represent the input values that the user actually
entered on the form.  Any functionality that tries to assign meaning to
these inputs should be done in business logic (which can pull data out of
the form bean in any order that you need), not in the form bean itself.


 Thank you.

Craig McClanahan



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



- Original Message -
From: Mike Ash [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 1:46 PM
Subject: multi row / multi col input forms


 Is there a way to get the inputs from an html form that has something
like:

 col1 col2 col3
 row x x x
 row x x x
 row x x x

 where x may or may not be entered and the input boxes are named like col1,
 col2, col3.

 So if a user enter a number in row2, col1 and row3, col1 how to tell that
it
 was row 2 and 3 that where entered because hen inputs are named the same
the
 parameters come back to the server as an array but there is no guarantee
 which order they were in especially if the first one was blank as in this
 case.  The array looks like I had two entries in col1 but the numbers are
in
 position 0, and 1.  which they should be in position 1 and 2.

 Any thoughts.



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



Re: Struts v1.1b3 download?

2003-01-02 Thread Martin Cooper
The links have been fixed.

--
Martin Cooper


On Thu, 2 Jan 2003, Martin Cooper wrote:



 On 2 Jan 2003, David M. Karr wrote:

   ajTreece == ajTreece  [EMAIL PROTECTED] writes:
 
  ajTreece I went to the apache site - milestone build for the subject 
mentioned release,
  ajTreece but get a requested url not found error...
 
  ajTreece Where is the milestone build?
 
  I don't know why the link is broken, but you can get to the release here:

 My fault. The previous link from there for Beta 2 was also broken. That
 didn't occur to me when I updated it for Beta 3 (I just changed '2' to
 '3'), so it's still broken. ;-(

 I'll fix it as soon as I can. In the meantime, you can use the link below,
 or get it here:

 http://www.apache.org/dist/jakarta/struts/

 --
 Martin Cooper


 
  http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/
 
  --
  ===
  David M. Karr  ; Java/J2EE/XML/Unix/C++
  [EMAIL PROTECTED]   ; SCJP
 
 
 
  --
  To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


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




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




ELFormTag.getFocusIndex() no such method

2003-01-02 Thread Brian Moseley

for some reason, almost every time i start up my app server (jboss 3.0.4 
w/ tomcat 4.1.12) and click to a jsp with an html:form element, i get 
the following exception:

java.lang.NoSuchMethodError: 
org.apache.strutsel.taglib.html.ELFormTag.getFocusIndex()Ljava/lang/String; 
at 
org.apache.strutsel.taglib.html.ELFormTag.evaluateExpressions(ELFormTag.java:143) 
at 
org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:89) 
at org.apache.jsp.List_jsp._jspx_meth_html_form_0(List_jsp.java:197) at 
org.apache.jsp.List_jsp._jspService(List_jsp.java:114) at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at
...

there is nothing about focus anywhere in my jsps, so i'm at a loss as to 
how to explain what is causing this exception. anybody seen anything 
like this?


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



absolute uri cannot be resolved

2003-01-02 Thread Daniel Grey
I am trying to deploy a .ear file (created by someone else) to JBOSS and
canNot get around this error:

org.apache.jasper.JasperException: null(-1,-1) This absolute uri
(http://jakarta.apache.org/struts/tags-tiles-1.1) cannot be resolved in
either web.xml or the jar files deployed with this application

There are a bunch of .jsp files that contain this reference:
%@ taglib uri=http://jakarta.apache.org/struts/tags-tiles-1.1;
prefix=tiles %

The web.xml has this reference:
 taglib
 
taglib-urihttp://jakarta.apache.org/struts/tags-tiles-1.1/taglib-uri
taglib-location/WEB-INF/struts-tiles.tld/taglib-location
  /taglib

The lib directory has struts.jar and the classes directory has the
classes
Does anyone have a clue on this?
HELP!
Thanks
 

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




Odd Tiles Behavior with 2003-01-01 Nightly Build

2003-01-02 Thread Paul Hodgetts, Agile Logic
I have a tiles application that was running fine on a
nightly build from 2002-12-03.  I just installed the
nightly build from 2003-01-01.  My tiles:insert sections
are now being inserted at the top of the HTML document
instead of at the point of the insert.  E.g., instead of:

head
body
  table
tr
  td inserted tile 1 /td
  td inserted tile 2 /td
/tr
  /table
/body

I get:

inserted tile 1
inserted tile 2
head
body
  table
tr
  td /td
  td /td
/tr
  /table
/body

Weirdness.  I've scanned the mailing list and release notes
for something related to this, but I couldn't find anything.
Any ideas?

Thanks,
Paul


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




RE: Odd Tiles Behavior with 2003-01-01 Nightly Build

2003-01-02 Thread James Mitchell
That certainly does sound strange.  I don't recall hearing anything like
this in the past.

Can you describe your settings with a bit more detail?
Have you made any configuration changes recently? (or using another
container)



--
James Mitchell
Software Engineer/Open Source Evangelist
http://www.open-tools.org

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: Paul Hodgetts, Agile Logic [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 02, 2003 9:07 PM
 To: [EMAIL PROTECTED]
 Subject: Odd Tiles Behavior with 2003-01-01 Nightly Build
 
 
 I have a tiles application that was running fine on a
 nightly build from 2002-12-03.  I just installed the
 nightly build from 2003-01-01.  My tiles:insert sections
 are now being inserted at the top of the HTML document
 instead of at the point of the insert.  E.g., instead of:
 
 head
 body
table
  tr
td inserted tile 1 /td
td inserted tile 2 /td
  /tr
/table
 /body
 
 I get:
 
 inserted tile 1
 inserted tile 2
 head
 body
table
  tr
td /td
td /td
  /tr
/table
 /body
 
 Weirdness.  I've scanned the mailing list and release notes
 for something related to this, but I couldn't find anything.
 Any ideas?
 
 Thanks,
 Paul
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 


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




Re: ELFormTag.getFocusIndex() no such method

2003-01-02 Thread David M. Karr
 Brian == Brian Moseley [EMAIL PROTECTED] writes:

Brian for some reason, almost every time i start up my app server (jboss 3.0.4 w/
Brian tomcat 4.1.12) and click to a jsp with an html:form element, i get the
Brian following exception:


Brian java.lang.NoSuchMethodError:
Brian org.apache.strutsel.taglib.html.ELFormTag.getFocusIndex()Ljava/lang/String; 
at
Brian 
org.apache.strutsel.taglib.html.ELFormTag.evaluateExpressions(ELFormTag.java:143)
Brian at org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:89) 
at
Brian org.apache.jsp.List_jsp._jspx_meth_html_form_0(List_jsp.java:197) at
Brian org.apache.jsp.List_jsp._jspService(List_jsp.java:114) at
Brian org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at

Brian ...

Brian there is nothing about focus anywhere in my jsps, so i'm at a loss as to 
how to
Brian explain what is causing this exception. anybody seen anything like this?

On December 13th, the focusIndex attribute was added to the form tag in the
base library.  Later that day, I added focusIndex to the form tag in
Struts-EL.

If you're getting this error, then the version of strutsel.jar that you have
does not match the version of struts.jar that your container is seeing.  I
would guess you have more than one struts.jar in your classpath, or visible
from more than one classloader, and one of them is older than the other.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



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




Re: ELFormTag.getFocusIndex() no such method

2003-01-02 Thread Brian Moseley
David M. Karr wrote:


On December 13th, the focusIndex attribute was added to the form tag in the
base library.  Later that day, I added focusIndex to the form tag in
Struts-EL.

If you're getting this error, then the version of strutsel.jar that you have
does not match the version of struts.jar that your container is seeing.  I
would guess you have more than one struts.jar in your classpath, or visible
from more than one classloader, and one of them is older than the other.


that makes sense, except: i have updated struts.jar and struts-el.jar 
twice since dec 13- the dec 24 nightly build and then 1.1b3. i will 
search for other jars that might be lying around unbeknownst to me. 
thanks for the tip.



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



Re: Odd Tiles Behavior with 2003-01-01 Nightly Build

2003-01-02 Thread Paul Hodgetts, Agile Logic
James Mitchell wrote:

 That certainly does sound strange.  I don't recall hearing
 anything like this in the past.

 Can you describe your settings with a bit more detail?
 Have you made any configuration changes recently? (or using
 another container)

All I did was download the 2003-01-01 release and copy the new
struts.jar and commons-*.jar and the new tlds into my web app's
directories.  I can toggle this weird behavior by just swapping
the struts.jar from the 2002-12-27 build and the 2003-01-01
build.

What settings would be helpful for you to see (before I dump
a bunch of stuff onto the list ;-)?

Thanks,
Paul

-
I previously wrote:

 I have a tiles application that was running fine on a
 nightly build from 2002-12-03.  I just installed the
 nightly build from 2003-01-01.  My tiles:insert sections
 are now being inserted at the top of the HTML document
 instead of at the point of the insert.  E.g., instead of:


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




Database access

2003-01-02 Thread sreejith
Dear all,

I have done an application using Struts MVC pattern. In that i am 
creating the database connection using the following statements

javax.sql.DataSource dataSource = 
(javax.sql.DataSource)servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
 

Connection connection =dataSource.getConnection();
Statement  st  =  connection.createStatement();

I specified all the data base related details in struts-config.xml file. I am using 
the JSQLConnect Type 4 Driver for the database connection. Previously it was working 
perfectly. But in December JSQLConnect has released a new version of JSQLConnect Type4 
Driver. While using the new version of the driver, My application is not working 
perfectly. It is getting database connection only once . The connection pooling is not 
happening.

 Can any body help me to solve this problem.

Waiting for your  valuable suggessions and solutions

Thanks,
Sreejith



RE: Odd Tiles Behavior with 2003-01-01 Nightly Build

2003-01-02 Thread James Mitchell
 What settings would be helpful for you to see 

Well, you've peaked my interest enough to try and replicate this.
Certainly its worth taking a whack at before submitting a bug.

If you ask 5 developers how to implement a webapp that utilzes Tiles,
you'll get 7 different answers.  Could you elaborate on your definitions
and how/if you are combining them with action-mappings? 

Perhaps you could cut out everything from your jsp except the offending
lines/tags.you know, just trying to narrow down the problem since
nothing we've discussed yet jumps out at me.


--
James Mitchell
Software Engineer/Open Source Evangelist
http://www.open-tools.org

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. 
- Bjarne Stroustrup


 -Original Message-
 From: Paul Hodgetts, Agile Logic [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 02, 2003 10:49 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Odd Tiles Behavior with 2003-01-01 Nightly Build
 
 
 James Mitchell wrote:
 
   That certainly does sound strange.  I don't recall hearing
   anything like this in the past.
  
   Can you describe your settings with a bit more detail?
   Have you made any configuration changes recently? (or using
   another container)
 
 All I did was download the 2003-01-01 release and copy the new
 struts.jar and commons-*.jar and the new tlds into my web app's
 directories.  I can toggle this weird behavior by just swapping
 the struts.jar from the 2002-12-27 build and the 2003-01-01
 build.
 
 What settings would be helpful for you to see (before I dump
 a bunch of stuff onto the list ;-)?
 
 Thanks,
 Paul
 


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




Iterate help

2003-01-02 Thread Mark Minnie
Let me try to explain this a quickly and clearly as possible.  I want to
make my struts application have a calendar.  The user can add notes to each
day on the calendar.  I made a class that will contain all the information
for the note (see the ANote class below).  The note class contains a string
and a date.  I also have a class that store many notes.  The class (see the
MyNotes class below) will hold the notes in ArrayLists that are stored in a
Hashtable.  So if I add 2 notes for Jan 1, 2003 and 3 notes for Jan 2, 2003,
the Hashtable will contain 2 ArrayListsone array list for each day.  I
thought this would be easy to iterate through each ArrayList...that is
what I thought.  My struts Action will create a MyNotes object, fill the
MyNotes object with the notes that need to be displayed on the calendar (may
be a weekly calendar, monthly, etc).  This filled MyNotes object will be set
as a request attribute (e.g. request.setAttribute(myNotes, myNotes); ).

What I don't know how to do is to easily get the ArrayList for each day
using the MyNotes.getNotes(date) method.  I am _trying_ to use the struts
logic tag libraries to do this.  I CAN do this using Java code in my JSP,
but that is the purpose of the struts design...to minimize the use of Java
in the JSP.  So...is there a way to use the struts logic:iterate tag to get
the ArrayList of a particular day?  Something like:

(theDays can be a collection of the days to display on the calendar)

logic:iterate id=theDays name=days
   logic:iterate name=someNotes id=myNotes property=notes
parameter=bean:write name=days
  The note says:bean:write name=someNotes property=note
   /logic:iterate

/logic:iterate



---
import java.util.Date;

public class ANote {

protected String note;
protected Date event_date;

public void setNote(String note) { this.note = note; }
public String getNote() { return note; }

public void setEventDate(Date event_date) { this.event_date =
event_date; }
public Date getEventDate() { return event_date; }
}


---

import java.util.Hashtable;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.Calendar;
import java.util.Date;
import java.text.SimpleDateFormat;

public class MyNotes {

private Hashtable allNotes;

// Adds a note to the ArrayList in the Hashtable
public void addNote(ANote myNote) {
ArrayList notes;

// Get date as hash key
SimpleDateFormat sdf = new SimpleDateFormat(MMdd);
String dateString = sdf.format(note.getEventDate());

// get existing array list for date
try {
notes = (ArrayList)allNotes.get(dateString);

if (notes == null) {
notes = new ArrayList();
allNotes.put(dateString, notes);
}
} catch (Throwable t) {
}

// Add appointment
notes.add(myNote);
}

// Returns all MyNotes from a date
public ArrayList getNotes(Date date) {
ArrayList notes;

// Get hash key
SimpleDateFormat sdf = new SimpleDateFormat(MMdd);
String dateString = sdf.format(date);

// get existing array list for date
try {
notes = (ArrayList)allNotes.get(dateString);
return notes;
} catch (Throwable t) {
}
}

public MyNotes() {
allNotes = new Hashtable();
}

}


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




ApplicationResources.properties

2003-01-02 Thread Jimmy Oh
Hi,
I am new to Struts.  I want to know whether is there a way (or is it
possible at all?) to put the `ApplicationResources.properties' file in
another directory other than in the `WEB-INF/classes' directory onwards?
That is, I do not want `ApplicationResources.properties' to be in
`WEB-INF/classes' or any of its sub-directories.

TIA
Jimmy


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




Re: ApplicationResources.properties

2003-01-02 Thread Dan Tran
Consult your servlet container to add additional classpath
(ie your property file path)

-D
- Original Message -
From: Jimmy Oh [EMAIL PROTECTED]
To: Struts Users [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 9:27 PM
Subject: ApplicationResources.properties


 Hi,
 I am new to Struts.  I want to know whether is there a way (or is it
 possible at all?) to put the `ApplicationResources.properties' file in
 another directory other than in the `WEB-INF/classes' directory onwards?
 That is, I do not want `ApplicationResources.properties' to be in
 `WEB-INF/classes' or any of its sub-directories.

 TIA
 Jimmy


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


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




Does not work to use SaveToken to avoid duplicated submit if I use the same jsp as the form and also as the resulting page?

2003-01-02 Thread Jason Yam
Hi everyone,
 
I try to use Struts 1.0.2's SaveToken function to avoid duplicated
submit.  However I try to use the following logic to make it work:
 
Action = JSP (show the submit form without the data) = (click submit) =
Action with populated form = JSP (show the same jsp page to show the data
result)
 
I get the message duplicated request.
 
I think neither (1) it can use the same Action class to show and process
the data, nor (2) it can use the same jsp page to show the form and display
the result.  I use a debugger to know that the value of the hidden variable
for storing the saved session Token value is the same as the session Token
stored in session after I click the submit button.  That 's why the
isValidToken is false.  It is the bug in my coding or this is the default
behaviour of Struts?
 
Thank you!
 
Jason



multiple parameters for dispatchaction

2003-01-02 Thread usha
Hi

can we pass multiple parameters for dispatchaction.

for example
i wanted to go to the details page on click of link i wanted to pass 
the primary key value along with the dispatch action parameter value.

how can i pass the both the dispatchaction parameter and the primary key 
value.

Thanks
usha


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



Re: multiple parameters for dispatchaction

2003-01-02 Thread Dan Tran
set your primary key as a hidden field.  This way you dont have to pass it
in the query string

-D


- Original Message -
From: usha [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 10:41 PM
Subject: multiple parameters for dispatchaction


 Hi

 can we pass multiple parameters for dispatchaction.

 for example
  i wanted to go to the details page on click of link i wanted to pass
 the primary key value along with the dispatch action parameter value.

 how can i pass the both the dispatchaction parameter and the primary key
 value.

 Thanks
 usha


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


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




Re: multiple parameters for dispatchaction

2003-01-02 Thread usha
Hi Dan Tran

i cannot set as hidden field because in that page all the primary keys 
list will be there upon clicking on the on of the primary key the key 
has to passed to the dispatchaction class

Thanks
usha

Dan Tran wrote:

set your primary key as a hidden field.  This way you dont have to pass it
in the query string

-D


- Original Message -
From: usha [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 10:41 PM
Subject: multiple parameters for dispatchaction


 

Hi

can we pass multiple parameters for dispatchaction.

for example
i wanted to go to the details page on click of link i wanted to pass
the primary key value along with the dispatch action parameter value.

how can i pass the both the dispatchaction parameter and the primary key
value.

Thanks
usha


--
To unsubscribe, e-mail:
   

mailto:[EMAIL PROTECTED]
 

For additional commands, e-mail:
   

mailto:[EMAIL PROTECTED]
 


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





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




Re: Iterate help

2003-01-02 Thread Martijn Lindhout
Hi Mark,

I think there is no direct 'struts way' to call the getNotes method. The 
iterate tag iterates over collections and arrays, so you may use
the bean:define tag to define the collection bean. Then, use that bean in 
the iterate tag.

You still have the problem of calling the getNotes method for a specific 
date.

Greetz,
  Martijn Lindhout





From: Mark Minnie [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Iterate help
Date: Thu, 2 Jan 2003 21:24:41 -0800

Let me try to explain this a quickly and clearly as possible.  I want to
make my struts application have a calendar.  The user can add notes to each
day on the calendar.  I made a class that will contain all the information
for the note (see the ANote class below).  The note class contains a string
and a date.  I also have a class that store many notes.  The class (see the
MyNotes class below) will hold the notes in ArrayLists that are stored in a
Hashtable.  So if I add 2 notes for Jan 1, 2003 and 3 notes for Jan 2, 
2003,
the Hashtable will contain 2 ArrayListsone array list for each day.  I
thought this would be easy to iterate through each ArrayList...that is
what I thought.  My struts Action will create a MyNotes object, fill the
MyNotes object with the notes that need to be displayed on the calendar 
(may
be a weekly calendar, monthly, etc).  This filled MyNotes object will be 
set
as a request attribute (e.g. request.setAttribute(myNotes, myNotes); ).

What I don't know how to do is to easily get the ArrayList for each day
using the MyNotes.getNotes(date) method.  I am _trying_ to use the struts
logic tag libraries to do this.  I CAN do this using Java code in my JSP,
but that is the purpose of the struts design...to minimize the use of Java
in the JSP.  So...is there a way to use the struts logic:iterate tag to get
the ArrayList of a particular day?  Something like:

(theDays can be a collection of the days to display on the calendar)

logic:iterate id=theDays name=days
   logic:iterate name=someNotes id=myNotes property=notes
parameter=bean:write name=days
  The note says:bean:write name=someNotes property=note
   /logic:iterate

/logic:iterate



---
import java.util.Date;

public class ANote {

protected String note;
protected Date event_date;

public void setNote(String note) { this.note = note; }
public String getNote() { return note; }

public void setEventDate(Date event_date) { this.event_date =
event_date; }
public Date getEventDate() { return event_date; }
}


---

import java.util.Hashtable;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.Calendar;
import java.util.Date;
import java.text.SimpleDateFormat;

public class MyNotes {

private Hashtable allNotes;

// Adds a note to the ArrayList in the Hashtable
public void addNote(ANote myNote) {
ArrayList notes;

// Get date as hash key
SimpleDateFormat sdf = new SimpleDateFormat(MMdd);
String dateString = sdf.format(note.getEventDate());

// get existing array list for date
try {
notes = (ArrayList)allNotes.get(dateString);

if (notes == null) {
notes = new ArrayList();
allNotes.put(dateString, notes);
}
} catch (Throwable t) {
}

// Add appointment
notes.add(myNote);
}

// Returns all MyNotes from a date
public ArrayList getNotes(Date date) {
ArrayList notes;

// Get hash key
SimpleDateFormat sdf = new SimpleDateFormat(MMdd);
String dateString = sdf.format(date);

// get existing array list for date
try {
notes = (ArrayList)allNotes.get(dateString);
return notes;
} catch (Throwable t) {
}
}

public MyNotes() {
allNotes = new Hashtable();
}

}


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


_
Chatten met je online vrienden via MSN Messenger. http://messenger.msn.nl/


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




Re: multiple parameters for dispatchaction

2003-01-02 Thread Dan Tran
So you start out with a list of items and upon clicking on
the item (your primary key), it will invoke a dispatch action?  In another
word, the initial screen does not have a form.?

-D

- Original Message -
From: usha [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 02, 2003 11:35 PM
Subject: Re: multiple parameters for dispatchaction


 Hi Dan Tran

 i cannot set as hidden field because in that page all the primary keys
 list will be there upon clicking on the on of the primary key the key
 has to passed to the dispatchaction class

 Thanks
 usha

 Dan Tran wrote:

 set your primary key as a hidden field.  This way you dont have to pass
it
 in the query string
 
 -D
 
 
 - Original Message -
 From: usha [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 02, 2003 10:41 PM
 Subject: multiple parameters for dispatchaction
 
 
 
 
 Hi
 
 can we pass multiple parameters for dispatchaction.
 
 for example
  i wanted to go to the details page on click of link i wanted to pass
 the primary key value along with the dispatch action parameter value.
 
 how can i pass the both the dispatchaction parameter and the primary key
 value.
 
 Thanks
 usha
 
 
 --
 To unsubscribe, e-mail:
 
 
 mailto:[EMAIL PROTECTED]
 
 
 For additional commands, e-mail:
 
 
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 




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


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




Re: Control Flow Errors

2003-01-02 Thread Matthias Bauer
Hi Jerry,

sorry for responding this late, but I did not check my mails between 
christmas and new year.

Concerning your question: There is not very much support in the workflow 
extension to deal with your situation. The workflow extension allows you 
to define a controlflowexception forward either globally and/or for 
each action. But this is not what you want. If I got you right, you want 
to handle control flow exceptions depending on the state you are 
currently in, when the workflow violation happens.

Here is just an idea that might aim in the right direction:

1. Change the global control flow exception forward definition like so:

 !-- this happens, if the workflow data do not match --
 forward name=controlflowexception 
path=/handleControlFlowException.do/

2. Define an action, the global forward points to:

 action path=/handleControlFlowException
 type=your.own.package.HandleControlFlowException
 /action

3. Globally define a forward for each workflow, sticking to a naming 
convention, e. g.:
 forward name=controlflowexception:wf1 
path=/wf1ControlFlowException.jspp/
 forward name=controlflowexception:wf2 
path=/wf2ControlFlowException.jspp/
 forward name=controlflowexception:wf3 
path=/wf3ControlFlowException.jspp/

4. Implement the class HandleControlFlowException, which needs to 
determine, where to forward to according to the naming convention. How 
this is determined, depends on the mechanism you have in mind. And this  
is where I am not quite clear about: What is the exact condition to 
forward to wf1, wf2 or wf3 exception page?

This is just what came to my mind, when I read your question, so I 
wanted to share it. I don't know if it helps you, or if I even got you 
right. Again: I don't really get what the conditions should be to decide 
which exception page to display, because it could also be the secondary 
workflow that causes the exception.

--- Matthias


Jerry Yu wrote:

Hi Matthias,

I finally figure almost all the things I need to use workflow. Thanks 
for you example about how to go back a page :p Now I have another 
question. When the user is not following the flow, it will throws a 
ControlFlowException. How can I customize this exception? Situation is 
I have couple work flows in the project. And I don't want them to all 
go to the same page when there is an flow exception. My main problem 
is how can I seperate different flow exception by different work flow.

Right now my works are like this:
wf1a - wflb - if flow errors - wf1 exception page
wf2a - wf2b - if flow errors - wf1 exception page
wf3a - wf3b - if flow errors - wf1 exception page

What i want to do:
wf1a - wflb - if flow errors - wf1 exception page
wf2a - wf2b - if flow errors - wf2 exception page
wf3a - wf3b - if flow errors - wf3 exception page

Thanks,
Jerry





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




Struts 1.1 Beta 3 now available from mirror sites

2003-01-02 Thread Martin Cooper
The Struts 1.1 Beta 3 release is now available for download from more than
20 mirror sites worldwide. To download, follow this link:

http://jakarta.apache.org/site/binindex.cgi

Under Release Builds, select the mirror site you desire, click Change,
and then click on Struts 1.1 Beta 3.

Happy Strutting!

--
Martin Cooper



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




RE: Struts in Action Unavailable at Amazon

2003-01-02 Thread Sterin, Ilya
That's funny, it's available at most bookstores in US, Borders and BN, I've
seen it everywhere.

Ilya

-Original Message-
From: James Watkin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 6:33 PM
To: [EMAIL PROTECTED]
Subject: FYI: Struts in Action Unavailable at Amazon


I tried to place an order for Struts in Action just prior to Christmas.
Here's Amazon's response:

Greetings from Amazon.com.

We are sorry to report that we will not be able to obtain the following
item from your order:

   Ted Husted, et al Struts in Action: Building Web
 Applications with the Leading Java Framework

Though we had expected to be able to send this item to you, we've
since found that it is not available from any of our sources at this
time.  We realize this is disappointing news to hear, and we apologize
for any inconvenience we have caused you.

We have cancelled this item from your order.

I'm going for the $22.47 E-book version available at:
http://www.manning.com/ebook_buy.html?project=husted

They also note: ebook purchasers who decide later to purchase the printed
book online from Manning will receive a discount of $22.47 off the list
price of the printed book.

- Jim

__
James Watkin
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
   Fax: 1-310-825-4835
__


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

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




Re: defeating caching

2003-01-02 Thread Taylor Cowan
besides the struts feature I thought someone might find this of interest.
Jason Hunter covers servlets and web caching here:

http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index2.html

Taylor
- Original Message -
From: Caoilte O'Connor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 01, 2003 7:36 PM
Subject: defeating caching


 Hi,
 Can anyone tell me exactly what options I should set for struts1.1 to
 defeat web caching. I found the option in the dtd and a few mentions of it
 in the archives, but no information anywhere on how to set it for all
 pages the webapp returns.

 much appreciated,

 caoilte

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



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