Re: File Uploading

2002-11-05 Thread Alok Garg
Thanka alot Craig I have seen it.
- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 12:16 PM
Subject: Re: File Uploading


>
>
> On Wed, 6 Nov 2002, Alok Garg wrote:
>
> > Date: Wed, 6 Nov 2002 12:03:48 +0530
> > From: Alok Garg <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: File Uploading
> >
> > Hello All,
>
> > Can anybody help in getting me started with using File uploading using
> > Struts, or if you can provide me with an example it would of greate use.
>
> > Thanking you
> > Alok
> >
>
> Have you tried the upload example that is included in every Struts
> distribution (webapps/struts-upload.war :-)?  The source code is included
> so that you can see exactly what's going on.
>
> Craig
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Nested properties of form bean not being updated !

2002-11-05 Thread Parnell, Giles (AU - Sydney)
Hi Sri

I've got the keyboardmonkey installed into my app. Just a quickie - how do
you tell the nested tag what form bean you're dealing with. 
Before we specified the "name" attribute in the write tag to indicate which
bean we were referring to. 

In 64_eng_del I've now got a portion that looks like this:

 
<%-- Engagement Client--%>
* engagement client
 



... but there's nowhere to say where this 'voEngagementDetails' is coming
from. (ie attached to which bean)

I get a nullpointer when trying to run this.
org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste
dPropertyHelper.java:174

Is this the correct way to use this tag.

Cheers
Giles


-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com]
Sent: Tuesday, 5 November 2002 2:26 PM
To: Struts Users Mailing List
Subject: RE: Nested properties of form bean not being updated !


Giles:
  I am sorry.  Going from the subject line I assumed you were trying to use
the nesting extension.

  I am using Struts 1.0.2 along with the nesting extension from Arron Bates
site www.keyboardmonkey.com/next/index.jsp.  This is not beta-ware so you
should be able to use it.  All the dot notation and everything advertised
works.

  So, you can and *should* use the nesting extension.  Spend the hour or so
learning how to use it -- it will save you a lot of work/worry/hassle.
Wherever I have a nested hierarchy to deal with, especially with iterations,
I use the extension.

  Hope you are able to work with it.

Sri

-Original Message-
From: Parnell, Giles (AU - Sydney) [mailto:g.parnell@;eclipsegroup.com.au] 
Sent: Monday, November 04, 2002 8:28 PM
To: 'Struts Users Mailing List'
Subject: RE: Nested properties of form bean not being updated !


Hi Sri

I've made the small change to the included file - 64_eng_del.jsp - didn't
help much I'm afraid.

We are not using the nested tags because at the moment struts 1.1-b2 is
still in beta (Is this the only version with the nested tag ???) My company
has made the firm decision that we cannot use beta software in the
production environment.

I was under the impression that the benefit of the nested tags didn't offer
much more additional functionality from the dot notation of struts 1.0.2,
i.e. it is just a way of structuring your code in a better manner. (could be
way wrong here too!)

I suppose the question I need to ask Sri, is : Is what I am trying to do
possible in my version of struts? Is the dot notation fully functional in
1.0.2? I know it's returning the correct stuff from the server, it's just
not updating it. Does this functionality work in Struts1.02? Was it EVER
possible to do this before nested tags came out?

If the nested tag is my only option, do you have any idea when struts1.1
will become production stable? I've seen there was a code freeze in august,
but haven't seen anything since.

Other than that, know anything else I might be able to try ???

Cheers
Giles

-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com]
Sent: Tuesday, 5 November 2002 2:12 AM
To: Struts Users Mailing List
Subject: RE: Nested properties of form bean not being updated !


Holy cow!  Yes, you gave enough details..

Looking at JSPs a few things jump out:

* You aren't using any of the  tags.  To take advantage of the
nested extension, you have to use the  equivalent of the usual
tags.  So, instead of  you should use , instead of
 you should use .  Of course, make sure you have the
necessary taglib statement for the nested tags.  This should fix a lot of
your problems
* Even though 64_eng_del.jsp is an included file, it ends with a
.  You probably don't want to leave that for the *includer* --
your top-level JSP.  Remember the top-level has an open form tag that it
closes at the end of all includes

Give this a shot.

Sri

-Original Message-
From: Parnell, Giles (AU - Sydney) [mailto:g.parnell@;eclipsegroup.com.au] 
Sent: Sunday, November 03, 2002 6:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Nested properties of form bean not being updated !


Hi Sri

Thanks for getting back to me. I've included 
1. A portion of my struts config:
- My form bean definition
- And the action mapping

2. My action class
3. My JSPs, which are comprised of -
- My top level jsp... that contains the form bean definition, and
the forwarding action name
- The include '64_eng_del.jsp' contains the nested bean

4. The two Value objects
- VOEPR, (which contains VOEngagementDetails) and
- VOEngagementDetails

As i said before all the top level attributes of the VOEPR are fine ...
i can update them. It's the VOEngagement Details where things fall over.
Nothing seems to be get set here. When i trace through into my action - the
'form' object doesn't seem to contain these nested attributes.

Sri .. any help would be great. 

Cheers
Giles

PS: Hope this is enough info this time :)


###

Réf. : Newbie logic:iterator question

2002-11-05 Thread meissa . Sakho





"Oliver Meyn" <[EMAIL PROTECTED]> on 05/11/2002 21:04:17

Veuillez répondre à "Struts Users Mailing List" <[EMAIL PROTECTED]>

Pour :"STRUTS" <[EMAIL PROTECTED]>
cc :
Objet :   Newbie logic:iterator question

I have the same problem with the logic iterate tag.
So I'm still using the good old loop "for" instead of iterate tag.
This thread existed a few weeks ago, according to the archives, where I
found this suggested example for how to get iterator working (from Alexis
Gallagher):




 


which appears to be the same idea as used in the struts-example, but I can't
get this to work, as it fails with the error:

Cannot find bean item in scope null

Similar attempts with my own beans also fail (as does explicitly setting the
scope, where the error just becomes "... item in scope application" or
whatever scope is specified).

Any suggestions?

Thanks very much,
Oliver


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Adding a parameter to a URL + can I use the JSTL expression language with struts?

2002-11-05 Thread Jim Collins
Thanks David,

I'll check that out.

Jim.
- Original Message -
From: "David M. Karr" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 6:53 AM
Subject: Re: Adding a parameter to a URL + can I use the JSTL expression
language with struts?


> > "Jim" == Jim Collins <[EMAIL PROTECTED]> writes:
>
> Jim> Sorry to be a pain but has anyone got any idea how to fix this
problem? Also
> Jim> can I use the JSP expression language with struts?
>
> If you are using the nightly build, you can use the contributed Struts-EL
> library, along with the JSTL (and Struts itself).  The Struts-EL library
is a
> "port" of the Struts tag library, where the attribute values are evaluated
with
> the JSTL EL engine, instead of runtime scriptlets.  Search the struts-user
list
> for "Struts-EL" for more information about this.  There is a very small
set of
> documentation in the user's guide on Struts-EL (in the nightly build).
>
> Using Struts-EL, it seems concievable (I haven't tried this, specifically)
you
> could do this:
>
>  
>   
>  
>
>  
>   ...
>  
>
> --
> ===
> David M. Karr  ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Adding a parameter to a URL + can I use the JSTL expression language with struts?

2002-11-05 Thread David M. Karr
> "Jim" == Jim Collins <[EMAIL PROTECTED]> writes:

Jim> Sorry to be a pain but has anyone got any idea how to fix this problem? Also
Jim> can I use the JSP expression language with struts?

If you are using the nightly build, you can use the contributed Struts-EL
library, along with the JSTL (and Struts itself).  The Struts-EL library is a
"port" of the Struts tag library, where the attribute values are evaluated with
the JSTL EL engine, instead of runtime scriptlets.  Search the struts-user list
for "Struts-EL" for more information about this.  There is a very small set of
documentation in the user's guide on Struts-EL (in the nightly build).

Using Struts-EL, it seems concievable (I haven't tried this, specifically) you
could do this:

 
  
 
 
 
  ...
 

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


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: File Uploading

2002-11-05 Thread Craig R. McClanahan


On Wed, 6 Nov 2002, Alok Garg wrote:

> Date: Wed, 6 Nov 2002 12:03:48 +0530
> From: Alok Garg <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: File Uploading
>
> Hello All,

> Can anybody help in getting me started with using File uploading using
> Struts, or if you can provide me with an example it would of greate use.

> Thanking you
> Alok
>

Have you tried the upload example that is included in every Struts
distribution (webapps/struts-upload.war :-)?  The source code is included
so that you can see exactly what's going on.

Craig



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: When using a html:multibox element, no setter-methode is called.

2002-11-05 Thread David M. Karr
> "Bernhard" == Bernhard Oberndorfer <[EMAIL PROTECTED]> writes:

Bernhard> Hello
Bernhard> I´m using a logic:iterate and html:multibox element in my jsp-page.
Bernhard> The getter-methode of my multibox-element(getSelectedFoos()) is called 
as it
Bernhard> should.
Bernhard> But the setter-methode(setSelectedFoos()) is never called by the 
controller.
Bernhard> Why? What I´m doing wrong?

Using the nightly build, I just tried a very similar structure, and I saw no
problem with the setter method being called.  However, note that there is one
situation where it doesn't call the setter method, and it's not supposed to.
That's when all of the generated checkboxes are unchecked.  I'm guessing that's
not the situation you're referring to, but I'll mention it just in case.

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


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




File Uploading

2002-11-05 Thread Alok Garg
Hello All,
Can anybody help in getting me started with using File uploading using Struts, or if 
you can provide me with an example it would of greate use.
Thanking you
Alok



Ted and the Crew "Struts in Action" Book

2002-11-05 Thread micael
Gang of Four Struts Version

Couldn't find out how to get to the "private web forum" on the book (Struts 
in Action) that is mentioned on page xxxii of the ebook.  So, thought I 
would toss a bit of errata in here and get information from whomever on how 
to access that page in time.  The first code on page 19 has a number of 
obvious faults, including two unnecessary "this." references and six 
extraneous ";"s.

Micael

---

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: Extending the struts config

2002-11-05 Thread Michael Delamere
Thank you!

- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 12:16 AM
Subject: Re: Extending the struts config


>
>
> On Tue, 5 Nov 2002, Eddie Bush wrote:
>
> > Date: Tue, 05 Nov 2002 15:37:54 -0600
> > From: Eddie Bush <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: Re: Extending the struts config
> >
> > Michael Delamere wrote:
> >
> > >Eddie,
> > >
> > >you said once (if I remeber correctly), that you extended the
> > >struts-config.xml to accommodate your own configuration settings.
> > >
> > Incorrect.  I used a seperate XML config and used digester to
> > parse/instantiate things.
> >
>
> With the latest nightly builds (i.e. since 1.1b2) you actually *can* do
> this.  You have to set the servlet init parameter "validating" to false,
> because otherwise your extended struts-config.xml file will not pass DTD
> validation (which is on by default).
>
> You'll still need to parse the struts-config.xml file yourself in order to
> read the extra elements; the standard parse will simply ignore them.
> Digester is useful for that.
>
> Craig
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Adding a parameter to a URL + can I use the JSTL expression language with struts?

2002-11-05 Thread Jim Collins
Sorry to be a pain but has anyone got any idea how to fix this problem? Also
can I use the JSP expression language with struts?

Thanks

Jim

> Hi,
>
> I have a JSP called upload.jsp with a form and file tag like this:
>
> 
> Please Input The File You Wish to Upload:
>   
>   
> 
>
> The page that calls upload.jsp also passes a parameter called objID, I
would
> like to add this parameter to the action URL but I don't know how to.
>
> I did try using a normal html form tag and jstl to add the paramerer like
> this:
>
> 
> 
> 
>
> >
> 
> 
>
> This sets the correct action url in the generated html but I get a bean
> utils exception when I press the submit button.
>
> Any help would be appreciated.
>
> Thanks
>
> Jim.
>
> PS I don't want to use a scriptlet if I can help it. I have seen previous
> postings from Craig where he advises against using scriptlets.
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Recall: robot search engines and struts

2002-11-05 Thread Andrew Hill
huh?

-Original Message-
From: Danen, Patrick [mailto:Patrick.Danen@;alcoa.com]
Sent: Wednesday, November 06, 2002 03:18
To: 'Craig R. McClanahan'; 'Struts Users Mailing List';
'[EMAIL PROTECTED]'
Subject: Recall: robot search engines and struts


Danen, Patrick would like to recall the message, "robot search engines and
struts".

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [TILES] Dynamically overriding Tiles Definitions

2002-11-05 Thread Affan Qureshi
Thanks. I got the attributes form the Tiles Context but only on the JSP that
had a . Can I somehow make the Tiles Definition session
scoped? Also in case of nested Tiles, will there be multiple Tile Contexts?

Affan
- Original Message -
From: "Cedric Dumoulin" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 9:11 PM
Subject: Re: [TILES] Dynamically overriding Tiles Definitions


>
>   Hi,
>
>   Where is declared your action ? To be able to retrieve the tiles
> context, there should be a tiles context. There is a tiles context only
> if you insert an Tiles, or do a forward from an action to a definition.
> In this later case, the context is created after the action.
>
>   Cedric
>
> Affan Qureshi wrote:
>
> >I want to modify the Attributes in a tiles Definition from my Action
> >classes. Is this possible? I have tried the following code inside the
Action
> >class but do not get an Attribute against the name, instead I get a null.
> >
> >ComponentContext context = ComponentContext.getContext(request);
> >java.util.List list =
(java.util.List)context.getAttribute("tabList");
> >
> >Is it because it is request scoped? Can i make it session-scoped? Also I
get
> >an empty iterator when I try to traverse the list of attributes in the
Tiles
> >Context.
> >
> >Iterator iter = context.getAttributeNames();
> >System.out.println(iter.next())
> >System.out.print("Printing Attrbutes:");
> >while(iter.hasNext())
> >{
> >System.out.println("Attribute"+ ((String)iter.next()));
> >}
> >
> >My tiles definition is given below. Thanks a lot.
> >
> >- Original Message -
> >From: "Affan Qureshi" <[EMAIL PROTECTED]>
> >To: "struts-user" <[EMAIL PROTECTED]>
> >Sent: Tuesday, November 05, 2002 1:26 PM
> >Subject: Nested layouts (Panels inside Tabs)
> >
> >
> >
> >
> >
> >>I have a Tabs Layout setup and inside a tab I have another layout with
two
> >>panels(menu and content). This is my definition:
> >>
> >>
> >> 
> >> dfs
> >> s
> >> 
> >> 
> >>  >>classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> >>  >>classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> >>  >>classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> >> 
> >>
> >>
> >>The link to "Template" i.e the template.jsp file follows a simple
layout:
> >>
> >>
> >>
> >>
> >>
> >>
> >>The problem is that when I click on any link inside one of the panels in
> >>templateTile.jsp or any other file, it breaks out of the Tabular layout
> >>
> >>
> >and
> >
> >
> >>displays it as just two panels. This problem can be reproduced if you
run
> >>the tiles-documentation example and go to
> >>http://localhost:8080/tiles-documentation/examples/tabs.jsp. Now here if
> >>
> >>
> >you
> >
> >
> >>click on any link in the menu the page will open outside the tab layout.
> >>
> >>The hyperlinks in my "Menu" panel point to Action classes. I am
forwarding
> >>requests from the Action classes to Tiles Definitions.
> >>
> >>What should I do to tackle this problem?
> >>
> >>Also can anyone guide me to a resource for Nested Tabs?
> >>
> >>Thanks for your time.
> >>
> >>
> >
> >
> >--
> >To unsubscribe, e-mail:

> >For additional commands, e-mail:

> >
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: struts-config_1_1.dtd and struts-config_1_0.dtd

2002-11-05 Thread Craig R. McClanahan


On Tue, 5 Nov 2002, Nekkalapudi, Viplava wrote:

> Date: Tue, 5 Nov 2002 17:25:09 -0600
> From: "Nekkalapudi, Viplava" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: struts-config_1_1.dtd and struts-config_1_0.dtd
>
> But all the DTDs under jakarta-struts-1.1-b2-src\conf\share have the XML
> header.
>

True.  And a bug report was (correctly) submitted pointing this out, and
the XML headers were removed.  See any recent nightly build.

Craig


> -Original Message-
> From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
> Sent: Tuesday, November 05, 2002 5:14 PM
> To: Struts Users Mailing List
> Subject: Re: struts-config_1_1.dtd and struts-config_1_0.dtd
>
>
>
>
> On Tue, 5 Nov 2002, Nekkalapudi, Viplava wrote:
>
> > Date: Tue, 5 Nov 2002 15:28:22 -0600
> > From: "Nekkalapudi, Viplava" <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
> > Subject: struts-config_1_1.dtd and struts-config_1_0.dtd
> >
> > Why is  is missing from
> > struts-config_1_1.dtd?
> > Is it by mistake OR is there any purpose?
> > I see it in the file struts-config_1_0.dtd.
> > I checked these files at   http://jakarta.apache.org/struts/dtds/.
> >
>
> It's not legal to have this header on a DTD, because DTDs are not XML
> documents.
>
> > --- Vip.
> >
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: accessing DataSource from custom tag

2002-11-05 Thread Andrew

i think i understand now why doing sql in a custom tag would be bad.
 
i am going to use your approach and create a utility bean that has
getter methods to get the html:select option fields from the database,
and add the bean to the session context. i will do this in the same
Action class that creates and populates the form bean that requires
those option fields.

thanks.

On Tue, 2002-11-05 at 07:26, [EMAIL PROTECTED] wrote:
> 
> I'd suggest that isolating database access in Model components that are
> called from the Action class is a more appropriate approach.
> 
> What happens if you throw a SQLException in the tag or if you end up
> needing to have conditional processing depending on what you bring back
> from the database? You'll need conditional logic either in the tag or in
> the JSP page to handle this - conditional logic that may be better managed
> by the controller (Action class).
> 
> Here's an alternative approach:
> 
> Form POST ->
>   Form Bean ->
> Action Class ->
>   Model Component (access database here) ->
> Action class stores data from Model in a bean, attaches bean to
> PageContext ->
>   JSP page retrieves data from bean using regular Struts tags
> 
> 
> Circumventing this approach by performing database access in a custom tag
> requires you to move Exception management and conditional processing from
> your Action class into the JSP page - which then eliminates much of the
> value of the MVC architecture...
> 
> 
> Kevin
> 
> ---
> Kevin Bedell
> Author, Struts Kick Start
> 
> 
>http://www.amazon.com/exec/obidos/tg/detail/-/0672324725/qid=1036509916/sr=1-1/ref=sr_1_1/002-7047256-5912803?v=glance
> 
> 
> 
> 
> 
> Mike Way <[EMAIL PROTECTED]> on 11/05/2002 06:04:22 AM
> 
> Please respond to "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> 
> To:"Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:Re: accessing DataSource from custom tag
> 
> 
> Andrew,
> 
> pageContext.getServletContext().getAttribute(
> 
> 
> But, do you really want to do this ?
> 
> Mike
> 
> At 02:53 05/11/2002 -0800, you wrote:
> 
> >is there any way to access the DataSource defined in
> >struts-config.xml from within a custom tag.
> >
> >i usually get it from the ActionServlet context
> >attribute Action.DATA_SOURCE_KEY from within an
> >Action.
> >
> >but its not defined in the pageContext of a tag, so i
> >assume its not easy to do, though i saw it mentioned,
> >but not fully explained, in a thread on this list
> >(Subject: RE: Urgent : Any Example which will show
> >  tag).
> >
> >my goal is to write a simple tag that downloads a list
> >of countries from a database table as an ArrayList,
> >adds it to the session so i can put it into an
> >. if there is a better approach, please let me know. thanks, andrew.
> >__ Do you Yahoo!? HotJobs
> >- Search new jobs daily now http://hotjobs.yahoo.com/ -- To unsubscribe,
> >e-mail: For additional commands, e-mail:
> 
> 
> Mike Way,
> Senior Consultant, Shared Skills Ltd
> +44 (0)1752 491088, mobile +44 (0) 7941 225581
> email: [EMAIL PROTECTED] web: www.sharedskills.com
> 
> 
> --
> To unsubscribe, e-mail:   <
> mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@;jakarta.apache.org>
> 
> 
> 
> 
> 
> 
> 
> ---
> This e-mail message (including attachments, if any) is intended for the use
> of the individual or entity to which it is addressed and may contain
> information that is privileged, proprietary , confidential and exempt from
> disclosure.  If you are not the intended recipient, you are notified that
> any dissemination, distribution or copying of this communication is
> strictly prohibited.  If you have received this communication in error,
> please notify the sender and erase this e-mail message immediately.
> ---
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using SecureLinkTag with non-actions

2002-11-05 Thread Ditlinger, Steve

Rick:

You are not the first to ask for a "secure" attribute on the link tag.  This
would be most useful for links to outside resources, like yours.  Currently,
the best answer would be to use the regular struts  tag for those
links, instead of the  tag -or- perhaps the 
tag is what you want to use.  Place at the top of your page like so:
. 

As for specifying a forward to be secure or non-secure: changing the
protocol requires a redirect, so every forward where the protocol changes
would require a redirect, which would be OK assuming the developer
recognizes that going in.  I think you can accomplish the same thing right
now by using the  tag.  

Anyway, please let me knoe of anymore issues, suggestions, etc you have.

Steve

> -Original Message-
> From: Rick Mann [mailto:rmann@;latencyzero.com]
> Sent: Monday, November 04, 2002 8:19 PM
> To: Struts Users Mailing List
> Subject: Using SecureLinkTag with non-actions
> 
> 
> Hi. I recently added the SSL Ext stuff to Struts 1.1b2, and 
> it mostly works,
> except for the SecureLinkTag.
> 
> I have a .jsp that is not required to be secure. The typical 
> user, however,
> will get to this page as a result of logging in (an HTTP 
> post), and so the
> page will be "secure".
> 
> I have several links on this page, none of which need to be 
> secure (that is,
> I'd like for them to be "http://..."; links). Using the 
> SecureLinkTag, I get
> this for links that reference an action, but for links that reference
> another .jsp or .html page, it uses the same scheme as the 
> referring page.
> 
> How can I tell ssl-ext that a page or forward is not secure? 
> Is this even
> possible? If not, a poor workaround would be to add a 
> "secure" property to
> the tag...
> 
> TIA
>  
> -- 
> Rick
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Final release for Struts 1.1

2002-11-05 Thread James Higginbotham
> (This is what? The 1500th time Ive had to give this answer? 
> Yes? No? Oh. Only 1499 times. Ok...)

Yep, probably.. But I think as its been discussed before, some folks can
work from the CVS version and some need some sort of minor release for
political or stability reasons.. Even the Struts workflow extension
won't update its config until 1.1 is released:

"I have not yet incorporated these modifications into the test
application, because the final version of Struts 1.1 is not yet
released. I will do as soon as this has happened. In the meantime
everybody should be able to make these minor changes himself. "

http://www.livinglogic.de/Struts/struts1_1.html

I completely admire the struts team for wanting to release a solid
version, but it seems you could go to an odd/even Linux-like approach,
with odds being experimental - 1.1, 1.3, 1.5 - and evens being stable
APIs - 1.2, 1.4, 1.6. Just a thought to satisfy the needs of many
different types of indiv and corporate developers. I haven't looked into
bugzilla to see how you guys do it, but I'm sure you can release more
often with the highest bugs squashed and lower bugs that may not affect
everyone still in there in the experimental versions. 

$0.02 from a long-time Struts fan,
James

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Sub-Apps] HOW-TO Get from Default to Sub-app and Back

2002-11-05 Thread James Mitchell
James Mitchell wrote:

What ideas do you have (as far as functionality)?


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

"Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former."
- Albert Einstein (1879-1955)




-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net]
Sent: Tuesday, November 05, 2002 8:25 PM
To: Struts Users Mailing List
Subject: Re: [Sub-Apps] HOW-TO Get from Default to Sub-app and Back


Yeah - good points.  I'll see if I can work another module into the
example.  As core as modules are it seems logical we'd want something
out there that uses them.  You're also very correct that it would be
better to have it in the example app, I believe, than a seperate app,
since it *is* a "core" feature.

James Mitchell wrote:



Eddie, I've been pondering the addition of a module to the struts-example







I am +1 for adding a few more pieces of the newest 1.1 features to the
current struts-example.  I think it would help to demonstrate


(at least on a


basic level) all the bulleted features of the 1.1 release.



Yeah - me too.  I need to clean my plate so I can sit back down on
Struts stuff :-(



I don't think every possible solution or technique should be


added (i.e. my


'jsp under WEB-INF' mod or my DBMessageResources impl), and


those might be


better suited for the contrib section or Struts project on sf.net:

http://www.sourceforge.net/projects/struts



Right - very valid point.



I have a lot of ideas for modifying the struts-examples, but I have not
moved on it because of what I mentioned earlier.



Well, if it's core functionality I (personally) think there should be an
example of it in the struts-example.war.  Ok, I can see not having, say,
a comprehensive validator/tiles example there.  There's a reason they
have seperate examples - they're a bit more involved!  Surely we could
at least come up with a simple use for each of them though - now that
they are, in fact, core components.  The "advanced features" should
still be reserved for their respective examples though.

--
Eddie Bush





--
To unsubscribe, e-mail:



For additional commands, e-mail:







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Extending ActionMapping in Struts 1.1 - classcast exception.

2002-11-05 Thread Alex_Kotchnev
I am working on an app with Tomcat 4.1 and Struts 1.1. I would like  to 
extend an ActionMapping, in order to verify that the user is logged in. I 
extend an ActionMapping, create the getter and setter methods for the 
property that I have added. 

Finally, I change my web.xml and my struts-config.xml files as indicated 
below. However, in my execute ( ...) method, when I cast the ActionMapping 
parameter to a UsersActionMapping, I get a ClassCastException. It seems 
that for some reason it is disregarding the fact that I want it to pass an 
UserActionMapping object , and instead passes me a regular ActionMapping 
object. If comment out the cast to UsersActionMapping, the execute method 
executes successfully.. 

So, my question is.. what am I missing.. what else do I have to do in 
order to get an instance of an UserActionMapping object in my execute 
method, instead of getting the normal ActionMapping object... ? 

Thanks in advance... 

  web.xml excerpt ---
.

action
org.apache.struts.action.ActionServlet

  debug
  5


  config
  /WEB-INF/struts-config.xml


  application
  ApplicationResources


  mapping
  printrejects.UsersActionMapping


application
printrejects.ApplicationResources


1
  
...

 struts-config.xml excerpt - - - - 








--- ClaimListAction.java excerpt ... 

public ActionForward execute(ActionMapping mapping, 
ActionForm form, 
HttpServletRequest request, 
HttpServletResponse response)
throws IOException, ServletException {

String target = "success";
 UsersActionMapping uam = (UsersActionMapping)mapping; 

. 

Thanks,

Alex Kotchnev
Diversified Information Technologies




RE: Final release for Struts 1.1

2002-11-05 Thread Andrew Hill
The 12th of April 2156 at 15:28 in the afternoon.

Or perhaps even sooner if its ready before then... ;-)

(This is what? The 1500th time Ive had to give this answer? Yes? No? Oh.
Only 1499 times. Ok...)

-Original Message-
From: Xuefeng Wang [mailto:jameswang_99@;hotmail.com]
Sent: Wednesday, November 06, 2002 03:25
To: [EMAIL PROTECTED]
Subject: Final release for Struts 1.1


Hi, all,
I'm using Struts 1.1B1 to develop our product, I want to know when Struts
1.1 final will be release.

thanks,

James





_
Surf the Web without missing calls! Get MSN Broadband.
http://resourcecenter.msn.com/access/plans/freeactivation.asp


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: org.apache.struts.validator.FieldChecks missing?

2002-11-05 Thread Rob Leland
Wendy Smoak wrote:


I have last night's (10/5) nightly build, and when I call
myValidatorForm.validate( mapping, request), I get this:

SEVERE: reflection: org.apache.struts.validator.FieldChecks
java.lang.ClassNotFoundException: org.apache.struts.validator.FieldChecks
 


This seems like an obvious question, 
are you sure you are using the new struts.jar ?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Sub-Apps] HOW-TO Get from Default to Sub-app and Back

2002-11-05 Thread James Mitchell
What ideas do you have (as far as functionality)?


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

"Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former."
- Albert Einstein (1879-1955)


> -Original Message-
> From: Eddie Bush [mailto:ekbush@;swbell.net]
> Sent: Tuesday, November 05, 2002 8:25 PM
> To: Struts Users Mailing List
> Subject: Re: [Sub-Apps] HOW-TO Get from Default to Sub-app and Back
>
>
> Yeah - good points.  I'll see if I can work another module into the
> example.  As core as modules are it seems logical we'd want something
> out there that uses them.  You're also very correct that it would be
> better to have it in the example app, I believe, than a seperate app,
> since it *is* a "core" feature.
>
> James Mitchell wrote:
>
> >Eddie, I've been pondering the addition of a module to the struts-example
> >
> >
> 
>
> >I am +1 for adding a few more pieces of the newest 1.1 features to the
> >current struts-example.  I think it would help to demonstrate
> (at least on a
> >basic level) all the bulleted features of the 1.1 release.
> >
> Yeah - me too.  I need to clean my plate so I can sit back down on
> Struts stuff :-(
>
> >I don't think every possible solution or technique should be
> added (i.e. my
> >'jsp under WEB-INF' mod or my DBMessageResources impl), and
> those might be
> >better suited for the contrib section or Struts project on sf.net:
> >
> >  http://www.sourceforge.net/projects/struts
> >
> Right - very valid point.
>
> >I have a lot of ideas for modifying the struts-examples, but I have not
> >moved on it because of what I mentioned earlier.
> >
> Well, if it's core functionality I (personally) think there should be an
> example of it in the struts-example.war.  Ok, I can see not having, say,
> a comprehensive validator/tiles example there.  There's a reason they
> have seperate examples - they're a bit more involved!  Surely we could
> at least come up with a simple use for each of them though - now that
> they are, in fact, core components.  The "advanced features" should
> still be reserved for their respective examples though.
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Dates & validation

2002-11-05 Thread Tim Cronin
we use this
http://developer.iplanet.com/viewsource/husted_calendar/husted_calendar.html

-Original Message-
From: Wendy Smoak [mailto:Wendy.Smoak@;asu.edu]
Sent: Tuesday, November 05, 2002 2:19 PM
To: 'Struts Users Mailing List'
Subject: Dates & validation



Do most people allow users to type in a complete free-form text date?  Or do
you give them three boxes where they must put in month day and year
separately?

I'm trying to come to terms with validation.  I can't turn on the automatic
validation  because the users are allowed to
leave the form before it's complete and come back to it.  Will I still be
able to use the plug-in Validator?  (All the actions in the struts-validator
example have 'validate' this turned on. :(

I have the DAO layer that takes an internal format date (# of days since
1960-something) to my Value Object which now has a java.sql.Date:
contactVO.setActualDate( java.sql.Date.valueOf( uSession.oconv(
udArray.extract( 16 ), "D4-YMD" ).toString() ) );

But here's where I get lost.  In order to copy the properties back and forth
from Value Object to ActionForm, the types have to match.  (Don't they?) But
if I put a java.sql.Date into my ActionForm, then it will blow up when the
user types 7/13/1985 rather than 1985-07-13 and submits the form.

So, I need a String property in the ActionForm, and ... some special
something that turns it into a java.sql.Date but will not blow up if the
input is wrong?

I'm going in circles.  Any advice is appreciated!  (Should I not be using
java.sql.date?)  I did search for 'struts date validation' with Google, but
didn't find an answer.

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

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts/Tiles/RequestProcessor

2002-11-05 Thread Aaron Oathout

Take a look at securityfilter http://securityfilter.sourceforge.net/
We've been using it to handle security for our struts apps and its been 
great.

Aaron


On Tue, 5 Nov 2002, Bhamani, Nizar ATL56E wrote:

> I am using Tomcat 4.1.12 with Struts 1.1. 
> I will try to dig more about using Filters.
> 
> Thanks,
> 
> Nizar Bhamani 
> 
> 
> -Original Message-
> From: Wendy Smoak [mailto:Wendy.Smoak@;asu.edu]
> Sent: Tuesday, November 05, 2002 6:15 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Struts/Tiles/RequestProcessor
> 
> 
> 
> > Every user needs to login before going to page1, page2, ...
> > What method do I need to override by extending the TilesRequestProcessor,
> so
> > that if somebody tries to go directly to any page other then login
> (without
> > doing a login), the controller will redirect to the login page ?
> > Any ideas ?
> 
> What about a Filter?  I have the same issue-- I don't know where they're
> going, but I know they can't see anything if they're not carrying a cookie
> that validates with the campus-wide authentication server.
> 
> A Filter catches the request before it ever gets to a Struts action.  What
> servlet container are you using?  (IIRC, Filters are Servlet 2.3)
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts/Tiles/RequestProcessor

2002-11-05 Thread Bhamani, Nizar A TL56E
I am using Tomcat 4.1.12 with Struts 1.1. 
I will try to dig more about using Filters.

Thanks,

Nizar Bhamani 


-Original Message-
From: Wendy Smoak [mailto:Wendy.Smoak@;asu.edu]
Sent: Tuesday, November 05, 2002 6:15 PM
To: 'Struts Users Mailing List'
Subject: RE: Struts/Tiles/RequestProcessor



> Every user needs to login before going to page1, page2, ...
> What method do I need to override by extending the TilesRequestProcessor,
so
> that if somebody tries to go directly to any page other then login
(without
> doing a login), the controller will redirect to the login page ?
> Any ideas ?

What about a Filter?  I have the same issue-- I don't know where they're
going, but I know they can't see anything if they're not carrying a cookie
that validates with the campus-wide authentication server.

A Filter catches the request before it ever gets to a Struts action.  What
servlet container are you using?  (IIRC, Filters are Servlet 2.3)

-- 
Wendy in Tempe, AZ

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




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




When using a html:multibox element, no setter-methode is called.

2002-11-05 Thread Bernhard Oberndorfer
Hello

I´m using a logic:iterate and html:multibox element in my jsp-page.
The getter-methode of my multibox-element(getSelectedFoos()) is called as it
should.
But the setter-methode(setSelectedFoos()) is never called by the controller.
Why? What I´m doing wrong?

I´m using Struts 1.1-b2.

-

My JSP-page:


 


-

My form bean:

private String[] selectedFoos = new String[0];  // no checkbox selected

public void reset() {
 selectedFoos = new String[0];
}

public TreeSet getTreeSet() {
 ...
}

public String[] getSelectedFoos() {
 return this.selectedFoos;
}

public void setSelectedFoos(String[] s) {
 this.selectedFoos = s;
}


Thanks

Bernhard Oberndorfer
---
[EMAIL PROTECTED]
http://www.xpecto.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Steps to Get JRUN 3.1 and Struts 1.1b2 working

2002-11-05 Thread Haseltine, Celeste
Steve, 

I'm a little confused.  Your first item was just a change in the JRUN 3.1
web.xml file, correct?  Or are you creating your own JRUN 3.1 action class
loader to correctly preload the action class?  And the second item regarding
the "public void init" method (as seen below), is this a modification to the
Struts source code, and a local rebuild of the struts.jar file?  If so, I
wanted to avoid this step, and use Struts 1.1b2 as is.  To me a modification
of the struts source code is just a "hack" workaround that will end up
confusing the people who come after me on on this project.  

public void init(javax.servlet.ServletConfig sc) 
throws javax.servlet.ServletException {
Thread.currentThread().setContextClassLoader(
this.getClass().getClassLoader());
super.init(sc);
}
}

Let me know if I misunderstood you. If there is a better way to get Struts
1.1b2 working under JRUN 3.1, I will reconsider my decision to start our new
project in Struts 1.02.  But I have to come up with a way that does NOT
involve an "obscure" or "hack" work around, so that when I move onto the
next project, and leave these guys to maintain this, they can rebuild the
system without someone remembering that something "unusual" had to be done
to get the project restored onto the server.  And modifying the Struts
source code is NOT an acceptable option for us.  What happened to our
partner who was based in the World Trade Center taught us a lesson the hard
way, when it comes to reinstalling your web apps on new hardware, and
getting them up and running again.

Thanks for any additional insight/advice you can offer.

Celeste Haseltine, PE
MTL, Inc
Dallas, TX 


-Original Message-
From: Steve Fyfe [mailto:sdf@;cnicorp.com]
Sent: Tuesday, November 05, 2002 1:52 PM
To: [EMAIL PROTECTED]
Subject: Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working


>As promised, I am posting the steps I took to get Struts 1.1b2 working
in
>JRUN 3.1.  I only got the example application working, I did not
bother to
>get the other web apps bundled with Struts 1.1b2 working.  So I can't
>guarantee that I found EVERY problem in getting Struts 1.1b2 working
in JRUN
>3.1. As you can see, the steps necessary to get Struts 1.1b2 working
are
>such that you cannot run any 1.02 Struts apps on the same physical
server in
>JRUN 3.1.  

I cannot comment on all the steps you went through, but I do know that
I was able to get my Struts application to load and run from the
standard WEB-INF folders. So in my case, it should be possible to share
the machine with Struts 1.0.2 based webapps.

I avoided the classloader problems by using the following code to
initialize the Action Servlet's context class loader at startup:

/**
 * Inserts initialization code into the beginning of the
ActionServlet.
 * 
 * For JRun 3.1, replace the class specified for the ActionServlet in
web.xml with
 * the full name of this class.
 */
public class Struts11JrunAdaptor extends
org.apache.struts.action.ActionServlet {

/**
 * Before running the code in the standard Struts v1.1
ActionServlet, initialize
 * the thread's classloader. This problem is fixed in JRun v4,
so only use this
 * module on JRun v3.1.
 *
 * @param sc ServletContext for the current servlet
 * @throws ServletException If thrown by the super class.
 */ 
public void init(javax.servlet.ServletConfig sc) 
throws javax.servlet.ServletException {
Thread.currentThread().setContextClassLoader(
this.getClass().getClassLoader());
super.init(sc);
}
}

I'm using JRun 3.1 on Win XP with JDK 1.3

I did this a while ago, so I may be overlooking some other critical
configuration detail. Your milage may vary :-)

Steve Fyfe
CNI Corporation
Milford NH 03055

[EMAIL PROTECTED]


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Sub-Apps] HOW-TO Get from Default to Sub-app and Back

2002-11-05 Thread Eddie Bush
Yeah - good points.  I'll see if I can work another module into the 
example.  As core as modules are it seems logical we'd want something 
out there that uses them.  You're also very correct that it would be 
better to have it in the example app, I believe, than a seperate app, 
since it *is* a "core" feature.

James Mitchell wrote:

Eddie, I've been pondering the addition of a module to the struts-example
 




I am +1 for adding a few more pieces of the newest 1.1 features to the
current struts-example.  I think it would help to demonstrate (at least on a
basic level) all the bulleted features of the 1.1 release.


Yeah - me too.  I need to clean my plate so I can sit back down on 
Struts stuff :-(

I don't think every possible solution or technique should be added (i.e. my
'jsp under WEB-INF' mod or my DBMessageResources impl), and those might be
better suited for the contrib section or Struts project on sf.net:

 http://www.sourceforge.net/projects/struts


Right - very valid point.


I have a lot of ideas for modifying the struts-examples, but I have not
moved on it because of what I mentioned earlier.


Well, if it's core functionality I (personally) think there should be an 
example of it in the struts-example.war.  Ok, I can see not having, say, 
a comprehensive validator/tiles example there.  There's a reason they 
have seperate examples - they're a bit more involved!  Surely we could 
at least come up with a simple use for each of them though - now that 
they are, in fact, core components.  The "advanced features" should 
still be reserved for their respective examples though.

--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: EJB / was Struts and high performance sites

2002-11-05 Thread V. Cekvenich
http://www2.theserverside.com/home/thread.jsp?thread_id=16300&article_count=25

I quote from above:
"
The criticism of EJB the author makes confirms what I have been 
suspecting for some time now:
EJBs are evil, and should be avoided at all costs, except in a few cases.
"

also: www.basebeans.com/bad.jsp can give you more info. You can just 
search EJB on google for more.

.V

Taylor, Jason wrote:
V-- What did you specifically see as a performance problem?  Was it jndi
lookups, I/O, serialization/deserialization, memory allocation, failover or
what?  

I also think they are often mis- or over-used-- I'm interested in the cases
you ran into.  Do you care to share?

-JT

-Original Message-
From: V. Cekvenich [mailto:vicc@;users.sourceforge.net]
Sent: Tuesday, September 24, 2002 4:26 AM
To: [EMAIL PROTECTED]
Subject: EJB / was Struts and high performance sites


They are hype marketed as such. Most newer developers try them, as I did 
when I was new, but in production they did not scale, so we removed 
them. On new sites I skip the writing them part,  since people would 
only remove them in production. (some management that take EJB to 
production are so upset that they go to the cached .NET ADO, so I steer 
my client's clear).

Read www.basebeans.com/bad.jsp links for other's opinion.
Some people disagree with them, but I had similar experience.

V.

Daniel Joshua wrote:

V. Cekvenich,




The slow part is DAO in J2EE (and ADO in .NET). Avoid any EJB, they do
not scale.



I though EJBs were designed to allow scalling?


Regards,
Daniel


-Original Message-
From: news [mailto:news@;main.gmane.org]On Behalf Of V. Cekvenich
Sent: Tuesday, September 24, 2002 5:56 PM
To: [EMAIL PROTECTED]
Subject: Re: Struts and high performance sites


Not a high volume of users, and 7 transactions per second? Should fit on
a single medium box (if not a laptop) if you do it right.

You have to worry about creating objects if you write your own framework
(you can put beans in session or requests, and request is better
mostly), and then you have 2 projects, your app and a framework, and you
won't do better than the Struts team and what about framework bugs?
Also, with Struts, my clients are able to write several modules(pages)
per day per developers, how's that for  productivity or beating the
schedule?
Some of the  Struts sites are 50 times more concurrent users I have
worked on, no problem.

The slow part is DAO in J2EE (and ADO in .NET). Avoid any EJB, they do
not scale.

Some good choices is RowSet(I do metadata w/ reflection to auto gen SQL
updates - RowSet also avoids BO/DTO/VO mapping and GC), Resin, pgSQL,
Eclipse or CodeGuide IDE, Linux/KDE and J:Rockit VM or IBM VM (Sun VM
and Sun Inc. have issues). Sample good practices code on
http://basicPortal.sf.net, FREE!

(If you have a large app or large # users, let a mentor help. many are
on this list, it is cost effective, but not because of Struts only)

V.
Struts Mentor
917 345 1445 [EMAIL PROTECTED]
("Mentor's helps you do it faster/cheaper)


David Zimmerman wrote:



Hi,
we are building a webshop for a site with a high volume of users, approx.


800 concurrent users and 25k transactions per hour. We are going to use


J2EE


as the ground platform. I am now considering some design choices where


using


Struts is one of them. However I have some questions regarding the
performance of Struts. I know this issue has been up many times before but


I


have never been able to find any satisfying answers, so...



What, if any, overhead does the Struts controller generate? This question


must of course be seen in the context of writing your own controller or
using any other framework. However, what is Struts overhead?



What overhead does the use of form beans generate (in the sense of objects


created, memory use, the use of reflection, speed)



Custom tags (Struts' or other). Would they be applicable in a case like


this? Wouldn't there be a massive creation of objects for every request?



Please help me out here! I really want your knowledge on this!

Regards
David Zimmerman



Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS
http://www.mail.lycos.com/brandPage.shtml?pageId=plus






--
To unsubscribe, e-mail:

For additional commands, e-mail:







--
To unsubscribe, e-mail:

For additional commands, e-mail:







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??????????

2002-11-05 Thread V. Cekvenich
can you try it with tomcat and reproduce?

.V

Nekkalapudi, Viplava wrote:

Hi Daniel,
Did you have a chance to read my last mail which I sent around 4:00PM.
If there are 3 instances running for WEBLOGIC 6.1 SP2, then why it is
not an issue with STRTUS 1.0.2?
Our STRUTS 1.1 application also works fine with the Validatior Frame
work, but only problem is with the port issue. We need to wait a minimum of
5/10 minutes.
(May be to stop all these instances).
 
 But today we just modified the the DOC-TYPE in struts-config.xml file to
refer STRUTS 1.1 DTD in our web application developed based on STRUTS 1.0.2.
We started seeing this error.

Thanks for your time.
 

-Original Message-
From: Daniel Jaffa [mailto:jaffad@;courtinnovation.org]
Sent: Tuesday, November 05, 2002 4:28 PM
To: Struts Users Mailing List
Subject: Re: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??


netstat -a returns

TCPproliant-ml370:82  proliant-ml370:0   LISTENING
TCPproliant-ml370:90  proliant-ml370:0   LISTENING
TCPproliant-ml370:94  proliant-ml370:0   LISTENING

Which are the 3 instances of Weblogic Server 6.1 SP2.

Eddie, this is not a Struts error and it is also not a BEA Weblogic error.
I have configured Weblogic 6.1 with struts 1.1 b1 and b2.  This is a config
error not a
application or framework error.

Viplava,  please look at what your configuration is, I assure you that you
have one small
error that is snowballing you right now.


Daniel Jaffa


Sa' right
Sa' write
- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 5:40 PM
Subject: Re: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??



I believe it's inconceivable that this is a Struts issue.  Struts isn't
causing any ports to be open - it just runs in your web container.  I
have heard that running WebLogic as a service can cause this behavior
though.  The suggestion I hear was "When the install asks if you'd like
the server to run as a service - just say NO!"

It *is* a WebLogic bug :-)  I guarantee you.

As I recall (and my memory is fuzzy) WebLogic built some custom
socket-handling code (native C-language stuff), to use in their server,
and, apparantly, they didn't do a good job of freeing them up.  I find
it odd that they don't show up under netstat -a, but the fact of the
matter is that the server is the only animal in the zoo that will open
that port :-)

You asked for an idea:

   - complain *loudly* to your server vendor!  (file a bug if there
isn't one outstanding)
   - find other people having this problem
   - organize and lobby to have it fixed

... that's my idea.

Nekkalapudi, Viplava wrote:



I already posted this some time back about the problem of server port
already in use.
We couldn't get away from this problem so we still use STRUTS 1.0.2 for



our


application.

We seen that by just modifying the DTD reference from STRUTS 1.0 to



STRUTS


1.1 in the struts-config.xml, resulting the port bind error (at the end



of


this mail).
We use Struts 1.0.2 with Weblogic Server 6.1 SP2.

I wonder how Struts 1.1 DTD related with the Weblogic port bind error?

If any one want to see this error with their application uses STRTUS



1.0.2,


Just modify the DTD reference in the struts-config.xml to STRUTS 1.1 DTD.
Start weblogic server, shutdown and restart the server again.
(The server binds the port correctly for the first time).

Any Ideas???



--
Eddie Bush




--
To unsubscribe, e-mail:





For additional commands, e-mail:






--
To unsubscribe, e-mail:

For additional commands, e-mail:






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic select menu in JSP

2002-11-05 Thread V. Cekvenich
Regarding menus, I use struts - menu from sourceforge.
You can see struts menu runing at baseBeans.com live.
.V

John Owen wrote:

I just tried "Struts html:option","Struts html:options","html:options" and
"html:option" in the mail archive for struts-user and neither search
returned results.

John
- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 5:42 PM
Subject: Re: Dynamic select menu in JSP




Try "Struts html:option" - works super.  I actually did try it :-)  I
didn't get as good of a return as I expected though :-/  I'm sure I
could refine it better and get a better return, but, as I was just doing
it to ensure I was getting back relevant data, I didn't investigate it
thoroughly.

The point is valid though :-) Far too few people actually take the time
to do any research on their question before asking.  Chances are, if you
have a problem, someone has already run into it and likely solved it as
well.  The first thing I do when I hit a "rough spot" is look around -
Google is my first stop.  I'll try a few (anywhere from 3-5) different
permutations of relevant keywords (doing things such as removing that
troublesome colon) and see what I get.  Most of the time that's ...
plenty :-)  There are times it does not suffice.

John Owen wrote:



When you put "html:option" in the search box it doesn't work. At least,



it


never has for me. The ':' screws it up and searching on "option" or "html
option" is not viable. I'm going to reiterate that if the Struts docs had
good examples of implementation, a lot of repetitive questions could be
avoided. I would gladly update the documentation if I had the time.

John



--
Eddie Bush





--
To unsubscribe, e-mail:





For additional commands, e-mail:









--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts-config_1_1.dtd and struts-config_1_0.dtd

2002-11-05 Thread Eddie Bush
... because a DTD is not an XML document.

Nekkalapudi, Viplava wrote:


Why is  is missing from
struts-config_1_1.dtd?
Is it by mistake OR is there any purpose?
I see it in the file struts-config_1_0.dtd.
I checked these files at   http://jakarta.apache.org/struts/dtds/.

--- Vip.



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: File Upload Tutorial

2002-11-05 Thread Jacob Hookom
download the struts binary and deploy the struts-upload.war, it will have
explanations and source code available.  Or, even just unzip the
struts-upload.war to look at the source.

- Original Message -
From: "Brandon Chee" <[EMAIL PROTECTED]>
To: "struts-user" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 5:21 PM
Subject: File Upload Tutorial


> Dear Sir/Madam,
>
>Can anyone point me to a good tutorial about file upload using Struts
> 1.1? Thanks a lot. Have a nice day.
>
> Best regards,
> Brandon
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: struts-config_1_1.dtd and struts-config_1_0.dtd

2002-11-05 Thread Nekkalapudi, Viplava
But all the DTDs under jakarta-struts-1.1-b2-src\conf\share have the XML
header.

-Original Message-
From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
Sent: Tuesday, November 05, 2002 5:14 PM
To: Struts Users Mailing List
Subject: Re: struts-config_1_1.dtd and struts-config_1_0.dtd




On Tue, 5 Nov 2002, Nekkalapudi, Viplava wrote:

> Date: Tue, 5 Nov 2002 15:28:22 -0600
> From: "Nekkalapudi, Viplava" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
> Subject: struts-config_1_1.dtd and struts-config_1_0.dtd
>
> Why is  is missing from
> struts-config_1_1.dtd?
> Is it by mistake OR is there any purpose?
> I see it in the file struts-config_1_0.dtd.
> I checked these files at   http://jakarta.apache.org/struts/dtds/.
>

It's not legal to have this header on a DTD, because DTDs are not XML
documents.

> --- Vip.
>

Craig


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??????????

2002-11-05 Thread Nekkalapudi, Viplava
Hi Daniel,
Did you have a chance to read my last mail which I sent around 4:00PM.
If there are 3 instances running for WEBLOGIC 6.1 SP2, then why it is
not an issue with STRTUS 1.0.2?
Our STRUTS 1.1 application also works fine with the Validatior Frame
work, but only problem is with the port issue. We need to wait a minimum of
5/10 minutes.
(May be to stop all these instances).
 
 But today we just modified the the DOC-TYPE in struts-config.xml file to
refer STRUTS 1.1 DTD in our web application developed based on STRUTS 1.0.2.
We started seeing this error.

Thanks for your time.
 

-Original Message-
From: Daniel Jaffa [mailto:jaffad@;courtinnovation.org]
Sent: Tuesday, November 05, 2002 4:28 PM
To: Struts Users Mailing List
Subject: Re: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??


netstat -a returns

TCPproliant-ml370:82  proliant-ml370:0   LISTENING
TCPproliant-ml370:90  proliant-ml370:0   LISTENING
TCPproliant-ml370:94  proliant-ml370:0   LISTENING

Which are the 3 instances of Weblogic Server 6.1 SP2.

Eddie, this is not a Struts error and it is also not a BEA Weblogic error.
I have configured Weblogic 6.1 with struts 1.1 b1 and b2.  This is a config
error not a
application or framework error.

Viplava,  please look at what your configuration is, I assure you that you
have one small
error that is snowballing you right now.


Daniel Jaffa


Sa' right
Sa' write
- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 5:40 PM
Subject: Re: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??


> I believe it's inconceivable that this is a Struts issue.  Struts isn't
> causing any ports to be open - it just runs in your web container.  I
> have heard that running WebLogic as a service can cause this behavior
> though.  The suggestion I hear was "When the install asks if you'd like
> the server to run as a service - just say NO!"
>
> It *is* a WebLogic bug :-)  I guarantee you.
>
> As I recall (and my memory is fuzzy) WebLogic built some custom
> socket-handling code (native C-language stuff), to use in their server,
> and, apparantly, they didn't do a good job of freeing them up.  I find
> it odd that they don't show up under netstat -a, but the fact of the
> matter is that the server is the only animal in the zoo that will open
> that port :-)
>
> You asked for an idea:
>
> - complain *loudly* to your server vendor!  (file a bug if there
> isn't one outstanding)
> - find other people having this problem
> - organize and lobby to have it fixed
>
> ... that's my idea.
>
> Nekkalapudi, Viplava wrote:
>
> >I already posted this some time back about the problem of server port
> >already in use.
> >We couldn't get away from this problem so we still use STRUTS 1.0.2 for
our
> >application.
> >
> >We seen that by just modifying the DTD reference from STRUTS 1.0 to
STRUTS
> >1.1 in the struts-config.xml, resulting the port bind error (at the end
of
> >this mail).
> >We use Struts 1.0.2 with Weblogic Server 6.1 SP2.
> >
> >I wonder how Struts 1.1 DTD related with the Weblogic port bind error?
> >
> >If any one want to see this error with their application uses STRTUS
1.0.2,
> >Just modify the DTD reference in the struts-config.xml to STRUTS 1.1 DTD.
> >Start weblogic server, shutdown and restart the server again.
> >(The server binds the port correctly for the first time).
> >
> > Any Ideas???
> >
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




File Upload Tutorial

2002-11-05 Thread Brandon Chee
Dear Sir/Madam,

   Can anyone point me to a good tutorial about file upload using Struts
1.1? Thanks a lot. Have a nice day.

Best regards,
Brandon


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




org.apache.struts.validator.FieldChecks missing?

2002-11-05 Thread Wendy Smoak

I have last night's (10/5) nightly build, and when I call
myValidatorForm.validate( mapping, request), I get this:

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:533)
at java.lang.Thread.run(Thread.java:536)
Nov 5, 2002 4:02:14 PM org.apache.commons.validator.Validator
validateFieldForRule
SEVERE: reflection: org.apache.struts.validator.FieldChecks
java.lang.ClassNotFoundException: org.apache.struts.validator.FieldChecks
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1428)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1274)
at
org.apache.commons.validator.Validator.validateFieldForRule(Validator
.java:367)
at
org.apache.commons.validator.Validator.validateField(Validator.java:5
12)
at
org.apache.commons.validator.Validator.validate(Validator.java:551)
at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java
:150)
at
edu.asu.vpia.example.EditContactAction.saveContact(EditContactAction.
java:347)

And lots more, actually, but I think the ClassNotFoundException is a deal
breaker.

Should I try tomorrow's build, or go back to an older one?  (Or is this
something I've done?  I looked in struts.jar and the file is not there,
although other o.a.s.validator classes are.

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



Re: Extending the struts config

2002-11-05 Thread Craig R. McClanahan


On Tue, 5 Nov 2002, Eddie Bush wrote:

> Date: Tue, 05 Nov 2002 15:37:54 -0600
> From: Eddie Bush <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: Extending the struts config
>
> Michael Delamere wrote:
>
> >Eddie,
> >
> >you said once (if I remeber correctly), that you extended the
> >struts-config.xml to accommodate your own configuration settings.
> >
> Incorrect.  I used a seperate XML config and used digester to
> parse/instantiate things.
>

With the latest nightly builds (i.e. since 1.1b2) you actually *can* do
this.  You have to set the servlet init parameter "validating" to false,
because otherwise your extended struts-config.xml file will not pass DTD
validation (which is on by default).

You'll still need to parse the struts-config.xml file yourself in order to
read the extra elements; the standard parse will simply ignore them.
Digester is useful for that.

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic select menu in JSP

2002-11-05 Thread Mark Ayad
It's quality not quantity. The quantity on the mailing list is vast refering
to different version / implementations / configurations  and so on.

There should be a better way to create examples relating to an release of a
certain API or framework. Come on guys a lower barrier to understanding is
good for all of us.

This is infact one of my pet projects. 52,000 mails, its a bit arrogant to
assume people don't RTFM, perhaps they do, perhaps they don't. The problem
still remains however, and the issue is far from solved if 3 more people ask
the same old same old question. Problem aint soved.

If questions were normalised even into rough categories these would act as
nucleating sites for rich content, with a narrower subject focus.


- Original Message -
From: "David Graham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 11:51 PM
Subject: Re: Dynamic select menu in JSP


> We would all gladly update the docs if we had the time.  The example apps
> that come with the distribution demonstrate implementations.  If they're
> unsatisfactory, feel free to update them and submit to bugzilla.
>
> David
>
> >John Owen wrote:
> >
> >>When you put "html:option" in the search box it doesn't work. At least,
it
> >>never has for me. The ':' screws it up and searching on "option" or
"html
> >>option" is not viable. I'm going to reiterate that if the Struts docs
had
> >>good examples of implementation, a lot of repetitive questions could be
> >>avoided. I would gladly update the documentation if I had the time.
> >>
> >>John
> >>
> >
> >--
> >Eddie Bush
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> >
> >For additional commands, e-mail:
> >
>
>
> _
> Surf the Web without missing calls! Get MSN Broadband.
> http://resourcecenter.msn.com/access/plans/freeactivation.asp
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic select menu in JSP

2002-11-05 Thread John Owen
I just tried "Struts html:option","Struts html:options","html:options" and
"html:option" in the mail archive for struts-user and neither search
returned results.

John
- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 5:42 PM
Subject: Re: Dynamic select menu in JSP


> Try "Struts html:option" - works super.  I actually did try it :-)  I
> didn't get as good of a return as I expected though :-/  I'm sure I
> could refine it better and get a better return, but, as I was just doing
> it to ensure I was getting back relevant data, I didn't investigate it
> thoroughly.
>
> The point is valid though :-) Far too few people actually take the time
> to do any research on their question before asking.  Chances are, if you
> have a problem, someone has already run into it and likely solved it as
> well.  The first thing I do when I hit a "rough spot" is look around -
> Google is my first stop.  I'll try a few (anywhere from 3-5) different
> permutations of relevant keywords (doing things such as removing that
> troublesome colon) and see what I get.  Most of the time that's ...
> plenty :-)  There are times it does not suffice.
>
> John Owen wrote:
>
> >When you put "html:option" in the search box it doesn't work. At least,
it
> >never has for me. The ':' screws it up and searching on "option" or "html
> >option" is not viable. I'm going to reiterate that if the Struts docs had
> >good examples of implementation, a lot of repetitive questions could be
> >avoided. I would gladly update the documentation if I had the time.
> >
> >John
> >
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts/Tiles/RequestProcessor

2002-11-05 Thread Wendy Smoak

> Every user needs to login before going to page1, page2, ...
> What method do I need to override by extending the TilesRequestProcessor,
so
> that if somebody tries to go directly to any page other then login
(without
> doing a login), the controller will redirect to the login page ?
> Any ideas ?

What about a Filter?  I have the same issue-- I don't know where they're
going, but I know they can't see anything if they're not carrying a cookie
that validates with the campus-wide authentication server.

A Filter catches the request before it ever gets to a Struts action.  What
servlet container are you using?  (IIRC, Filters are Servlet 2.3)

-- 
Wendy in Tempe, AZ



Re: struts-config_1_1.dtd and struts-config_1_0.dtd

2002-11-05 Thread Craig R. McClanahan


On Tue, 5 Nov 2002, Nekkalapudi, Viplava wrote:

> Date: Tue, 5 Nov 2002 15:28:22 -0600
> From: "Nekkalapudi, Viplava" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
> Subject: struts-config_1_1.dtd and struts-config_1_0.dtd
>
> Why is  is missing from
> struts-config_1_1.dtd?
> Is it by mistake OR is there any purpose?
> I see it in the file struts-config_1_0.dtd.
> I checked these files at   http://jakarta.apache.org/struts/dtds/.
>

It's not legal to have this header on a DTD, because DTDs are not XML
documents.

> --- Vip.
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts/Tiles/RequestProcessor

2002-11-05 Thread Bhamani, Nizar A TL56E
Here is my scenario that uses Struts/Tiles that has following pages.

http://localhost:8080/login.jsp
http://localhost:8080/page1.jsp
http://localhost:8080/page2.jsp
http://localhost:8080/page3.jsp
and so on

All the above pages use Tiles layout.
Every user needs to login before going to page1, page2, ...

What method do I need to override by extending the TilesRequestProcessor, so
that if somebody tries to go directly to any page other then login (without
doing a login), the controller will redirect to the login page ?

Any ideas ?

Thanks,

Nizar.



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




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic select menu in JSP

2002-11-05 Thread Mark Ayad
Eddie Don't do my research um - I got a PhD in Molecular Physics and
Nanotechnology for doing some very good research. Oh and then there was Bell
Labs.

Oh never used Google whats that ?

With 52,000 mails and a very poor interface, a.k.a you can't even order by
date ?
I'll know not to post so fast in future for fear of being made an example of
by Eddie.

However if the framework is so simple why is there 52,000 mail comparable
with Tomcat ?


- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 12:42 AM
Subject: Re: Dynamic select menu in JSP


> Try "Struts html:option" - works super.  I actually did try it :-)  I
> didn't get as good of a return as I expected though :-/  I'm sure I
> could refine it better and get a better return, but, as I was just doing
> it to ensure I was getting back relevant data, I didn't investigate it
> thoroughly.
>
> The point is valid though :-) Far too few people actually take the time
> to do any research on their question before asking.  Chances are, if you
> have a problem, someone has already run into it and likely solved it as
> well.  The first thing I do when I hit a "rough spot" is look around -
> Google is my first stop.  I'll try a few (anywhere from 3-5) different
> permutations of relevant keywords (doing things such as removing that
> troublesome colon) and see what I get.  Most of the time that's ...
> plenty :-)  There are times it does not suffice.
>
> John Owen wrote:
>
> >When you put "html:option" in the search box it doesn't work. At least,
it
> >never has for me. The ':' screws it up and searching on "option" or "html
> >option" is not viable. I'm going to reiterate that if the Struts docs had
> >good examples of implementation, a lot of repetitive questions could be
> >avoided. I would gladly update the documentation if I had the time.
> >
> >John
> >
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dates & validation

2002-11-05 Thread C. Struts
Wendy,

We had the same issue where users were used to doing very little to enter a
date, so we employ a read only text box and a calendar pop up, ala
travelocity.  The pop up returns the selected (and always valid) date in
DD-MON- format that can be easily be parsed by the action.

We also do some JavaScript validation since the date needs to be in the
future.

-c

- Original Message -
From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 5:07 PM
Subject: RE: Dates & validation


> > One vote for three pre-populated boxes. Saves on validation that way :)
> > Brian
>
> And if I make them read-only, that would really fix it!  ;) I think the
> three-boxes approach comes with its own problems... I did it for a "time"
> field, but there, the choices are fixed.  If I wanted drop-downs for a
date
> then I'd have to figure out what days are valid.  Blech.  Besides, the
users
> will complain.  They're used to typing in partial dates and having the
> [telnet] app magically figure out what they meant.
>
> I'm currently dissecting the struts-validator example, and my first
concern
> is that all of the actions have validate="true" in struts-config.xml.  I
> don't think I can do that.  The user may go off to a resolution page and
> come back before the form needs to be validated.
>
> Without validate="true" in the  tag in struts-config, is the
> Validator Plugin even going to work?  Is there a way to manually validate?
> In my case, I have a LookupDispatchAction, and I only want to validate at
> the last minute-- the user has pressed the 'Finish' button and the
'action'
> request parameter has caused the 'saveContact()' method in my
> LookupDispatchAction to be called.
>
> Is it as simple as manually calling validate() and placing the
ActionErrors
> object into request scope with the appropriate name, which I think is
> 'org.apache.struts.action.ERROR'?  I know someone explained this to me a
> week or so ago, but apparently it didn't stick.  Brain overload.
>
> --
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic select menu in JSP

2002-11-05 Thread David Graham
We would all gladly update the docs if we had the time.  The example apps 
that come with the distribution demonstrate implementations.  If they're 
unsatisfactory, feel free to update them and submit to bugzilla.

David

John Owen wrote:


When you put "html:option" in the search box it doesn't work. At least, it
never has for me. The ':' screws it up and searching on "option" or "html
option" is not viable. I'm going to reiterate that if the Struts docs had
good examples of implementation, a lot of repetitive questions could be
avoided. I would gladly update the documentation if I had the time.

John



--
Eddie Bush





--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



_
Surf the Web without missing calls! Get MSN Broadband. 
http://resourcecenter.msn.com/access/plans/freeactivation.asp


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: Dynamic select menu in JSP

2002-11-05 Thread V. Cekvenich
Thanks. I did not even think of that.
.V

Eddie Bush wrote:

Try "Struts html:option" - works super.  I actually did try it :-)  I 
didn't get as good of a return as I expected though :-/  I'm sure I 
could refine it better and get a better return, but, as I was just doing 
it to ensure I was getting back relevant data, I didn't investigate it 
thoroughly.

The point is valid though :-) Far too few people actually take the time 
to do any research on their question before asking.  Chances are, if you 
have a problem, someone has already run into it and likely solved it as 
well.  The first thing I do when I hit a "rough spot" is look around - 
Google is my first stop.  I'll try a few (anywhere from 3-5) different 
permutations of relevant keywords (doing things such as removing that 
troublesome colon) and see what I get.  Most of the time that's ... 
plenty :-)  There are times it does not suffice.

John Owen wrote:

When you put "html:option" in the search box it doesn't work. At 
least, it
never has for me. The ':' screws it up and searching on "option" or "html
option" is not viable. I'm going to reiterate that if the Struts docs had
good examples of implementation, a lot of repetitive questions could be
avoided. I would gladly update the documentation if I had the time.

John







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Sub-Apps] HOW-TO Get from Default to Sub-app and Back

2002-11-05 Thread James Mitchell
Eddie, I've been pondering the addition of a module to the struts-example
(enough to spec out a few screens), but I wasn't sure if it would fit with
its purpose.  (Craig has said on more than one occasion that the example is
basically to verify that struts is working properly)

On one hand, adding another example that demonstrates how to use Modules
would help those new to this technique.  But on the other hand, adding
another example means someone has to maintain it.

I am +1 for adding a few more pieces of the newest 1.1 features to the
current struts-example.  I think it would help to demonstrate (at least on a
basic level) all the bulleted features of the 1.1 release.

I don't think every possible solution or technique should be added (i.e. my
'jsp under WEB-INF' mod or my DBMessageResources impl), and those might be
better suited for the contrib section or Struts project on sf.net:

  http://www.sourceforge.net/projects/struts


I have a lot of ideas for modifying the struts-examples, but I have not
moved on it because of what I mentioned earlier.

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

"Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former."
- Albert Einstein (1879-1955)


> -Original Message-
> From: Eddie Bush [mailto:ekbush@;swbell.net]
> Sent: Tuesday, November 05, 2002 5:44 PM
> To: Struts Users Mailing List
> Subject: Re: [Sub-Apps] HOW-TO Get from Default to Sub-app and Back
>
>
> Read the User Guide online - specifically the area about building the
> controller-oriented components.  If you have already done that then say
> so.  It's not rocket science.  If what is provided in the User Guide
> isn't sufficient then perhaps we should take a look at building a
> struts-module.war for people to tear apart.
>
> Jerry Jalenak wrote:
>
> >I'm looking into splitting my web application into pieces based
> on business
> >unit.  I've read everything I can find in the mail archives and on the
> >Struts home page, and think I understand most of it.  I've got a second
> >struts-config init parm pointing to my new sub-app, and I've got
> my sub-app
> >set up as a 'normal' struts-config.  What I am having trouble
> figuring out
> >is how to get from my main app to my sub-app, and back.  I think I should
> >either be using ForwardAction or SwitchAction, but can't figure out the
> >config parms well enough to use either one.  Can someone please post a
> >working sub-app example?
> >
> >TIA!
> >
> >Jerry Jalenak
> >Web Publishing
> >LabOne, Inc.
> >10101 Renner Blvd.
> >Lenexa, KS  66219
> >(913) 577-1496
> >[EMAIL PROTECTED]
> >
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Passing an (Dyna)ActionForm to the business object

2002-11-05 Thread Kris Schneider
Almost forgot about PropertyUtils.copyProperties and BeanUtils.copyProperties 
(I think the difference is that BeanUtils handles type conversion). If the 
property names of your model match the property names of your form, you should 
be able to use one of those methods to populate your model with a single method 
call.

Quoting Kris Schneider <[EMAIL PROTECTED]>:

> +1
> 
> Although it may seem like splitting hairs because (in your case) the same 
> object instance is passed to the doBusiness method, there's a huge 
> architectural/design difference between:
> 
> public class myModel {
>   public void doBusiness(DynaActionForm data) {
>   ...
>   }
> }
> 
> and:
> 
> public class myModel {
>   public void doBusiness(DynaBean data) {
>   ...
>   }
> }
> 
> I suppose another possibility would be to use BeanUtils.describe or 
> PropertyUtils.describe (not sure which is preferred) to generate a Map to
> pass 
> to the doBusiness method. Either describe method can deal with a DynaBean.
> 
> Quoting Robert Taylor <[EMAIL PROTECTED]>:
> 
> > I would say you wouldn't necessarily violate MVC if you pass the
> > DynaActionForm as a DynaBean into your model. Your model doesn't need
> > an "Form" functionality, it only needs to access the data which is
> > supported
> > by the DynaBean contract. DynaBean is not bound to any presentation layer
> > and
> > therefore does not couple your business tier to your web tier.
> > 
> > When passing data from my web tier to the business tier, I tend to
> convert
> > the data contained in the form into data structures native to the
> business
> > tier;
> > Data Transport Objects (DTO) sometimes refered to as ValueObjects. I then
> > pass
> > around these DTOs.
> > 
> > There has been plenty of discussion on this list and depending on which
> > engineer
> > you speak with you may get a different answer. For more information on
> > this,
> > search
> > the archives.
> > 
> > HTH,
> > 
> > robert
> > 
> > > -Original Message-
> > > From: Vincent Stoessel [mailto:vincent@;xaymaca.com]
> > > Sent: Tuesday, November 05, 2002 2:34 PM
> > > To: Struts Users
> > > Subject: Passing an (Dyna)ActionForm to the business object
> > >
> > >
> > > I know I have probably violated MVC by doing this but
> > > while trying to find an elegant solution to passing
> > > field values between my Action classes and my Model Classes
> > > I went ahead and passed the whole darn DyaActionForm (daf)
> > > to my Model class:
> > >
> > > Why did I got to the dark side? It was so convenient to
> > > only have to add/remove fields in one class (and in struts-config.xml).
> > > I am working with a massive form that is in flux and editing 2 classes
> > > all the time was slowing me down:
> > >
> > > // The Old way: the force
> > > in myAction:
> > >
> > >  DynaActionForm daf  = (DynaActionForm) acForm  ;
> > >  myModel mym  = new myModel();
> > > String firstname = (String) daf.get("fname");
> > > String lastname = (String) daf.get("lname") ;
> > > String street = (String)daf.get("street") ;
> > > String city = (String)daf.get("city") ;
> > > String state = (String)daf.get("state") ;
> > >
> > > myModel.doBusiness(firstname, lastname,street,city,state);
> > >
> > >
> > >
> > >
> > > then in myModel:
> > >
> > > PreparedStatement   pstmt  = con.prepareStatement(qstr);
> > >  pstmt.setString(1,(String)daf.get("firstname"));
> > >  pstmt.setString(2,(String)daf.get("lastname"));
> > >  pstmt.setString(3,(String)daf.get("street"));
> > >  pstmt.setString(4, (String)daf.get("city"));
> > >  pstmt.setString(5, (String)daf.get("state"));
> > >
> > >
> > >
> > > // the New Way: the dark side
> > >
> > > now I can just do:
> > >
> > > myModel mym  = new myModel();
> > > myModel.doBusiness(daf);
> > >
> > >
> > > Yes, in myModel class  I still have to break out daf.getXXX but at
> least
> > > now all thefields can be managed from one place and less prone to
> > > mismached case/spelling (for me anyway) than it was before.
> > >
> > > Of course I really do not want to violate the Struts MVC model, is
> there
> > > a better way than the first method?
> > >
> > > Thanks All
> > >
> > >
> > > --
> > > Vincent Stoessel
> > > Linux Systems Developer
> > > vincent xaymaca.com
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> -- 
> Kris Schneider 
> D.O.Tech   
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 

Re: Dynamic select menu in JSP

2002-11-05 Thread Eddie Bush
Try "Struts html:option" - works super.  I actually did try it :-)  I 
didn't get as good of a return as I expected though :-/  I'm sure I 
could refine it better and get a better return, but, as I was just doing 
it to ensure I was getting back relevant data, I didn't investigate it 
thoroughly.

The point is valid though :-) Far too few people actually take the time 
to do any research on their question before asking.  Chances are, if you 
have a problem, someone has already run into it and likely solved it as 
well.  The first thing I do when I hit a "rough spot" is look around - 
Google is my first stop.  I'll try a few (anywhere from 3-5) different 
permutations of relevant keywords (doing things such as removing that 
troublesome colon) and see what I get.  Most of the time that's ... 
plenty :-)  There are times it does not suffice.

John Owen wrote:

When you put "html:option" in the search box it doesn't work. At least, it
never has for me. The ':' screws it up and searching on "option" or "html
option" is not viable. I'm going to reiterate that if the Struts docs had
good examples of implementation, a lot of repetitive questions could be
avoided. I would gladly update the documentation if I had the time.

John



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Passing an (Dyna)ActionForm to the business object

2002-11-05 Thread Vincent Stoessel
Kris Schneider wrote:

+1

Although it may seem like splitting hairs because (in your case) the same 
object instance is passed to the doBusiness method, there's a huge 
architectural/design difference between:

public class myModel {
  public void doBusiness(DynaActionForm data) {
  ...
  }
}

and:

public class myModel {
  public void doBusiness(DynaBean data) {
  ...
  }
}

I suppose another possibility would be to use BeanUtils.describe or 
PropertyUtils.describe (not sure which is preferred) to generate a Map to pass 
to the doBusiness method. Either describe method can deal with a DynaBean.

This is cool. I will give it a whirl.
Thanks.


--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Images in buttons

2002-11-05 Thread Eddie Bush
... and zoom by http://www.husted.com/struts/

Check out the tips section - tip #1 to be more precise.  The 
ImageButtonBean is now an integral part of Struts (o.a.s.u is the 
package you can find it in).

David Graham wrote:

Use the  tag to create a submit button with an image.

David 


--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??????????

2002-11-05 Thread Daniel Jaffa
netstat -a returns

TCPproliant-ml370:82  proliant-ml370:0   LISTENING
TCPproliant-ml370:90  proliant-ml370:0   LISTENING
TCPproliant-ml370:94  proliant-ml370:0   LISTENING

Which are the 3 instances of Weblogic Server 6.1 SP2.

Eddie, this is not a Struts error and it is also not a BEA Weblogic error.
I have configured Weblogic 6.1 with struts 1.1 b1 and b2.  This is a config
error not a
application or framework error.

Viplava,  please look at what your configuration is, I assure you that you
have one small
error that is snowballing you right now.


Daniel Jaffa


Sa' right
Sa' write
- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 5:40 PM
Subject: Re: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??


> I believe it's inconceivable that this is a Struts issue.  Struts isn't
> causing any ports to be open - it just runs in your web container.  I
> have heard that running WebLogic as a service can cause this behavior
> though.  The suggestion I hear was "When the install asks if you'd like
> the server to run as a service - just say NO!"
>
> It *is* a WebLogic bug :-)  I guarantee you.
>
> As I recall (and my memory is fuzzy) WebLogic built some custom
> socket-handling code (native C-language stuff), to use in their server,
> and, apparantly, they didn't do a good job of freeing them up.  I find
> it odd that they don't show up under netstat -a, but the fact of the
> matter is that the server is the only animal in the zoo that will open
> that port :-)
>
> You asked for an idea:
>
> - complain *loudly* to your server vendor!  (file a bug if there
> isn't one outstanding)
> - find other people having this problem
> - organize and lobby to have it fixed
>
> ... that's my idea.
>
> Nekkalapudi, Viplava wrote:
>
> >I already posted this some time back about the problem of server port
> >already in use.
> >We couldn't get away from this problem so we still use STRUTS 1.0.2 for
our
> >application.
> >
> >We seen that by just modifying the DTD reference from STRUTS 1.0 to
STRUTS
> >1.1 in the struts-config.xml, resulting the port bind error (at the end
of
> >this mail).
> >We use Struts 1.0.2 with Weblogic Server 6.1 SP2.
> >
> >I wonder how Struts 1.1 DTD related with the Weblogic port bind error?
> >
> >If any one want to see this error with their application uses STRTUS
1.0.2,
> >Just modify the DTD reference in the struts-config.xml to STRUTS 1.1 DTD.
> >Start weblogic server, shutdown and restart the server again.
> >(The server binds the port correctly for the first time).
> >
> > Any Ideas???
> >
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Adding a parameter to a URL

2002-11-05 Thread Jim Collins
Hi,

I have a JSP called upload.jsp with a form and file tag like this:


Please Input The File You Wish to Upload:
  
  


The page that calls upload.jsp also passes a parameter called objID, I would
like to add this parameter to the action URL but I don't know how to.

I did try using a normal html form tag and jstl to add the paramerer like
this:





>



This sets the correct action url in the generated html but I get a bean
utils exception when I press the submit button.

Any help would be appreciated.

Thanks

Jim.

PS I don't want to use a scriptlet if I can help it. I have seen previous
postings from Craig where he advises against using scriptlets.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Passing an (Dyna)ActionForm to the business object

2002-11-05 Thread Kris Schneider
+1

Although it may seem like splitting hairs because (in your case) the same 
object instance is passed to the doBusiness method, there's a huge 
architectural/design difference between:

public class myModel {
  public void doBusiness(DynaActionForm data) {
  ...
  }
}

and:

public class myModel {
  public void doBusiness(DynaBean data) {
  ...
  }
}

I suppose another possibility would be to use BeanUtils.describe or 
PropertyUtils.describe (not sure which is preferred) to generate a Map to pass 
to the doBusiness method. Either describe method can deal with a DynaBean.

Quoting Robert Taylor <[EMAIL PROTECTED]>:

> I would say you wouldn't necessarily violate MVC if you pass the
> DynaActionForm as a DynaBean into your model. Your model doesn't need
> an "Form" functionality, it only needs to access the data which is
> supported
> by the DynaBean contract. DynaBean is not bound to any presentation layer
> and
> therefore does not couple your business tier to your web tier.
> 
> When passing data from my web tier to the business tier, I tend to convert
> the data contained in the form into data structures native to the business
> tier;
> Data Transport Objects (DTO) sometimes refered to as ValueObjects. I then
> pass
> around these DTOs.
> 
> There has been plenty of discussion on this list and depending on which
> engineer
> you speak with you may get a different answer. For more information on
> this,
> search
> the archives.
> 
> HTH,
> 
> robert
> 
> > -Original Message-
> > From: Vincent Stoessel [mailto:vincent@;xaymaca.com]
> > Sent: Tuesday, November 05, 2002 2:34 PM
> > To: Struts Users
> > Subject: Passing an (Dyna)ActionForm to the business object
> >
> >
> > I know I have probably violated MVC by doing this but
> > while trying to find an elegant solution to passing
> > field values between my Action classes and my Model Classes
> > I went ahead and passed the whole darn DyaActionForm (daf)
> > to my Model class:
> >
> > Why did I got to the dark side? It was so convenient to
> > only have to add/remove fields in one class (and in struts-config.xml).
> > I am working with a massive form that is in flux and editing 2 classes
> > all the time was slowing me down:
> >
> > // The Old way: the force
> > in myAction:
> >
> >  DynaActionForm daf  = (DynaActionForm) acForm  ;
> >  myModel mym  = new myModel();
> > String firstname = (String) daf.get("fname");
> > String lastname = (String) daf.get("lname") ;
> > String street = (String)daf.get("street") ;
> > String city = (String)daf.get("city") ;
> > String state = (String)daf.get("state") ;
> >
> > myModel.doBusiness(firstname, lastname,street,city,state);
> >
> >
> >
> >
> > then in myModel:
> >
> > PreparedStatement   pstmt  = con.prepareStatement(qstr);
> >  pstmt.setString(1,(String)daf.get("firstname"));
> >  pstmt.setString(2,(String)daf.get("lastname"));
> >  pstmt.setString(3,(String)daf.get("street"));
> >  pstmt.setString(4, (String)daf.get("city"));
> >  pstmt.setString(5, (String)daf.get("state"));
> >
> >
> >
> > // the New Way: the dark side
> >
> > now I can just do:
> >
> > myModel mym  = new myModel();
> > myModel.doBusiness(daf);
> >
> >
> > Yes, in myModel class  I still have to break out daf.getXXX but at least
> > now all thefields can be managed from one place and less prone to
> > mismached case/spelling (for me anyway) than it was before.
> >
> > Of course I really do not want to violate the Struts MVC model, is there
> > a better way than the first method?
> >
> > Thanks All
> >
> >
> > --
> > Vincent Stoessel
> > Linux Systems Developer
> > vincent xaymaca.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


-- 
Kris Schneider 
D.O.Tech   

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Dates & validation

2002-11-05 Thread Wendy Smoak
> One vote for three pre-populated boxes. Saves on validation that way :)
> Brian

And if I make them read-only, that would really fix it!  ;) I think the
three-boxes approach comes with its own problems... I did it for a "time"
field, but there, the choices are fixed.  If I wanted drop-downs for a date
then I'd have to figure out what days are valid.  Blech.  Besides, the users
will complain.  They're used to typing in partial dates and having the
[telnet] app magically figure out what they meant.

I'm currently dissecting the struts-validator example, and my first concern
is that all of the actions have validate="true" in struts-config.xml.  I
don't think I can do that.  The user may go off to a resolution page and
come back before the form needs to be validated.

Without validate="true" in the  tag in struts-config, is the
Validator Plugin even going to work?  Is there a way to manually validate?
In my case, I have a LookupDispatchAction, and I only want to validate at
the last minute-- the user has pressed the 'Finish' button and the 'action'
request parameter has caused the 'saveContact()' method in my
LookupDispatchAction to be called.

Is it as simple as manually calling validate() and placing the ActionErrors
object into request scope with the appropriate name, which I think is
'org.apache.struts.action.ERROR'?  I know someone explained this to me a
week or so ago, but apparently it didn't stick.  Brain overload.

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




Re: Dynamic select menu in JSP

2002-11-05 Thread John Owen
When you put "html:option" in the search box it doesn't work. At least, it
never has for me. The ':' screws it up and searching on "option" or "html
option" is not viable. I'm going to reiterate that if the Struts docs had
good examples of implementation, a lot of repetitive questions could be
avoided. I would gladly update the documentation if I had the time.

John
- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 4:59 PM
Subject: Re: Dynamic select menu in JSP


> That's a very valid point.  Did you, in the course of asking to be put
> on the list, actually read:
>
> http://www.tuxedo.org/~esr/faqs/smart-questions.html
>
> ... or just look for the link that said "sign me up!" ? :-)  Not trying
> to be difficult - I'm just honestly curious ;-)  I would be willing to
> wager (and I'm not a betting man) that if you searched for html:option
> you'd find several suggestions to "use html:options instead" - and some
> of even those likely have explicit details as well :-)
>
> I'm not in the habit of holding grudges, so don't feel *too bad*.
>  You're far from the first to ask a repetitive question, and I doubt
> you'll be the last.  It would be nice if folks exercised their
> STFW-related brain cells though :-)
>
> (Sorry - not trying to single you out - this particular question is
> occassionally asked and answered as many as three times in a single day
> though - I can't remember the last week that passed without at least a
> single query on it.)
>
> Peace ;-)
>
> Mark Ayad wrote:
>
> >**gasp**
> >
> >Sure, but its knowing the right question to ask first .
> >
>
> --
> Eddie Bush
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??????????

2002-11-05 Thread Nekkalapudi, Viplava
Thanks Eddie for your Ideas.
We also think it is a weblogic BUG contacted our server vendor and reported
about it.

But how Struts 1.0.2 making WEBLOGIC BUG hiding behind it. And how the BUG
reappears even with STRUTS 1.0.2 when we just change our DTD reference to
STRUTS 1.1.

We are not running Weblogic as a service.

We even heard that weblogic uses its own Socket Handling to support JDK
1.4.1 for future(Weblogic 6.1/7.0 not yet officially support) and they added
some changes to the servlet implementation in 6.1. But how Struts 1.0.2
helping Weblogic 6.1 SP2 to free up the port?
Is STRUTS 1.1 Action Servlet depends on the servlet container for any of
these?

We were thinking it might be some thing related with the Action Servlet in
Destroying the applications cleanly. Because it should destroy all the Plug
Ins also. 

Thanks,
Vip.  

-Original Message-
From: Eddie Bush [mailto:ekbush@;swbell.net]
Sent: Tuesday, November 05, 2002 4:40 PM
To: Struts Users Mailing List
Subject: Re: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??


I believe it's inconceivable that this is a Struts issue.  Struts isn't 
causing any ports to be open - it just runs in your web container.  I 
have heard that running WebLogic as a service can cause this behavior 
though.  The suggestion I hear was "When the install asks if you'd like 
the server to run as a service - just say NO!"

It *is* a WebLogic bug :-)  I guarantee you.

As I recall (and my memory is fuzzy) WebLogic built some custom 
socket-handling code (native C-language stuff), to use in their server, 
and, apparantly, they didn't do a good job of freeing them up.  I find 
it odd that they don't show up under netstat -a, but the fact of the 
matter is that the server is the only animal in the zoo that will open 
that port :-)

You asked for an idea:

- complain *loudly* to your server vendor!  (file a bug if there 
isn't one outstanding)
- find other people having this problem
- organize and lobby to have it fixed

... that's my idea.

Nekkalapudi, Viplava wrote:

>I already posted this some time back about the problem of server port
>already in use.
>We couldn't get away from this problem so we still use STRUTS 1.0.2 for our
>application.
>
>We seen that by just modifying the DTD reference from STRUTS 1.0 to STRUTS
>1.1 in the struts-config.xml, resulting the port bind error (at the end of
>this mail).
>We use Struts 1.0.2 with Weblogic Server 6.1 SP2.
>
>I wonder how Struts 1.1 DTD related with the Weblogic port bind error?
>
>If any one want to see this error with their application uses STRTUS 1.0.2,

>Just modify the DTD reference in the struts-config.xml to STRUTS 1.1 DTD.
>Start weblogic server, shutdown and restart the server again.
>(The server binds the port correctly for the first time).
>
> Any Ideas???
>
-- 
Eddie Bush




--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Missing Struts Form attributes in Action class

2002-11-05 Thread Tuan H. Le
Edgar,

Thanks for your response! I commented out the code in reset() method, but still get 
null data in the Action class for action and view attributes. 

  public void reset( ActionMapping mapping,
 HttpServletRequest request ) {
//action = null;
//view = null;
  }

Please advise.

Thanks,
Tuan

-Original Message-
From: edgar [mailto:edgar@;blue-moose.net]
Sent: Tuesday, November 05, 2002 1:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Missing Struts Form attributes in Action class


Reset and validate are run after every html submit and before the action
class takes over.

-Original Message-
From: Tuan H. Le [mailto:tuan.le@;phsadc.com] 
Sent: Tuesday, November 05, 2002 4:30 PM
To: 'Struts Users Mailing List (E-mail)'
Subject: Missing Struts Form attributes in Action class


Hi, 

Do you know of the reason why in my case the form data in Struts Form
class does not get passed to the Action class? When the user clicks on a
Submit button, I need to set the value in the action and view hidden
fields, and submit that HTML form to a Struts Action class. But for some
reasons, when I retrieve the data from the Struts Form, it returned
null. 

Below is my code and Struts config file for that form. 

Thanks!
Tuan

 struts-config.xml -








 Form class -

public final class ApproveSubmitForm extends ActionForm
 implements IConstants {
  /**
   * User's selected view
   */
  private String view;
  /**
   * submit action
   */
  private String action;

  public void setView( String aView ) {
this.view = aView;
  }

  public String getView() {
return this.view;
  }

  public void setAction( String anAction ) {
this.action = anAction;
  }

  public String getAction() {
return this.action;
  }

  public void reset( ActionMapping mapping,
 HttpServletRequest request ) {
action = null;
view = null;
  }

  public ActionErrors validate( ActionMapping mapping,
HttpServletRequest request ) {
ActionErrors errors = new ActionErrors();

return errors;
  }
}

- Action class  ---

public final class ApproveSubmitAction extends Action
   implements IConstants {
  public ActionForward perform( ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response )
throws IOException, ServletException {

///
// ... other code logic
//

// get the form handler
ApproveSubmitForm approveSubmitForm = (ApproveSubmitForm)form;

// PROBLEM: both of these variables returned null
String selectedView = approveSubmitForm.getView();
String selectedAction = approveSubmitForm.getAction();

// Forward to the appropriate View
return ( mapping.findForward( target ) );
  }
}



- JSP (View) --



  function saveApproveReject( theForm ) {
 theForm.view.value =
theForm.view.options[theForm.view.selectedIndex].value;
 theForm.action.value = 'submit';
 theForm.submit();
  }










--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dynamic select menu in JSP

2002-11-05 Thread Eddie Bush
That's a very valid point.  Did you, in the course of asking to be put 
on the list, actually read:

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

... or just look for the link that said "sign me up!" ? :-)  Not trying 
to be difficult - I'm just honestly curious ;-)  I would be willing to 
wager (and I'm not a betting man) that if you searched for html:option 
you'd find several suggestions to "use html:options instead" - and some 
of even those likely have explicit details as well :-)

I'm not in the habit of holding grudges, so don't feel *too bad*. 
You're far from the first to ask a repetitive question, and I doubt 
you'll be the last.  It would be nice if folks exercised their 
STFW-related brain cells though :-)

(Sorry - not trying to single you out - this particular question is 
occassionally asked and answered as many as three times in a single day 
though - I can't remember the last week that passed without at least a 
single query on it.)

Peace ;-)

Mark Ayad wrote:

**gasp**

Sure, but its knowing the right question to ask first .



--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How do I search this newsgroup with google.

2002-11-05 Thread Eddie Bush
Oh, slick!  I didn't know that!  Thanks for the heads-up!

Kris Schneider wrote:


You can also restrict the domain(s) that Google uses, so you can search the 
*sites* that host the mail archives. Something like:

html:options site:www.mail-archive.com

or

html:options [EMAIL PROTECTED] site:www.mail-archive.com


--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Sub-Apps] HOW-TO Get from Default to Sub-app and Back

2002-11-05 Thread Eddie Bush
Read the User Guide online - specifically the area about building the 
controller-oriented components.  If you have already done that then say 
so.  It's not rocket science.  If what is provided in the User Guide 
isn't sufficient then perhaps we should take a look at building a 
struts-module.war for people to tear apart.

Jerry Jalenak wrote:

I'm looking into splitting my web application into pieces based on business
unit.  I've read everything I can find in the mail archives and on the
Struts home page, and think I understand most of it.  I've got a second
struts-config init parm pointing to my new sub-app, and I've got my sub-app
set up as a 'normal' struts-config.  What I am having trouble figuring out
is how to get from my main app to my sub-app, and back.  I think I should
either be using ForwardAction or SwitchAction, but can't figure out the
config parms well enough to use either one.  Can someone please post a
working sub-app example?

TIA!

Jerry Jalenak
Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496
[EMAIL PROTECTED]



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??????????

2002-11-05 Thread Eddie Bush
I believe it's inconceivable that this is a Struts issue.  Struts isn't 
causing any ports to be open - it just runs in your web container.  I 
have heard that running WebLogic as a service can cause this behavior 
though.  The suggestion I hear was "When the install asks if you'd like 
the server to run as a service - just say NO!"

It *is* a WebLogic bug :-)  I guarantee you.

As I recall (and my memory is fuzzy) WebLogic built some custom 
socket-handling code (native C-language stuff), to use in their server, 
and, apparantly, they didn't do a good job of freeing them up.  I find 
it odd that they don't show up under netstat -a, but the fact of the 
matter is that the server is the only animal in the zoo that will open 
that port :-)

You asked for an idea:

   - complain *loudly* to your server vendor!  (file a bug if there 
isn't one outstanding)
   - find other people having this problem
   - organize and lobby to have it fixed

... that's my idea.

Nekkalapudi, Viplava wrote:

I already posted this some time back about the problem of server port
already in use.
We couldn't get away from this problem so we still use STRUTS 1.0.2 for our
application.

We seen that by just modifying the DTD reference from STRUTS 1.0 to STRUTS
1.1 in the struts-config.xml, resulting the port bind error (at the end of
this mail).
We use Struts 1.0.2 with Weblogic Server 6.1 SP2.

I wonder how Struts 1.1 DTD related with the Weblogic port bind error?

If any one want to see this error with their application uses STRTUS 1.0.2, 
Just modify the DTD reference in the struts-config.xml to STRUTS 1.1 DTD.
Start weblogic server, shutdown and restart the server again.
(The server binds the port correctly for the first time).

Any Ideas???

--
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Extending the struts config

2002-11-05 Thread Michael Delamere
Hi,

wow - that´s just the kind of answer I was looking for!  I´ve been long
enough in this list to know who to ask if I want a long and thorough answer
;-) !!  Thanks very much!

Ok, so obviously I didn´t remember every detail, but I knew it was something
along those lines.

I think that your approach is a good one and I will certainly have a go at
it!  My requirements are infact also pretty view-centric so I think the
plugin idea is quite sufficient.

> commons-digester is supercalafragilisticexpealedociously cool.

Ok sounds good to me ;-) !  I will certainly give it a go.  Now if there
is one thing I have learnt, then it is this:  It´s just a matter of getting
your head down and learning the stuff!  I don´t believe in something being
too hard (in terms of programming anyway :-) ), it´s just a question of
wether it makes sense or not.  I remembered that you had mentioned doing
something similar and was hoping that you would share your experience - so,
thanks for that!

>  I can't imagine a simpler approach to making your
> configuration declarative (versus programatic - ack - do you really want
> to change code to change your config?  Not me!)

Couldn´t agree with you more!

> Look at the PlugIn implementations available in Struts and
> then if you still have questions I can shoot you a skelleton.

I´ll take your word for it :-) ...

Regards,

Michael


- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 10:37 PM
Subject: Re: Extending the struts config


> Michael Delamere wrote:
>
> >Eddie,
> >
> >you said once (if I remeber correctly), that you extended the
> >struts-config.xml to accommodate your own configuration settings.
> >
> Incorrect.  I used a seperate XML config and used digester to
> parse/instantiate things.
>
> >I would appreciate it if you took a minute or two in answering my
> >questions :-) :
> >
> >Did this involve a lot of overhead?
> >
> org.apache.commons.digester - see that package description.  It's *cake*!
>
> >Are you having to change the dtd? - which would require you to update
> >every time you installed a new struts-version.
> >
> Nope.  ... and that's why I tacked mine on instead of making it core.
>  Remember, I'm "XML- and DTD-stupid (TM)".
>
> >Is there an easy way to retrieve the values from you action?
> >
> Well, assuming you poke whatever you create into some reasonable scope
> (application!), and utilizing some reasonable scheme (so different
> modules don't trample each other), you have access to it wherever you
like.
>
> >I would be equally happy if you directed me to a good documentation that
> >might be of some help.
> >
> See org.apache.struts.action.PlugIn for how you'll do your
> initialization.  There are several digester examples in the Struts
> code-base.  Look at the PlugIn implementations available in Struts and
> then if you still have questions I can shoot you a skelleton.  In fact,
> I think I posted one to the list some time back.  I've been intending to
> add an example to the User Guide too - will try to do that sometime soon.
>
> >Thanks in advance,
> >
> >Regards,
> >
> >Michael
> >
> Anytime ;-)
>
> commons-digester is supercalafragilisticexpealedociously cool.  If
> you're looking at adding some custom "thing" to Struts, I highly
> recommend it.  I can't imagine a simpler approach to making your
> configuration declarative (versus programatic - ack - do you really want
> to change code to change your config?  Not me!)  The rules you setup can
> be a bit difficult to understand at first, but, with some requisite
> amount of tinkering (doesn't take a lot) you'll figure it out fast.  If
> you do hit problems just yell.
>
> Game Plan:
>
> 1 - Conceive an XML representation of the structure you wish to create
> (structure = composition of objects - ApplicationConfig contains
> ActionConfig etc).
> 2 - Generate a set of rules for digester that will do what you want with
> the structure you've conceived.
> 3 - Write an implementation of the o.a.s.a.PlugIn interface that will
> actually load things and put them into scope.
> 4 - Include your PlugIn implementation in your struts-config.xml
> 5 - Sit back and radiate pride for having built an add-on component that
> can be included in each module.
>
> Notes:
> - *could* take one config file for the entire application
> - *should* (probably) allow one config file per module (using a
> scheme akin to what Struts does - or something else that guarantees
> uniqueness)
> - There's really no rule here - do what makes sense for *your*
> application
>
> My approach was to just programatically setup the rules in the PlugIn by
> calling various digester.addXXX methods (you'll see).  You can also use
> plugable rulesets.  For what I'm doing I just didn't see the advantage.
>  My stuff was pretty view-centric (and Struts-centric, at that), so I
> don't really envision it ever being useful outside of S

RE: Missing Struts Form attributes in Action class

2002-11-05 Thread edgar
Reset and validate are run after every html submit and before the action
class takes over.

-Original Message-
From: Tuan H. Le [mailto:tuan.le@;phsadc.com] 
Sent: Tuesday, November 05, 2002 4:30 PM
To: 'Struts Users Mailing List (E-mail)'
Subject: Missing Struts Form attributes in Action class


Hi, 

Do you know of the reason why in my case the form data in Struts Form
class does not get passed to the Action class? When the user clicks on a
Submit button, I need to set the value in the action and view hidden
fields, and submit that HTML form to a Struts Action class. But for some
reasons, when I retrieve the data from the Struts Form, it returned
null. 

Below is my code and Struts config file for that form. 

Thanks!
Tuan

 struts-config.xml -








 Form class -

public final class ApproveSubmitForm extends ActionForm
 implements IConstants {
  /**
   * User's selected view
   */
  private String view;
  /**
   * submit action
   */
  private String action;

  public void setView( String aView ) {
this.view = aView;
  }

  public String getView() {
return this.view;
  }

  public void setAction( String anAction ) {
this.action = anAction;
  }

  public String getAction() {
return this.action;
  }

  public void reset( ActionMapping mapping,
 HttpServletRequest request ) {
action = null;
view = null;
  }

  public ActionErrors validate( ActionMapping mapping,
HttpServletRequest request ) {
ActionErrors errors = new ActionErrors();

return errors;
  }
}

- Action class  ---

public final class ApproveSubmitAction extends Action
   implements IConstants {
  public ActionForward perform( ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response )
throws IOException, ServletException {

///
// ... other code logic
//

// get the form handler
ApproveSubmitForm approveSubmitForm = (ApproveSubmitForm)form;

// PROBLEM: both of these variables returned null
String selectedView = approveSubmitForm.getView();
String selectedAction = approveSubmitForm.getAction();

// Forward to the appropriate View
return ( mapping.findForward( target ) );
  }
}



- JSP (View) --



  function saveApproveReject( theForm ) {
 theForm.view.value =
theForm.view.options[theForm.view.selectedIndex].value;
 theForm.action.value = 'submit';
 theForm.submit();
  }










--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts 1.1b2 for WLS 5.1 SP11 does not seem to find any classes inside thestruts-example war file.

2002-11-05 Thread David_Boatwright
We are having problems using the struts-example for Struts 1.1b2 on
Weblogic 5.1 SP 11.   During war deployment we get ClassNotFound exceptions
on various classes.  The only way I have been able to get the example
working is to pull all of the jars under WEB-INF\lib and all the classes
under WEB-INF\classes out of the struts-example war file and include them
in my weblogic classpath directly.

Note: I did as the Weblogic 5.1 install notes asked and put the
ApplicationResources.properties) where it should go for a Weblogic 5.1
installation.  I don't believe this is my issue.

At first I got ClassNotFound exceptions on
org.apache.struts.util.PropertyMessageResourcesFactory.After adding
struts.jar to the server-wide weblogic classpath I got
ClassNotFoundExceptions for classes in the common-* jar files.  After doing
the same for the commons jars I got ClassNotFound exceptions for the struts
specific jars under WEB-INF\classes so I extracted these to a directory and
put that in my classpath as well.

Struts 1.0.2 worked fine out of the box for us.

My questions:

1) Is there any way to get the example working in a war format without
pulling out every class and jar and putting it in my server's classpath?  I
don't really like the workaround I discovered.

2) What changed in struts 1.1b2 that caused the example to break?

3) Is this a bug in struts?  If so, is it expected to be fixed in the
release version of 1.1?

Thanks in advance for the help!

- David Boatwright ([EMAIL PROTECTED])


Detailed example of the type of exceptions I get during server startup when
the struts-example is deployed.

Tue Nov 05 15:45:46 EST 2002: 
action: init
java.lang.ClassNotFoundException:
org.apache.struts.util.PropertyMessageResourcesFactory
at
weblogic.boot.ServerClassLoader.findLocalClass(ServerClassLoader.java:372)
at
weblogic.boot.ServerClassLoader.loadClass(ServerClassLoader.java:112)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:193)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:169)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:557)
at
org.apache.struts.util.RequestUtils.(RequestUtils.java:140)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:169)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:557)
at
org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1153)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:449)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:499)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:453)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:442)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:361)
at
weblogic.servlet.internal.ServletContextImpl.preloadServlet(ServletContextImpl.java:748)
at
weblogic.servlet.internal.ServletContextImpl.preloadServlets(ServletContextImpl.java:722)
at
weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java:669)
at weblogic.t3.srvr.HttpServer.start(HttpServer.java:467)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1395)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:869)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:140)
at weblogic.Server.main(Server.java:97)
at weblogic.Server.main(Server.java:58)
[ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory

java.lang.ExceptionInInitializerError: java.lang.NullPointerException
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:558)
at
org.apache.struts.util.RequestUtils.(RequestUtils.java:140)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:169)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:557)
at
org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1153)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:449)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:499)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:453)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:442)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:361)
at
weblogic.se

Struts 1.0.2, Nested 1.0 and Standard Tags 1.0.2

2002-11-05 Thread Edgar Dollin
Has anyone gotten JSTL  to work with  Struts .
 
I get a null pointer exception in NestedPropertyHelper line 174.
 
Thanks
 
Edgar P. Dollin
Blue Moose Software, LLC
P/O Box 3865
Union, NJ  07083
908-688-0823
Fax 908-688-0671
[EMAIL PROTECTED]  
http://www.blue-moose.net



Re: Continuous datastream from server to client

2002-11-05 Thread Eddie Bush
If you're using OJB, you have access to the Query interface.  That 
particular interface is *very* useful.  You can specify a beginning 
index and an ending index.  With minimal coding on your part, it's 
super-simple to have something that will do pagination.  I went so far 
as to give my DAOs which may return collections another method with a 
signature that allows me to specify a page number and a page size - have 
that method determine the start/end index (very simple logic - 
encapsulate it somewhere [like your base DAO] and just invoke it), 
execute the query, and return me the collection.  Very easy to do.

- search ojb-user
- examine the Query interface (org.apache.ojb.broker.query package, if 
memory serves).

I still say generate it as a CSV download.  I can't imagine why you 
couldn't generate the CSV dynamically.  I know I don't determine a 
content-length for dynamic pages I build.  You will need to set the 
content-type though (text/??? - no clue what the mime type for CSV is). 
Plus, generating large dynamic tables can be ... problematic.

Reinhard Dunst wrote:

Hi, thanks for answer.
I'm using OJB for database access but for the moment without proxy.
I think the user is responsible to print only lists of acceptable lenght.
But if he
wants to print a long list he should do, across ?? pages and not page by
page.
When I saw, that I could run into memory problems, my next idea was to use
the PrintWriter from HttpServletResponse, create html code and flush every
10th row.
But I never tried it. An other Idea is to create a PDF File in the
background. During creation I render a pagecounter on a seperate page and
when finished I create a link on output page, but thats my last option.

So you think, there is no way to send data with undefined length from server
to the client?

Reinhard



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Missing Struts Form attributes in Action class

2002-11-05 Thread Tuan H. Le
Hi, 

Do you know of the reason why in my case the form data in Struts Form class does not 
get passed to the Action class? When the user clicks on a Submit button, I need to set 
the value in the action and view hidden fields, and submit that HTML form to a Struts 
Action class. But for some reasons, when I retrieve the data from the Struts Form, it 
returned null. 

Below is my code and Struts config file for that form. 

Thanks!
Tuan

 struts-config.xml -








 Form class -

public final class ApproveSubmitForm extends ActionForm
 implements IConstants {
  /**
   * User's selected view
   */
  private String view;
  /**
   * submit action
   */
  private String action;

  public void setView( String aView ) {
this.view = aView;
  }

  public String getView() {
return this.view;
  }

  public void setAction( String anAction ) {
this.action = anAction;
  }

  public String getAction() {
return this.action;
  }

  public void reset( ActionMapping mapping,
 HttpServletRequest request ) {
action = null;
view = null;
  }

  public ActionErrors validate( ActionMapping mapping,
HttpServletRequest request ) {
ActionErrors errors = new ActionErrors();

return errors;
  }
}

- Action class  ---

public final class ApproveSubmitAction extends Action
   implements IConstants {
  public ActionForward perform( ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response )
throws IOException, ServletException {

///
// ... other code logic
//

// get the form handler
ApproveSubmitForm approveSubmitForm = (ApproveSubmitForm)form;

// PROBLEM: both of these variables returned null
String selectedView = approveSubmitForm.getView();
String selectedAction = approveSubmitForm.getAction();

// Forward to the appropriate View
return ( mapping.findForward( target ) );
  }
}



- JSP (View) --



  function saveApproveReject( theForm ) {
 theForm.view.value = theForm.view.options[theForm.view.selectedIndex].value;
 theForm.action.value = 'submit';
 theForm.submit();
  }








<>--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: Previous Action

2002-11-05 Thread edgar
Make multiple entries in the struts-config for the actions with a single
form spec. 

-Original Message-
From: Darren Hill [mailto:dhill@;724.com] 
Sent: Tuesday, November 05, 2002 2:18 PM
To: 'Struts Users Mailing List'
Subject: Previous Action


I have an action which needs to know which action called it.

More background ... its a deleteAction that, if called from a list, go
back to that list, if called from a view, go to welcome page, etc

1)  Can I discover which action was call, from within an action?
2)  Is there a better way to do this?

Darren.

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




struts-config_1_1.dtd and struts-config_1_0.dtd

2002-11-05 Thread Nekkalapudi, Viplava
Why is  is missing from
struts-config_1_1.dtd?
Is it by mistake OR is there any purpose?
I see it in the file struts-config_1_0.dtd.
I checked these files at   http://jakarta.apache.org/struts/dtds/.

--- Vip.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[Announce] Struts Article on theServerSide.com

2002-11-05 Thread Nadir Gulzar
An article on Struts has been published on www.theServerSide.com. This
article titled 'Fast Track to Struts: What it Does and How' is primarily
written to assist new users get quickly familiar with Struts. It is
complementary to the information already available at
http://jakarta.apache.org/struts/userGuide/index.html. I am hoping that this
article will complement the efforts of the people already evangelizing
Struts adoption.

The introduction to the article is reproduced below.

Introduction

The objective of this article is to introduce prospective Struts users to
the key benefits of using Struts, and at the same time illustrate its
configuration and usage semantics. We will define the requirements of a
robust presentation framework and simultaneously discuss how these
requirements are implemented in the Struts framework. We will also explore
the design patterns implemented by Struts, the semantics of the controller,
and the semantics of the associated helper components; this knowledge will
be useful when designing components that will interact with the framework,
and when there is a need for extending the framework for accommodating
special needs of a project. This article complements the information
available at http://jakarta.apache.org/struts.

Nadir Gulzar.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tiles overloading problem/question

2002-11-05 Thread Zsolt Koppany

when I try the example below I get the error:

ERROR commons.digester.Digester - Parse Error at line 114 column -1: 
Element "put" does not allow "put" -- (#PCDATA)
org.xml.sax.SAXParseException: Element "put" does not allow "put" -- (#PCDATA)

EXAMPLE:


   

   
   



On Tuesday 05 November 2002 18:08, Dennis Muhlestein wrote:
> Yes, we use 1.1b2 and it works just fine.
> You may need
>type="definintion">
>
> note the type... but I saw someone say that it worked without it before.
> -Dennis
>
> On Tue, 2002-11-05 at 09:38, Zsolt Koppany wrote:
> > Hi tiles users,
> >
> > is it possible to bring the two definitions into one? I just want to
> > define (overload) the variable "selected" that is needed by renderer of
> > "cb.project.toolbar".
> >
> >  > extends="cb.project.toolbar"> 
> > 
> >
> > 
> > 
> >  
> >  
> >
> >
> > --
> > To unsubscribe, e-mail:  
> >  For additional
> > commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??????????

2002-11-05 Thread Nekkalapudi, Viplava
I already posted this some time back about the problem of server port
already in use.
We couldn't get away from this problem so we still use STRUTS 1.0.2 for our
application.

We seen that by just modifying the DTD reference from STRUTS 1.0 to STRUTS
1.1 in the struts-config.xml, resulting the port bind error (at the end of
this mail).
We use Struts 1.0.2 with Weblogic Server 6.1 SP2.

I wonder how Struts 1.1 DTD related with the Weblogic port bind error?

If any one want to see this error with their application uses STRTUS 1.0.2, 
Just modify the DTD reference in the struts-config.xml to STRUTS 1.1 DTD.
Start weblogic server, shutdown and restart the server again.
(The server binds the port correctly for the first time).

 Any Ideas???


[java]   
>  Address in use: JVM_Bind Perhaps another process is usi ng port 51300.>
> 
>   [java]   
>  probably restart it.> 
>   [java] shutdown has been requested by system> 
>   [java] shutdown sequence has been initiated.> 


--- Viplava.

-Original Message-
From: [EMAIL PROTECTED] [mailto:s.frank@;vierundsechzig.de]
Sent: Tuesday, October 15, 2002 11:19 AM
To: Nekkalapudi, Viplava
Subject: AW: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??


neither nor, i suppose: we are using the same combination and it works
fine.  Do you have some startup-logs, that show exactly where weblogic
stops?! You're sure this is not some other stuff that prevents wls from
booting?! 

greetings 
stf
 --- Ursprüngliche Nachricht --- 
Datum: 15.10.2002 18:13
Von: "Nekkalapudi, Viplava" <[EMAIL PROTECTED]>
An: Struts Users Mailing List <[EMAIL PROTECTED]>
Betreff: Struts1.1 B2 BUG OR Weblogic 6.1 SP2 BUG??
 
>   
>   We are trying to update a web application based on
Struts1.0.2
to
> Struts 1.1 B2. We use Weblogic 6.1 SP2 on Win 2000.
>   It used to work fine with Struts 1.0.2 and with Struts 1.1
B2,
> weblogic server fails to start properly using the port and shut down
> initialized automatically (Complaining port is already used). It works
some
> times if we reboot our machines OR wait 5/10 minutes before restart the
App
> server. By issuing the command "netstat -a", the port doesn't show up. 
> 
>   Any one has an idea what will be the problem? It happened only when
> we migrate to Struts1.1 from Struts 1.0.2. Is it a bug of Struts 1.1 OR
> Weblogic 6.1?
> 
> Thanks in advance.
> 
>   [java]   
>  Address in use: JVM_Bind Perhaps another process is usi ng port 51300.>
> 
>   [java]   
>  probably restart it.> 
>   [java] shutdown has been requested by system> 
>   [java] shutdown sequence has been initiated.> 
> 
> 
> -- Vip.
> 
> --
> To unsubscribe, e-mail:  

> For additional commands, e-mail:

> 
>
 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Dates & validation

2002-11-05 Thread Brian Hickey
Wendy

One vote for three pre-populated boxes. Saves on validation that way :)

Brian

- Original Message -
From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 3:18 PM
Subject: Dates & validation


>
> Do most people allow users to type in a complete free-form text date?  Or
do
> you give them three boxes where they must put in month day and year
> separately?
>
> I'm trying to come to terms with validation.  I can't turn on the
automatic
> validation  because the users are allowed to
> leave the form before it's complete and come back to it.  Will I still be
> able to use the plug-in Validator?  (All the actions in the
struts-validator
> example have 'validate' this turned on. :(
>
> I have the DAO layer that takes an internal format date (# of days since
> 1960-something) to my Value Object which now has a java.sql.Date:
> contactVO.setActualDate( java.sql.Date.valueOf( uSession.oconv(
> udArray.extract( 16 ), "D4-YMD" ).toString() ) );
>
> But here's where I get lost.  In order to copy the properties back and
forth
> from Value Object to ActionForm, the types have to match.  (Don't they?)
But
> if I put a java.sql.Date into my ActionForm, then it will blow up when the
> user types 7/13/1985 rather than 1985-07-13 and submits the form.
>
> So, I need a String property in the ActionForm, and ... some special
> something that turns it into a java.sql.Date but will not blow up if the
> input is wrong?
>
> I'm going in circles.  Any advice is appreciated!  (Should I not be using
> java.sql.date?)  I did search for 'struts date validation' with Google,
but
> didn't find an answer.
>
> --
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Previous Action

2002-11-05 Thread Eddie Bush
Ok - here's a dead-simple approach:

   - your form has a field indicating which action you're going through 
(list / detail)
   - your form has a hidden field which carries this value to ...
   - your delete action which has a forward for each possible value and 
uses the value of the parameter to lookup the forward it returns.

Is that too simplistic?

Darren Hill wrote:

I have an action which needs to know which action called it.

More background ... its a deleteAction that, if called from a list, go back
to that list, if called from a view, go to welcome page, etc

1)  Can I discover which action was call, from within an action?
2)  Is there a better way to do this?

Darren.



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Final release for Struts 1.1

2002-11-05 Thread Eddie Bush
Answer (not being facetious in the slightest):  When all the bugs are 
resolved.

Xuefeng Wang wrote:

Hi, all,
I'm using Struts 1.1B1 to develop our product, I want to know when 
Struts 1.1 final will be release.

thanks,

James 


--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Extending the struts config

2002-11-05 Thread Eddie Bush
Michael Delamere wrote:


Eddie,

you said once (if I remeber correctly), that you extended the
struts-config.xml to accommodate your own configuration settings.  

Incorrect.  I used a seperate XML config and used digester to 
parse/instantiate things.

I would appreciate it if you took a minute or two in answering my
questions :-) :

Did this involve a lot of overhead?  

org.apache.commons.digester - see that package description.  It's *cake*!


Are you having to change the dtd? - which would require you to update
every time you installed a new struts-version.


Nope.  ... and that's why I tacked mine on instead of making it core. 
Remember, I'm "XML- and DTD-stupid (TM)".

Is there an easy way to retrieve the values from you action?


Well, assuming you poke whatever you create into some reasonable scope 
(application!), and utilizing some reasonable scheme (so different 
modules don't trample each other), you have access to it wherever you like.

I would be equally happy if you directed me to a good documentation that
might be of some help.


See org.apache.struts.action.PlugIn for how you'll do your 
initialization.  There are several digester examples in the Struts 
code-base.  Look at the PlugIn implementations available in Struts and 
then if you still have questions I can shoot you a skelleton.  In fact, 
I think I posted one to the list some time back.  I've been intending to 
add an example to the User Guide too - will try to do that sometime soon.

Thanks in advance,

Regards,

Michael


Anytime ;-)

commons-digester is supercalafragilisticexpealedociously cool.  If 
you're looking at adding some custom "thing" to Struts, I highly 
recommend it.  I can't imagine a simpler approach to making your 
configuration declarative (versus programatic - ack - do you really want 
to change code to change your config?  Not me!)  The rules you setup can 
be a bit difficult to understand at first, but, with some requisite 
amount of tinkering (doesn't take a lot) you'll figure it out fast.  If 
you do hit problems just yell.

Game Plan:

1 - Conceive an XML representation of the structure you wish to create 
(structure = composition of objects - ApplicationConfig contains 
ActionConfig etc).
2 - Generate a set of rules for digester that will do what you want with 
the structure you've conceived.
3 - Write an implementation of the o.a.s.a.PlugIn interface that will 
actually load things and put them into scope.
4 - Include your PlugIn implementation in your struts-config.xml
5 - Sit back and radiate pride for having built an add-on component that 
can be included in each module.

Notes:
   - *could* take one config file for the entire application
   - *should* (probably) allow one config file per module (using a 
scheme akin to what Struts does - or something else that guarantees 
uniqueness)
   - There's really no rule here - do what makes sense for *your* 
application

My approach was to just programatically setup the rules in the PlugIn by 
calling various digester.addXXX methods (you'll see).  You can also use 
plugable rulesets.  For what I'm doing I just didn't see the advantage. 
My stuff was pretty view-centric (and Struts-centric, at that), so I 
don't really envision it ever being useful outside of Struts - or a 
servlet container, for that matter.

If what you're doing is web-centric, but not Struts-centric, you may 
wish to use a ContextListener instead of a PlugIn implementation.  If 
what you're doing requires some information from the Struts config (as 
mine did), then you'll most certainly find a PlugIn implementation a 
cleaner solution.

I did not provide a DTD for my XML config.  You may wish to.  Digester 
supports this (though I can't speak to how easy it is to implement - my 
guess is that part is easy too).

Good Luck!  Yell back if you have problems.

--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



[Sub-Apps] HOW-TO Get from Default to Sub-app and Back

2002-11-05 Thread Jerry Jalenak
I'm looking into splitting my web application into pieces based on business
unit.  I've read everything I can find in the mail archives and on the
Struts home page, and think I understand most of it.  I've got a second
struts-config init parm pointing to my new sub-app, and I've got my sub-app
set up as a 'normal' struts-config.  What I am having trouble figuring out
is how to get from my main app to my sub-app, and back.  I think I should
either be using ForwardAction or SwitchAction, but can't figure out the
config parms well enough to use either one.  Can someone please post a
working sub-app example?

TIA!

Jerry Jalenak
Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496
[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




struts validation and DispatchAction

2002-11-05 Thread Darren Hill
So.

My DispatchAction works great .. now I want to do validation ( on the ADD
action ), but because I need to turn validation 'on', it applies to ALL my
actions with the DispatchAction.

So .. create creates a 'clean' form, which of course fails in validation.

I suppose, for the 'view' action I can re-validate the info coming from the
back-end, but that my be over-kill.

Is there a way I can ask for validation ONLY on the submission of the create
jsp?

D

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Dates & validation

2002-11-05 Thread Wendy Smoak

Do most people allow users to type in a complete free-form text date?  Or do
you give them three boxes where they must put in month day and year
separately?

I'm trying to come to terms with validation.  I can't turn on the automatic
validation  because the users are allowed to
leave the form before it's complete and come back to it.  Will I still be
able to use the plug-in Validator?  (All the actions in the struts-validator
example have 'validate' this turned on. :(

I have the DAO layer that takes an internal format date (# of days since
1960-something) to my Value Object which now has a java.sql.Date:
contactVO.setActualDate( java.sql.Date.valueOf( uSession.oconv(
udArray.extract( 16 ), "D4-YMD" ).toString() ) );

But here's where I get lost.  In order to copy the properties back and forth
from Value Object to ActionForm, the types have to match.  (Don't they?) But
if I put a java.sql.Date into my ActionForm, then it will blow up when the
user types 7/13/1985 rather than 1985-07-13 and submits the form.

So, I need a String property in the ActionForm, and ... some special
something that turns it into a java.sql.Date but will not blow up if the
input is wrong?

I'm going in circles.  Any advice is appreciated!  (Should I not be using
java.sql.date?)  I did search for 'struts date validation' with Google, but
didn't find an answer.

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



Re: Emiting JSP tag ?

2002-11-05 Thread V. Cekvenich
I see, you create a JSP file at run time.
Thanks!! I like it.

Any other Ideas?
tia,
.V

Hookom, Jacob John wrote:

Why not do a filter of some sort that catches requests?
 
Logic would follow:
boolean createJsp = false;
Select dateLastModified, destination from tbl_pages
if (!File(destination).exists())
 createJsp = true;
else if (File(destination).lastModified() < dateLastModified)
 createJsp = true;
 
if (createJsp)
{
 Select xmlContent from tbl_pages
 // do xslt transformation and save output as JSP file @ destination
}
 
RequestDispatcher (destination)
 
I did something like this previously for caching PDF/HTML transformations a while back with a filter by checking transformation dates vs. source dates.
 
Just an idea
 
Regards,
Jacob Hookom

	-Original Message- 
	From: V. Cekvenich [mailto:vicc@;users.sourceforge.net] 
	Sent: Tue 11/5/2002 1:27 PM 
	To: [EMAIL PROTECTED] 
	Cc: 
	Subject: Emiting JSP tag ?
	
	

	I have a situation where I need to create complex layouts in XML (in a
	DB) and create a JSP from them that collect input.
	
	So I want to convert XML to JSP including tags at runtime. Ex: XML has
	a certian section where I need to put in  and .
	Of course if I just emit this to a browser it won't work.  Something
	like ECS.
	
	thanks in advance for any tips, ideas, etc.
	
	.V
	
	
	
	
	--
	To unsubscribe, e-mail:   
	For additional commands, e-mail: 
	
	





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Why does the nightly build produces a huge log file during startup?

2002-11-05 Thread Eddie Bush
Is your application really large?  (Lots of actions etc?)
Do your classes print a lot of debugging output?
Have you tried configuring Log4J so "tone-down" the amount of output? 
(see the log4j site about how to configure log4j)

I don't understand why you have so much being logged unless you simply 
have a lot of logging output being generated.  If it is system.out 
stuff, you're fu-bared (that's a technical term).  If you were smart and 
used commons-logging you can control it by setting up a reasonable 
log4j.properties file and adjusting the debug levels appropriately.

By setting up your log4j.properties file, you could conceivably 
configure it so that you got 0kb of output on startup.  I imagine the 
logging is what's causing it to start slow too.

Zsolt Koppany wrote:

Hi,

I have copied the latest nightly build and after extraction I copied 
jakarta-struts/webapps into the tomcat -4.1.12 webapps directory. It takes a 
very long time to start tomcat (it was not the case before I installed 
struts) and a huge log file (100Mb) was created (I redirect stderr and stdout 
into a log4j file). I find a log file with the size pretty unuseful because 
this is just the initialization.

How can I decrease the amount the information? I don't know whether this is 
realistic but I would not like to get more that a couple of Kb after startup.

Zsolt


--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Previous Action

2002-11-05 Thread Chen, Gin
The best way for this is doing something called breadcrumbs.
Its similar to the breadcrumb links that you normally see on top of websites
that show:
home -> view
home -> view -> list
etc.
Then you need to programmatically decide where to go based on the last link
in the breadcrumbs.
If you do a search for breadcrumbs I'm sure something more helpful would
come up. Sorry, I dont know what else this is refered to as.
-Tim

-Original Message-
From: Darren Hill [mailto:dhill@;724.com]
Sent: Tuesday, November 05, 2002 2:18 PM
To: 'Struts Users Mailing List'
Subject: Previous Action


I have an action which needs to know which action called it.

More background ... its a deleteAction that, if called from a list, go back
to that list, if called from a view, go to welcome page, etc

1)  Can I discover which action was call, from within an action?
2)  Is there a better way to do this?

Darren.

--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Entire Struts Mail Archive

2002-11-05 Thread Mark Ayad
Is there a link where I can download (compressed) the entire Struts Mailing
List archive to date ?

Or do let my spider out ?

Mark

- Original Message -
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 10:01 PM
Subject: Re: Final release for Struts 1.1


> LOL
>
> ... and when they go check the site and see it's not final yet?  ... and
> if they happen to frequent the mailing list and notice your suggestion?
>  That doesn't sound like very good advice.  There are too many potential
> problems :-)  I'd fire someone outright that lied to me about something
> like that.  Maybe that's just me ...
>
> Dennis Muhlestein wrote:
>
> >Get a nightly. Rename it 1.1 Final.  If anyone asks questions... Lie.
> >
> >On Tue, 2002-11-05 at 12:24, Xuefeng Wang wrote:
> >
> >
> >>Hi, all,
> >>I'm using Struts 1.1B1 to develop our product, I want to know when
Struts
> >>1.1 final will be release.
> >>
> >>thanks,
> >>
> >>James
> >>
>
> --
> Eddie Bush
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Emiting JSP tag ?

2002-11-05 Thread Hookom, Jacob John
Why not do a filter of some sort that catches requests?
 
Logic would follow:
boolean createJsp = false;
Select dateLastModified, destination from tbl_pages
if (!File(destination).exists())
 createJsp = true;
else if (File(destination).lastModified() < dateLastModified)
 createJsp = true;
 
if (createJsp)
{
 Select xmlContent from tbl_pages
 // do xslt transformation and save output as JSP file @ destination
}
 
RequestDispatcher (destination)
 
I did something like this previously for caching PDF/HTML transformations a while back 
with a filter by checking transformation dates vs. source dates.
 
Just an idea
 
Regards,
Jacob Hookom

-Original Message- 
From: V. Cekvenich [mailto:vicc@;users.sourceforge.net] 
Sent: Tue 11/5/2002 1:27 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Emiting JSP tag ?



I have a situation where I need to create complex layouts in XML (in a
DB) and create a JSP from them that collect input.

So I want to convert XML to JSP including tags at runtime. Ex: XML has
a certian section where I need to put in  and .
Of course if I just emit this to a browser it won't work.  Something
like ECS.

thanks in advance for any tips, ideas, etc.

.V




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




<>--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Newbie logic:iterator question

2002-11-05 Thread Oliver Meyn
This thread existed a few weeks ago, according to the archives, where I
found this suggested example for how to get iterator working (from Alexis
Gallagher):







which appears to be the same idea as used in the struts-example, but I can't
get this to work, as it fails with the error:

Cannot find bean item in scope null

Similar attempts with my own beans also fail (as does explicitly setting the
scope, where the error just becomes "... item in scope application" or
whatever scope is specified).

Any suggestions?

Thanks very much,
Oliver


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Final release for Struts 1.1

2002-11-05 Thread Eddie Bush
LOL

... and when they go check the site and see it's not final yet?  ... and 
if they happen to frequent the mailing list and notice your suggestion? 
That doesn't sound like very good advice.  There are too many potential 
problems :-)  I'd fire someone outright that lied to me about something 
like that.  Maybe that's just me ...

Dennis Muhlestein wrote:

Get a nightly. Rename it 1.1 Final.  If anyone asks questions... Lie.

On Tue, 2002-11-05 at 12:24, Xuefeng Wang wrote:
 

Hi, all,
I'm using Struts 1.1B1 to develop our product, I want to know when Struts 
1.1 final will be release.

thanks,

James


--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Steps to Get JRUN 3.1 and Struts 1.1b2 working

2002-11-05 Thread Steve Fyfe
>As promised, I am posting the steps I took to get Struts 1.1b2 working
in
>JRUN 3.1.  I only got the example application working, I did not
bother to
>get the other web apps bundled with Struts 1.1b2 working.  So I can't
>guarantee that I found EVERY problem in getting Struts 1.1b2 working
in JRUN
>3.1. As you can see, the steps necessary to get Struts 1.1b2 working
are
>such that you cannot run any 1.02 Struts apps on the same physical
server in
>JRUN 3.1.  

I cannot comment on all the steps you went through, but I do know that
I was able to get my Struts application to load and run from the
standard WEB-INF folders. So in my case, it should be possible to share
the machine with Struts 1.0.2 based webapps.

I avoided the classloader problems by using the following code to
initialize the Action Servlet's context class loader at startup:

/**
 * Inserts initialization code into the beginning of the
ActionServlet.
 * 
 * For JRun 3.1, replace the class specified for the ActionServlet in
web.xml with
 * the full name of this class.
 */
public class Struts11JrunAdaptor extends
org.apache.struts.action.ActionServlet {

/**
 * Before running the code in the standard Struts v1.1
ActionServlet, initialize
 * the thread's classloader. This problem is fixed in JRun v4,
so only use this
 * module on JRun v3.1.
 *
 * @param sc ServletContext for the current servlet
 * @throws ServletException If thrown by the super class.
 */ 
public void init(javax.servlet.ServletConfig sc) 
throws javax.servlet.ServletException {
Thread.currentThread().setContextClassLoader(
this.getClass().getClassLoader());
super.init(sc);
}
}

I'm using JRun 3.1 on Win XP with JDK 1.3

I did this a while ago, so I may be overlooking some other critical
configuration detail. Your milage may vary :-)

Steve Fyfe
CNI Corporation
Milford NH 03055

[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Passing an (Dyna)ActionForm to the business object

2002-11-05 Thread Robert Taylor
I would say you wouldn't necessarily violate MVC if you pass the
DynaActionForm as a DynaBean into your model. Your model doesn't need
an "Form" functionality, it only needs to access the data which is supported
by the DynaBean contract. DynaBean is not bound to any presentation layer
and
therefore does not couple your business tier to your web tier.

When passing data from my web tier to the business tier, I tend to convert
the data contained in the form into data structures native to the business
tier;
Data Transport Objects (DTO) sometimes refered to as ValueObjects. I then
pass
around these DTOs.

There has been plenty of discussion on this list and depending on which
engineer
you speak with you may get a different answer. For more information on this,
search
the archives.

HTH,

robert

> -Original Message-
> From: Vincent Stoessel [mailto:vincent@;xaymaca.com]
> Sent: Tuesday, November 05, 2002 2:34 PM
> To: Struts Users
> Subject: Passing an (Dyna)ActionForm to the business object
>
>
> I know I have probably violated MVC by doing this but
> while trying to find an elegant solution to passing
> field values between my Action classes and my Model Classes
> I went ahead and passed the whole darn DyaActionForm (daf)
> to my Model class:
>
> Why did I got to the dark side? It was so convenient to
> only have to add/remove fields in one class (and in struts-config.xml).
> I am working with a massive form that is in flux and editing 2 classes
> all the time was slowing me down:
>
> // The Old way: the force
> in myAction:
>
>  DynaActionForm daf  = (DynaActionForm) acForm  ;
>  myModel mym  = new myModel();
> String firstname = (String) daf.get("fname");
> String lastname = (String) daf.get("lname") ;
> String street = (String)daf.get("street") ;
> String city = (String)daf.get("city") ;
> String state = (String)daf.get("state") ;
>
> myModel.doBusiness(firstname, lastname,street,city,state);
>
>
>
>
> then in myModel:
>
> PreparedStatement   pstmt  = con.prepareStatement(qstr);
>  pstmt.setString(1,(String)daf.get("firstname"));
>  pstmt.setString(2,(String)daf.get("lastname"));
>  pstmt.setString(3,(String)daf.get("street"));
>  pstmt.setString(4, (String)daf.get("city"));
>  pstmt.setString(5, (String)daf.get("state"));
>
>
>
> // the New Way: the dark side
>
> now I can just do:
>
> myModel mym  = new myModel();
> myModel.doBusiness(daf);
>
>
> Yes, in myModel class  I still have to break out daf.getXXX but at least
> now all thefields can be managed from one place and less prone to
> mismached case/spelling (for me anyway) than it was before.
>
> Of course I really do not want to violate the Struts MVC model, is there
> a better way than the first method?
>
> Thanks All
>
>
> --
> Vincent Stoessel
> Linux Systems Developer
> vincent xaymaca.com
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Final release for Struts 1.1

2002-11-05 Thread Paananen, Tero
> Hi, all,
> I'm using Struts 1.1B1 to develop our product, I want to know 
> when Struts 
> 1.1 final will be release.

I heard tomorrow.

-TPP - ducks

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Final release for Struts 1.1

2002-11-05 Thread Dennis Muhlestein
Get a nightly. Rename it 1.1 Final.  If anyone asks questions... Lie.

On Tue, 2002-11-05 at 12:24, Xuefeng Wang wrote:
> Hi, all,
> I'm using Struts 1.1B1 to develop our product, I want to know when Struts 
> 1.1 final will be release.
> 
> thanks,
> 
> James
> 
> 
> 
> 
> 
> _
> Surf the Web without missing calls! Get MSN Broadband.  
> http://resourcecenter.msn.com/access/plans/freeactivation.asp
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [OT] OJB/Struts and Jetspeed

2002-11-05 Thread John Nicholas
James Higginbotham wrote:

Do you think that using the portal features of tiles could 
help in developing a portal application based on Struts? 


Well, if you need something now, like me, then you'll probably be doing
what I do - comparing the potential of Jetspeed's codebase vs. writing
something simple from scratch using Tiles. If you have some time, a ref
impl of the portlet JSR should be out within the next month or two and
would allow you to choose from (hopefully)  multiple portal containers
once the JSR goes final. I'm not sure where I stand at this point, I
just know that after 3 years of J2EE, someone should have a solid portal
framework (ala PHPNuke, but better), but nothing really exists yet. 


I'm not surprised that there isn't a java nuke. The typical nuke user is 
someone running a hobby or special interest site. Nuke's use of 
php/mysql supports the cheapest hosting option. Since java used more in 
business/corporate settings, I wouldn't expect a big need for something 
like phpNuke.

I used Tiles to create an intranet site that had user customizable 
modules but I didn't need all the nuke type candy or the threaded 
message board (slashdot style) stuff.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: DynaValidatorForm and Multi-page Forms

2002-11-05 Thread Seth Milder
Derek Lin wrote:


Oh I see.  In my code, I am validating using the plug-in validator. 
You are
validating in the action class.  I haven't tried the things you are doing.
Anyone else tried this?

I am using the plug-in validator too. At least I think I am :) I was 
just following the examples that come with Struts 1.1b, specifically the 
 struts-validator webapp with the MultiRegistrationForm example with 
the exception that they are not using DynaValidatorForm.


--
Seth Milder
Department of Physics and Astronomy
MS 3f3
George Mason University
Fairfax, VA
http://www.mrseth.org
--
Few men have virtue to withstand the highest bidder. GEORGE WASHINGTON


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: Final release for Struts 1.1

2002-11-05 Thread Vincent Stoessel
They say a great work of art is never truly finished, only reluctantly 
abandoned. The devlopers say they will release 1.1 when the bugs are 
smashed.

Xuefeng Wang wrote:
Hi, all,
I'm using Struts 1.1B1 to develop our product, I want to know when 
Struts 1.1 final will be release.

thanks,

James





_
Surf the Web without missing calls! Get MSN Broadband.  
http://resourcecenter.msn.com/access/plans/freeactivation.asp


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Passing an (Dyna)ActionForm to the business object

2002-11-05 Thread Vincent Stoessel
I know I have probably violated MVC by doing this but
while trying to find an elegant solution to passing
field values between my Action classes and my Model Classes
I went ahead and passed the whole darn DyaActionForm (daf)
to my Model class:

Why did I got to the dark side? It was so convenient to
only have to add/remove fields in one class (and in struts-config.xml). 
I am working with a massive form that is in flux and editing 2 classes 
all the time was slowing me down:

// The Old way: the force
in myAction:

DynaActionForm daf  = (DynaActionForm) acForm  ;
myModel mym  = new myModel();
   String firstname = (String) daf.get("fname");
   String lastname = (String) daf.get("lname") ;
   String street = (String)daf.get("street") ;
   String city = (String)daf.get("city") ;
   String state = (String)daf.get("state") ;

myModel.doBusiness(firstname, lastname,street,city,state);




then in myModel:

PreparedStatement   pstmt  = con.prepareStatement(qstr);
pstmt.setString(1,(String)daf.get("firstname"));
pstmt.setString(2,(String)daf.get("lastname"));
pstmt.setString(3,(String)daf.get("street"));
pstmt.setString(4, (String)daf.get("city"));
pstmt.setString(5, (String)daf.get("state"));



// the New Way: the dark side

now I can just do:

myModel mym  = new myModel();
myModel.doBusiness(daf);


Yes, in myModel class  I still have to break out daf.getXXX but at least 
now all thefields can be managed from one place and less prone to 
mismached case/spelling (for me anyway) than it was before.

Of course I really do not want to violate the Struts MVC model, is there
a better way than the first method?

Thanks All


--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: Previous Action

2002-11-05 Thread Robert Taylor
Darren, you can create different action mappings which identify the correct
"return to" screen but map to the same action. If I'm on the list page and I
would invoke something like /do/list/delete and if I was on a view, then
invoke the delete action like /do/view/delete. The action mapping for
/list/delete would have a success forward which returned me to the list
where as the /view/delete action mapping would have a success forward which
returned me to the welcome page.

You could also use the request header "REFERER", but that is not reliable.

robert

> -Original Message-
> From: Darren Hill [mailto:dhill@;724.com]
> Sent: Tuesday, November 05, 2002 2:18 PM
> To: 'Struts Users Mailing List'
> Subject: Previous Action
>
>
> I have an action which needs to know which action called it.
>
> More background ... its a deleteAction that, if called from a
> list, go back
> to that list, if called from a view, go to welcome page, etc
>
> 1)  Can I discover which action was call, from within an action?
> 2)  Is there a better way to do this?
>
> Darren.
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




bean:include question

2002-11-05 Thread Stephen . Chambers

All,

Does anyone know if this is possible?






I keep getting java.io.CharConversionExcpetion: isHexDigit
  at
org.apache.tomcat.util.buf.UDecoder.converter(UDecoder.java:124)
etc...

Any help would be appreciated.

Steve


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: DynaValidatorForm and Multi-page Forms

2002-11-05 Thread Derek Lin
Oh I see.  In my code, I am validating using the plug-in validator.  You are
validating in the action class.  I haven't tried the things you are doing.
Anyone else tried this?

-- Derek
- Original Message -
From: "Seth Milder" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 11:00 AM
Subject: Re: DynaValidatorForm and Multi-page Forms


> Derek Lin wrote:
>
> > What is the setPage() method?  From what class?
> >
> > Are you trying to do a form wizard(multiple pages using one
> > DynaValidatorForm)?
>
>
> Yes. This is it exactly.
>
> > If so, I have something like that.  But I had to
> > override the reset() method in DynaValidatorForm class.--I am still
> > not sure
> > if this is the most elegant way. (don't have time to investigate
further)
> >
> > Let me know if I should post my code.
> >
> > -- Derek
>
>
> In struts-config.xml I have:
>
>   
>  name="dynaRegistrationForm"
>dynamic="true"
>type="org.apache.struts.validator.DynaValidatorForm">
> .
> .
> .
> 
> .
> .
> .
> 
>   
>
> And in the jsp's I have the typical hidden field:
> .
> .
> .
> 
>
> .
> .
> .
>
> But the page will not validate correctly unless I call explicitly the
> setPage method for the DynaValidatorForm in the Action class, like so:
>
> DynaValidatorForm info= (DynaValidatorForm) form;
> int foof = -1;
> try{
> foof = Integer.parseInt(request.getParameter("page"));
> info.setPage(foof);
> }catch(Exception e){
> if(!(e instanceof java.lang.NoSuchMethodException))
> log.error(e.getMessage(),e);
>  }
>
> ActionErrors errors = info.validate(mapping, request);
>
>
> If I do not put the above in the Action code, the info.getPage() always
> returns zero, so the page is not validated since I have no page=0 in the
> appropriate places in validation.xml. With the above the first page gets
> validated correctly but the second also tries to validate every field
> that has page=2 in validation.xml AND page=1 too, which all fail since
> those parameters are not being submitted. It is almost like it is
> "forgetting" that they were set on the first page. Perhaps the trouble
> is that the DynaValidatorForm is not being saved in the session? I
> should not have to do this myself. Right? If you have this working, then
> by all means post your code.
>
>
> Thanks a bunch!
>
>
> --
> Seth Milder
> Department of Physics and Astronomy
> MS 3f3
> George Mason University
> Fairfax, VA
> http://www.mrseth.org
> --
> Sex alleviates tension. Love causes it. -- Woody Allen
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: frame in template

2002-11-05 Thread Eddie Bush
There are two ways Tiles will bring content in - as an include or as a 
value.  You want to bring your content in as a value (to be specified in 
your frameset), but currently your bringing it in as an include.  The 
same type of thing happens when you want to set the title for a 
document.  Go look at the example and you can't miss it (hint:  it's not 
an include!).

Amit Badheka wrote:

frame, and not hrame.

sorry.
- Original Message -
From: "Amit Badheka" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 12:28 PM
Subject: hrame in template


Can I include a frameset into Template?

I have a page called index.jsp, that contains frameset defined.

Now, I want to include this page in my template. I tried it but it does not
includeing the pages inside the frames, but when I saw the generated html
source the file contents are included.

Please help.



--
Eddie Bush





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >