html:messages Design issue: mixing data and presentation!!!!

2002-02-07 Thread JC

Hi,
A great thing with Struts is the error validation
capabilities. However, the use of html:errors/, or
lately html:messages, poses a problem that I found
not to be a very good design (though it is slightly
better in the messages tag).

What I don't like is, in order to get any presentation
formatting on the header and footer, you need to enter
html in the resources and therefore mixing up data and
presentation.

An example where this apply is that we have an i18n
utility where the administrator for each country can
translate all messages from a default language into
their local language and for the messages headers and
footers they have to see the html as well.

Has anyone thought of this before?

/Johannes



_
Hitta snörapporter... 
från 500 olika skidorter i Europa
på http://se.snow.yahoo.com

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




Re: Boost Struts with XSLT and XML - JavaWorld.com

2002-02-07 Thread Thorbjørn Ravn Andersen


mandag februar 4 2002 kl. 06:43 PM skrev Dustin Aleksiuk:

 The most common way to generate HTML forms is through the Struts HTML 
 tag library,
 which is not XML compliant and therefore unusable in conjunction with 
 XSLT.

Does this mean that Struts generates HTML and not XHTML?  If so, then this 
should be relatively easy to fix.

--
   Thorbjørn Ravn Andersen
   Scandiatransplant, c/o Christian Mondrup
   89 49 53 01
   http://biobase.dk/~tra


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




Re: urgent!!!! HELP!!!! I have application to go... Dynamic Property.

2002-02-07 Thread Patrick Refondini

I am new to using mailing lists but I guess  you'll find a reason for 
the silence following your question by having a look at :

http://www.tuxedo.org/~esr/faqs/smart-questions.html

Hereafter a short part of it :

 (...)
Use meaningful, specific subject headers

On mailing lists or newsgroups, the subject header is your golden 
opportunity to attract qualified experts' attention in around 50 
characters or fewer. Don't waste it on babble like Please help me (let 
alone PLEASE HELP ME; messages with subjects like that get 
discarded by reflex). Don't try to impress us with the depth of your 
anguish; use the space for a super-concise problem description instead.
(...)

I hope it can help, Regards Patrick


Arik Levin ( Tikal ) wrote:

Hello out there...
 
I asked this question yesterday, but with no luck. No a single
comment.
 
 can anybody help me with this    HELP  @#@#@#@#
 
 
 
 
Hi everybody.
 
  I'm new at struts, but I have tried it and It's just what our company
wants to our project, and hey... you did a great job.
 
  BUT, I have to use some dynamic property because a lot of forms at our
app. is dynamic. Thus, I have found at the mailing list a
DynamicProperty zip file so... I have compiled it to the struts jar and did
the example but I have this small problem.

 
At this section:
 
 
  jsp:useBean id=mainForm type=xtest.actions.DynPropForm
scope=session/
 
html:form action=/xtest/jsp/inputDetails.do method=get
 
% for (java.util.Iterator iter =
mainForm.allDynamicPropertyNames().iterator(); iter.hasNext(); ) {
String propName = (String)iter.next(); %
%=propName%: html:text property=%=propName%/br
%
}
%
 
 
I get an Exception:  blab la Could instantiate bean
'mainForm', neither 'class' nor 'beanName' were specified   bla.. bla..
 
So as I see it, the bean thru struts is not in session scope, so
I don't have this bean so I'm  ...beeep!
 
 
If someone out there can help me with this issue , it would be
great, but if not I think I'll have to write something else and I don't want
that !!!
 
By the way, is there any chance to know when is the next release
???  thanx bye  Arik.
 

 
 
 
 




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




RE: urgent!!!! HELP!!!! I have application to go... Dynamic Property.

2002-02-07 Thread Mikkel Bruun

 nice point...

And, the original posters problem may be urgent...but that doesnt mean that
every reader will throw aside whatever stuff they are doing just to help a
gu solve his URGENT problem...the effect is usually the contrary...

In Software Development you usually dont have URGENT problems, just bad
planning...

I'll crawl back to my cave now, thank you very much


Mikkel

-Original Message-
From: Patrick Refondini
To: Struts Users Mailing List
Sent: 07-02-2002 10:21
Subject: Re: urgent HELP I have application to go... Dynamic
Property.

I am new to using mailing lists but I guess  you'll find a reason for 
the silence following your question by having a look at :

http://www.tuxedo.org/~esr/faqs/smart-questions.html

Hereafter a short part of it :

 (...)
Use meaningful, specific subject headers

On mailing lists or newsgroups, the subject header is your golden 
opportunity to attract qualified experts' attention in around 50 
characters or fewer. Don't waste it on babble like Please help me (let

alone PLEASE HELP ME; messages with subjects like that get 
discarded by reflex). Don't try to impress us with the depth of your 
anguish; use the space for a super-concise problem description instead.
(...)

I hope it can help, Regards Patrick


Arik Levin ( Tikal ) wrote:

Hello out there...
 
I asked this question yesterday, but with no luck. No a
single
comment.
 
 can anybody help me with this    HELP 
@#@#@#@#
 
 
 
 
Hi everybody.
 
  I'm new at struts, but I have tried it and It's just what our
company
wants to our project, and hey... you did a great job.
 
  BUT, I have to use some dynamic property because a lot of forms
at our
app. is dynamic. Thus, I have found at the mailing list a
DynamicProperty zip file so... I have compiled it to the struts jar and
did
the example but I have this small problem.

 
At this section:
 
 
  jsp:useBean id=mainForm type=xtest.actions.DynPropForm
scope=session/
 
html:form action=/xtest/jsp/inputDetails.do method=get
 
% for (java.util.Iterator iter =
mainForm.allDynamicPropertyNames().iterator(); iter.hasNext(); ) {
String propName = (String)iter.next(); %
%=propName%: html:text property=%=propName%/br
%
}
%
 
 
I get an Exception:  blab la Could instantiate bean
'mainForm', neither 'class' nor 'beanName' were specified   bla..
bla..
 
So as I see it, the bean thru struts is not in session
scope, so
I don't have this bean so I'm  ...beeep!
 
 
If someone out there can help me with this issue , it would
be
great, but if not I think I'll have to write something else and I don't
want
that !!!
 
By the way, is there any chance to know when is the next
release
???  thanx bye  Arik.
 

 
 
 
 




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




Problem with UTF encoding with Action Form

2002-02-07 Thread Antony Stace
Hi

I have a jsp page in UTF-8 format with a form in it a user fills out, this form is a 
session scope Action Form.
The user then submits the request and the
same page gets returned with the form values from the previous submit on this screen.  
I did not change the
values anyway of the Action Form, they should be the same ones the user submitted in 
their first step.  However, all the fields 
in this populated form are all garbage.  
Any idea where my problem is?

-- 


Cheers

Tony$B!#(B
-


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


RE: speed of struts

2002-02-07 Thread Christopher Cheng

I think it is a bad to have so many things on one single JSP page, but it is the 
decision of the management to have the online form to be exactly the same as the paper 
copy.

Anyway, I followed what Lee suggested, got the IBM JDK installed and the page is 
almost as fast as static HTML.

Thanks a lot!

-Original Message-
From: Martin Farrell [mailto:[EMAIL PROTECTED]]
Posted At: Wednesday, February 06, 2002 11:33 PM
Posted To: Struts
Conversation: speed of struts
Subject: RE: speed of struts


hi

i think it depends on the type of application - if it is similar information
then you could have a 10*5 array (some form of corporate time sheet maybe) -
to help the user submit the information faster. rather than having 5 * 10
forms with the inevitable network delays that would give the user dialing up
from home

your essentially moving from a form filing metaphor to a spreadsheet
metaphor idea. 

martin



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 06 February 2002 15:32
To: Struts Users Mailing List
Subject: RE: speed of struts




Good point.  Under no circumstances whatsoever should the user be expected
to do data entry for 50 items on a single web page unless they items all
happen to be simple checkboxes.  This is a known principal in
user-experience architecture and Web site usability. If you need some lab
data or something that backs this up, I can probably find something if I
dig around.

Data entry is a cumbersome process. Users must be incented through the
process by parsing the process itself into manageable chunks and giving
users motivation throughout.

Consider a wizard-based data entry metaphor to correct this issue.
Also, make sure that you give appropriate feedback to the user after each
wizard step.
Consider also adding a motivator and possibly even a step-map that shows
location in the overall data entry process.
If you really want to be aggresive, consider also allowing automatic save
of the current state so that the user can always pick up where they left
off on new sessions.

- Cody





Galbreath, Mark [EMAIL PROTECTED] on 02/06/2002 07:14:57 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]
To:   'Struts Users Mailing List' [EMAIL PROTECTED]
cc:
Subject:  RE: speed of struts


50 fields in a form???  Me thinks the bug is in the design.

Cheers!
Mark

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 6:02 AM
To: [EMAIL PROTECTED]
Subject: RE: speed of struts


I had a form with lots of custom tags. When run under the Sun 1.3 JDK it
was
slow as molasses. Sun 1.2 JDK or IBM 1.3 was instantaneous. A few mailing
list posts pointed me to a bug in Sun's 1.3 having to do with nested
try/catch blocks in the compiled JSP.

Try your page under Sun 1.2 or the IBM JDK and see if it makes a
difference.

Lee


-Original Message-
From: Christopher Cheng [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 3:50 AM
To: Struts Users Mailing List
Subject: RE: speed of struts


My form does not have a lot of tag processing (acutally none) The time it
takes to load the page is proportional to the number of instances of form
objects appeared on the JSP.

For instance, outputting a radio set is A LOT slower than outputting a drop
down list since you just have to pass a collection to the iterate, but
you
have to actually put all the html:radio/ options on the JSP.

html:select property=factors[4].rating
html:options collection=ratings property=value labelProperty=label/
/html:select

html:radio ./Option A
html:radio ./Option A
html:radio ./Option A
html:radio ./Option A

-Original Message-
From: Pete Carapetyan [mailto:[EMAIL PROTECTED]]
Posted At: Wednesday, February 06, 2002 12:10 PM
Posted To: Struts
Conversation: speed of struts
Subject: Re: speed of struts


I have had the same problem on one very large form with lots of back end
tag
processing. Would be interested to know if anyone had performed any
profiling on similar situations to identify where the bottlenecks were.

Struts wrote:

 I found out that if I include a lot of html form fields in a form (over
50). The jsp pages seems to be awfully slow to load (almost 10 seconds). I
made it a little bit faster when I converted all radio button sets to drop
down list, still it is very slow. The speed to load up seems to
exponentially related to the number of form fields.

 Has anybody got the same problem?

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

--
Pete Carapetyan
http://datafundamentals.com
Java Development Services

Open standards technology for commercial profitability



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

Re: Multiple Forms on one JSP...

2002-02-07 Thread Jay Sissom

Maybe this code snippet is not complete, but there is only one FORM on this
page.  Everything between html:form and /html:form is a single form.
There may be multiple html:submit tags, but there is only one FORM.

I don't believe struts will work with multiple-forms, but I'm not sure.
Multiple submit buttons is no problem.

Jay

- Original Message -
From: STEVE WILKINSON [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 06, 2002 4:56 PM
Subject: Re: Multiple Forms on one JSP...


 I use multiple forms successfully in my sample application that I did in
the
 Wrox Pro JSP 2nd Edition book.  There is one per entry in the HTML table.

 --- snip: from showshoppingcart.jsp 

 html:form action=/checkout.do
   html:hidden property=action value=update /
   html:hidden property=%= Constants.TITLE_ID %
 value=%= String.valueOf(titleId) % /
   table cellspacing=2 cellpadding=2 border=0
 tr
   td
 bean:define id=quantity name=cartItem property=quantity/
 html:text property=quantity
value=%= String.valueOf(quantity) %
size=5 maxlength=5/
   /td
  td
html:submit
  bean:message key=button.update/
/html:submit
  /td
/tr
   /table
 /html:form

 --- snip: from showshoppingcart.jsp 

 I iterate over a collection of items in the shopping cart and display the
 table.  NOTE, each form has it's own submit button and that I use a hidden
 variable to tell which form was submitted.

 Here is the struts-config.xml file entry:

 --- snip: from struts-config.xml file 
 !-- Process checkout request --
 actionpath=/checkout
type=com.wrox.pjsp2.struts.shopping.CheckoutAction
name=checkoutForm
   scope=request
validate=false
   forward name=success path=/shoppingcart.jsp/
 /action
 --- snip: from struts-config.xml file 

 Hopes this helps...

 Source code from my chapter example can be downloaded from:
 http://www.newparticles.com/struts

 There is a new version being placed on the site that is based on the CVS
 snapshot from December.  It's in the read me.  I will be updating this in
 the next month or so to be current with CVS.

 Thanks,
 Steve Wilkinson

 From: Rustad, Aaron [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: Multiple Forms on one JSP...
 Date: Wed, 6 Feb 2002 13:15:53 -0700
 
 
 I seem to be running into a bit of a problem with one of my JSP pages
that
 has two forms on it. Only one Form is being instantiated for it. I am
sure
 you should be able to have multiple forms.
 
 Here is an example of my JSP:
 
 html:form action=/searchFood 
 
 table width=224 border=0
 
  ** FORM CODE **
 
 /html:form
 html:form action=/selectFood
 
  ** MORE FORM CODE **
 
/html:form
 
 However, only the Form bean associated with /searchFood is instantiated
 and placed in the session.
 
 Here is the entries I have in the struts-config.xml
 
  action path=/searchFood
  type=com.anassina.web.nutrition.SearchFoodAction
  name=searchForm
  scope=session
  validate=false
  forward name=success path=/nutrition/SearchFood.jsp/
  /action
 
  !-- Add selected Food --
  action path=/selectFood
  type=com.anassina.web.nutrition.SelectFoodAction
  name=selectedFoodForm
  scope=session
  validate=false
  forward name=success
 path=/nutrition/FoodGroupList.jsp/
  /action
 
 I would think that struts should handle this correctly.
 I am not receiving any errors with the exception of the JSP reference to
 the
 second bean isn't being found.
 
 
 Please advise.
 Thanks!
 Aaron.
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com


 --
 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: urgent!!!! HELP!!!! I have application to go... Dynamic Property.

2002-02-07 Thread Ted Husted

Personally, I'm never quite sure what people mean by dynamic forms. 

Are these being used with a dynamic database that creates fields on
the fly?

Given all the scriptlets, it's hard to tell what's wrong with your code.
Most often Struts pages are written using custom tags, with the
occaisonal runtime expression to plug a gap. 

For more about building applications with Struts, see 

http://jakarta.apache.org/struts/userGuide/index.html

and 

http://www.husted.com/struts

For more about how releases are scheduled, see

http://jakarta.apache.org/struts/userGuide/kickstart.html#release



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/


Arik Levin ( Tikal ) wrote:
 
 Hello out there...
 
 I asked this question yesterday, but with no luck. No a single
 comment.
 
  can anybody help me with this    HELP  @#@#@#@#
 
 
 
 
 Hi everybody.
 
   I'm new at struts, but I have tried it and It's just what our company
 wants to our project, and hey... you did a great job.
 
   BUT, I have to use some dynamic property because a lot of forms at our
 app. is dynamic. Thus, I have found at the mailing list a
 DynamicProperty zip file so... I have compiled it to the struts jar and did
 the example but I have this small problem.
 
 
 At this section:
 
 
   jsp:useBean id=mainForm type=xtest.actions.DynPropForm
 scope=session/
 
 html:form action=/xtest/jsp/inputDetails.do method=get
 
 % for (java.util.Iterator iter =
 mainForm.allDynamicPropertyNames().iterator(); iter.hasNext(); ) {
 String propName = (String)iter.next(); %
 %=propName%: html:text property=%=propName%/br
 %
 }
 %
 
 
 I get an Exception:  blab la Could instantiate bean
 'mainForm', neither 'class' nor 'beanName' were specified   bla.. bla..
 
 So as I see it, the bean thru struts is not in session scope, so
 I don't have this bean so I'm  ...beeep!
 
 
 If someone out there can help me with this issue , it would be
 great, but if not I think I'll have to write something else and I don't want
 that !!!
 
 By the way, is there any chance to know when is the next release
 ???  thanx bye  Arik.

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




Re: html:messages Design issue: mixing data and presentation!!!!

2002-02-07 Thread Ted Husted

That was true with the html:errors tag, but not with the newer
html:messages tag. With the messages, tag the errors.header and .footer
are optional, so can do things like this:

logic:messagesPresent
TABLE width=100%
TRTD class=message
   UL
   html:messages id=error
  LIbean:write name=error//LI
   /html:messages
   /UL
/TD/TR
/TABLE
/logic:messagesPresent


JC wrote:
 
 Hi,
 A great thing with Struts is the error validation
 capabilities. However, the use of html:errors/, or
 lately html:messages, poses a problem that I found
 not to be a very good design (though it is slightly
 better in the messages tag).
 
 What I don't like is, in order to get any presentation
 formatting on the header and footer, you need to enter
 html in the resources and therefore mixing up data and
 presentation.
 
 An example where this apply is that we have an i18n
 utility where the administrator for each country can
 translate all messages from a default language into
 their local language and for the messages headers and
 footers they have to see the html as well.
 
 Has anyone thought of this before?
 
 /Johannes
 
 _
 Hitta snörapporter...
 från 500 olika skidorter i Europa
 på http://se.snow.yahoo.com
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

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




Re: Long term Session attributes [ was RE: Wizard Interface question ]

2002-02-07 Thread Peter Pilgrim



I made a mistake with the method names, perhaps this is much clearer

public interface SessionLeaseable {

 public void updateLastAccessTime();

 public long getLastAccessTime() ;
}


Clearly every `SessionLeasable' will call its `updateLastAccessTime()'
method to refresh the internal time value.
Here is an example of a bean that avoids the threading issue

public AcmeBean implements SessionLeaseable {
 String coffee;
 volatile long actime;
 public String getCoffee() {
  updateLastAccessTime();// !
  return actime;
 }

 public void setCoffee( s ) {
  updateLastAccessTime();  // !
  this.coffee = x;
 }

 public synchronised void updateLastAccessTime()
 { actime = System.currentMillisecs(); }
 public synchronised long getLastAccessTime()
 { return actime; }
}


Moreover, if you follow the AXIOM, that

every navigation invokes an ACTION that generates a VIEW
and I never navigate to VIEW directly

then you can write logic to reactivate beans that have been timed-out,
or take appropriate countermeasure in your Struts Action.

--
Peter Pilgrim ++44 (0)207-545-9923

 Swamped under electionic mails


 Message History 



From: [EMAIL PROTECTED] (Duncan Harris) on 06/02/2002 12:43

Please respond to Struts Users Mailing List [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Re: Long term Session attributes [ was RE: Wizard Interface question ]


[EMAIL PROTECTED] (Peter Pilgrim) wrote:

 Have a background thread or even better a java.util.Timer
 on each session object or per user.
 The sleeper or swiper continuous timer wakes up every
 10 minutes or so iterates through the attributes in the session
 looking especially for Leasable object.  Remove any Leaseable
 object that has expired the maximum idle time.

Got to be a bit careful about threading issues here.
Code inside struts does:

  use getAttribute() to get form
  ...
  do some tests on attribute
  ...
  return form for processing

So if your sweeper does its delete after the getAttribute()
your JSP page may well be unhappy.

Duncan Harris
~~~
Hartford, Cheshire, U.K., Tel: 07968 060418
Looking for STRUTS contract work in the U.K.

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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




Dynamic Property - can I do it at 1.01 release somehow?

2002-02-07 Thread Arik Levin ( Tikal )

Hi
 
If anyone can answer this question:
 
  As I was saying at my last mail I'm trying to get some Dynamic
Property.
 
Is there any way to do it at the current release? And  If not my
is my alternative ?



RE: Dynamic Property.

2002-02-07 Thread Arik Levin ( Tikal )

Yes, I mean buy "dynamic Property" that I'm getting the fields dynamic from
my database, so how can I do it? Because at the current release I can't do
it, so do u have some suggestions how to do it anyway? 

Thanx.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 07, 2002 11:55 AM
To: Struts Users Mailing List
Subject: Re: urgent HELP I have application to go... Dynamic
Property.

Personally, I'm never quite sure what people mean by "dynamic forms". 

Are these being used with a "dynamic database" that creates fields on
the fly?

Given all the scriptlets, it's hard to tell what's wrong with your code.
Most often Struts pages are written using custom tags, with the
occaisonal runtime expression to plug a gap. 

For more about building applications with Struts, see 

http://jakarta.apache.org/struts/userGuide/index.html

and 

http://www.husted.com/struts

For more about how releases are scheduled, see

http://jakarta.apache.org/struts/userGuide/kickstart.html#release



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/


"Arik Levin ( Tikal )" wrote:
 
 Hello out there...
 
 I asked this question yesterday, but with no luck. No a single
 comment.
 
  can anybody help me with this    HELP  @#@#@#@#
 
 
 
 
 Hi everybody.
 
   I'm new at struts, but I have tried it and It's just what our
company
 wants to our project, and hey... you did a great job.
 
   BUT, I have to use some dynamic property because a lot of forms at
our
 app. is dynamic. Thus, I have found at the mailing list a
 DynamicProperty zip file so... I have compiled it to the struts jar and
did
 the example but I have this small problem.
 
 
 At this section:
 
 
   jsp:useBean id="mainForm" type="xtest.actions.DynPropForm"
 scope="session"/
 
 html:form action="/xtest/jsp/inputDetails.do" method="get"
 
 % for (java.util.Iterator iter =
 mainForm.allDynamicPropertyNames().iterator(); iter.hasNext(); ) {
 String propName = (String)iter.next(); %
 %=propName%: html:text property="%=propName%"/br
 %
 }
 %
 
 
 I get an Exception:  blab la" Could instantiate bean
 'mainForm', neither 'class' nor 'beanName' were specified "  bla.. bla..
 
 So as I see it, the bean thru struts is not in session scope,
so
 I don't have this bean so I'm  ...beeep!
 
 
 If someone out there can help me with this issue , it would be
 great, but if not I think I'll have to write something else and I don't
want
 that !!!
 
 By the way, is there any chance to know when is the next
release
 ???  thanx bye  Arik.

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



Re: Design question about ActionForm's validate method

2002-02-07 Thread Ted Husted

Unfortunately, we don't have free reign on conventions, and are
restricted to the patterns that the container will match. The container
gets the request first, and then passes it along to Struts. For the best
compatibility, a single, very simple pattern is best. 

One way to think about it is that the Actions are your applications API,
its command set. They represent everything that your application knows
how to do. One thing it does is display a form for adding a new record.
Another thing might to display a page summarizing the entered data, or a
page for editing the data. 

Displaying a form is sometimes a simple process. Often times, it is not,
since dropdown boxes must be populated, security parmeters might need to
be checked, other customizations might need to be performed. In
practice, there is sometimes a lot to do even to simply display a data
entry form. 

I tend to break my applications into modules, which sometimes correspond
to the major tables in a database, or at least the major databases
views. So I would tend to represent the URIs you mentioned as 

/adddress/Form.do
/address/Store.do
/address/View.do

or 

/do/adddress/Form
/do/address/Store
/do/address/View

-Ted.


Alex Paransky wrote:
 
 Ok, I understand how forcing all requests through the controller is a good
 thing.  Now, I have various types of pages:
 
 Forms - html:form...
 Actions - .do action of the form
 View - basic .jsp page to view and link to a form for further edit
 
 Is there a naming convention that you found works for you?  Since, I am
 using .do extension for everything, it seems like I have URL's which look
 like this:
 
 AddressForm.do
 AddressSaveAction.do
 AddressView.do
 
 I think it would be nice to have:
 
 Address.form
 AddressSave.action
 Address.view
 
 Or something like this.  The .do extension makes me think of action and I
 don't see a form or a view as an action.  I could always map *.view and
 *.form to execute the servlet as well, but then Address.form and
 Address.view are ambiguous.
 
 Any suggestion on naming conventions?
 
 Thanks.
 -AP_
 http://www.alexparansky.com
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 06, 2002 3:47 PM
 To: Struts Users Mailing List
 Subject: Re: Design question about ActionForm's validate method
 
 In 1.0.x, it is often suggested that each link at least be represented
 by an ActionForward. This centralizes control over the hyperlinks in the
 Struts Config, which yields a number of benefits.
 
 In Struts 1.1, now the Nightly Build, support has been added for
 multiple Struts configuration files. In order for this feature to work,
 any request for a presentation page that uses elements from the
 configuration file (ActionForms, forwards, mappings) must be routed
 through the controller. This allows the controller to make the
 appropriate configuration available for a given page.
 
 This is becoming a common pattern, since the Velocity support, and I
 believe the X2 servlet, also need you to do the same thing for the same
 reason. The controller needs to touch the request to prepare it for the
 presentation layer.
 
 Many other features in advanced applications, including security,
 logging, and screen definitins, are easier to implement when everything
 passes through the controller.
 
 In a strict MVC implementation, the controller is responsible for
 interacting with the user. It then follows that all requests from the
 user should flow through the controller. Some of us had been counting
 the ActionForwards as flowing through the controller, but as the
 framework expands, and more services are being plugged in, passing the
 actual request through the controller becomes more and more desirable,
 until it's really not worth making the occasional exception any more.
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 Alex Paransky wrote:
 
  So do you mean, all pages go through the Action?  Even those which are not
  forms and for display purposes only?  Could you shed some light as to why
  this is preferred?
 
  Thanks.
 
  -AP_
  http://www.alexparansky.com
 
  -Original Message-
  From: Ted Husted [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 05, 2002 2:02 PM
  To: Struts Users Mailing List
  Subject: Re: Design question about ActionForm's validate method
 
  The best practice now is to use ActionMappings for everything, so that
  the reqeust passes through the controller.
 
  This buys you several important capabilities that become important as
  applications grow. Not the least of which is the new support for
  multiple applications in the Nightly Build.
 
  The ActionMapping has a validate property that you can use to turn off
  validation when the mapping is used to initialize a new form. So,
  typically, you will have an ActionMapping for each circumstance.
 
  action
  

Re: Dynamic Property.

2002-02-07 Thread Ted Husted

Populating the fields you plan to retrieve from the database is not a
problem. 

The Action handles the retrieval, populates the ActionForm, and sends it
along to the presentation page. 

The ActionForm properties correspond to columns in the result set. 


Arik Levin ( Tikal ) wrote:
 
 Yes, I mean buy dynamic Property that I'm getting the fields dynamic from
 my database, so how can I do it? Because at the current release I can't do
 it, so do u have some suggestions how to do it anyway?
 
 Thanx.
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 11:55 AM
 To: Struts Users Mailing List
 Subject: Re: urgent HELP I have application to go... Dynamic
 Property.
 
 Personally, I'm never quite sure what people mean by dynamic forms.
 
 Are these being used with a dynamic database that creates fields on
 the fly?
 
 Given all the scriptlets, it's hard to tell what's wrong with your code.
 Most often Struts pages are written using custom tags, with the
 occaisonal runtime expression to plug a gap.
 
 For more about building applications with Struts, see
 
 http://jakarta.apache.org/struts/userGuide/index.html
 
 and
 
 http://www.husted.com/struts
 
 For more about how releases are scheduled, see
 
 http://jakarta.apache.org/struts/userGuide/kickstart.html#release
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 Arik Levin ( Tikal ) wrote:
 
  Hello out there...
 
  I asked this question yesterday, but with no luck. No a single
  comment.
 
   can anybody help me with this    HELP  @#@#@#@#
 
 
 
 
  Hi everybody.
 
I'm new at struts, but I have tried it and It's just what our
 company
  wants to our project, and hey... you did a great job.
 
BUT, I have to use some dynamic property because a lot of forms at
 our
  app. is dynamic. Thus, I have found at the mailing list a
  DynamicProperty zip file so... I have compiled it to the struts jar and
 did
  the example but I have this small problem.
 
 
  At this section:
 
 
jsp:useBean id=mainForm type=xtest.actions.DynPropForm
  scope=session/
 
  html:form action=/xtest/jsp/inputDetails.do method=get
 
  % for (java.util.Iterator iter =
  mainForm.allDynamicPropertyNames().iterator(); iter.hasNext(); ) {
  String propName = (String)iter.next(); %
  %=propName%: html:text property=%=propName%/br
  %
  }
  %
 
 
  I get an Exception:  blab la Could instantiate bean
  'mainForm', neither 'class' nor 'beanName' were specified   bla.. bla..
 
  So as I see it, the bean thru struts is not in session scope,
 so
  I don't have this bean so I'm  ...beeep!
 
 
  If someone out there can help me with this issue , it would be
  great, but if not I think I'll have to write something else and I don't
 want
  that !!!
 
  By the way, is there any chance to know when is the next
 release
  ???  thanx bye  Arik.
 
 --
 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: Dynamic Property - can I do it at 1.01 release somehow?

2002-02-07 Thread Ted Husted

What might be most helpful would be if you stated that actual
requirement you need to meet. 

What are the specific screen requirements?

Going back to the first response in this thread, people most often
volunteer to answer interesting, detailed questions, which make them
feel like they are being called in as part of the development team. 


Arik Levin ( Tikal ) wrote:
 
 Hi
 
 If anyone can answer this question:
 
   As I was saying at my last mail I'm trying to get some Dynamic
 Property.
 
 Is there any way to do it at the current release? And  If not my
 is my alternative ?

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




RE: Dynamic Property.

2002-02-07 Thread Arik Levin ( Tikal )

Sorry, I think that I didn't make my self clear,

Say I have two fields DB

- Name
- Value

the values are my form fields so, how can I make a setter and getter
form methods if I don't know what fields name I'm gonna get?

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 07, 2002 12:19 PM
To: Struts Users Mailing List
Subject: Re: Dynamic Property.

Populating the fields you plan to retrieve from the database is not a
problem. 

The Action handles the retrieval, populates the ActionForm, and sends it
along to the presentation page. 

The ActionForm properties correspond to columns in the result set. 


"Arik Levin ( Tikal )" wrote:
 
 Yes, I mean buy "dynamic Property" that I'm getting the fields dynamic
from
 my database, so how can I do it? Because at the current release I can't do
 it, so do u have some suggestions how to do it anyway?
 
 Thanx.
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 11:55 AM
 To: Struts Users Mailing List
 Subject: Re: urgent HELP I have application to go... Dynamic
 Property.
 
 Personally, I'm never quite sure what people mean by "dynamic forms".
 
 Are these being used with a "dynamic database" that creates fields on
 the fly?
 
 Given all the scriptlets, it's hard to tell what's wrong with your code.
 Most often Struts pages are written using custom tags, with the
 occaisonal runtime expression to plug a gap.
 
 For more about building applications with Struts, see
 
 http://jakarta.apache.org/struts/userGuide/index.html
 
 and
 
 http://www.husted.com/struts
 
 For more about how releases are scheduled, see
 
 http://jakarta.apache.org/struts/userGuide/kickstart.html#release
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 "Arik Levin ( Tikal )" wrote:
 
  Hello out there...
 
  I asked this question yesterday, but with no luck. No a
single
  comment.
 
   can anybody help me with this    HELP  @#@#@#@#
 
 
 
 
  Hi everybody.
 
I'm new at struts, but I have tried it and It's just what our
 company
  wants to our project, and hey... you did a great job.
 
BUT, I have to use some dynamic property because a lot of forms at
 our
  app. is dynamic. Thus, I have found at the mailing list a
  DynamicProperty zip file so... I have compiled it to the struts jar and
 did
  the example but I have this small problem.
 
 
  At this section:
 
 
jsp:useBean id="mainForm" type="xtest.actions.DynPropForm"
  scope="session"/
 
  html:form action="/xtest/jsp/inputDetails.do" method="get"
 
  % for (java.util.Iterator iter =
  mainForm.allDynamicPropertyNames().iterator(); iter.hasNext(); ) {
  String propName = (String)iter.next(); %
  %=propName%: html:text property="%=propName%"/br
  %
  }
  %
 
 
  I get an Exception:  blab la" Could instantiate bean
  'mainForm', neither 'class' nor 'beanName' were specified "  bla.. bla..
 
  So as I see it, the bean thru struts is not in session
scope,
 so
  I don't have this bean so I'm  ...beeep!
 
 
  If someone out there can help me with this issue , it would
be
  great, but if not I think I'll have to write something else and I don't
 want
  that !!!
 
  By the way, is there any chance to know when is the next
 release
  ???  thanx bye  Arik.
 
 --
 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: Dynamic Property.

2002-02-07 Thread Robert Taylor

Arik,

The Action class perform method passes in the HttpServletRequest which
provides
access to all the parameters entered via the HTTP request (ie. a form POST)

I believe one common technique would be to dynamically generate your form
fields by giving
them names like name.1, value.1, name.2, value.2, name.numeric_identifier,
value.numeric_identifier etc...

When the form is submitted to your Action class for processing, you can
iterate through the request parameter values and access common values based
on
their numeric_identifier extension.

This is a manual way of doing it. I've seen some threads on this list that
talk about
dynamic forms but I'm not sure where they are.

One good resource  to check is the mailing list archive.
http://www.mail-archive.com/struts-user%40jakarta.apache.org/

Like I said, there may be a more eloquent solution, but I know the
above works.

robert

 -Original Message-
 From: Arik Levin ( Tikal ) [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 5:11 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Dynamic Property.


 Yes, I mean buy dynamic Property that I'm getting the fields
 dynamic from
 my database, so how can I do it? Because at the current release I can't do
 it, so do u have some suggestions how to do it anyway?

 Thanx.

 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 11:55 AM
 To: Struts Users Mailing List
 Subject: Re: urgent HELP I have application to go... Dynamic
 Property.

 Personally, I'm never quite sure what people mean by dynamic forms.

 Are these being used with a dynamic database that creates fields on
 the fly?

 Given all the scriptlets, it's hard to tell what's wrong with your code.
 Most often Struts pages are written using custom tags, with the
 occaisonal runtime expression to plug a gap.

 For more about building applications with Struts, see

 http://jakarta.apache.org/struts/userGuide/index.html

 and

 http://www.husted.com/struts

 For more about how releases are scheduled, see

 http://jakarta.apache.org/struts/userGuide/kickstart.html#release



 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/


 Arik Levin ( Tikal ) wrote:
 
  Hello out there...
 
  I asked this question yesterday, but with no luck.
 No a single
  comment.
 
   can anybody help me with this    HELP  @#@#@#@#
 
 
 
 
  Hi everybody.
 
I'm new at struts, but I have tried it and It's just what our
 company
  wants to our project, and hey... you did a great job.
 
BUT, I have to use some dynamic property because a lot of forms at
 our
  app. is dynamic. Thus, I have found at the mailing list a
  DynamicProperty zip file so... I have compiled it to the struts jar and
 did
  the example but I have this small problem.
 
 
  At this section:
 
 
jsp:useBean id=mainForm type=xtest.actions.DynPropForm
  scope=session/
 
  html:form action=/xtest/jsp/inputDetails.do method=get
 
  % for (java.util.Iterator iter =
  mainForm.allDynamicPropertyNames().iterator(); iter.hasNext(); ) {
  String propName = (String)iter.next(); %
  %=propName%: html:text property=%=propName%/br
  %
  }
  %
 
 
  I get an Exception:  blab la Could instantiate bean
  'mainForm', neither 'class' nor 'beanName' were specified   bla.. bla..
 
  So as I see it, the bean thru struts is not in
 session scope,
 so
  I don't have this bean so I'm  ...beeep!
 
 
  If someone out there can help me with this issue ,
 it would be
  great, but if not I think I'll have to write something else and I don't
 want
  that !!!
 
  By the way, is there any chance to know when is the next
 release
  ???  thanx bye  Arik.

 --
 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: How to go about??

2002-02-07 Thread Ted Husted

[EMAIL PROTECTED] wrote:
(Natural, I guess.who's gonna
 sit and write good documentation anyway.  This is almost as hard as writing
 good software!)

It my experience it's harder (and doesn't pay as well) -:0)

Projects are always desperate for better documentation, and we have had
some great pieces of ours sent in by people who were reading it, and
wanted to improve it as they went along. That's where the Walking Tour
of the example application came from. I wrote it to explain the example
to myself, and then shared it with the group. 

Contributing documentation to a project is no different than
contributing code. 

http://jakarta.apache.org/site/getinvolved.html

The only caveat is that it *is* no different than contributing code, and
so it should be in the same format as the rest of the documentation,
ready to paste or otherwise patch.

-Ted.


[EMAIL PROTECTED] wrote:
 
 Good luck Sanjay!  Even the documentation to Struts itself does not tell
 you how to use it. Tells you how to build parts, but not really how to get
 them together.  It's typical developer documentation.  Open source software
 is wonderful, but developers do not seem to be as enthusastic about
 documenting as they are about developing. (Natural, I guess.who's gonna
 sit and write good documentation anyway.  This is almost as hard as writing
 good software!)
 
 We need to start the Open Source Documentation Initiative and save this
 glorious revolution from its one greatest flaw.
 
 - Cody
 
 Sanjay Choudhary [EMAIL PROTECTED] on 02/06/2002 04:11:23 PM
 
 Please respond to Struts Users Mailing List
   [EMAIL PROTECTED]
 To:   Struts Users Mailing List [EMAIL PROTECTED]
 cc:
 Subject:  How to go about??
 
 Hi Friends,
 
 I am very new to Struts. All I have done is worked out
 couple of examples from web to understand the
 Architecture. We are in a process of designing a
 Product and plan to use Struts Framework with EJB's.
 
 In my team
 1. No one has any knowledge about Struts but they are
 very good with Java and J2EE.
 
 2. Except for a HTML designer, most of the programmers
 are involved with backend programming. They have done
 very little HTML work. I was wondering if we will be
 able to create JSP's using Struts HTML tags and other
 tag libraries if a form is defined using pure HTML.
 
 3. What is the best way to go about to learn Struts to
 use in practical life and how much time it takes?
 
 4. What strategies did you guys adopt to move to
 Struts?
 
 5. All pointers to valuable resources and design
 stratergies will be appreciated.
 
 Thanks you ,
 Sanjay
 
 __
 Do You Yahoo!?
 Send FREE Valentine eCards with Yahoo! Greetings!
 http://greetings.yahoo.com
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 The information transmitted is intended only for the person or entity to
 which it is addressed and may contain confidential and/or privileged
 material.  Any review, retransmission, dissemination or other use of, or
 taking of any action in reliance upon, this information by persons or
 entities other than the intended recipient is prohibited.   If you received
 this in error, please contact the sender and delete the material from any
 computer.
 
 --
 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]




Turbine style multiple method actions

2002-02-07 Thread Ken . Horn


I'm just trying to catch up with what's changed in struts 1.0.1 / 1.1 
from the version I previously used (pre version numbers). Is there a 
facility to map a request to different methods / actions based on a 
request parameter?

For example, if the request contains a parameter function, can I 
choose the Action that will be invoked, or alternatively, can I invoke 
different methods in the action defined in the form.action URL, based 
on some parameter? I realise I can change the URL using javascript on 
the html form, but this removes the struts config as the control of app 
flow. In my previous apps, we found theat often you end up writing 
Action classes similar to:

myAction(..) extends Action {

if (null == function) { doView(..) } 
else if (submit.equals(function)) { doSubmit(..) }
else ...

prepareRequest(req, ..);
return mainPageForward;
}

etc

Which makes the action into a type of mini controller. I know this 
could be done in a more OO way, but that's not my point, I'd like the 
controller to be able to do this in some way. Turbine does this in a 
very similar way (though I'm not sure I like their parameter 
convention).

My only issue with doing this in the main ActionServlet is that 
partioning of the logic should perhaps be encapsulated better -- though 
the XML config file provides a suitable scoping for this information. 

I've not been keeping up with the nightly developments - does the 
multiple applications, stuff allow this kind of thing?

Ken.


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


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




Re: Turbine style multiple method actions

2002-02-07 Thread Ted Husted

See 

http://jakarta.apache.org/struts/api-1.0/org/apache/struts/actions/DispatchAction.html

Really should mention this in the User Guide someplace =:0)


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/


[EMAIL PROTECTED] wrote:
 
 I'm just trying to catch up with what's changed in struts 1.0.1 / 1.1
 from the version I previously used (pre version numbers). Is there a
 facility to map a request to different methods / actions based on a
 request parameter?
 
 For example, if the request contains a parameter function, can I
 choose the Action that will be invoked, or alternatively, can I invoke
 different methods in the action defined in the form.action URL, based
 on some parameter? I realise I can change the URL using javascript on
 the html form, but this removes the struts config as the control of app
 flow. In my previous apps, we found theat often you end up writing
 Action classes similar to:
 
 myAction(..) extends Action {
 
 if (null == function) { doView(..) }
 else if (submit.equals(function)) { doSubmit(..) }
 else ...
 
 prepareRequest(req, ..);
 return mainPageForward;
 }
 
 etc
 
 Which makes the action into a type of mini controller. I know this
 could be done in a more OO way, but that's not my point, I'd like the
 controller to be able to do this in some way. Turbine does this in a
 very similar way (though I'm not sure I like their parameter
 convention).
 
 My only issue with doing this in the main ActionServlet is that
 partioning of the logic should perhaps be encapsulated better -- though
 the XML config file provides a suitable scoping for this information.
 
 I've not been keeping up with the nightly developments - does the
 multiple applications, stuff allow this kind of thing?
 
 Ken.

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




Migrating from another framework to struts ...

2002-02-07 Thread cool dude

Hi,
   We are currently migrating from another framework
to struts. This has brought about a lot of queries 
doubts about how we can use struts to do things for us
that the earlier framework provided. My main concerns
are :
1.  Does struts provide any build-in mechanism for
session management? If not, then is there any
guideline as to how struts can be used to provide that
kindof support?
2.  How do I deal with form beans that have
aggregate objects in them. For example, I have a class
called UserInfo, which has the username
 the user address (which is another class called
AddressInfo) among other things. Now, if I have to use
UserInfo class to display/edit user information in a
form. How would I manage that?
3.  I'm also having problems with URL forwards. It
looks like in struts you have give URL forwards
starting with /. What if I want to
forward to a URL that doesn't being with /, i.e., a
relative URL. Say my site looks something like this
http://mysite.com/info1/info2/actionname and I would
want to carry this URL for all the actions, ie, only
the action name would change  the rest of the URL
remains the same. Maybe I'm missing soemthing out
here.   

These are few of the questions that I had. Since I'm
new to struts, these questions may be naive. Please
get back to me if you need further clarifications on
the questions.

Thanx in advance,
VD.


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




AW: Migrating from another framework to struts ...

2002-02-07 Thread Oliver Refle

1. For one, what do you mean autmatic session management,
you can put form beans into the session and work with them.
So if you mean that with session support it supports it

2. You need getter and setter in your UserInfo form for
the aggregated forms.
Than struts can call them with the following entry
html:text property=address.street/
Struts will call first the getter getAddress()
and then getStreet()

3. Only solution i found here was to return null in the action
and before that redirect the resonse, this should work.

e.g
repsonse.sendRedirect(test/side.jsp);
return null;

Oliver

-Ursprungliche Nachricht-
Von: cool dude [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 7. Februar 2002 11:58
An: [EMAIL PROTECTED]
Betreff: Migrating from another framework to struts ...


Hi,
   We are currently migrating from another framework
to struts. This has brought about a lot of queries 
doubts about how we can use struts to do things for us
that the earlier framework provided. My main concerns
are :
1.  Does struts provide any build-in mechanism for
session management? If not, then is there any
guideline as to how struts can be used to provide that
kindof support?

2.  How do I deal with form beans that have
aggregate objects in them. For example, I have a class
called UserInfo, which has the username
 the user address (which is another class called
AddressInfo) among other things. Now, if I have to use
UserInfo class to display/edit user information in a
form. How would I manage that?
3.  I'm also having problems with URL forwards. It
looks like in struts you have give URL forwards
starting with /. What if I want to
forward to a URL that doesn't being with /, i.e., a
relative URL. Say my site looks something like this
http://mysite.com/info1/info2/actionname and I would
want to carry this URL for all the actions, ie, only
the action name would change  the rest of the URL
remains the same. Maybe I'm missing soemthing out
here.

These are few of the questions that I had. Since I'm
new to struts, these questions may be naive. Please
get back to me if you need further clarifications on
the questions.

Thanx in advance,
VD.


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
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: Turbine style multiple method actions

2002-02-07 Thread Ken . Horn

Thanks, Ted. Spot on.

-Original Message-
From: husted 
Sent: 07 February 2002 10:52
To: struts-user
Cc: husted
Subject: Re: Turbine style multiple method actions


See 

http://jakarta.apache.org/struts/api-1.0/org/apache/struts/actions/DispatchAction.html

Really 
should mention this in the User Guide someplace =:0)


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/


[EMAIL PROTECTED] wrote:
 
 I'm just trying to catch up with what's changed in struts 1.0.1 / 1.1
 from the version I previously used (pre version numbers). Is there a
 facility to map a request to different methods / actions based on a
 request parameter?
 
 For example, if the request contains a parameter function, can I
 choose the Action that will be invoked, or alternatively, can I invoke
 different methods in the action defined in the form.action URL, based
 on some parameter? I realise I can change the URL using javascript on
 the html form, but this removes the struts config as the control of 
app
 flow. In my previous apps, we found theat often you end up writing
 Action classes similar to:
 
 myAction(..) extends Action {
 
 if (null == function) { doView(..) }
 else if (submit.equals(function)) { doSubmit(..) }
 else ...
 
 prepareRequest(req, ..);
 return mainPageForward;
 }
 
 etc
 
 Which makes the action into a type of mini controller. I know this
 could be done in a more OO way, but that's not my point, I'd like the
 controller to be able to do this in some way. Turbine does this in a
 very similar way (though I'm not sure I like their parameter
 convention).
 
 My only issue with doing this in the main ActionServlet is that
 partioning of the logic should perhaps be encapsulated better -- 
though
 the XML config file provides a suitable scoping for this information.
 
 I've not been keeping up with the nightly developments - does the
 multiple applications, stuff allow this kind of thing?
 
 Ken.

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



Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


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




Re: Migrating from another framework to struts ...

2002-02-07 Thread Ted Husted

In furtherance of Oliver's response:

cool dude wrote:
 1.  Does struts provide any build-in mechanism for
 session management? If not, then is there any
 guideline as to how struts can be used to provide that
 kindof support?

For the most part, Struts relies on the Java Servlet container for that. 

The custom tags provided with the framework all provide automatic URL
rewriting, so the container can maintain the session when cookies are
not available. 


 3.  I'm also having problems with URL forwards. It
 looks like in struts you have give URL forwards
 starting with /. What if I want to
 forward to a URL that doesn't being with /, i.e., a
 relative URL. Say my site looks something like this
 http://mysite.com/info1/info2/actionname and I would
 want to carry this URL for all the actions, ie, only
 the action name would change  the rest of the URL
 remains the same. Maybe I'm missing soemthing out
 here.

Struts looks as these as String identifiers rather than a file tree, and
does not resolve relative references in the way that you might expect. 

It's important to remember that while we assign URI to actoins that look
like references to directories or files, these don't exist in fact. You
are not really forwarding to a URL that resolves to a file, but to an
identifier that Struts looks up in a table.

While seems like it would be feasible for Struts to treat this table
like it were file tree, that functionality is not provided.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

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




Re: How to go about??

2002-02-07 Thread Ted Husted

What Steve said, and 

Sanjay Choudhary wrote:
 2. Except for a HTML designer, most of the programmers
 are involved with backend programming. They have done
 very little HTML work. I was wondering if we will be
 able to create JSP's using Struts HTML tags and other
 tag libraries if a form is defined using pure HTML.

If the Java Engineers will also be doing alot of the HTML coding, I'd
recommend looking at Tiles early in the project. This lets you treat
blocks of markup (both template and dynamic) like methods in a program.
This can severely reduce the amount of markup the engineers actually
have to touch. Instead they incorporate it by reference, much like
calling a block of methods. 

So, with tiles an engineer might create a new Result page by adding this
to a configuration file 

  definition name=.item.Result extends=.Result
  put name=title  value=New Item Result /
  put name=contentvalue=/pages/item/NewResult.jsp /
  /definition

and then just writing the NewResult.jsp segment that exposes the result
set 

(simplified from production, but this would work) 

logic:notEqual name=RESULT property=size value=0 
TRTDTABLE width=100%
TR class=greybg
THitem/TH
THname/TH
THcategory/TH
THdonor/TH
THscript/TH
THtype/TH
/TR
TR
TDbean:write name=row property=item//TD
TDbean:write name=row property=name//TD
TDbean:write name=row property=category//TD
TD align=rightbean:write name=row property=donor//TD
TDbean:write name=row property=script//TD
TDbean:write name=row property=itemType//TD
/TR
/logic:iterate
/TABLE/TDTR
/logic:notEqual

The rest of the page, headers, footers, menus, even control buttons, can
all be inherited from a layout that the HTML dude has crafted. 

Though, at the top, even that looks like a method:

html:html
tiles:useAttribute name=title scope=request/
tiles:get name=base/
tiles:get name=header/
tiles:get name=heading/
tiles:get name=messages /
TRTD width=100%
tiles:get name=caption/
/TD/TR
tiles:get name=content/ -- THIS IS THE PART THE ENGINEER WRITES
tiles:get name=back/
tiles:get name=footer/
/html:html

Of course, my production version also includes stylesheets so the HTML
designer can control that too, and some internal links so users can
drill down, but you get the idea. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

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




Re: Problem: multiple browsers and session state

2002-02-07 Thread simon


 Unfortunately, this does not solve my multiple browsers in single
session
 problem.


Being pragamatic, I don't actually think you can solve this insofar as come
up with a one-size-fits all fix for these kind of issues.

.s



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




Login Authentication

2002-02-07 Thread Galbreath, Mark

What's the best way to authenticate users from a backend database in a
system using Struts?  Should the HTML form action go through the
ActionServlet or should I write a small validation class that authenticates
the login and forwards to the appropriate JSP?

Thanks,
Mark

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




RE: Bug in JBuilder 6.0 EE?

2002-02-07 Thread Galbreath, Mark

Speaking of JBuilder 6 EE, I've noticed some problems where the incorporated
compiler (JDK 1.3 beta 4, I think) is missing required exceptions when
compiling EJBs, most noticeably the CreateException thrown by finder
methods.  Compiling from the command line (JDK 1.3.1) catches these code
omissions.  Anybody else find this?

Mark

-Original Message-
From: Robert D. Morse [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 6:29 PM

Ted,
I finally have this working.  Turns out that the Tomcat version that Borland
packages with JBuilder 6 Enterprise is buggy.  I downloaded the 4.0.1

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




RE: Dynamic Property.

2002-02-07 Thread Ken . Horn

you can use either indexed or mapped properties in struts for this. 
Alternatively the standard request.getParameterNames/getParameterValues 
will supply all the data values.
For the mapped properties, use something like:

input type=text name=prop[%= rowNum %]   
or
input type=text name=prop{%= name %   

which will call a setProp(rowNum, value) or setProp(name, value)

Note: to use the mapped properties (indexed by name) you need to use 
either BeanUtils from Commons or get a nightly of struts.

Ken

-Original Message-
From: arikl 
Sent: 07 February 2002 10:30
To: struts-user
Cc: arikl
Subject: RE: Dynamic Property.


Sorry, I think that I didn't make my self clear,

Say I have two fields DB

- Name
- Value

the values are my form fields so, how can I make a setter and 
getter
form methods if I don't know what fields name I'm gonna get?

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 07, 2002 12:19 PM
To: Struts Users Mailing List
Subject: Re: Dynamic Property.

Populating the fields you plan to retrieve from the database is not a
problem. 

The Action handles the retrieval, populates the ActionForm, and sends it
along to the presentation page. 

The ActionForm properties correspond to columns in the result set. 


Arik Levin ( Tikal ) wrote:
 
 Yes, I mean buy dynamic Property that I'm getting the fields dynamic
from
 my database, so how can I do it? Because at the current release I 
can't do
 it, so do u have some suggestions how to do it anyway?
 
 Thanx.
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 11:55 AM
 To: Struts Users Mailing List
 Subject: Re: urgent HELP I have application to go... Dynamic
 Property.
 
 Personally, I'm never quite sure what people mean by dynamic forms.
 
 Are these being used with a dynamic database that creates fields on
 the fly?
 
 Given all the scriptlets, it's hard to tell what's wrong with your 
code.
 Most often Struts pages are written using custom tags, with the
 occaisonal runtime expression to plug a gap.
 
 For more about building applications with Struts, see
 
 http://jakarta.apache.org/struts/userGuide/index.html
 
 and
 
 http://www.husted.com/struts
 
 For more about how releases are scheduled, see
 
 http://jakarta.apache.org/struts/userGuide/kickstart.html#release
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 Arik Levin ( Tikal ) wrote:
 
  Hello out there...
 
  I asked this question yesterday, but with no luck. No a
single
  comment.
 
   can anybody help me with this    HELP  
@#@#@#@#
 
 
 
 
  Hi everybody.
 
I'm new at struts, but I have tried it and It's just what our
 company
  wants to our project, and hey... you did a great job.
 
BUT, I have to use some dynamic property because a lot of 
forms at
 our
  app. is dynamic. Thus, I have found at the mailing list a
  DynamicProperty zip file so... I have compiled it to the struts jar 
and
 did
  the example but I have this small problem.
 
 
  At this section:
 
 
jsp:useBean id=mainForm type=xtest.actions.DynPropForm
  scope=session/
 
  html:form action=/xtest/jsp/inputDetails.do method=get
 
  % for (java.util.Iterator iter =
  mainForm.allDynamicPropertyNames().iterator(); iter.hasNext(); ) {
  String propName = (String)iter.next(); %
  %=propName%: html:text property=%=propName%/br
  %
  }
  %
 
 
  I get an Exception:  blab la Could instantiate bean
  'mainForm', neither 'class' nor 'beanName' were specified   bla.. 
bla..
 
  So as I see it, the bean thru struts is not in session
scope,
 so
  I don't have this bean so I'm  ...beeep!
 
 
  If someone out there can help me with this issue , it 
would
be
  great, but if not I think I'll have to write something else and I 
don't
 want
  that !!!
 
  By the way, is there any chance to know when is the next
 release
  ???  thanx bye  Arik.
 
 --
 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]


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender 

RE: Problem with UTF encoding with Action Form

2002-02-07 Thread Chris Birch
Hi,

The following is taken from javax.servlet.ServletResponse:

---
The charset for the MIME body response can be specified with
setContentType(java.lang.String). For example, "text/html;
charset=Shift_JIS". The charset can alternately be set using
setLocale(java.util.Locale). If no charset is specified, ISO-8859-1 will be
used. The setContentType or setLocale method must be called before getWriter
for the charset to affect the construction of the writer.
---

If your UTF-8 chars are inside the normal ascii range then you shouldn't
have a problem, for those outside, its using the wrong encoding.  You will
need to set the appropiate content type in response object.  Also, you must
specify the charset in your HTML (in jsp) as well, otherwise the browser
wont know which charset to use to display the characters.

I saw a post on here a while ago that said IE often ignores the charset
specified and it had to be changed manually.

Hope this helps,
Chris.



-Original Message-
From: Antony Stace [mailto:[EMAIL PROTECTED]]
Sent: 07 February 2002 09:25
To: [EMAIL PROTECTED]
Subject: Problem with UTF encoding with Action Form


Hi

I have a jsp page in UTF-8 format with a form in it a user fills out, this
form is a session scope Action Form.
The user then submits the request and the
same page gets returned with the form values from the previous submit on
this screen.  I did not change the
values anyway of the Action Form, they should be the same ones the user
submitted in their first step.  However, all the fields
in this populated form are all garbage.
Any idea where my problem is?

--


Cheers

Tony$B!#(B
-


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
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: Dynamic Property.

2002-02-07 Thread Arik Levin ( Tikal )

Ken.

Thanx a LOT ! haleluYa

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 07, 2002 2:25 PM
To: [EMAIL PROTECTED]
Subject: RE: Dynamic Property.

you can use either indexed or mapped properties in struts for this. 
Alternatively the standard request.getParameterNames/getParameterValues 
will supply all the data values.
For the mapped properties, use something like:

input type=text name="prop[%= rowNum %]"   
or
input type=text name="prop{%= name %"   

which will call a setProp(rowNum, value) or setProp(name, value)

Note: to use the mapped properties (indexed by name) you need to use 
either BeanUtils from Commons or get a nightly of struts.

Ken

-Original Message-
From: arikl 
Sent: 07 February 2002 10:30
To: struts-user
Cc: arikl
Subject: RE: Dynamic Property.


Sorry, I think that I didn't make my self clear,

Say I have two fields DB

- Name
- Value

the values are my form fields so, how can I make a setter and 
getter
form methods if I don't know what fields name I'm gonna get?

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 07, 2002 12:19 PM
To: Struts Users Mailing List
Subject: Re: Dynamic Property.

Populating the fields you plan to retrieve from the database is not a
problem. 

The Action handles the retrieval, populates the ActionForm, and sends it
along to the presentation page. 

The ActionForm properties correspond to columns in the result set. 


"Arik Levin ( Tikal )" wrote:
 
 Yes, I mean buy "dynamic Property" that I'm getting the fields dynamic
from
 my database, so how can I do it? Because at the current release I 
can't do
 it, so do u have some suggestions how to do it anyway?
 
 Thanx.
 
 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 11:55 AM
 To: Struts Users Mailing List
 Subject: Re: urgent HELP I have application to go... Dynamic
 Property.
 
 Personally, I'm never quite sure what people mean by "dynamic forms".
 
 Are these being used with a "dynamic database" that creates fields on
 the fly?
 
 Given all the scriptlets, it's hard to tell what's wrong with your 
code.
 Most often Struts pages are written using custom tags, with the
 occaisonal runtime expression to plug a gap.
 
 For more about building applications with Struts, see
 
 http://jakarta.apache.org/struts/userGuide/index.html
 
 and
 
 http://www.husted.com/struts
 
 For more about how releases are scheduled, see
 
 http://jakarta.apache.org/struts/userGuide/kickstart.html#release
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 "Arik Levin ( Tikal )" wrote:
 
  Hello out there...
 
  I asked this question yesterday, but with no luck. No a
single
  comment.
 
   can anybody help me with this    HELP  
@#@#@#@#
 
 
 
 
  Hi everybody.
 
I'm new at struts, but I have tried it and It's just what our
 company
  wants to our project, and hey... you did a great job.
 
BUT, I have to use some dynamic property because a lot of 
forms at
 our
  app. is dynamic. Thus, I have found at the mailing list a
  DynamicProperty zip file so... I have compiled it to the struts jar 
and
 did
  the example but I have this small problem.
 
 
  At this section:
 
 
jsp:useBean id="mainForm" type="xtest.actions.DynPropForm"
  scope="session"/
 
  html:form action="/xtest/jsp/inputDetails.do" method="get"
 
  % for (java.util.Iterator iter =
  mainForm.allDynamicPropertyNames().iterator(); iter.hasNext(); ) {
  String propName = (String)iter.next(); %
  %=propName%: html:text property="%=propName%"/br
  %
  }
  %
 
 
  I get an Exception:  blab la" Could instantiate bean
  'mainForm', neither 'class' nor 'beanName' were specified "  bla.. 
bla..
 
  So as I see it, the bean thru struts is not in session
scope,
 so
  I don't have this bean so I'm  ...beeep!
 
 
  If someone out there can help me with this issue , it 
would
be
  great, but if not I think I'll have to write something else and I 
don't
 want
  that !!!
 
  By the way, is there any chance to know when is the next
 release
  ???  thanx bye  Arik.
 
 --
 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]


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by 

RE: urgent!!!! HELP!!!! I have application to go... Dynamic Property.

2002-02-07 Thread Galbreath, Mark

The message subjects are getting a bit shrill around here, aren't they?  I
look at my inbox and think someone is on fire or something

:-)

Mark

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




Re: html:messages Design issue: mixing data and presentation!!!!

2002-02-07 Thread Julius

Why do you have to put the html in the resource file for header and footer?
You can use include directive instead.

- Original Message -
From: JC [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 3:31 AM
Subject: html:messages Design issue: mixing data and presentation


 Hi,
 A great thing with Struts is the error validation
 capabilities. However, the use of html:errors/, or
 lately html:messages, poses a problem that I found
 not to be a very good design (though it is slightly
 better in the messages tag).

 What I don't like is, in order to get any presentation
 formatting on the header and footer, you need to enter
 html in the resources and therefore mixing up data and
 presentation.

 An example where this apply is that we have an i18n
 utility where the administrator for each country can
 translate all messages from a default language into
 their local language and for the messages headers and
 footers they have to see the html as well.

 Has anyone thought of this before?

 /Johannes



 _
 Hitta snörapporter...
 från 500 olika skidorter i Europa
 på http://se.snow.yahoo.com

 --
 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: Problem with UTF encoding with Action Form

2002-02-07 Thread Antony Stace
Hi Chris 

Thanks for the reply.

On Thu, 7 Feb 2002 12:32:27 -
"Chris Birch" [EMAIL PROTECTED] wrote:

 Hi,
 
 The following is taken from javax.servlet.ServletResponse:
 
 ---
 The charset for the MIME body response can be specified with
 setContentType(java.lang.String). For example, "text/html;
 charset=Shift_JIS". The charset can alternately be set using
 setLocale(java.util.Locale). If no charset is specified, ISO-8859-1 will be
 used. The setContentType or setLocale method must be called before getWriter
 for the charset to affect the construction of the writer.
 ---
 
 If your UTF-8 chars are inside the normal ascii range then you shouldn't
 have a problem, for those outside, its using the wrong encoding. 

They are outside - Japanese Characters.

 You will
 need to set the appropiate content type in response object.  

Isn't this done by

%@ page contentType="text/html; charset=UTF-8" %

or do I need to do this in the Action.perform() method by

response.setContentType("text/html;charset=UTF-8;");

?

Also, you must
 specify the charset in your HTML (in jsp) as well, otherwise the browser
 wont know which charset to use to display the characters.

do you mean

%@ page contentType="text/html; charset=UTF-8" %
or

head
meta http-equiv="Content-Type" content="text/html; charset=UTF-8"

 
 I saw a post on here a while ago that said IE often ignores the charset
 specified and it had to be changed manually.

I shall watch out for this.

Thanks for the help


-- 


Cheers

Tony$B!#(B
-


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


ActionForward usage.

2002-02-07 Thread rob

Regarding a post Ted made a couple of days ago. (Which a copy of follows
this post)
As well as some other general questions.

I would like to pre-populate my form field values from a database
datasource.

I am using the following configuration which to be honest is giving me a bit
of a
headache and I hope someone could improve it for me.

action path=/addItem
type=actions.AddItemAction
name=AddItemForm
scope=request
input=/pages/addItem.jsp
validate=true

forward name=selfpath=/pages/addItem.jsp/

/action

Initially if I want to add an item I forward to /addItem the AddItemAction
detects whether or not this is the first visit to the form and if so places
data from an rdbms into the HttpServletRequest object and calls the
ActionForm (AddItemForm)'s reset() method to populate the form.

The AddItemAction then forwards the request to the self forward which
displays the form for the user to enter his or her own new data.  The user
then submits the form back to the /do/addItem and this time the action
detects that the form had been prepopulated and that the data should be
validated and inserted into the rdbms upon completion the AddItemAction then
forwards the request to some global forward.

Now at a first glance this obviously sucks.   A couple of days ago however I
saw a post that Ted had made about mapping all request through actions that
I thought might help me to solve the above problem. (the post attached
below)

From the configuration in Ted's post I developed this new configuration
(which doesn't work).
I set it up initially with the intent that I would subclass the
ForwardAction class and have it pull the data from the rdbms stick the data
in the request and then call the forms reset() method to populate the form.
However before getting around to that I figured I'd just try setting it up
to forward to see if I ended up at my addItem.jsp form.

action path=/addItemGet
type=org.apache.struts.actions.ForwardAction
parameter=/pages/addItem.jsp
name=AddItemForm
scope=request
validate=false
/action

action path=/addItemSet
type=actions.AddItemAction
name=AddItemForm
scope=request
validate=true
input=/pages/addItem.jsp

/action

Unfortunately this is the error I get:

elysium# 2002-02-08 09:56:37 - Ctx(/ims) : Status code:500 request:R( /ims +
/do + /addItemGet) msg:No action instance for path /addItemGet could be
created

I've posted about form pre-population before and a couple of you were able
to help me out but clearly I misunderstood.  So please if you reply be as
verbose and explanitory as possible thanks.

The best practice now is to use ActionMappings for everything, so that
the reqeust passes through the controller.

This buys you several important capabilities that become important as
applications grow. Not the least of which is the new support for
multiple applications in the Nightly Build.

The ActionMapping has a validate property that you can use to turn off
validation when the mapping is used to initialize a new form. So,
typically, you will have an ActionMapping for each circumstance.

action
path=/item/Add
type=org.apache.struts.actions.ForwardAction
parameter=/pages/item/Form.jsp
name=itemForm
scope=request
validate=false
/action

   action
path=/item/Store
type=org.apache.gavel.item.http.Store
name=itemForm
scope=request
validate=true
input=/pages/item/Form.jsp
forward
name=continue
path=/do/donor/Detail/
/action



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




RE: Problem with UTF encoding with Action Form

2002-02-07 Thread Chris Birch
Hi,

I've just looked in the JSP spec. and you're quite right, the "@page content
..." directive sets the encoding used by the Writer.  You also correctly
stated that you need:

meta http-equiv="Content-Type" content="text/html; charset=UTF-8"

as well.

Hopefully that should do the trick.

Regards,
Chris.

-Original Message-
From: Antony Stace [mailto:[EMAIL PROTECTED]]
Sent: 07 February 2002 13:11
To: Struts Users Mailing List
Subject: Re: Problem with UTF encoding with Action Form


Hi Chris

Thanks for the reply.

On Thu, 7 Feb 2002 12:32:27 -
"Chris Birch" [EMAIL PROTECTED] wrote:

 Hi,

 The following is taken from javax.servlet.ServletResponse:

 ---
 The charset for the MIME body response can be specified with
 setContentType(java.lang.String). For example, "text/html;
 charset=Shift_JIS". The charset can alternately be set using
 setLocale(java.util.Locale). If no charset is specified, ISO-8859-1 will
be
 used. The setContentType or setLocale method must be called before
getWriter
 for the charset to affect the construction of the writer.
 ---

 If your UTF-8 chars are inside the normal ascii range then you shouldn't
 have a problem, for those outside, its using the wrong encoding.

They are outside - Japanese Characters.

 You will
 need to set the appropiate content type in response object.

Isn't this done by

%@ page contentType="text/html; charset=UTF-8" %

or do I need to do this in the Action.perform() method by

response.setContentType("text/html;charset=UTF-8;");

?

Also, you must
 specify the charset in your HTML (in jsp) as well, otherwise the browser
 wont know which charset to use to display the characters.

do you mean

%@ page contentType="text/html; charset=UTF-8" %
or

head
meta http-equiv="Content-Type" content="text/html; charset=UTF-8"


 I saw a post on here a while ago that said IE often ignores the charset
 specified and it had to be changed manually.

I shall watch out for this.

Thanks for the help


--


Cheers

Tony$B!#(B
-


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
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: Problem with UTF encoding with Action Form

2002-02-07 Thread Antony Stace
Thanks Chris for the reply.

 I've just looked in the JSP spec. and you're quite right, the "@page content
 ..." directive sets the encoding used by the Writer.  You also correctly
 stated that you need:
 
 meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
 
 as well.
 
 Hopefully that should do the trick.

Umm.I have this and I get the garbage charactersWhere to go from here I wonder.


-- 


Cheers

Tony$B!#(B
-


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


RE: Problem with UTF encoding with Action Form

2002-02-07 Thread Chris Birch
Tony,

Try sending your request to your server via a telnet connection.  That way
you will be able to see in the headers if the correct content type has been
set and what the character values are that are returned.  I'd suggest
creating a file with the HTTP POST in and having telnet read it.  Bit of a
pain but then at least you'd know what was happening.  Actually, rather than
messing with multi-part posts, you could probably use a HTTP GET with the
name/value pairs tagged onto the URL.

What servlet container are you using?  There is a possibility of a bug with
the page directive...

Regards,
Chris.

-Original Message-
From: Antony Stace [mailto:[EMAIL PROTECTED]]
Sent: 07 February 2002 13:47
To: Struts Users Mailing List
Subject: Re: Problem with UTF encoding with Action Form


Thanks Chris for the reply.

 I've just looked in the JSP spec. and you're quite right, the "@page
content
 ..." directive sets the encoding used by the Writer.  You also correctly
 stated that you need:

 meta http-equiv="Content-Type" content="text/html; charset=UTF-8"

 as well.

 Hopefully that should do the trick.

Umm.I have this and I get the garbage charactersWhere to go from
here I wonder.


--


Cheers

Tony$B!#(B
-


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
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: AW: ResultSet and ListObject - List Screens

2002-02-07 Thread Keith Bacon

Is it 16cm down this page?

--- Dirk Storck [EMAIL PROTECTED] wrote:
 WHERE do I find that taglib?
 Thanks!
 
 -Ursprungliche Nachricht-
 Von: Matt Raible [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 31. Januar 2002 22:21
 An: [EMAIL PROTECTED]
 Betreff: ResultSet and ListObject - List Screens
 
 
 I am looking to (hopefully) use Ed Hill's Display Tag Library to do sorting,
 alternate colored rows, and pagination of my list screens.  Other
 alternatives
 I've seen are HTMLTables and JSTL's forEach tag.
 
 What I'm wondering is if there are any utilities that anyone knows of to
 copy
 a ResultSet into a ListObject (I've seen Ed's tag use them, as well as the
 Nested Tag).
 
 Even better, I'd love to use Simper in association with one of these.
 
 Thanks,
 
 Matt
 
 Links to above references:
 
 Display Tag: http://edhill.its.uiowa.edu/display-examples/
 
 HTMLTable Tag: http://english.yuriy-zubarev.com/index.jsp
 
 JSTL Iterator Tag:
 http://jakarta.apache.org/taglibs/doc/standard-doc/standard-ea3/IteratorTag_
 FunctionalDescription_2_EAI.html
 
 Simper: http://netmeme.org/simper/
 
 __
 Do You Yahoo!?
 Great stuff seeking new owners in Yahoo! Auctions!
 http://auctions.yahoo.com
 
 --
 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]
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




Re: Problem with UTF encoding with Action Form

2002-02-07 Thread Michael Baldwin

Try reading a really good resource on character set encoding.
http://tagunov.newmail.ru/i18n/i18n.html

It sounds to me like the request params aren't being decoded properly when they are 
being
processed by the web container.

I'd suggest looking at the section on Decoding request parameters under Servlet 2.3
containers.
The 2.3 method on the request, request.setCharacterEncoding( String env ).  It might 
be
just what you're looking for.  As long as you call this method before any of there 
request
params are read (which means you'll have to mod the controller servlet), you can 
specify
whatever encoding you want when reading the chars from the request.

You could get fancier with supporting multiple character sets in your app by checking 
the
user's locale and making some assumptions about what character sets are used (GB for
Chinese, Big5 for others, etc.)

--Michael

Antony Stace wrote:

 Thanks Chris for the reply.

  I've just looked in the JSP spec. and you're quite right, the @page content
  ... directive sets the encoding used by the Writer.  You also correctly
  stated that you need:
 
  meta http-equiv=Content-Type content=text/html; charset=UTF-8
 
  as well.
 
  Hopefully that should do the trick.

 Umm.I have this and I get the garbage charactersWhere to go from here I 
wonder.

 --

 Cheers

 Tony$B!#(B
 -

 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com

 --
 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: Dynamic Property.

2002-02-07 Thread christian_weiler


Hi!

This is exactly what I need but does anyone know where to find a reference
implementation/example of BeanUtils respectively indexed props?

Thanks in advance,
Chris.


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




Re: Tiles Vs Templates

2002-02-07 Thread Cedric Dumoulin


  This prove that there is a need in such kind of frameworks ;-)

  At first glance, it looks like similar to Tiles. I will investigate more on it asap.

  Also, Tiles is open, and anyone can participate to improve it,  bring new ideas, and
why not starting its successor ;-)

 Cedric

nicolas bonvin wrote:

 Hi everyone,

 I do not want to start a flame war out here but after trying Templates and
 Tiles, I recently successfuly used a custom Web Toolkit (wtk) on a couple of
 J2ee projects. It is available at http://ultrawork.sourceforge.net.

 The org.ultrawork.wtk.mc package provides a few classes and taglibs that let
 you use strongly typed components inside Jsps or Servlets. The following
 components are available :
 Page, represents an Html markup document.
 Container, can hold components and arrange how it display them using a
 layout.
 Text, represents internationalizable text.
 Block, represents a fragment of markup.
 Link, represents an html link to either a resource that is located inside
 the web application, or to an external resource.

 My 2ç on the 3 alternatives :

 Templates, pros:
 very simple
 Templates, cons:
 lacks important features such as central-definition of components
 no inheritance between components

 Tiles, pros:
 very powerful
 compatible with Templates
 provides central-definition of components
 inheritance
 Tiles, cons:
 has a bigger API (more than 40 classes)
 lacks real component types such as texts, links, or markup fragments
 I found it more complicated to extend, especially when writing portal-type
 user-customizable pages.
 you have to specify a name to any component you create, even if the
 component only exists within another one.

 org.ultrawork.wtk.mc, pros:
 simple (18 classes) and easy to extend
 offers different types of components including containers and i18n support
 Jsp and Servlet layouts implementation
 simple syntax with the lowest possible overhead when defining complex
 components
 access to the components graph of a container through a dotted syntax
 org.ultrawork.wtk.mc, cons:
 yet another new component toolkit (mc stands for More Components)

 hope this helps,

 nicolas

  -Original Message-
  From: Sriram Nookala [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 04, 2002 6:50 PM
  To: Struts Users Mailing List
  Subject: Tiles Vs Templates
 
 
  I'm trying to get some information in order to make a choice
  between struts
  templates and Tiles for our UI design and templating. Where would
  you choose
  one over the other, and what does Tiles offer you that Templates doesn't?
  thanks,
  sriram
 
 
  --
  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: Dynamic tiles (attn: Cedric)

2002-02-07 Thread Cedric Dumoulin



Jim Crossley wrote:

 Thanks, Cedric.  I got this to work in the perform method of my Action
 class:

ComponentDefinition definition =
DefinitionsUtil.getDefinition(mapping.findForward(success).getPath(),
  request,
  getServlet().getServletContext());
definition.putAttribute( title, Overloaded title );
DefinitionsUtil.setActionDefinition( request, definition);

 Does it make sense to override the Tiles ActionServlet to invoke the
 above code to make some dynamic attributes available to all of my
 definition views?  Or would the Controller class be a better solution?


  It depends of what you want. If you want such behavior on all your definitions
views, why not. If you want it just on some definitions, use controller.


 -- Jim

 Cedric Dumoulin [EMAIL PROTECTED] writes:

So your install seem to work perfectly. Sorry for the wrong
response before, it  is what happen when you do to much things in
the same time.
 
It is normal that the componentContext is not found if you access
directly the  action (with *.do). The context is set when the
tile is inserted, or when an  action forward to a tile.
 
It work in the first url, because the action is inserted, so the
context  created.  A workaround is to have another action
forwarding to the action overloading  parameter.  Another
possibility is to define a definition with appropriate attributes,
and  set it in jsp context as in (not tested)
 
ComponentDefinition definition = new ComponentDefinition();
  // initialize definition here. If struts forward also specify a definition,
  attributes defined here will preval
  definition.putAttribute( attributeName, aValue );

   // Set def to be used by struts forward
DefinitionsUtil.setActionDefinition( request, definition);
return (mapping.findForward(success));
 
Also check example/tiles/test/TestActionTileAction.java
 
 Hope this help,
 
Cedric
 
 
  Jim Crossley wrote:
 
   Cedric Dumoulin [EMAIL PROTECTED] writes:
  
tiles-doc.jar is shipped with Struts1.1 previous than 15 jan, and is
ready to run. So you can try the mentioned url test directly on it,
and it should run. If not, let me know.
  
   This runs:
 http://localhost:8080/tiles-doc/test/testStrutsAction.jsp
  
   This does not:
 http://localhost:8080/tiles-doc/test/testAction.do
  
   It doesn't because the call to ComponentContext.getContext(request) in
   org.apache.struts.example.tiles.test.TestActionTileAction returns
   null.
  
   So I'm still not sure how to overload definition attributes (specified
   in an XML file) in a Struts action.  :-(
  
   --
   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: Multiple Forms on one JSP...

2002-02-07 Thread STEVE WILKINSON

Sounds like you need some debugging of you code.  Hum, I don't see enough posted here 
to help.   

Normally, one would post more code or look at the code sample that was offered to 
compare and see what's wrong.  I don't think I can help anymore.   

What I was trying to say with my prior posts is that it is possible.  Obviously, this 
is not the help you need.  There are other things to look at, but it appears that my 
help is not wanted or needed.  If you want to post more information maybe you can 
entice others to look with your charming responses.  Good luck debugging your code.  


- Original Message -
From: Rustad, Aaron
Sent: Wednesday, February 06, 2002 8:22 PM
To: 'Struts user '
Subject: RE: Multiple Forms on one JSP...

Alright, this is not what I want.

I have ONE JSP, it contains TWO forms, each form goes to a separate action.
However, when the JSP is rendered, the first form's FormBean is placed in
the session, but the second form(same JSP) throws a JSPException indicating
that it cannot find a bean under that name.

I am sure that you should be able to have TWO forms, referencing two
different actions, using TWO different formBean.

Any suggestions?
AR.

-Original Message-
From: STEVE WILKINSON
To: Struts user
Sent: 2/6/02 4:39 PM
Subject: Re: Multiple Forms on one JSP...

I know that works also.  It was not clear to me in your email that the
example had to be specific to two different actions.  Anywho... here is
what you were talking about.  Right from my example code.  Free of
charge, both the advice and the code. :-)

--- snip: shoppingcart.jsp ---
html:form action=/order.do
  html:hidden property=action value=createOrder /
html:submit
   bean:message key=button.createOrder/
/html:submit
/html:form

--- snip: shoppingcart.jsp ---

Note, I have different submit buttons on my page.

--- snip: struts-config.xml ---
!-- Process order request --
actionpath=/order
   type=com.wrox.pjsp2.struts.order.OrderAction
   name=orderForm
  scope=session
   validate=false
  input=/order.jsp
  forward name=success path=/order.jsp/
  forward name=thankyoupath=/thankyou.jsp/
/action
--- snip: struts-config.xml ---

So like I said if you look at my example you can see that I also go to
two different Actions from the same JSP page.  Yes, I use the same form
bean, but that should not matter.  I believe that you could use
different form beans, but I haven't checked it out yet.

Note, the reason for providing the example code at
http://www.newparticles.com/struts was to go beyond the basic struts
example and to provide what I learned back to the community.  Please
download the example application.  I get no extra money for it.  It's
there as a resource to learn from.

I've updated the code to work off CVS, but it's not been posted to the
web site yet.

Steve
- Original Message -
From: Rustad, Aaron
Sent: Wednesday, February 06, 2002 4:22 PM
To: 'Struts Users Mailing List'
Subject: RE: Multiple Forms on one JSP...

Yes, I know that would work. However, I want BOTH on the same JSP, at
the
same time. I don't want one action that decides what to do. I want each
form
in the One JSP to submit to a different action.

Thanks for your help though.

-Original Message-
From: STEVE WILKINSON [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 2:57 PM
To: [EMAIL PROTECTED]
Subject: Re: Multiple Forms on one JSP...


I use multiple forms successfully in my sample application that I did in
the

Wrox Pro JSP 2nd Edition book.  There is one per entry in the HTML
table.

--- snip: from showshoppingcart.jsp 

html:form action=/checkout.do
  html:hidden property=action value=update /
  html:hidden property=%= Constants.TITLE_ID %
value=%= String.valueOf(titleId) % /
  table cellspacing=2 cellpadding=2 border=0
tr
  td
bean:define id=quantity name=cartItem property=quantity/
html:text property=quantity
   value=%= String.valueOf(quantity) %
   size=5 maxlength=5/
  /td
 td
   html:submit
 bean:message key=button.update/
   /html:submit
 /td
   /tr
  /table
/html:form

--- snip: from showshoppingcart.jsp 

I iterate over a collection of items in the shopping cart and display
the
table.  NOTE, each form has it's own submit button and that I use a
hidden
variable to tell which form was submitted.

Here is the struts-config.xml file entry:

--- snip: from struts-config.xml file 
!-- Process checkout request --
actionpath=/checkout
   type=com.wrox.pjsp2.struts.shopping.CheckoutAction
   name=checkoutForm
  scope=request
   validate=false
  forward name=success path=/shoppingcart.jsp/
/action
--- snip: from struts-config.xml file 

Hopes this helps...

Source code from my chapter example can be 

RE: Dynamic Property.

2002-02-07 Thread Arik Levin ( Tikal )

Hey Chris.

This make the two of us.

I'm trying it like this moment at J2EE env. , If u'll find an
example later on tell me about it. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 07, 2002 3:50 PM
To: Struts Users Mailing List
Subject: RE: Dynamic Property.


Hi!

This is exactly what I need but does anyone know where to find a reference
implementation/example of BeanUtils respectively indexed props?

Thanks in advance,
Chris.


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



Re: Dynamic tiles (attn: Cedric)

2002-02-07 Thread Jim Crossley

One more question...

  ComponentDefinition definition =
  DefinitionsUtil.getDefinition(mapping.findForward(success).getPath(),
request,
getServlet().getServletContext());
  definition.putAttribute( title, Overloaded title );
  DefinitionsUtil.setActionDefinition( request, definition);

Once the above code is executed in Action.perform, how does the
subsequent return value (ActionForward) affect the definition
previously set?

In other words, once I call setActionDefinition, does it matter which
ActionForward I return?  Could I simply return a new ActionForward()?

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




Re: Dynamic tiles (attn: Cedric)

2002-02-07 Thread Cedric Dumoulin


  If the actionForward contains a definition name, the definition is retrieved,
and missing attributes are added to your definition. Otherwise, ActionForward has
no effect, and I think you should be able to return null.

Jim Crossley wrote:

 One more question...

   ComponentDefinition definition =
   DefinitionsUtil.getDefinition(mapping.findForward(success).getPath(),
 request,
 getServlet().getServletContext());
   definition.putAttribute( title, Overloaded title );
   DefinitionsUtil.setActionDefinition( request, definition);

 Once the above code is executed in Action.perform, how does the
 subsequent return value (ActionForward) affect the definition
 previously set?

 In other words, once I call setActionDefinition, does it matter which
 ActionForward I return?  Could I simply return a new ActionForward()?

 --
 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 Forms on one JSP...

2002-02-07 Thread Rustad, Aaron

OK, I found a solution. Maybe some of you can shed some light on why this
works.

In my second html:form, I simply included type=com.class.name to signify
the class that should be instantiated in the event that it doesn't locate
one. However, Doesn't the ActionServlet look at the ActionMappings to
determine what Form to instantiate? I know it does for the first form in my
JSP and for any other single-formed JSP. Could this be a bug?

In any case, much thanks to Steve for your help.
Thanks!
Aaron.



-Original Message-
From: STEVE WILKINSON [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 7:23 AM
To: Struts user
Subject: Re: Multiple Forms on one JSP...


Sounds like you need some debugging of you code.  Hum, I don't see
enough posted here to help.   

Normally, one would post more code or look at the code sample that was
offered to compare and see what's wrong.  I don't think I can help
anymore.   

What I was trying to say with my prior posts is that it is possible.
Obviously, this is not the help you need.  There are other things to
look at, but it appears that my help is not wanted or needed.  If you
want to post more information maybe you can entice others to look with
your charming responses.  Good luck debugging your code.  


- Original Message -
From: Rustad, Aaron
Sent: Wednesday, February 06, 2002 8:22 PM
To: 'Struts user '
Subject: RE: Multiple Forms on one JSP...

Alright, this is not what I want.

I have ONE JSP, it contains TWO forms, each form goes to a separate
action.
However, when the JSP is rendered, the first form's FormBean is placed
in
the session, but the second form(same JSP) throws a JSPException
indicating
that it cannot find a bean under that name.

I am sure that you should be able to have TWO forms, referencing two
different actions, using TWO different formBean.

Any suggestions?
AR.

-Original Message-
From: STEVE WILKINSON
To: Struts user
Sent: 2/6/02 4:39 PM
Subject: Re: Multiple Forms on one JSP...

I know that works also.  It was not clear to me in your email that the
example had to be specific to two different actions.  Anywho... here is
what you were talking about.  Right from my example code.  Free of
charge, both the advice and the code. :-)

--- snip: shoppingcart.jsp ---
html:form action=/order.do
  html:hidden property=action value=createOrder /
html:submit
   bean:message key=button.createOrder/
/html:submit
/html:form

--- snip: shoppingcart.jsp ---

Note, I have different submit buttons on my page.

--- snip: struts-config.xml ---
!-- Process order request --
actionpath=/order
   type=com.wrox.pjsp2.struts.order.OrderAction
   name=orderForm
  scope=session
   validate=false
  input=/order.jsp
  forward name=success path=/order.jsp/
  forward name=thankyoupath=/thankyou.jsp/
/action
--- snip: struts-config.xml ---

So like I said if you look at my example you can see that I also go to
two different Actions from the same JSP page.  Yes, I use the same form
bean, but that should not matter.  I believe that you could use
different form beans, but I haven't checked it out yet.

Note, the reason for providing the example code at
http://www.newparticles.com/struts was to go beyond the basic struts
example and to provide what I learned back to the community.  Please
download the example application.  I get no extra money for it.  It's
there as a resource to learn from.

I've updated the code to work off CVS, but it's not been posted to the
web site yet.

Steve
- Original Message -
From: Rustad, Aaron
Sent: Wednesday, February 06, 2002 4:22 PM
To: 'Struts Users Mailing List'
Subject: RE: Multiple Forms on one JSP...

Yes, I know that would work. However, I want BOTH on the same JSP, at
the
same time. I don't want one action that decides what to do. I want each
form
in the One JSP to submit to a different action.

Thanks for your help though.

-Original Message-
From: STEVE WILKINSON [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 2:57 PM
To: [EMAIL PROTECTED]
Subject: Re: Multiple Forms on one JSP...


I use multiple forms successfully in my sample application that I did in
the

Wrox Pro JSP 2nd Edition book.  There is one per entry in the HTML
table.

--- snip: from showshoppingcart.jsp 

html:form action=/checkout.do
  html:hidden property=action value=update /
  html:hidden property=%= Constants.TITLE_ID %
value=%= String.valueOf(titleId) % /
  table cellspacing=2 cellpadding=2 border=0
tr
  td
bean:define id=quantity name=cartItem property=quantity/
html:text property=quantity
   value=%= String.valueOf(quantity) %
   size=5 maxlength=5/
  /td
 td
   html:submit
 bean:message key=button.update/
   /html:submit
 /td
   /tr
  /table
/html:form

--- snip: from showshoppingcart.jsp 

I 

Nightlies stability and 1.1

2002-02-07 Thread Ken . Horn


How stable are the current nightly builds? Is there a proposed 
timescale for when a 1.1 is likely? (approx weeks/months/years? :o)

Ken


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


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




Derived tiles inherit controllerClass?

2002-02-07 Thread Jim Crossley

In the tiles definition file, when one definition extends another, the
parent's controllerClass does not seem to be inherited by the child.
Is that by design or a bug?

Thanks.

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




Subject: configure the welcome page

2002-02-07 Thread @Basebeans.com

Subject: Subject: configure the welcome page
4856:From: Brian K. Buckley [EMAIL PROTECTED]
 ===

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




Re: Derived tiles inherit controllerClass?

2002-02-07 Thread Cedric Dumoulin


  It's a bug.

Jim Crossley wrote:

 In the tiles definition file, when one definition extends another, the
 parent's controllerClass does not seem to be inherited by the child.
 Is that by design or a bug?

 Thanks.

 --
 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: Antwort: How to go about??

2002-02-07 Thread STEVE WILKINSON

Chris,

Thanks for the feedback on my chapter in Professional JSP.  FYI, 
http://www.newparticles.com/struts contains updates and bug fixes to the chapter 
examples.  In a few days they will post the latest edition that is built from a CVS 
snapshot of 12-15-2001.

Steve   

- Original Message -
From: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 2:43 AM
To: Struts Users Mailing List
Subject: Antwort: How to go about??


Hi!

I'm also doing a kind of struts evaluation project for my company at the
moment and I found Chapter 21 from 'Professional JSP' very useful. It
discusses the wrox-struts example in detail and so gives and your guys a
good starting point.

Chris.


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



Re: Multiple Forms on one JSP...

2002-02-07 Thread STEVE WILKINSON

Jay,

You are correct in that the JSP snip was not complete.  This is contained in an 
iterate tag.  I mentioned that after the code snip.   

Multiple forms do work in struts.  I have sample code that shows it.  Sometimes while 
debugging a problem its easier to look at working code and see what they do 
differently.

Thanks for your response, code snip below:

Steve


--- bigger snip: shoppingcart.jsp -

logic:iterate id=cartItem  
 type=com.wrox.pjsp2.struts.common.CartItem  
 name=shoppingCart
 property=cartItems
%
  num++;
  if((num % 2) == 0) {
bgColor = SLATE;
  } else {
bgColor = WHITE;
  }
%
  bean:define id=cd name=cartItem property=cd 
type=com.wrox.pjsp2.struts.common.CD/
tr bgcolor=%= bgColor %
tdjsp:getProperty name=cd property=artist//td
tdjsp:getProperty name=cd property=titleName//td
tdjsp:getProperty name=cd property=price//td
td valign=middle
  html:form action=/checkout.do
html:hidden property=action value=update /
bean:define id=titleId name=cd property=titleId/
html:hidden property=%= Constants.TITLE_ID %  
value=%= String.valueOf(titleId) % /
table cellspacing=2 cellpadding=2 border=0
  tr
  td
bean:define id=quantity name=cartItem 
property=quantity/
html:text property=quantity  
  value=%= String.valueOf(quantity) %  
   size=5 maxlength=5/
  /td
  td
html:submit
   bean:message key=button.update/
/html:submit
  /td
  /tr
/table
  /html:form
/td
tdjsp:getProperty name=cartItem property=total//td
/tr
/logic:iterate

--- bigger snip: shoppingcart.jsp -



- Original Message -
From: Jay Sissom
Sent: Thursday, February 07, 2002 2:59 AM
To: Struts Users Mailing List
Subject: Re: Multiple Forms on one JSP...

Maybe this code snippet is not complete, but there is only one FORM on this
page.  Everything between html:form and /html:form is a single form.
There may be multiple html:submit tags, but there is only one FORM.

I don't believe struts will work with multiple-forms, but I'm not sure.
Multiple submit buttons is no problem.

Jay

- Original Message -
From: STEVE WILKINSON [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 06, 2002 4:56 PM
Subject: Re: Multiple Forms on one JSP...


 I use multiple forms successfully in my sample application that I did in
the
 Wrox Pro JSP 2nd Edition book.  There is one per entry in the HTML table.

 --- snip: from showshoppingcart.jsp 

 html:form action=/checkout.do
   html:hidden property=action value=update /
   html:hidden property=%= Constants.TITLE_ID %
 value=%= String.valueOf(titleId) % /
   table cellspacing=2 cellpadding=2 border=0
 tr
   td
 bean:define id=quantity name=cartItem property=quantity/
 html:text property=quantity
value=%= String.valueOf(quantity) %
size=5 maxlength=5/
   /td
  td
html:submit
  bean:message key=button.update/
/html:submit
  /td
/tr
   /table
 /html:form

 --- snip: from showshoppingcart.jsp 

 I iterate over a collection of items in the shopping cart and display the
 table.  NOTE, each form has it's own submit button and that I use a hidden
 variable to tell which form was submitted.

 Here is the struts-config.xml file entry:

 --- snip: from struts-config.xml file 
 !-- Process checkout request --
 actionpath=/checkout
type=com.wrox.pjsp2.struts.shopping.CheckoutAction
name=checkoutForm
   scope=request
validate=false
   forward name=success path=/shoppingcart.jsp/
 /action
 --- snip: from struts-config.xml file 

 Hopes this helps...

 Source code from my chapter example can be downloaded from:
 http://www.newparticles.com/struts

 There is a new version being placed on the site that is based on the CVS
 snapshot from December.  It's in the read me.  I will be updating this in
 the next month or so to be current with CVS.

 Thanks,
 Steve Wilkinson

 From: Rustad, Aaron [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: Multiple Forms on one JSP...
 Date: Wed, 6 Feb 2002 13:15:53 -0700
 
 
 I seem to be running into a bit of a problem with one of my JSP pages
that
 has two forms on it. Only one Form is being instantiated for it. I am
sure
 you should be able to have multiple forms.
 
 Here is an example of my JSP:
 
 html:form 

Re: Poolman Help?

2002-02-07 Thread Jason B Menard

Without examining your code it is hard to say exactly where the problem is,
but basically it doesn't sounds like something is going on with your
Connection object (reusing it when you shouldn't, goes out of scope, not
closing it when you should, something along those lines).  The reason it
works after you wait awhile is probably that the connection or the user
eventually timesout, as specified by values in your poolman.xml file.

- Original Message -
From: Mark Woon [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, February 06, 2002 9:29 PM
Subject: OT: Poolman Help?


 Hi all...

 I'm hoping someone can help me out with a problem I'm having with
 Poolman 2.1b1.  I have it set up, and everything seems to work fine the
 first time I access the database, but on subsequent connections, I get
 an NPE:

 java.lang.NullPointerException
  at

oracle.jdbc.dbaccess.DBDataSetImpl._createOrGetDBItem(DBDataSetImpl.java:578
)

  at

oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:1773)

  at

oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.j
ava:874)

  at

oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement
.java:1256)

  at com.codestudio.sql.PoolManPreparedStatement.setString(Unknown
 Source)
  at org.pharmgen.security.User.authenticateUser(User.java:232)
  at org.pharmgen.webapp.LoginForm.validate(LoginForm.java:95)
  at

org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:21
06)

  at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
  at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 [snip]

 If I try again immediately, I get an NPE.  If I back off and wait a
 while, it'll work again, but then the problem repeats itself.  There's
 nothing in the PoolMan log related to this exception.

 I've tried mucking with all the configuration variables, but nothing
 seems to help.  Has anyone seen this problem before?  Is there a
 solution?

 Thanks,
 -Mark



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




error implementing menus using tiles

2002-02-07 Thread Sriram Nookala

I'm trying to create a dynamic menu using the tiles tutorial, but I get the
following error when I display the jsp:

[ServletException in:/topnavbar.jsp] Cannot find bean links in scope page'

What am I doing wrong?

thanks,
sriram

My implementation is as follows:

1. I have a topnvabar.jsp which is similar to the tiles example submenu.jsp:

%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %

%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

%@ taglib uri=/WEB-INF/tiles.tld prefix=comp %

%@ page import=java.util.Iterator %



%-- Push component attributes in page context --%

comp:importAttribute /

table

logic:present name=title

tr

th colspan=2

div align=leftstrongbean:write name=title//strong/div

/th

/tr

/logic:present

%-- Check if selected exist. --%

logic:notPresent name=selected 

% pageContext.setAttribute( selected,  ); %

/logic:notPresent

%-- Prepare the links list to be iterated --%

bean:define id=links name=links type=java.util.List scope=page /

% Iterator i = links.iterator(); %

%-- iterate on items list --%

%-- Normally, we should write something like this :

logic:iterate id=item name=items type=java.lang.String 

But, Struts doesn't declare the TEI class for iterate, and

some web container deal badly with the declared variable.

So, we use what follow instead.

--%

logic:iterate id=iterateItem name=items 

bean:define id=item name=iterateItem type=java.lang.String
scope=page /



tr

td width=10 valign=top /td

td valign=top 

%-- check if selected --%

logic:notEqual name=selected value=%=item%

% // Compute link value

String link = (String)i.next();

if(link.startsWith(/) )

link = request.getContextPath() + link;

%

font size=-1a href=%=link%%=item%/a/font

/logic:notEqual

logic:equal name=selected value=%=item%

font size=-1 color=fuchsia%=item%/font

/logic:equal

/td

/tr

/logic:iterate

/table



2. I have a tilesDefinitons.xml with the following relevant entries:



tiles-definitions
definition name=baseDef path=/TopLevelTemplate.jsp
  put name=title value= /
  put name=topnavbar value=topnavbar.links /
  put name=sectionnavbar value=/sectionnavbar.jsp /
  put name=leftnavbar value=/leftnavbar.jsp /
  put name=content value= /
  put name=footer value=/footer.jsp /
/definition

definition name=topnavbar.links path=/topnavbar.jsp 
  put name=selected value=Home /
  putList name=items 
add value=Home /
add value=Campaign /
add value=Segment /
add value=Analyze /
add value=Profile /
add value=Admin /
  /putList
  putList name=links 
add value=home.action /
add value=campaignlist.action?name=home /
add value=home.action /
add value=home.action /
add value=home.action /
add value=home.action /
  /putList
/definition

definition name=home extends=baseDef
  put name=title value=Campaign Manager Home /
  put name=content value=/HomeContent.jsp /
/definition

/tiles-definitions





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




RE: How to go about??

2002-02-07 Thread John Menke

There is a book: Struts Fast Track (See Resources Section on Jakarta Site).
It has helped me.  Also, read the API javadocs and the User Guide.

-Original Message-
From: Arnab Sengupta [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 12:50 AM
To: Struts Users Mailing List
Subject: Re: How to go about??


Dear Sanjay,
One and only one solution...
Follow the structs Documentations and try to understand the struts example
(only one is there) given alogn with the struts 1.0. It's too good and if
one understands the inner logic of the example,he/she is unstoppable.
It might take a week's time ..but worth investing.
Best of luck and welcome to struts..
Arnab.
- Original Message -
From: Sanjay Choudhary [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 3:41 AM
Subject: How to go about??


 Hi Friends,

 I am very new to Struts. All I have done is worked out
 couple of examples from web to understand the
 Architecture. We are in a process of designing a
 Product and plan to use Struts Framework with EJB's.

 In my team
 1. No one has any knowledge about Struts but they are
 very good with Java and J2EE.

 2. Except for a HTML designer, most of the programmers
 are involved with backend programming. They have done
 very little HTML work. I was wondering if we will be
 able to create JSP's using Struts HTML tags and other
 tag libraries if a form is defined using pure HTML.

 3. What is the best way to go about to learn Struts to
 use in practical life and how much time it takes?

 4. What strategies did you guys adopt to move to
 Struts?

 5. All pointers to valuable resources and design
 stratergies will be appreciated.

 Thanks you ,
 Sanjay







 __
 Do You Yahoo!?
 Send FREE Valentine eCards with Yahoo! Greetings!
 http://greetings.yahoo.com

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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




SSL + URL rewriting problem

2002-02-07 Thread Nathan Anderson

Hello all, 

I've been trying to get my Apache 1.3.22 + Tomcat 4.0.1 [via mod_WebApp] installation 
to work with SSL.  So far I've had some success, but there is one problem left that 
seems to only effect Struts applications.  

All my non-struts .JSP's and servlets work without any issues.  But in Struts, all of 
the URL's are being written like this:
http://www.hostname.com:443/strutsapp/...  

I'm probably missing something that will be fairly obvious to some of you but I just 
can't seem to figure it out.  Do any of you have suggestions, or links to help me out?

Nathan Anderson
--
Sent via jApache.org

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




Re: Migrating from another framework to struts ...

2002-02-07 Thread cool dude

Hi Ted and Oliver,
First lemme thank you guyz for the quick response.
Few of your suggestions have really helped me. But my
problem with relative URL still remains. Maybe I
didn't explain the problem in the right manner. Lemme
tell you what the exact scenario is. I have a URL
which looks like
http://www.mysite.com/US/en/brandname/actionname.

This would be the URL even for the starting page, with
actionname being say home. I need such a lengthy URL
because the site supports multiple countries 
languages  brands. I get this information form the
URL. I know we could have send this information even
as a querystring but unfortunately this is the
standard URL now and I can't change it. Now the
problem is this: If I give the action name as just
login  in the html:form I mention login it does
not find the action mapping. It gives me a error when
I submit to this form saying that there is no mapping
for action name /login. Why does it convert login
to /login I have no idea about ... its being done
internally in the struts FormTag. To solve this
problem I changed the action name to /login in my
struts-config.xml  it worked but then the URL changed
to http://www.mysite.com/main/login

You would notice that I lost the country, language 
brand information. I need all these information in the
all the pages to cater for bookmarking, ie, when a
user bookmarks a page I should be able to recreate the
page with his preferences, which I can do only if I
have this information in the URL.

How can I solve this problem? As I'm a newbee I might
be ignoring something really obvious ... hope you guyz
can help me out with this on e...

Thanx in advance,
Vikram.




--- Ted Husted [EMAIL PROTECTED] wrote:
 In furtherance of Oliver's response:
 
 cool dude wrote:
  1.  Does struts provide any build-in mechanism
 for
  session management? If not, then is there any
  guideline as to how struts can be used to provide
 that
  kindof support?
 
 For the most part, Struts relies on the Java Servlet
 container for that. 
 
 The custom tags provided with the framework all
 provide automatic URL
 rewriting, so the container can maintain the session
 when cookies are
 not available. 
 
 
  3.  I'm also having problems with URL
 forwards. It
  looks like in struts you have give URL forwards
  starting with /. What if I want to
  forward to a URL that doesn't being with /,
 i.e., a
  relative URL. Say my site looks something like
 this
  http://mysite.com/info1/info2/actionname and I
 would
  want to carry this URL for all the actions, ie,
 only
  the action name would change  the rest of the URL
  remains the same. Maybe I'm missing soemthing out
  here.
 
 Struts looks as these as String identifiers rather
 than a file tree, and
 does not resolve relative references in the way
 that you might expect. 
 
 It's important to remember that while we assign URI
 to actoins that look
 like references to directories or files, these don't
 exist in fact. You
 are not really forwarding to a URL that resolves to
 a file, but to an
 identifier that Struts looks up in a table.
 
 While seems like it would be feasible for Struts to
 treat this table
 like it were file tree, that functionality is not
 provided.
 
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




InvokeAction (action chaining)

2002-02-07 Thread Jeff Oberlander


I am working with the 1/31/02 nightly build.  The release notes show that
the following was added:
Add InvokeAction and CreateActionForm methods to allow direct chaining of
Actions.

Yet neither method shows in the javadoc or binaries.  Does anyone know the
status of these methods?  

Thanks much

Jeff


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




Re: Antwort: How to go about??

2002-02-07 Thread Sanjay Choudhary

Hi Steve,

Is it possible for us to get a soft copy of chapter 21
of your book to start with. I will also purchase the
book over the weekend. Can't wait anymore to get into
it.

-Sanjay


--- STEVE WILKINSON [EMAIL PROTECTED] wrote:
 Chris,
 
 Thanks for the feedback on my chapter in
 Professional JSP.  FYI,
 http://www.newparticles.com/struts contains updates
 and bug fixes to the chapter examples.  In a few
 days they will post the latest edition that is built
 from a CVS snapshot of 12-15-2001.
 
 Steve   
 
 - Original Message -
 From: [EMAIL PROTECTED]
 Sent: Thursday, February 07, 2002 2:43 AM
 To: Struts Users Mailing List
 Subject: Antwort: How to go about??
 
 
 Hi!
 
 I'm also doing a kind of struts evaluation project
 for my company at the
 moment and I found Chapter 21 from 'Professional
 JSP' very useful. It
 discusses the wrox-struts example in detail and so
 gives and your guys a
 good starting point.
 
 Chris.
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




File upload produces modified files

2002-02-07 Thread Tingleff, Sam


Using Struts 1.0 with Tomcat 4.0.1 on Win 2k.

FormFile uploads will consistently produce modified files with some
large binary files.  Is this a known bug?  Is there a fix available for
Struts 1.0?  Thanks.

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




Re: File upload produces modified files

2002-02-07 Thread John M. Corro

Very interesting, when you say large...how large we talking?
- Original Message -
From: Tingleff, Sam [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 11:24 AM
Subject: File upload produces modified files



 Using Struts 1.0 with Tomcat 4.0.1 on Win 2k.

 FormFile uploads will consistently produce modified files with some
 large binary files.  Is this a known bug?  Is there a fix available for
 Struts 1.0?  Thanks.

 --
 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: File upload produces modified files

2002-02-07 Thread Jeff Martin

Well, how do the files compare to each other? Is one longer by a byte, a lot of bytes, 
did it do \n - \r\n conversions on you, or what?

-Original Message-
From: Tingleff, Sam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 12:24 PM
To: '[EMAIL PROTECTED]'
Subject: File upload produces modified files



Using Struts 1.0 with Tomcat 4.0.1 on Win 2k.

FormFile uploads will consistently produce modified files with some
large binary files.  Is this a known bug?  Is there a fix available for
Struts 1.0?  Thanks.




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




Re: File upload produces modified files

2002-02-07 Thread Martin Cooper

There were a couple of bugs related to this that were fixed in Struts 1.0.1.
You might want to try upgrading and see if the problem remains.

--
Martin Cooper


- Original Message -
From: Tingleff, Sam [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 9:24 AM
Subject: File upload produces modified files



 Using Struts 1.0 with Tomcat 4.0.1 on Win 2k.

 FormFile uploads will consistently produce modified files with some
 large binary files.  Is this a known bug?  Is there a fix available for
 Struts 1.0?  Thanks.

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




Concatinating mutliple struts-config.xml files into one.

2002-02-07 Thread Ace

When working with a team on a struts web app it is best for each person 
to have his own
piece of the struts-config.xml file and merge all on a build. What is 
the best way to do this?
Can't find a cat command in ant?

-- 

--
- Rick Holland   OO/Distributed Systems Consultant
- ObjectAge Inc.
- [EMAIL PROTECTED]
Logic is a wreath of pretty flowers, that smell bad
--



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




RE: File upload produces modified files

2002-02-07 Thread Tingleff, Sam


Actually the file doesn't have to be too large.  I can reproduce it
with a 640k zip file.

Here's a diff from od -c output.  File size is always the same.

$ diff ~/content_orig.txt ~/content_new.txt
38746c38746
 2272620   g   e   /   c   l   i   e   n   t   /   E   T   r   a   n   s
---
 2272620   g   e   /   c   l   i   e   n   t   /   E   T   r   a  \n   s
40597c40597
 2364500   * 025 237   U   X 305  \b  \0  \0 205 021  \0  \0   3  \0  \0
---
 2364500   * 025 237   U   X 305  \b  \0  \0 205 021  \0  \0   3  \n  \0



-Original Message-
From: Jeff Martin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 9:29 AM
To: Struts Users Mailing List
Subject: RE: File upload produces modified files


Well, how do the files compare to each other? Is one longer by a byte, a lot
of bytes, did it do \n - \r\n conversions on you, or what?

-Original Message-
From: Tingleff, Sam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 12:24 PM
To: '[EMAIL PROTECTED]'
Subject: File upload produces modified files



Using Struts 1.0 with Tomcat 4.0.1 on Win 2k.

FormFile uploads will consistently produce modified files with some
large binary files.  Is this a known bug?  Is there a fix available for
Struts 1.0?  Thanks.




--
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: File upload produces modified files

2002-02-07 Thread Tingleff, Sam


You're right, Struts 1.0.1 seems to have fixed this.  Thanks!

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 9:39 AM
To: Struts Users Mailing List
Subject: Re: File upload produces modified files


There were a couple of bugs related to this that were fixed in Struts 1.0.1.
You might want to try upgrading and see if the problem remains.

--
Martin Cooper


- Original Message -
From: Tingleff, Sam [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 9:24 AM
Subject: File upload produces modified files



 Using Struts 1.0 with Tomcat 4.0.1 on Win 2k.

 FormFile uploads will consistently produce modified files with some
 large binary files.  Is this a known bug?  Is there a fix available for
 Struts 1.0?  Thanks.

 --
 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: ActionForm:reset() method

2002-02-07 Thread Keith Bacon

I think it's this simple:- (but experts please correct me if I'm wrong)
When your action is invoked if it specifies a form bean struts will call reset on it 
before
calling your perform method.

This is true when the action is invoked from HTTP either when your form is submitted 
(from submit
button) or when it's started thru a link (or redirected to). Struts tries to move the 
form fields
(from a submit) or request parameters (from a link) to the corresponding form bean 
properties
after the call to reset.

It's also true when you do a struts forwardTo(mapping, someAction).
If someAction is associated with someForm, someForm.reset() is called before calling
someAction.perform(..).
Note the previous action may have left it's form bean in the request (it normally 
should delete
it), but struts won't call it's reset, only that of the new form.
Hope this makes sense,
keith.
 
--- rob [EMAIL PROTECTED] wrote:
 Under what circumstances is the reset() method of an ActionForm called on
 the struts programmers behalf without them (the struts programmer)
 explicitly calling reset() in their own code?
 
 I can't quite figure out when it's being called for me and it's irritating
 the hell out of me :)
 
 Thanks
 
 rob
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




Re: Problem with validation

2002-02-07 Thread Keith Bacon

Not sure I understand but maybe this is your problem...

Is this because you are letting struts call your form bean's validate() method?
If your action is putting data in the request for your jsp to display it will be lost.

Then you should set validate=false  call validate from your action class.

This is from something I saw in the list a while ago - hope i got it right - I don't 
use
validate(0 myself. 
Keith.

--- Oliver_Reflé [EMAIL PROTECTED] wrote:
 Hello all,
 i have a big problem, when validating my form he maps back to input
 when errors occur(what is wished). But he empties the fileds of form and
 displays
 empty input fields. When i get the form manually out of the session and
 debug print
 the values it is filled.
 
 I put the form in the session, and set validation true.
 The form itself in the jsp takes it configuration out of the defined action.
 
 Any idea?
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




RE: Login Authentication

2002-02-07 Thread Afshartous, Nick


 From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 7:16 AM

 What's the best way to authenticate users from a backend database in a
 system using Struts?  Should the HTML form action go through the
 ActionServlet or should I write a small validation class that 
 authenticates
 the login and forwards to the appropriate JSP?

I would say the latter.  Another option would be 
to have the container perform authentication
(see the Servlet 2.2 spec for into on how to set this
 up).  

  Nick

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




Re: File upload produces modified files

2002-02-07 Thread John M. Corro

Is anyone aware of the nature of the bug?  That is does the bug only happen
w/ files over a certain size, compressed, files of a certain type, etc?  In
the app I'm working on, there is an option to upload certain files whose
data gets imported into the database.  The largest file that has been used
was ~6mbI haven't run into an issue as far as the file getting
morphed/altered (knock on wood).


- Original Message -
From: Tingleff, Sam [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 12:01 PM
Subject: RE: File upload produces modified files



 You're right, Struts 1.0.1 seems to have fixed this.  Thanks!

 -Original Message-
 From: Martin Cooper [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 9:39 AM
 To: Struts Users Mailing List
 Subject: Re: File upload produces modified files


 There were a couple of bugs related to this that were fixed in Struts
1.0.1.
 You might want to try upgrading and see if the problem remains.

 --
 Martin Cooper


 - Original Message -
 From: Tingleff, Sam [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, February 07, 2002 9:24 AM
 Subject: File upload produces modified files


 
  Using Struts 1.0 with Tomcat 4.0.1 on Win 2k.
 
  FormFile uploads will consistently produce modified files with some
  large binary files.  Is this a known bug?  Is there a fix available for
  Struts 1.0?  Thanks.
 
  --
  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: feed-forward data

2002-02-07 Thread Keith Bacon


 I need an answer to this in a hurry
It's a big question - a hurried answer might be wrong.

 not had luck searching the archives.
but there's lots of stuff there!

Has anyone got this logic in a live system  can comment from practical experience?
---
Hidden fields are passed into the form bean by struts (if they have a corresponding 
setter method)
same as visible fields.

So in your set of web pages each has every field on it. For each page the irrelevant 
fields are
hidden. That would be OK. I suspect you might get problems if the user breaks up the 
flow of your
app - the data in the request could get lost. 

Many people use a form Bean in the session which has every field in it. This keeps 
your jsp's
cleaner (no hidden fields). You may have unwanted data left in the session if user 
doesn't
complete the work flow. Also problems with session timeout when user didn't want to 
lose the data.

Me I love databases  like to store things there, with status codes to indicate if 
data is valid
/or complete.

For a little app I think your hidden fields theory is OK. If you are writing a Bank 
Account
opening app, I'd use a database, you can't lose the data by mistake, which would annoy 
your
potential customer.

You could write a big article on this stuff  argue all day!

Keith.
 


--- Folbrecht, Paul [EMAIL PROTECTED] wrote:
 Sorry for the basic question, but I need an answer to this in a hurry and
 have not had luck searching the archives.  All I need to know is: what is
 the best, simplest mechanism to handle standard feed-forward data in
 struts?  I.e., you have a multi-part form, and the data from the first must
 be stored (probably in hidden fields) in subsequent forms so it's all
 available in the post from the last page (form).  Of course I do not want to
 store it in the session.  I should be able to simple use form:hidden tags on
 the 2nd and subsequent pages, right?  But how do I populate them from the
 incoming request?  Thanks!!
  
 
 
 
 This e-mail contains confidential and privileged material for the sole use
 of the intended recipient.  Any review or distribution by others is strictly
 prohibited.  If you are not the intended recipient, please contact the
 sender and delete all copies.  This message and/or the materials contained
 herein are not an offer to sell, or a solicitation of an offer to buy, any
 securities or other instruments.  The information has been obtained or
 derived from sources believed by us to be reliable, but we do not represent
 that it is accurate or complete.  Any opinions or estimates contained in
 this information constitute our judgment as of this date and are subject to
 change without notice.
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




Re: Design question about ActionForm's validate method

2002-02-07 Thread Sean Willson

RE: Design question about ActionForm's validate method
The process we followed is very simular to what Ted suggested but depends on
how you are approaching the construction of your actions. If you have the
ability to write a collection of objects that handle storing and retreiving
data irreguardless of the data you might map it like this:

/do/store/address
/do/load/address
/do/load/user
etc ...

If however you want to segment it out as to what you are working on and then
the action you are performing on that thing you would merely reverse it to
this:

/do/address/load
/do/address/save
/do/address/delete

No what have we done in practice is a combination of those two. For one
project we were able to encapsulate the loading, sending, and saving type of
actions into one an action for each and thus the namespace we defined for
this was simular to the top  this namespace was a bit easier to manage
but obviously the actions themselves were either larger or the beans they
used were larger, for us the actions. For another larger project we went for
breadth as we didn't have much that was reusable and therefor had many many
actions all acting on the data but in different unique ways. Therefor the
namespace we defined was more in line with suggestion two.

One standard we have imposed which I think works and looks much cleaner is
the /do/* instead of *.do. It requires less explaining to people on what is
a .do file ... hehhe ... and it has less legacy implications like.cgi and
.pl have ... a namespace is nothing more then a mapping to a resource,
therefor extension has less importance. Anyhow ... we use /do/* for all
actions.

Not sure if any of this has helped ... ;)

Sean


- Original Message -
From: Alex Paransky
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Sent: Wednesday, February 06, 2002 11:53 PM
Subject: RE: Design question about ActionForm's validate method


Ok, I understand how forcing all requests through the controller is a good
thing.  Now, I have various types of pages:
Forms - html:form...
Actions - .do action of the form
View - basic .jsp page to view and link to a form for further edit
Is there a naming convention that you found works for you?  Since, I am
using .do extension for everything, it seems like I have URL's which look
like this:
AddressForm.do
AddressSaveAction.do
AddressView.do
I think it would be nice to have:
Address.form
AddressSave.action
Address.view
Or something like this.  The .do extension makes me think of action and I
don't see a form or a view as an action.  I could always map *.view and
*.form to execute the servlet as well, but then Address.form and
Address.view are ambiguous.
Any suggestion on naming conventions?
Thanks.
-AP_
http://www.alexparansky.com


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




Re: MultipartRequestHandler Question

2002-02-07 Thread Sean Willson

RE: MultipartRequestHandler QuestionThanks for the reply ... as far as the
first part of the question, do you know the answer? When a file is posted
does the handler get notified immediatly as the file is transfering or only
when the file has been downloaded completely? I don't want a 20MB file
taking up 20MB of memory before it gets to the handler, I would like to
transfer data as it comes in ...

I appreciate the help.

Sean

- Original Message -
From: SCHACHTER,MICHAEL (HP-NewJersey,ex2)
To: Struts Users Mailing List
Sent: Wednesday, February 06, 2002 10:19 AM
Subject: RE: MultipartRequestHandler Question


Buenos Dias Sean,
1. In looking at the current DiskMultipartRequestHandler I can't tell
 whether or not the request that is handed and parsed by the
 MulitpartIterator is already uploaded and complete or is still
 maybe uploading. Since it is reading a stream I assume that the
 request may not be complete yet. Is this correct? Use case, user
 wants to upload a 10MB file. This posting of that file kicks off
 a MultipartRequestHandler of some kind ... is that file already
 100% ready when it gets to that point or is it still uploading?
MultipartIterator does all the work of parsing the multipart/form-data
representing a file upload with form elements.  Each time you call
on getNextElement(), it reads a little more from the stream.  When
getNextElement() returns null, you've reached the end of the stream.
2. My thought process would be to modify the handleRequest method in
 the DiskMultipartRequestHandler to create some
 CustomMultipartIterator who's createLocalFile method (if I were to
 name it simular to the current iterator) would instead of creating a
 local file open a connection to that other server and begin
 transfering the bytes as they are read in. Anyone see any holes in
 this?
You might just want to implement the MultipartRequestHandler interface
instead of
extending DiskMultipartRequestHandler, there doesn't seem to be much
functionality in the DiskMultipartRequestHandler that you need.
I don't see much gain from extending MultipartIterator, as currently it's
pretty File-centric.  I'll keep this in mind when I go to recode some of it,
but for the time being, it looks like you might be writing your own class
to parse the multipart/form-data request body.
--
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: Are Vectors in a FormAction set to null after a user has submitted a form?

2002-02-07 Thread Rick Holland
Did you know that the ControllerServlet calls reset on a form before
populating it
from the request? If your form reset method clears the instvars it may
be the problem.

Antony Stace wrote:

Hi Chuck

I just tried having the first actions scope set to scope="session" and the second 
actions scope set to scope="session" 
and still the Vector data is still disapearing.  I actually, for a test, set another 
field in ActionForm in the first action to a
test value, I didn't have this set on the form anywhere where the user could change 
this value, then in the
second action I tried to access this data, but it was not there - it too was gone.  
Somehow a new form is being created
and the scope="session" is not happening.
Any ideas anyone?

Cheers

Tony


On Fri, 01 Feb 2002 07:51:12 -0500
Chuck Cavaness [EMAIL PROTECTED] wrote:

That's sort of what I was saying. In the second action, the one that is called after 
the user sees the form data and makes some choices, does the scope equal to request 
or session? If you have both of these actions defined as session scope, then I don't 
believe a new ActionForm would be created during the second action. If the mapping is 
session, then an ActionForm will be looked for in the session, which should have been 
put there on the previous action (along with the Vector data in it still).

However, if the second action is defined as request and the first one is session, 
then yes the user entered data would make it to the new ActionForm and the Vector 
data would be gone because one would be recycled.

Obviously, this is all a guess. I hope it helps somehow.

Chuck
--
Sent via jApache.org

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




-- 

--
- Rick Holland   OO/Distributed Systems Consultant
- ObjectAge Inc.
- [EMAIL PROTECTED]
"Logic is a wreath of pretty flowers, that smell bad"
--


validation form collection loss discussion

2002-02-07 Thread Dan Tanner

Has there been discussion on changing struts so that it doesn't lose 
collection and other non-String form information upon a validation 
failure in request scope?  I've seen a lot of hacks (good and bad) on 
the userlist to get around this problem, but I think this is something 
that should be built into the framework.

I'm sure there a lot of users that have felt the same pain I did when I 
first came across this issue...what do other people think about this? 
Are there any major reasons or barriers not to implement it?  Thanks.


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




Redirect to a jsp page

2002-02-07 Thread Joanna Chan

Hello

How do I redirect to a jsp page in struts without allowing the user to press the back 
key in browser. I want to maintain transactional control so that the user cannot press 
back key to re-enter somethinig that is already submitted.

Thanks
Joanna


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




redirect html:errors to popup window

2002-02-07 Thread jcanter


Any suggestions on how to redirect html:errors/ output to a popup window
rather than the page that the form is located on?
Thanks, Jim Canter

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




Accessing the ActionForm bean from within JSP page

2002-02-07 Thread Richard Yee

Hi,
I'm trying to access a field in the actionForm bean from within 
bean:message tag. Specifically, I want to use one of the attributes in the 
bean as a value for the attr0 attribute in the bean:message tag. So far, 
I've been able to use a scriptlet to set a page variable reference to the 
ActionForm bean that is stored in session scope like this:
% NewFormBean nfb = (NewFormBean) session.getAttribute(newFormBean); %
My ActionForm class is called NewFormBean and I have the following in my 
struts-config.xml file:
 form-bean  name=newFormBean
 type=dynaform.NewFormBean/

I'm wondering if there is a better way to access/expose this bean using the 
struts tags? I've tried bean:struts and bean:page without much success. Can 
someone tell me what the best way to do this is?

Thanks,

Richard



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




HTML tags - WHY?

2002-02-07 Thread cody.burleson



Can someone help me understand why struts duplicates almost all standard
HTML tags. In all of these cases, struts adds something special that is not
already inherent in the tag?

- Cody


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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




RE: HTML tags - WHY?

2002-02-07 Thread Krueger, Jeff

One thing is it will populate the tag with the value from your formBean.

Jeff


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 3:00 PM
To: Struts Users Mailing List
Subject: HTML tags - WHY?




Can someone help me understand why struts duplicates almost all standard
HTML tags. In all of these cases, struts adds something special that is not
already inherent in the tag?

- Cody


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


--
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: nesting struts tags

2002-02-07 Thread Pavel Nejedly

On Thu, Feb 07, 2002 at 03:41:06AM +1100, rob wrote:
# What is the appropriate way to nest tags in struts?  I've seen this posted
# before but couldn't find a scriptlet free answer so I'm posting myself.
# 
# I have a collection through which I'm iterating with the logic:iterate tag
# each item in the collection is meant to be used to create a link to view the
# item.
# 
# If someone could tell me how to do the following properly.
# 
# logic:iterate id=mybean name=mybeanarray
# html:link forward=myForward?id=jsp:getProperty name=mybean
# property=id//
# br
# /logic:iterate


  Try
  
  logic:iterate id=mybean name=mybeanarray
html:link forward=myForward 
  paramName=mybean paramProperty=id paramId=id
   ...
/html:link
  /logic:iterate


  Pavel


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




Re: Derived tiles inherit controllerClass?

2002-02-07 Thread Jim Crossley

I see.  I had a look at the source and another question occurred to
me.  When a child overrides the controllerClass of the parent, would
we expect only the child's to execute, or would all inherited
controllers chain together?

Cedric Dumoulin [EMAIL PROTECTED] writes:

   It's a bug.
 
 Jim Crossley wrote:
 
  In the tiles definition file, when one definition extends another, the
  parent's controllerClass does not seem to be inherited by the child.
  Is that by design or a bug?
 
  Thanks.
 
  --
  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: Redirect to a jsp page

2002-02-07 Thread Bob Williams

There is a JavaScript command to reset the history list on the browser.  I
don't know what it is off hand.  Just include this command in the page you
send out as a response.

Hope this points you in the right direction.

bob

- Original Message -
From: Joanna Chan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 3:36 PM
Subject: Redirect to a jsp page



Hello

How do I redirect to a jsp page in struts without allowing the user to press
the back key in browser. I want to maintain transactional control so that
the user cannot press back key to re-enter somethinig that is already
submitted.

Thanks
Joanna


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




bean write tag's format

2002-02-07 Thread Louis Leung

Anyone used bean:write tag's format attribute before ??

I looked at the struts-bean.tld, and found that this attribute is not
defined by the write tag.

Furthermore, I downloaded struts source, and found that it is not even
implemented.

But this said is supported on Struts' homepage under taglib
documentation.

Am I missing something obvious ??


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




Re: HTML tags - WHY?

2002-02-07 Thread Jim Crossley

That is certainly the biggie.  Coupla others:

- Transparently inserts context path prefix.  
- Automatically encodes html-specific characters

Krueger, Jeff [EMAIL PROTECTED] writes:

 One thing is it will populate the tag with the value from your formBean.
 
 Jeff
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 3:00 PM
 To: Struts Users Mailing List
 Subject: HTML tags - WHY?
 
 
 
 
 Can someone help me understand why struts duplicates almost all standard
 HTML tags. In all of these cases, struts adds something special that is not
 already inherent in the tag?
 
 - Cody
 
 
 The information transmitted is intended only for the person or entity to
 which it is addressed and may contain confidential and/or privileged
 material.  Any review, retransmission, dissemination or other use of, or
 taking of any action in reliance upon, this information by persons or
 entities other than the intended recipient is prohibited.   If you received
 this in error, please contact the sender and delete the material from any
 computer.
 
 
 --
 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: HTML tags - WHY?

2002-02-07 Thread cody.burleson



I understand that. But what is the use of all the tags that are not related
to forms?

- Cody





Krueger, Jeff [EMAIL PROTECTED] on 02/07/2002 04:01:12 PM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]
To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  RE: HTML tags - WHY?


One thing is it will populate the tag with the value from your formBean.

Jeff


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 3:00 PM
To: Struts Users Mailing List
Subject: HTML tags - WHY?




Can someone help me understand why struts duplicates almost all standard
HTML tags. In all of these cases, struts adds something special that is not
already inherent in the tag?

- Cody


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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





The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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




RE: Redirect to a jsp page

2002-02-07 Thread Galbreath, Mark

You cannot keep a user from pressing the back button on the browser
(without breaking the user's fingers), but you can prevent a resubmit by
testing a session attribute flag you set at the first submit.

Mark

-Original Message-
From: Joanna Chan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 4:37 PM
To: [EMAIL PROTECTED]
Subject: Redirect to a jsp page


Hello

How do I redirect to a jsp page in struts without allowing the user to press
the back key in browser. I want to maintain transactional control so that
the user cannot press back key to re-enter somethinig that is already
submitted.

Thanks
Joanna


--
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: HTML tags - WHY?

2002-02-07 Thread cody.burleson


Maybe I should rephrase the question.  I understand what the tags are for
when related to form items and even hyperlinks (allowing forwards), but
what is the point of duplicating the others?

- Cody





Jim Crossley [EMAIL PROTECTED]@jimmy.ifleet.com on 02/07/2002 04:14:45
PM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

Sent by:  [EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  Re: HTML tags - WHY?


That is certainly the biggie.  Coupla others:

- Transparently inserts context path prefix.
- Automatically encodes html-specific characters

Krueger, Jeff [EMAIL PROTECTED] writes:

 One thing is it will populate the tag with the value from your formBean.

 Jeff


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 07, 2002 3:00 PM
 To: Struts Users Mailing List
 Subject: HTML tags - WHY?




 Can someone help me understand why struts duplicates almost all standard
 HTML tags. In all of these cases, struts adds something special that is
not
 already inherent in the tag?

 - Cody

 
 The information transmitted is intended only for the person or entity to
 which it is addressed and may contain confidential and/or privileged
 material.  Any review, retransmission, dissemination or other use of, or
 taking of any action in reliance upon, this information by persons or
 entities other than the intended recipient is prohibited.   If you
received
 this in error, please contact the sender and delete the material from any
 computer.


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





The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.


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




Re: Poolman Help?

2002-02-07 Thread Mark Woon

Jason B Menard wrote:

 Without examining your code it is hard to say exactly where the problem is,
 but basically it doesn't sounds like something is going on with your
 Connection object (reusing it when you shouldn't, goes out of scope, not
 closing it when you should, something along those lines).  The reason it
 works after you wait awhile is probably that the connection or the user
 eventually timesout, as specified by values in your poolman.xml file.

Well...

This particular problem only exists when I use PoolMan 2.1b1, with
nativeResults=false.  With nativeResults=true, I get different errors.

With PoolMan 2.04, I get different errors yet, apparently because the ResultSet
thinks I'm using ResultSet.TYPE_FORWARD_ONLY when I specifically set it to
ResultSet.TYPE_SCROLL_INSENSITIVE.  Go figure.

I agree, the exception would seem to point to me doing something wrong in my
code, but I've checked it many times.  I only close the connection in a finally
block, which means it only gets closed when I'm done with it.  It's not a
scoping problem.  Sometimes after the initial login, I can never login again
(due to the  same exception) no matter how long I wait.

The code works fine without a connection pool and with Oracle's default
connection pool.  At this point, I've pretty much given up on PoolMan.

Thanks,
-Mark


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




Re: HTML tags - WHY?

2002-02-07 Thread Jim Crossley

Care to give an example of a particularly pointless tag?

[EMAIL PROTECTED] writes:

 Maybe I should rephrase the question.  I understand what the tags
 are for when related to form items and even hyperlinks (allowing
 forwards), but what is the point of duplicating the others?

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




Re: How to go about??

2002-02-07 Thread Sanjay Choudhary

thanks ted,

Where can I get info. on tiles?

Sanjay
--- Ted Husted [EMAIL PROTECTED] wrote:
 What Steve said, and 
 
 Sanjay Choudhary wrote:
  2. Except for a HTML designer, most of the
 programmers
  are involved with backend programming. They have
 done
  very little HTML work. I was wondering if we will
 be
  able to create JSP's using Struts HTML tags and
 other
  tag libraries if a form is defined using pure
 HTML.
 
 If the Java Engineers will also be doing alot of the
 HTML coding, I'd
 recommend looking at Tiles early in the project.
 This lets you treat
 blocks of markup (both template and dynamic) like
 methods in a program.
 This can severely reduce the amount of markup the
 engineers actually
 have to touch. Instead they incorporate it by
 reference, much like
 calling a block of methods. 
 
 So, with tiles an engineer might create a new Result
 page by adding this
 to a configuration file 
 
   definition name=.item.Result extends=.Result
   put name=title  value=New Item Result
 /
   put name=content   
 value=/pages/item/NewResult.jsp /
   /definition
 
 and then just writing the NewResult.jsp segment that
 exposes the result
 set 
 
 (simplified from production, but this would work) 
 
 logic:notEqual name=RESULT property=size
 value=0 
 TRTDTABLE width=100%
 TR class=greybg
 THitem/TH
 THname/TH
 THcategory/TH
 THdonor/TH
 THscript/TH
 THtype/TH
 /TR
 TR
 TDbean:write name=row property=item//TD
 TDbean:write name=row property=name//TD
 TDbean:write name=row
 property=category//TD
 TD align=rightbean:write name=row
 property=donor//TD
 TDbean:write name=row property=script//TD
 TDbean:write name=row
 property=itemType//TD
 /TR
 /logic:iterate
 /TABLE/TDTR
 /logic:notEqual
 
 The rest of the page, headers, footers, menus, even
 control buttons, can
 all be inherited from a layout that the HTML dude
 has crafted. 
 
 Though, at the top, even that looks like a method:
 
 html:html
 tiles:useAttribute name=title scope=request/
 tiles:get name=base/
 tiles:get name=header/
 tiles:get name=heading/
 tiles:get name=messages /
 TRTD width=100%
 tiles:get name=caption/
 /TD/TR
 tiles:get name=content/ -- THIS IS THE PART THE
 ENGINEER WRITES
 tiles:get name=back/
 tiles:get name=footer/
 /html:html
 
 Of course, my production version also includes
 stylesheets so the HTML
 designer can control that too, and some internal
 links so users can
 drill down, but you get the idea. 
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




Re: SSL + URL rewriting problem

2002-02-07 Thread Nathan Anderson

I have a bit more information if anyone is interested in helping me with this issue..

I found out that the HttpUtils.getRequestURL().  If I make a JSP with the following 
scriptlet:

%= HttpUtils.getRequestURL(request) %

I get this:

http://hostname:443/webapp/page.jsp

when the actual request URL was:

https://hostname/webapp/page.jsp

Any ideas appreciated.

Nathan Anderson
--
Sent via jApache.org

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




Re: SSL + URL rewriting problem

2002-02-07 Thread Dan Moore

Hi Nathan,

On Feb 7, Nathan Anderson wrote:

 I have a bit more information if anyone is interested in helping me with this issue..
 
 I found out that the HttpUtils.getRequestURL().  If I make a JSP with the following 
scriptlet:

I assume you're talking about javax.servlet.http.HttpUtils here (I just
joined the list and it's not clear.)  If you aren't, please ignore the rest
of this message (because it's predicated on you using this class).

Note, based on:
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpUtils.html
this is deprecated in favor of the request objects.


 %= HttpUtils.getRequestURL(request) %
 
 I get this:
 
 http://hostname:443/webapp/page.jsp
 
 when the actual request URL was:
 
 https://hostname/webapp/page.jsp
 
 Any ideas appreciated.
 
So, looking at the HttpServletRequest
(http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html),
 I see these methods:

getProtocol which Returns the name and version of the protocol the request
uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1.
For HTTP servlets, the value returned is the same as the value of the CGI
variable SERVER_PROTOCOL.

This method is also present in the 2.2 Servlet api as well.

Hope this helps.

Dan



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




Re: SSL + URL rewriting problem

2002-02-07 Thread Max Cooper

Nathan,

I have noticed the behavior you describe on a Struts application that I
worked on. However, I was not sure of why the :443 was added until your
post. I was thinking that it was the web server, perhaps not.

Anyway, one issue to watch out for is that Netscape considers these two URLs
to be from different servers, and thus won't send the session cookie from
one to the other:

 https://hostname:443/webapp/page.jsp
 https://hostname/webapp/page.jsp

If you are having trouble with people getting redirected back to your login
page after they login with Netscape, this issue might be the cause. One
solution (that has the significant downside that you have to maintain the
setting) is to set the cookie domain for your server. You usually set it to
the fully qualified domain name of your web server. The details of how to do
that depend on what app server you are using.

-Max

- Original Message -
From: Nathan Anderson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 3:59 PM
Subject: Re: SSL + URL rewriting problem


 I have a bit more information if anyone is interested in helping me with
this issue..

 I found out that the HttpUtils.getRequestURL().  If I make a JSP with the
following scriptlet:

 %= HttpUtils.getRequestURL(request) %

 I get this:

 http://hostname:443/webapp/page.jsp

 when the actual request URL was:

 https://hostname/webapp/page.jsp

 Any ideas appreciated.

 Nathan Anderson
 --
 Sent via jApache.org

 --
 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: SSL + URL rewriting problem

2002-02-07 Thread Nathan Anderson

Thanks for the info.  

You are correct that I was referring to javax.servlet.http.HttpUtils.  So I tried it 
using the object [request.getRequestURL], and I got the exact same thing.  

I guess this is not a Struts issue, so I'll keep looking.

Nathan Anderson
--
Sent via jApache.org

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




Re: Poolman Help?

2002-02-07 Thread Nathan Anderson

I have had this same problem with Poolman 2.1b1.  In fact I documented with the 
author.  Here is the e-mail I sent to him:

BRIEF:  PoolMan.PreparedStatement is returning null instead of a ResultSet object 
after the PoolSkimmer has removed all objects.  

DETAIL:  This is part of a web based database maintenance program I have developed.  
After I start Tomcat and make the first call to the database, PoolMan is instantiated 
and operates properly.  Any valid SQL I try returns the expected results.  However, if 
I let a connection become stale and removed from the cache by the PoolSkimmer [so 
there are 0 connections in the pool], any PreparedStatement returns the error listed 
below.  After reverting to PoolMan 2.0.4, the problem is resolved, so I'm assuming 
there is an issue with PoolMan 2.1b's PreparedStatement.  I have not looked at 
PoolMan's code to pinpoint the error more closely.  NOTE: I was using the mm.mysql 
2.0.6 driver, but it returned a NullPointerException.  Once I installed 2.0.9 I got 
the error listed below.  

CONFIGURATION:
  OS - RedHat 7.1
  JVM - IBM Java 2.13
  DB - MySQL 3.23.46
  JDBC Driver - mm.mysql 2.0.9
  Application Server: Tomcat 4.0.1

POOLMAN.XML: 
?xml version=1.0 encoding=UTF-8?

poolman

  management-modelocal/management-mode

  datasource

dbnameDATASOURCE/dbname
jndiNamejndi-datasource/jndiName
driverorg.gjt.mm.mysql.Driver/driver
urljdbc:mysql://hostname:3306/dbname/url

usernamevalidUser/username
passwordvalidPassword/password

minimumSize0/minimumSize
maximumSize10/maximumSize
connectionTimeout300/connectionTimeout
userTimeout12/userTimeout
shrinkBy5/shrinkBy

logFile/var/logs/poolman.log/logFile
debuggingtrue/debugging

!-- Query Cache Attributes--

cacheEnabledfalse/cacheEnabled
cacheSize20/cacheSize
cacheRefreshInterval120/cacheRefreshInterval

  /datasource

/poolman 

JAVA CODE:
/**
 * Executes a SQL command 
 * 
 * @param String The datasource name for the 
 * ConnectionPool to used 
 * @param String The SQL command 
 * @param Collection A collection of SQLParams to 
 * insert into the command 
 * @returns Collection A collection of value objects 
 * @exception SQLException If SQL error occurs  
 */
protected static Collection executeQuery(String resource, 
String command, Collection params)
throws SQLException {
SQLParam param = null;
Collection collection = null;
Connection connection = null;
PreparedStatement statement = null;
Statement stmt = null;
ResultSet resultSet = null;
try {
connection = ConnectionPool.getConnection(resource);
if (params!=null) {
statement = connection.prepareStatement(command);
int p = 1;
for (Iterator i=params.iterator(); i.hasNext(); p++) {
param = (SQLParam) i.next();
statement.setObject(p, param.object(), 
param.type(), param.scale());
}
resultSet = statement.executeQuery();
}
else {
stmt = connection.createStatement();
resultSet = stmt.executeQuery(command);
}
if (resultSet!=null) collection = getCollection(resultSet);
}
finally {
try {
if (resultSet != null) resultSet.close();
if (statement != null) statement.close();
if (connection != null) connection.close();
}
catch (SQLException sqle) { } 
}
return collection;
}

ERROR ENCOUNTERED:
java.sql.SQLException: Connection.close() has already been called. Invalid operation 
in this state.
at org.gjt.mm.mysql.Connection.getMutex(Unknown Source)
at org.gjt.mm.mysql.PreparedStatement.executeQuery(Unknown Source)
at com.codestudio.sql.PoolManPreparedStatement.executeQuery(Unknown Source)
at com.sumware.timeline.timeline.ModelBase.executeQuery(ModelBase.java:312)
at com.sumware.timeline.timeline.ModelBase.selectWhere(ModelBase.java:79)
at com.sumware.timeline.timeline.Search.execute(Search.java:16)
at org.apache.scaffold.model.ModelBeanBase.execute(Unknown Source)
at org.apache.scaffold.http.ModelHelper.getResult(Unknown Source)
at org.apache.scaffold.http.ModelHelper.perform(Unknown Source)
at 

Re: Announce: Struts hands on public training in NJ

2002-02-07 Thread Vic Cekvenich

I have 2 more seats. If you want to master Struts by March, the class is 
2/20, in less than 2 weeks.
Vic

Vic Cekvenich wrote:

 in Atlantic City, NY on 2/20 or see.
 
 http://www.basebeans.com/students.jsp
 
 
 You have to register this week(on above page, we do not do last minute 
 registration. So we still have a few seats left
 This is the only east coast class this year that we will do. More 
 information is on the above page.
 
 
 Vic
 
 
 
 
 


 Can anyone recommend a very simple working example of struts? I'm 
 familiar
 with MVC, have been working with Turbine but would like to use Struts.

 Thanks,
 Mark Glass


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

 
 
 
 -- 
 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: Antwort: How to go about??

2002-02-07 Thread STEVE WILKINSON

Sanjay,

Sorry I don't have a soft copy of it.  My only soft copy does not include the last 
edits from the editors at Wrox and has a bunch of comments and no images.

Sorry,
Steve

- Original Message -
From: Sanjay Choudhary
Sent: Thursday, February 07, 2002 10:23 AM
To: Struts Users Mailing List
Subject: Re: Antwort: How to go about??

Hi Steve,

Is it possible for us to get a soft copy of chapter 21
of your book to start with. I will also purchase the
book over the weekend. Can't wait anymore to get into
it.

-Sanjay


--- STEVE WILKINSON [EMAIL PROTECTED] wrote:
 Chris,

 Thanks for the feedback on my chapter in
 Professional JSP.  FYI,
 http://www.newparticles.com/struts contains updates
 and bug fixes to the chapter examples.  In a few
 days they will post the latest edition that is built
 from a CVS snapshot of 12-15-2001.

 Steve

 - Original Message -
 From: [EMAIL PROTECTED]
 Sent: Thursday, February 07, 2002 2:43 AM
 To: Struts Users Mailing List
 Subject: Antwort: How to go about??


 Hi!

 I'm also doing a kind of struts evaluation project
 for my company at the
 moment and I found Chapter 21 from 'Professional
 JSP' very useful. It
 discusses the wrox-struts example in detail and so
 gives and your guys a
 good starting point.

 Chris.


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



__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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



  1   2   >