HREF link question

2001-06-14 Thread Rick Horowitz

Hi,

I'm trying to use href links with Struts templates, and can't figure out 
how to make my href links work properly.  [Templates seem to work just 
fine, otherwise.]... my compliments.

1. I want to use Struts html:link tags so that to automatically do URL 
session encoding.

2. I want to use absolute URLs to make coding of urls more robust. For 
example, if I have a directory structure of JSPs:
 jsp
 jsp/prodinfo
 jsp/faq
  ...I want to be able to code the url something like... 
jsp/faq/faq1.jsp or jsp/prodinfo/info1.jsp, in case I change the directory 
structure, rather than using relative links, e.g. ../faq/faq1.jsp.

3. For the portion of the website that I'm currently working on, I am 
creating href links from one JSP to other JSPs.  [For other portions of the 
website, I will be using an MVC architecture, hence forwarding from a 
servlet to a JSP and vice versa.]

4. I have tried various approaches to using the html:base/ tag in the 
HTML HEAD section of my Struts template file, not using a base tag, and 
have tried using the following to set the html base:
 BASE HREF=%= http://;
 +request.getServerName() +:
 +request.getServerPort()
 +request.getContextPath() %/ 
  Although the latter works with regular a href  tags, it does not 
seem to work with html:link Struts tags.

I have tried a variety of combinations of these base tags with a variety of 
combinations of url encodings, but cannot seem to get them to work -- 
except with regular a href tags using the
 BASE HREF=%= http://;
 +request.getServerName() +:
 +request.getServerPort()
 +request.getContextPath() %/ 
 base tag setting.

Thank you in advance to anyone who can help,


Rick Horowitz




Internationalization (I18N) query

2001-06-14 Thread Sandeep . Yawale




Hi All,

This is a typical requirement about the internationalization.

I want to create an application to be displayed in English and Japanese.
Also, the user has given facility to customise some of the display field names
for him.

Now, question arises, do we need to provide the internationalization for these
cutomised fields.
What is the general trend for this and Is it feasible to do this?

e.g. if an english user change field name like employee_name to empl_name,
what if next time when he logs on selecting locale as Japanese.

What should we display, empl_name literal in english  or something else in
Japanese, like default setting for that field in Japanese?

Kindly forward your suggestion for such kind of Internationalization.

- Sandeep











Re: Please confirm css ok from client-side jscript validation

2001-06-14 Thread Chuck Amadi


Cheers 4 that advice , i did try the javascript declartion and inclued
the javascript code directly , thus the jsp worked but no javascript event.Thus
i 'll try the src (source).
I have a created a javascript file at the same level as the CascadeStyle
Sheet - ( /struts-bbnpa / css/ graphics ) thus do i do the same
i.e ( struts-bbnpa / javascript/ ) and must i add the js extension
to javascript file when i amend it later within windows.Thus shall i create
html page with the embeded js code within the js file.
cheers chuck ( trying it out )
 SCRIPT language="JavaScript" src="myJavascriptFile.js">/SCRIPT>
Or include the javascript code directly:
 SCRIPT language="JavaScript">
 function myFunct() {}
 /SCRIPT>
and call methods from whichever event you want: onLoad, onClick, etc
HTH,
 Pete
Chuck Amadi wrote:
> I have placed the CSS file in my struts-bbnpa( named web
app) and
> not directly in WEB-INF directory. but as follows -
> /struts-bbnpa/css/bbnpa.css" same level as WEB-INF
>
> I have used the LINK tag as the href the client's browser should
not
> be able to access the style sheet. as demonstrated - works fine .
> CHEERS!!
> link rel="stylesheet" href="css/bbnpa.css"
> charset="ISO-8859-1"
> type="text/css">"/struts-bbnpa/css/bbnpa.css"
> nevertheless how do i embed the javascript within jsp as i had js
> working on my college assignment web-site (a timed window status
> scroll ) albiet wont work on my companies web project. any ideas.
>
> Cheers again chuck
>
>
> --
> The views expressed by the sender of this message don't
> necessarily represent those of Brecon Beacons National Park
> Authority. This message is intended for the addressee(s) only
> and is sent in confidence; if you receive it in error, please can
you
> let us know (at [EMAIL PROTECTED]) and then destroy all copies.
> Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
> adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
> Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
> yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
> mewn camgymeriad, a fyddech gystal rhoi gwybod i
> ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
>

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.



Re: help with package struts-classpath

2001-06-14 Thread Chuck Amadi


Cheers as i was about 2.
Hi, does anyone no why i now reciveve the following invalid package
declarations
My Package classpath is
struts-bbnpa/WEB-INF/classes/org/breconbeacons/it/ActionForward.java
// (and the retst of the classes.
struts-bbnpa the name of my webapp.
I have declared package org.breaconbeacons.it;
// top of java classes.
Sorry 4 keeping on but all my classes now say invalid package declarations,
i have checked my tld's and kept away from altering the strus-config.
Dan Miser wrote:
Don't change those action types. Those are default
classes provided in
struts.jar. Open struts.jar with WinZip and you'll see the classes
in there.
They are for dynamic, run-time administration of your webapp and are
not
required at all.
--
Dan Miser
http://www.distribucon.com
- Original Message -
From: Chuck Amadi
To: [EMAIL PROTECTED]
Sent: Wednesday, June 13, 2001 9:50 AM
Subject: Re: help with package struts-classpath
Sorry about this what happens regarding the action path="/admin/addFormBean"
as im about to amended the type="org.breconbeacons.it.AddFormBeanAction.
cheers chuck
action path="/admin/addFormBean"

type="org.apache.struts.actions.AddFormBeanAction"/>

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.



RE: Type conversions - issues on where to do them

2001-06-14 Thread Jonas Bjornerstedt


  1) If I do it in the ActionForm and there is a problem in 
  the Action, then I have to reconvert back to a String on 
  the way back.;
 
 That's why I advocate that properties in an ActionForm should 
 be Strings instead of dates/ints/whatever.
 
Why not let the ActionForm do all simple conversion and validation? The
request object still has the String versions.

Jonas



Re: GenericDataSource

2001-06-14 Thread Chuck Amadi

Cheers Mark , as i was sure i came across it somewhere as i am on the connection 
pooling since i
made the generic Datasource URL work within postgresql and jsp, except i didn't like 
the result
so have any advice regarding forms /nested forms as sql statement retrieved the data 
from my db
but i wan it in a aesthetically pleasing manner.

Cheers chuck

Mark Johnson wrote:

 In Tomcat 3.2.1 the session timeout is set in 
$JAKARTA_HOME/build/tomcat/conf/web.xml. HTH...

  Date: Wed, 13 Jun 2001 14:51:21 +0100
  To: [EMAIL PROTECTED]
  From: Chuck Amadi [EMAIL PROTECTED]
  Subject: Re: GenericDataSource
  Message-ID: [EMAIL PROTECTED]
 
  Sorry,  anwser to the 1st question , the fact is the session is closed is
  because by default there is a 30 minute time out somewhere in xml doc's
  either tld or struts-config i'll have 2 take a look as im digesting all this
  at work and at home but there is definately a time out period.

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal â rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.





RE: Form tag problem in VAJ 3.5.3 WTE with 1.0b2

2001-06-14 Thread Jon.Ridgway

Hi Antonio,

You appear to have the same setup as me, so we should be able to get things
working.

Questions:

-Have you added the struts code to VAJ workspace?
-Have you added the struts project in your workspace to the WTE classpath?
-Have you made sure that a struts.jar IS NOT on your classpath?
-Have you tried adding a breakpoint at the top of FormTag.doEndTag to check
the correct version is be used.
-Have you edited the correct FormTag? Be aware that you should be editing
the FormTag in the html package, not the one in the base taglib package.
-Have you had several cups of coffee?

Jon.

-Original Message-
From: antonio loureiro [mailto:[EMAIL PROTECTED]] 
Sent: 13 June 2001 23:20
To: [EMAIL PROTECTED]
Subject: RE: Form tag problem in VAJ 3.5.3 WTE with 1.0b2

Hi all!
I use struts beta2 with websphere 3.5.3 and applied the following patch to
the
FormTag, as suggested by Jon.Ridgway previously in this mailing list:

// Remove the page scope attributes we created
pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

but it doesn't seem to work - that means I still get an Exception called
can't
remove attribute from request scope.

any help is appreciated!

Thanx
Antonio





RE: can't remove attributes from servlet

2001-06-14 Thread Jon.Ridgway

Hi All WTE User,

I have just realised that I have been pointing to the wrong class. See
below. I should have suggested editing 


org.apache.struts.taglib.html.FormTag.doEndTag

Apologies,

Jon.

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] 
Sent: 13 June 2001 15:36
To: [EMAIL PROTECTED]
Subject: RE: can't remove attributes from servlet

Hi Tom,

Welcome to Struts...

 Try editing org.apache.struts.taglib.FormTag.doEndTag as follows :
  
   
  // Remove the page scope attributes we created 
  pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
  pageContext.getRequest().removeAttribute(Constants.FORM_KEY);
  
  Jon.

This is taken from a previous post, you may have other setup issues with
VAJ, most are cover in the archive...

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

Jon.

-Original Message-
From: Van-Landeghem Tom [mailto:[EMAIL PROTECTED]] 
Sent: 13 June 2001 15:08
To: '[EMAIL PROTECTED]'
Subject: can't remove attributes from servlet

Hi,
 
Today is my first day I try to play with Struts using Visual Age V3.5.3.
I try settingup and running the EmployeeList example application from IBM in
the WTE of VAJ.
I get the following exception when I try to run the application :
can't remove attributes from servlet
which seems to be thrown by the Formtag.doEndTag()
anybody has any ideas ?
 
Tom



Re: Please confirm css ok from client-side jscript validation

2001-06-14 Thread Chuck Amadi

Cheers Peter and the other similiar examples must of been a bad day as all
is well with my javascript running on jsp . Some how the directly included
js code wouldn't work , thus i made sure that it was embeded within the
head elements and valar yippy do it works fine .

Until the next prob cheers chuckie

Peter Alfors wrote:

 You can either link to a javascript file:

   SCRIPT language=JavaScript src=myJavascriptFile.js/SCRIPT

 Or include the javascript code directly:

   SCRIPT language=JavaScript
 function myFunct() {}
   /SCRIPT

 and call methods from whichever event you want: onLoad, onClick, etc

 HTH,
 Pete

 Chuck Amadi wrote:

  I have  placed  the CSS file in my struts-bbnpa( named web app) and
  not directly in WEB-INF directory. but as follows -
  /struts-bbnpa/css/bbnpa.css same level as WEB-INF
 
  I have used the LINK tag as the href the client's browser should not
  be able to access the style sheet. as demonstrated - works fine .
  CHEERS!!
  link rel=stylesheet  href=css/bbnpa.css
  charset=ISO-8859-1
  type=text/css/struts-bbnpa/css/bbnpa.css
  nevertheless how do i embed the javascript within jsp as i had js
  working on my college assignment web-site (a timed window status
  scroll ) albiet wont work on my companies web project. any ideas.
 
  Cheers again chuck
 
 
  --
  The views expressed by the sender of this message don't
  necessarily represent those of Brecon Beacons National Park
  Authority. This message is intended for the addressee(s) only
  and is sent in confidence; if you receive it in error, please can you
  let us know (at [EMAIL PROTECTED]) and then destroy all copies.
  Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
  adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
  Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
  yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
  mewn camgymeriad, a fyddech gystal  rhoi gwybod i
  ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
 

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal â rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.





Storing Edited elements from an html form in a collection

2001-06-14 Thread Mark Kettner

Hi All,

Unfortunately nobody has answered to my mail on 06/13/2001 (How to 
access getIndex method of iterate
tag in a jsp page). Indirectly Martin Cooper replied (Re: Iterate tag 
update), but this can only be accomplished
by a new struts version which he will publish this afternoon.

What I like to do is to edit a collection of data in a form. The 
collection is displayed using the logic:iterate tag.
How do I store the modified values in the right element of the collection?
Can somebody please post a jsp code snippet of how this is done using 
struts?

Mark

-- 
--o-o--
Mark Kettner
http://www.fredhopper.com
Amsterdam, The Netherlands
Phone:  +31 20 3206203 Mobile: +31 620 609 817
fax:+31 20 8848747
E-mail: [EMAIL PROTECTED], [EMAIL PROTECTED]




Server-side form validation - anything in STRUTS?

2001-06-14 Thread Dave Small

Hi all.

Does STRUTS contain a framework for server-side form validation? It's
obviously a very common requirement - to check that values entered into
an HTML form conform to certain criteria. As I see it, these criteria
fall into:

1. per-field validation - checking that a text box is not-empty, setting
a max size for a field, disallowing certain characters
2. intra-field validation - eg for a 'date' section, checking that
'day', 'month' and 'year' are *either* all entered *or* all not entered
3. full-form validation - eg all fields in the form are allowed to be
blank individually, but at least one of them must not be blank

Has anyone seen anything 'out there' that tackles this somewhat thorny
issue? I can see that there's a need to provide quite a few different
types of criteria at all three of the above levels.

For my own reasons, I do *not* want to rely on client-side validation -
I need to do this on the server.

An interesting article at
http://www.javaworld.com/javaworld/jw-03-2000/jw-0331-ssj-forms_p.html
has started me thinking about this, but if deals with only 'per field'
validation.

Cheers
Dave



Re: Server-side form validation - anything in STRUTS?

2001-06-14 Thread Kyle Brown

Uhhh.yes.  Have you read any of the Struts documentation?  It talks at
length about this.  Also, you could go to my article on the VisualAge
developer's domain about why you want to use Struts
(http://www7.software.ibm.com/vad.nsf/data/document2557?OpenDocumentp=1BCT=1Footer=1),

where I list it as one of the top reasons.  Of couse, the documentation
also makes this perfectly clear...

Kyle Brown

Dave Small [EMAIL PROTECTED] on 06/14/2001 07:17:18 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Server-side form validation - anything in STRUTS?



Hi all.

Does STRUTS contain a framework for server-side form validation? It's
obviously a very common requirement - to check that values entered into
an HTML form conform to certain criteria. As I see it, these criteria
fall into:

1. per-field validation - checking that a text box is not-empty, setting
a max size for a field, disallowing certain characters
2. intra-field validation - eg for a 'date' section, checking that
'day', 'month' and 'year' are *either* all entered *or* all not entered
3. full-form validation - eg all fields in the form are allowed to be
blank individually, but at least one of them must not be blank

Has anyone seen anything 'out there' that tackles this somewhat thorny
issue? I can see that there's a need to provide quite a few different
types of criteria at all three of the above levels.

For my own reasons, I do *not* want to rely on client-side validation -
I need to do this on the server.

An interesting article at
http://www.javaworld.com/javaworld/jw-03-2000/jw-0331-ssj-forms_p.html
has started me thinking about this, but if deals with only 'per field'
validation.

Cheers
Dave





Re: ActionForms for read-only data??

2001-06-14 Thread hi there

Craig,

The ActionForm class definition seems to imply that it was intended to 
contain only editable data (i.e., the reset and validate methods).  
Distinguishing between read and write functionality in the enterprise 
systems I have developed was always a major advantage, both in extensibility 
and code maintainability, as usually each type of functionality had 
different processing requirments.  It seems that if we mix read and write 
functionality into one ActionForm instance, we will have some bulky 
classes to maintain.  Any comments?  Thanks.

From: Craig R. McClanahan [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: ActionForms for read-only data??
Date: Mon, 11 Jun 2001 17:01:31 -0700 (PDT)



On Mon, 11 Jun 2001 [EMAIL PROTECTED] wrote:

  I have a Struts theory question on use of action forms versus java beans
  for read-only data.
 
  We have extended workflow on our website such that the same form can 
look a
  bit different depending on where you are in the workflow.
  For example, the quote request will have limit and retention fields in 
the
  business request section.  Once you get to quote, those fields are
  read-only and there's an additional quote amount field.  When the client
  requests binder, all those fields are read-only and there is a checkbox.
  Once bound, everything is read-only.
 
  There is some disagreement on the team as to how to handle this case.  
We
  will obviously have four JSPs, one for each of these presentations.  The
  question is the data mapping to beans.
 
  Half of the team feels that to use Struts in its purest sense, we need 
to
  have java beans that represent the read-only data, and action forms to
  represent the editable data.  That would mean four action forms, one for
  each JSP.
 
  The other half of the team wants to re-use the same action form for all
  four cases, bean:define it in the session, and use bean:write to print 
out
  the data if read-only.  The major advantage is simplicity - we have one
  bean that represents all of the data - there is no need to understand 
what
  part of the workflow we are in when translating the data from the data
  model to the presentation layer beans.  It is also easier to understand 
for
  an HTML programmer or developer that the same bean is used regardless of
  whether it is a bean:write or any of the html tags.
 
  We certainly don't want to end up in a position where we have broken the
  framework and hurt our extensibility in future releases.  The first
  scenario would seem to follow the framework more closely, but in this
  special case, is it a problem to deviate and use the ActionForm for what 
it
  is - a bean?
  We would appreciate any advice and experiences.
  Thank you.
 

Ted covered a couple of the issues in his response -- I'd like to add a
few more thoughts.  I don't think there are cut-and-dried answers to an
issue like this, so it's a question of balancing the tradeoffs.

If you are using the same JSP page itself for the different views of the
same information, you probably already have conditional logic in it about
whether to make a field editable or read only.  In such a case, I don't
think it necessarily violates the Struts philosophy to use the same
ActionForm bean.  In fact, the Struts example application includes a
miniature example of this use case like this:

   logic:equal name=registrationForm property=action
   scope=request value=Create
 html:text property=username size=16 maxlength=16/
   /logic:equal
   logic:equal name=registrationForm property=action
   scope=request value=Edit
 bean:write name=registrationForm property=username/
   /logic:equal

which makes the username field editable in create mode, but read only in
edit mode.

Note that you do not actually have to use bean:define to introduce the
ActionForm bean if it's the same bean used in your html:form tag -- the
standard Struts logic will introduce it for you.  It can be used exactly
like any other bean, from within the nested body of the html:form.

 
  Lisa Stephens
  GeneralCologne Re
  Trumbull, CT
  203 328 5227
 
 

Craig McClanahan



_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Problems with session scope forms disappearing

2001-06-14 Thread Karen



Hi Everyone,

I've been using Struts for a while now, and have 
come across a problemwhereby trying to pass a form (with all struts-config 
entries being scope="session") between multiple different actions (same form) 
will lose all previously entered data - I'mtrying to map each page in a 
process to an action class, however I'm not writing the data to the database 
until the last page has been submitted as the user may want to go back and 
foward several times.

Should it be possible to do this ?

I've got a number of actions working with different 
action entries (ie. paths), however pointing to the same type (ie. java action 
class)and form to allow different pages to have different 'success' and 
'failure' mappings, however I've found that a few of these classes are becoming 
quite large and unmanageable, and I would like to clean this up by having a 
different action per web page, but only 1 form for all data.

Any help would be gratefully 
received..

Regards,
Don Elliott


Re: Iterate tag update?

2001-06-14 Thread frank waldheim

* Martin Cooper [EMAIL PROTECTED]  2001-06-13 (21:42:47):

 I just checked in a change to the iterate tag which allows you to access the
 current index as a scripting variable. If you specify the 'indexId'
 attribute, a scripting variable with the specified name will contain the
 current index (as an Integer) on each iteration. This will be available in
 the 6/14 nightly build, and also in Struts 1.0.

i think this is exactly what i needed recently..after all i cannot
follow 100percently right now. would be great if you can post
a snippet where you do such a iteration and use this feature.
thx alot.
 - fw


-- 
 \|/  \|/ --([EMAIL PROTECTED])-
  @~/ ,. \~@
 /_( \__/ )_\   waste of money, brains and time - wombat()
\/  -



RE: Server-side form validation - anything in STRUTS?

2001-06-14 Thread Dave Small

 -Original Message-
 From: Kyle Brown [mailto:[EMAIL PROTECTED]]
 Sent: 14 June 2001 12:24

Hi Kyle,

Thanks for this response.

 Have you read any of the Struts documentation?

If you mean the User Guide on the STRUTS site, yes I have. But it
doesn't include much of a 'discussion' on form validation - that is why
I have tried to start one up...

 Also, you could go to my article on the VisualAge
 developer's domain about why you want to use Struts

I have now looked at this - thanks for the pointer...

 Of couse, the documentation also makes this perfectly clear...

It's perfectly clear how a single form can be validated within STRUTS
(thanks to Wellington Lacerda for his input and clarification too).
However, your article points to implementing the 'validate' method in a
very low-level way, coding the validation logic on a per-form basis as
required. I guess my real question was whether STRUTS had taken a
higher-level abstraction of the validation required, so that form
validation can be expressed external to the Java code (eg. in a
properties file). 

Wellington Lacerda ponits out that 'Inside the validation method you can
use any kind of logic you want' - is there any work on generalising this
logic?

Thanks for you time on this one :)
Dave



Dreamweaver and Struts 1.0 - updated translator now available..

2001-06-14 Thread Karen



Hi Everyone,

Recently I downloaded from husted.com an old 
Dreamweavertranslator for Struts 0.5 to use in coding my Struts 1.0 JSPs, 
however I've had a lot of problems with it...

I've since converted this to support most 1.0 HTML 
tags, and have been using it fairly successfully in conjunction with a JSP 
include extension found on the dreamweaver site.

If anyone is interested in a copy of this I'm happy 
to provide - please email me on [EMAIL PROTECTED] and I'll 
send the translator + instructions via return email...

Regards,
Don Elliott
www.i4-talent.com
Melbourne, Australia


FYI - the translator basically converts Struts HTML 
tagsinto normal html tags so that the design view of Dreamweaver will show 
you what the page looks like - without this, the page just looks like a bunch of 
little squares that represent ASP / JSP code.

I've spent quite a bit of time commenting the code 
so it should be easy to add the tags I already haven't. The few known 
issues are as follows:

- dreamweaver goes bananas when it finds a Struts 
tag that has been commented out and replaces it with a bunch of 
MM:taglock ... junk in your source file (be careful of commented out 
tags !! By commented out, I mean within % /* ... */ %
or % // ... % comments, or event !-- 
... -- tags.
- doesn't support any iteration tags, however if 
these are coded nicely will ignore these which makes little difference to the 
way your screen looks.



Re: help with package struts-classpath

2001-06-14 Thread Jonathan Asbell



Chuck, send me your directory structure and name of 
your server and I will tell you what your classpath should be.

  - Original Message - 
  From: 
  Chuck Amadi 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, June 14, 2001 5:03 
  AM
  Subject: Re: help with package 
  struts-classpath
  Cheers as i was about 2. 
  Hi, does anyone no why i now reciveve the following invalid package 
  declarations My Package classpath is 
  struts-bbnpa/WEB-INF/classes/org/breconbeacons/it/ActionForward.java // 
  (and the retst of the classes. struts-bbnpa the name of my webapp. 
  I have declared package 
  org.breaconbeacons.it; // top of java classes. 
  Sorry 4 keeping on but all my classes now say invalid package declarations, 
  i have checked my tld's and kept away from altering the strus-config. 
  Dan Miser wrote: 
  Don't change those action types. Those are default 
classes provided in struts.jar. Open struts.jar with WinZip and you'll 
see the classes in there. They are for dynamic, run-time administration 
of your webapp and are not required at all. -- Dan Miser http://www.distribucon.com 
- Original Message - From: Chuck Amadi To: 
[EMAIL PROTECTED] Sent: Wednesday, June 13, 2001 9:50 AM 
Subject: Re: help with package struts-classpath 
Sorry about this what happens regarding the action 
path="/admin/addFormBean" as im about to amended the 
type="org.breconbeacons.it.AddFormBeanAction. cheers chuck 
action path="/admin/addFormBean" 
 
type="org.apache.struts.actions.AddFormBeanAction"/
  -- The views expressed by the sender of this message don't 
  necessarily represent those of Brecon Beacons National Park Authority. 
  This message is intended for the addressee(s) only and is sent in 
  confidence; if you receive it in error, please can you let us know (at 
  [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir 
  gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc 
  Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y 
  derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych 
  yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni 
  (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.  



Re: Problems with session scope forms disappearing

2001-06-14 Thread Jean-Noel Ribette

I think you got this behaviour because Struts is calling the reset() method before of 
the form populating it, so the
form is reinitialize betwen each actions.

You can solve this problem by having a blank reset() method and a realReset() method 
that you can from your action class
when needed.

Jean-Noel

- Original Message -
From: Karen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 14, 2001 1:48 PM
Subject: Problems with session scope forms disappearing


Hi Everyone,

I've been using Struts for a while now, and have come across a problem whereby trying 
to pass a form (with all
struts-config entries being scope=session) between multiple different actions (same 
form) will lose all previously
entered data - I'm trying to map each page in a process to an action class, however 
I'm not writing the data to the
database until the last page has been submitted as the user may want to go back and 
foward several times.

Should it be possible to do this ?

I've got a number of actions working with different action entries (ie. paths), 
however pointing to the same type (ie.
java action class)and form to allow different pages to have different 'success' and 
'failure' mappings, however I've
found that a few of these classes are becoming quite large and unmanageable, and I 
would like to clean this up by having
a different action per web page, but only 1 form for all data.

Any help would be gratefully received..

Regards,
Don Elliott





[Not registered, use system identifier] - the cause of my prob?

2001-06-14 Thread dsf65b y b3763476b3

Hi there fellow struts users!

Making struts work with VAJ 3.5.3 WTE is causing me no end of grief.
I managed to get struts working with WAS 3.5.3 thanks to indispensible help 
from you guys. I then copied everything from my WAS struts
installation except:

I imported the struts 1.0b1 source into VAJ instead of deploying the 
struts.jar file in my classpath.

I followed the instructions at:
http://www7.software.ibm.com/vad.nsf/Data/Document2558?OpenDocumentSubMast
for installing the JAXP parser in VAJ 3.5.3


Although, I'm quite sure my classpath is OK, I end up with a 505 error (see 
end of doc). When I start the WTE i get messages saying:


resolveEntity('null', 
'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
Not registered, use system identifier

Right now I suspect these messages are at the root of my problem. Is that 
probable?
How do I get rid of those?




Error 500
An error has occured while processing request:http://mcsbt01w:8091/login.jsp
Message: Server caught unhandled exception from servlet [jsp]: null

Target Servlet: jsp
StackTrace:

Root Error-1: null

javax.servlet.jsp.JspException
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.jsp.JspException(java.lang.String)
int org.apache.struts.taglib.bean.MessageTag.doStartTag()
void _login_xjsp_debug._jspService(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void 
org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest,
 
javax.servlet.http.HttpServletResponse, boolean)
void 
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest,
 
javax.servlet.http.HttpServletResponse, java.lang.String, 
java.lang.Throwable, boolean)
void 
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.ServletRequest,
 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.ServletRequest,
 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engine.webapp.StrictLifecycleServlet,
 
javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.ServletRequest,
 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse, 
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void 
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.servlet.engine.webapp.ServletInstanceReference,
 
javax.servlet.ServletRequest, javax.servlet.ServletResponse, 
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void 
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servlet.ServletRequest,
 
javax.servlet.ServletResponse, 
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(com.ibm.servlet.engine.webapp.WebAppRequest,
 
javax.servlet.http.HttpServletResponse, boolean)
void 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet.ServletRequest,
 
javax.servlet.ServletResponse, boolean)
void 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.ServletRequest,
 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang.Object)
void 
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(java.lang.Object)
void 
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.lang.String, 
com.ibm.servlet.engine.srp.ISRPConnection)
void 
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(com.ibm.servlet.engine.oselistener.api.IOSEConnection)
void 
com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(java.net.Socket)
void com.ibm.servlet.engine.http_transport.HttpTransportHandler.run()
void java.lang.Thread.run()





RE: [Not registered, use system identifier] - the cause of my prob?

2001-06-14 Thread Van-Landeghem Tom

Next to the java sources you also have to import the resources in VAJ.
You can do this by importing them from the struts.JAR but only select the
resources.
Maybe this will solve your problem.

Tom

-Original Message-
From: dsf65b y b3763476b3 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 2:16 PM
To: [EMAIL PROTECTED]
Subject: [Not registered, use system identifier] - the cause of my prob?


Hi there fellow struts users!

Making struts work with VAJ 3.5.3 WTE is causing me no end of grief.
I managed to get struts working with WAS 3.5.3 thanks to indispensible help 
from you guys. I then copied everything from my WAS struts
installation except:

I imported the struts 1.0b1 source into VAJ instead of deploying the 
struts.jar file in my classpath.

I followed the instructions at:

http://www7.software.ibm.com/vad.nsf/Data/Document2558?OpenDocumentSubMast
for installing the JAXP parser in VAJ 3.5.3


Although, I'm quite sure my classpath is OK, I end up with a 505 error (see 
end of doc). When I start the WTE i get messages saying:


resolveEntity('null', 
'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
Not registered, use system identifier

Right now I suspect these messages are at the root of my problem. Is that 
probable?
How do I get rid of those?





Error 500
An error has occured while processing request:http://mcsbt01w:8091/login.jsp
Message: Server caught unhandled exception from servlet [jsp]: null

Target Servlet: jsp
StackTrace:


Root Error-1: null

javax.servlet.jsp.JspException
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.jsp.JspException(java.lang.String)
int org.apache.struts.taglib.bean.MessageTag.doStartTag()
void
_login_xjsp_debug._jspService(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void 
org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServlet
Request, 
javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse, boolean)
void 
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
ervletRequest, 
javax.servlet.http.HttpServletResponse, java.lang.String, 
java.lang.Throwable, boolean)
void 
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
equest, 
javax.servlet.http.HttpServletResponse)
void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.
ServletRequest, 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.
ServletRequest, 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engin
e.webapp.StrictLifecycleServlet, 
javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.S
ervletRequest, 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletR
equest, 
javax.servlet.ServletResponse, 
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void 
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.se
rvlet.engine.webapp.ServletInstanceReference, 
javax.servlet.ServletRequest, javax.servlet.ServletResponse, 
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void 
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servle
t.ServletRequest, 
javax.servlet.ServletResponse, 
com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent)
void 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(c
om.ibm.servlet.engine.webapp.WebAppRequest, 
javax.servlet.http.HttpServletResponse, boolean)
void 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet
.ServletRequest, 
javax.servlet.ServletResponse, boolean)
void 
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.
ServletRequest, 
javax.servlet.ServletResponse)
void 
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang.Obje
ct)
void 
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(java.lan
g.Object)
void 
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.lang.S
tring, 

Visual editing of Struts tags

2001-06-14 Thread Jonas Björnerstedt

One of the main ideas of the MVC approach of Struts is making it easier for
non-programmers to do the view editing. Although the idea is great, the
problem for me as a developer is the lack of tools for editing JSP with
custom tags. I have some questions about this:

1) I know that Dreamweaver UltraDev 4 can be customized to Struts. Can this
be done with any other editors? It does not seem like WebSphere has this
feature. Sure, custom tags can be added, but there is little visual support.


2) Has someone written a good documentation of the Struts tags for
non-programmers that prefer to use text editors? Although the Struts
documentation is fantastic, it does require some programming knowledge.

3) One approach is to use html-code as much as possible until editors
support custom tags better. This means using the Struts controller, with a
minimal use of custom tags in the JSP files. The Blazix form tags is one
example of doing form editing in almost-html. Values are inserted into the
form by enclosing the form in tags 

blx:getProperty name=testBean property=*
... html form...
/blx:getProperty

Although the Struts tags are clearly better, this approach seems easier to
use with for example WebSphere. Unfortunately, the source code does not seem
to be available. Has anyone else done anything along these lines?

Jonas



RE: Declarative security constraints

2001-06-14 Thread Geddes, Mark (ANTS)

Craig wrote:

Have you tried a URL pattern like this?

  url-pattern/action1.do/url-pattern

The syntax of URL patterns used in security constraints is exactly like
that used in servlet mappings, and this would be an exact match pattern
for path /action1 (assuming you are using the usual *.do mapping for the
controller servlet).

Well I thought I had, but obviously I hadn't, as it works fine. Thanks.


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: 13 June 2001 18:04
To: Struts-User@Jakarta. Apache. Org (E-mail)
Subject: Re: Declarative security constraints




On Wed, 13 Jun 2001, Geddes, Mark (ANTS) wrote:

 I am using the security-constraint tag in web.xml to protect access to
my
 pages.
 I have been unable to use this method to restrict access to specific
 requests, say 'action1.do'. I assume this is because only the resources
are
 protected (i.e. the actual JSPs).
 The upshot is that I am protecting the whole web-app using
 url-pattern/*/url-pattern.
 This is fine. It is an intranet site and it means that I can use
 request.isUserInRole() and request.getUserPrincipal() in the confidence
that
 I know the user has been forced to authenticate themselves.
 The problem comes when I want to restrict certain actions based upon the
 user's role. In the perform() method of my Action class I have to use
 request.isUserInRole(). I would like to be able to do this declaratively
 rather than programmatically, either using the security-constraint
 declaration in web.xml, or possibly as part of the action declaration in
 struts-config.xml.
  
 Question1: Have I missed something obvious in my use of the
 security-constraint mechanism?

Have you tried a URL pattern like this?

  url-pattern/action1.do/url-pattern

The syntax of URL patterns used in security constraints is exactly like
that used in servlet mappings, and this would be an exact match pattern
for path /action1 (assuming you are using the usual *.do mapping for the
controller servlet).

 Question2: If not, would this make a useful extension to the Struts
 framework?
  

I've thought about the idea of incorporating role-based checking into the
controller servlet itself, but it seems like a duplication of what you can
already do in the container (such as the above).  However, a place where
it might be useful is if you have a scripted workflow of some sort, and
certain steps would be executed or skipped based on the roles possessed by
the authenticated user.

 Thanks in advance.
  
 Mark
 

Craig McClanahan



***
This email message contains confidential information for the above addressee only.  If 
you are not the intended addressee you must not disclose or use the information in any 
manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey 
House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by 
the SFA
***



Re: Server-side form validation - anything in STRUTS?

2001-06-14 Thread Ted Husted

More support for implementing validations is on the list for the 1.1
timeframe. 

The leading contender here is David Winterfeldt's extension. Highly
recommended.

 http://home.earthlink.net/~dwinterfeldt/ 

The most popular pattern is to perform domain validations in the
ActionForm to ensure that the String can be converted to a native type.
And then perform range validations in the Action, which may need to
reference the business logic tier. The actual data-type conversion can
be done anywhere along the way.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


Dave Small wrote:
 It's perfectly clear how a single form can be validated within STRUTS
 (thanks to Wellington Lacerda for his input and clarification too).
 However, your article points to implementing the 'validate' method in a
 very low-level way, coding the validation logic on a per-form basis as
 required. I guess my real question was whether STRUTS had taken a
 higher-level abstraction of the validation required, so that form
 validation can be expressed external to the Java code (eg. in a
 properties file).



RE: RE: [Not registered, use system identifier] - the cause of my pro

2001-06-14 Thread dsf65b y b3763476b3

If by resources you mean these files:

struts-config_1_0_1.dtd
web-app_1_2.dtd
web-app_2_3.dtd

I'm afraid I already did that, to no avail.

In fact my struts-config.xml and webapp.xml start like this respectively:

!DOCTYPE struts-config SYSTEM
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

!DOCTYPE web-app SYSTEM
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;


I've tried editing those so they read:

!DOCTYPE struts-config SYSTEM

file://C:/progra~1/ibm/visual~1/ide/projec~1/ibmweb~1/hosts/defaul~1/mywebapp/servlets/apache/struts/resources/struts-config_1_0.dtd

But this resulted in that it can't even load the ActionServlet!

So it seems I'm stuck :(

brgds,
S. Bro












_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




RE: RE: [Not registered, use system identifier] - the cause of my pro

2001-06-14 Thread Van-Landeghem Tom

I just managed to install the EmployeeList application from IBM which is
described in the article you also mention. If I look at their
struts-config.xml the DOCTYPE part is put in comments. Check out their
struts-config.xml and try that, you can download it on the article's page.

Tom

-Original Message-
From: dsf65b y b3763476b3 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 3:13 PM
To: [EMAIL PROTECTED]
Subject: RE: RE: [Not registered, use system identifier] - the cause of
my pro


If by resources you mean these files:

struts-config_1_0_1.dtd
web-app_1_2.dtd
web-app_2_3.dtd

I'm afraid I already did that, to no avail.

In fact my struts-config.xml and webapp.xml start like this respectively:

!DOCTYPE struts-config SYSTEM
 
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;

!DOCTYPE web-app SYSTEM
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;


I've tried editing those so they read:

!DOCTYPE struts-config SYSTEM

file://C:/progra~1/ibm/visual~1/ide/projec~1/ibmweb~1/hosts/defaul~1/myweba
pp/servlets/apache/struts/resources/struts-config_1_0.dtd

But this resulted in that it can't even load the ActionServlet!

So it seems I'm stuck :(

brgds,
S. Bro












_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.



Re: Please confirm css ok from client-side jscript validation

2001-06-14 Thread Peter Alfors

The source (src) attribute should work.  This can be very helpful if you
have common methods that you want to share across multiple pages.

  SCRIPT language=JavaScript
src=/struts-bbnpa/javascript/myJavascriptFile.js/SCRIPT

notice the leading '/' and also, do you have the ending /SCRIPT tag,
this is required as well.

As for the js extension... here is an snippet from HTML: The Definitive
Guide by Oreilly.

The value of the src attribute is the URL of the file containing the
JavaScript program.  The stored file should have a MIME type of
application/x-javascript; but will also be properly handled
automatically by a properly configured server if the filename suffix is
.js.

Looking at my computer, I have the MIME type set.  However, I did not
set this manually.  Either it was a default of windows, or an
application that I loaded added it.

HTH,
Pete

Chuck Amadi wrote:

 Cheers 4 that advice , i did try the javascript declartion and inclued
 the javascript code directly , thus the jsp worked but no javascript
 event.Thus i 'll try  the src (source).
 I have a created a javascript file at the same level as the
 CascadeStyle Sheet - ( /struts-bbnpa / css/ graphics ) thus do i do
 the same i.e ( struts-bbnpa / javascript/ ) and must i add the js
 extension to javascript file when i amend it later within windows.Thus
 shall i create html page with the embeded js code within the js file.

 cheers chuck ( trying  it out )

   SCRIPT language=JavaScript src=myJavascriptFile.js/SCRIPT

 Or include the javascript code directly:

   SCRIPT language=JavaScript
 function myFunct() {}
   /SCRIPT

 and call methods from whichever event you want: onLoad, onClick, etc

 HTH,
 Pete

 Chuck Amadi wrote:

  I have  placed  the CSS file in my struts-bbnpa( named web app)
 and
  not directly in WEB-INF directory. but as follows -
  /struts-bbnpa/css/bbnpa.css same level as WEB-INF
 
  I have used the LINK tag as the href the client's browser should
 not
  be able to access the style sheet. as demonstrated - works fine .
  CHEERS!!
  link rel=stylesheet  href=css/bbnpa.css
  charset=ISO-8859-1
  type=text/css/struts-bbnpa/css/bbnpa.css
  nevertheless how do i embed the javascript within jsp as i had js
  working on my college assignment web-site (a timed window status
  scroll ) albiet wont work on my companies web project. any ideas.
 
  Cheers again chuck
 
 
  --
  The views expressed by the sender of this message don't
  necessarily represent those of Brecon Beacons National Park
  Authority. This message is intended for the addressee(s) only
  and is sent in confidence; if you receive it in error, please can
 you
  let us know (at [EMAIL PROTECTED]) and then destroy all copies.

  Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
  adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
  Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
  yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
  mewn camgymeriad, a fyddech gystal  rhoi gwybod i
  ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
 

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: struts-config.xml - How do I open a success path as a new window???

2001-06-14 Thread Peter Alfors

Your javascript code looks correct.  :)

However, if at all possible, I would avoid using javascript.  Basically,
because the user may have javascript turned off in their browser.

Pete

Abraham Kang wrote:

 Hi Linnea,  I think it would be easier to usea class=leftnav
 href=javascript:window.open('yourAction.do','windowName',
 'status=no')Your action will return mapping.findForward(success)
 to load the popup windows contents.Pete,  my javascript is rusty so if
 you see any errors please correct.--Abraham

  -Original Message-
  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, June 13, 2001 1:52 AM
  To: [EMAIL PROTECTED]
  Subject: struts-config.xml - How do I open a success path
  as a new window???

  Hi!!

  I want to my path

  forward name=success path=/InsertAddress.jsp/

  to open the jsp-page as a new window/page ( like the html
  tag

  td align=lefta class=leftnav href=http://./;
  target=_blankbean:message key=icon.calendar//td )

  Any ideas how to do this with struts???

  Thanks / Linnéa





begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Please confirm css ok from client-side jscript validation

2001-06-14 Thread Chuck Amadi


Hi, Peter the js code direct script> /script> procedure worked
within the head element and the directive of script language="JavaScript".
Thus at a later stage i'll try and config src just 4 knowledge purposes
as i've got another dillema with java invalid packages declarations
now!! hard life hey.
Cheers again Chuck.
Peter Alfors wrote:
The source (src) attribute should work. This
can be very helpful if you
have common methods that you want to share across multiple pages.
 SCRIPT language="JavaScript"
src="/struts-bbnpa/javascript/myJavascriptFile.js">/SCRIPT>
notice the leading '/' and also, do you have the ending /SCRIPT>
tag,
this is required as well.
As for the js extension... here is an snippet from "HTML: The Definitive
Guide" by Oreilly.
"The value of the src attribute is the URL of the file containing the
JavaScript program. The stored file should have a MIME type of
application/x-javascript; but will also be properly handled
automatically by a properly configured server if the filename suffix
is
.js."
Looking at my computer, I have the MIME type set. However, I did
not
set this manually. Either it was a default of windows, or an
application that I loaded added it.
HTH,
 Pete
Chuck Amadi wrote:
> Cheers 4 that advice , i did try the javascript declartion and inclued
> the javascript code directly , thus the jsp worked but no javascript
> event.Thus i 'll try the src (source).
> I have a created a javascript file at the same level as the
> CascadeStyle Sheet - ( /struts-bbnpa / css/ graphics ) thus do i
do
> the same i.e ( struts-bbnpa / javascript/ ) and must i add the js
> extension to javascript file when i amend it later within windows.Thus
> shall i create html page with the embeded js code within the js file.
>
> cheers chuck ( trying it out )
>
>> SCRIPT language="JavaScript" src="myJavascriptFile.js">/SCRIPT>
>>
>> Or include the javascript code directly:
>>
>> SCRIPT language="JavaScript">
>> function myFunct() {}
>> /SCRIPT>
>>
>> and call methods from whichever event you want: onLoad, onClick,
etc
>>
>> HTH,
>> Pete
>>
>> Chuck Amadi wrote:
>>
>> > I have placed the CSS file in my struts-bbnpa( named
web app)
>> and
>> > not directly in WEB-INF directory. but as follows -
>> > /struts-bbnpa/css/bbnpa.css" same level as WEB-INF
>> >
>> > I have used the LINK tag as the href the client's browser should
>> not
>> > be able to access the style sheet. as demonstrated - works fine
.
>> > CHEERS!!
>> > link rel="stylesheet" href="css/bbnpa.css"
>> > charset="ISO-8859-1"
>> > type="text/css">"/struts-bbnpa/css/bbnpa.css"
>> > nevertheless how do i embed the javascript within jsp as i had
js
>> > working on my college assignment web-site (a timed window status
>> > scroll ) albiet wont work on my companies web project. any ideas.
>> >
>> > Cheers again chuck
>> >
>> >
>> > --
>> > The views expressed by the sender of this message don't
>> > necessarily represent those of Brecon Beacons National Park
>> > Authority. This message is intended for the addressee(s) only
>> > and is sent in confidence; if you receive it in error, please
can
>> you
>> > let us know (at [EMAIL PROTECTED]) and then destroy all copies.
>>
>> > Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
>> > adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
>> > Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
>> > yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
>> > mewn camgymeriad, a fyddech gystal rhoi gwybod i
>> > ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
>> >
>
> --
> The views expressed by the sender of this message don't
> necessarily represent those of Brecon Beacons National Park
> Authority. This message is intended for the addressee(s) only
> and is sent in confidence; if you receive it in error, please can
you
> let us know (at [EMAIL PROTECTED]) and then destroy all copies.
> Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
> adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
> Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
> yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
> mewn camgymeriad, a fyddech gystal rhoi gwybod i
> ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
>
 

Name: peter.alfors.vcf
 peter.alfors.vcf Type:
VCard (text/x-vcard)

Encoding: 7bit

Description: Card for Peter Alfors

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; 

RE: Server-side form validation - anything in STRUTS?

2001-06-14 Thread chris . chang

Hi Dave,

Try this http://home.earthlink.net/~dwinterfeldt/

Struts Validator - Validation Framework for Struts

Hope this can help 8)

-Original Message-
From: Dave Small [mailto:[EMAIL PROTECTED]]
Sent: June 14, 2001 5:51 AM
To: [EMAIL PROTECTED]
Subject: RE: Server-side form validation - anything in STRUTS?


 -Original Message-
 From: Kyle Brown [mailto:[EMAIL PROTECTED]]
 Sent: 14 June 2001 12:24

Hi Kyle,

Thanks for this response.

 Have you read any of the Struts documentation?

If you mean the User Guide on the STRUTS site, yes I have. But it
doesn't include much of a 'discussion' on form validation - that is why
I have tried to start one up...

 Also, you could go to my article on the VisualAge
 developer's domain about why you want to use Struts

I have now looked at this - thanks for the pointer...

 Of couse, the documentation also makes this perfectly clear...

It's perfectly clear how a single form can be validated within STRUTS
(thanks to Wellington Lacerda for his input and clarification too).
However, your article points to implementing the 'validate' method in a
very low-level way, coding the validation logic on a per-form basis as
required. I guess my real question was whether STRUTS had taken a
higher-level abstraction of the validation required, so that form
validation can be expressed external to the Java code (eg. in a
properties file). 

Wellington Lacerda ponits out that 'Inside the validation method you can
use any kind of logic you want' - is there any work on generalising this
logic?

Thanks for you time on this one :)
Dave



Re: struts-config.xml - How do I open a success path as a new window???

2001-06-14 Thread Linnea Ahlbeck

Hi Abraham and Pete!

Thanks for your help! The problem is  - I don´t use a link directly from my
jsp page to reach this new window. I have two submit buttons on my jsp-page,
Save and Insert Address . The form:action on the jsp-page is:

html:form action=/saveComposeMessageAction.do?action=Save

in Struts-Config.xml this action looks like this:
!-- Save compose message --
   action  path=/saveComposeMessage
type=com.appium.UM.Control.Web.Mail.SaveComposeMessageAction
name=composeMessageForm
scope=session
validate=false
  forward name=success  path=/ComposeMessage.jsp?action=Create/
  forward name=success2 path=/viewInsertAddress.do?action=Insert/
  forward name=failure  path=/ErrorLDAP.jsp/
  forward name=failure2 path=/ComposeMessage.jsp/
   /action

If i click on the submit button InsertAddress, saveComposeAction is the
first action. From the action class I check if Insert Address was the button
the user clicked on, if this is the case I return success2 and the path is:

path=/viewInsertAddress.do?action=Insert/

The action in struts_config.xml looks like this:

!-- View insert address--
   action  path=/viewInsertAddress
type=com.appium.UM.Control.Web.Mail.ViewInsertAddressAction
name=insertAddressForm
scope=session
validate=false
  forward name=successpath=/InsertAddress.jsp/
  forward name=failurepath=/ErrorLDAP.jsp/
   /action

From this class I return success and the path is :

path=/InsertAddress.jsp/

As it is now InsertAddress.jsp is onpened in the same window as the first
jsp-page but a want a new window!! Where do I enter this information and
how??
Any suggestions???

Thank you in advance!

/lLinnéa



- Original Message -
From: Peter Alfors [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 14, 2001 3:57 PM
Subject: Re: struts-config.xml - How do I open a success path as a new
window???


 Your javascript code looks correct.  :)

 However, if at all possible, I would avoid using javascript.  Basically,
 because the user may have javascript turned off in their browser.

 Pete

 Abraham Kang wrote:

  Hi Linnea,  I think it would be easier to usea class=leftnav
  href=javascript:window.open('yourAction.do','windowName',
  'status=no')Your action will return mapping.findForward(success)
  to load the popup windows contents.Pete,  my javascript is rusty so if
  you see any errors please correct.--Abraham
 
   -Original Message-
   From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, June 13, 2001 1:52 AM
   To: [EMAIL PROTECTED]
   Subject: struts-config.xml - How do I open a success path
   as a new window???
 
   Hi!!
 
   I want to my path
 
   forward name=success path=/InsertAddress.jsp/
 
   to open the jsp-page as a new window/page ( like the html
   tag
 
   td align=lefta class=leftnav href=http://./;
   target=_blankbean:message key=icon.calendar//td )
 
   Any ideas how to do this with struts???
 
   Thanks / Linnéa
 
 
 





Accessing session attributes

2001-06-14 Thread James Howe

This is probably a stupid question, but here it goes.  I have a handful of 
string values that I'm storing in the session object.  These values aren't 
associated with any bean (actually, in a sense the session object is the 
bean).  I have a couple of places where I need to display these values in a 
form.  I want to use the html:text tag, but I don't know what I need to 
specify.  Let me give an example.  Suppose I have a String value stored in 
the session by the name of filter.  How would I get the filter value to 
display in a form text field?

Thanks.




RE: Accessing session attributes

2001-06-14 Thread Charlesworth, Chico


u probably just need to specify 'filter' in the name attribute ...

like bean:write name=filter

it should try and find filter in the session, page, request, and
application scopes ... in which order i can never remember ;)

chico.

-Original Message-
From: James Howe [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 3:59 PM
To: [EMAIL PROTECTED]
Subject: Accessing session attributes


This is probably a stupid question, but here it goes.  I have a handful of 
string values that I'm storing in the session object.  These values aren't 
associated with any bean (actually, in a sense the session object is the 
bean).  I have a couple of places where I need to display these values in a 
form.  I want to use the html:text tag, but I don't know what I need to 
specify.  Let me give an example.  Suppose I have a String value stored in 
the session by the name of filter.  How would I get the filter value to 
display in a form text field?

Thanks.

-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England  Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS



Can another bean besides the FormBean be used inside a Form?

2001-06-14 Thread Shamdasani Nimmi-ANS004

Hi,

I have a form  which has a SELECT type field. The value selected from the Select 
options should set the corresponding field in the FormBean but the options available 
in this Select field are in another bean in the session scope. How do I  specify such 
a Select field using html:select  html:options tags?

TIA

-Nimmi




RE: My app no longer loads message resources

2001-06-14 Thread Noel Sebastien

Hello,

I would like to launch additional initializations at strut servlet start-up,
such as instantiating myObject that must read its configuration in a file.
Where can I put code in order to be sure that it will be executed at
start-up (I mean once) ?
Thank you in advance.

 - Sébastien Noel - 
 

-

Un courrier électronique n'engage pas son émetteur. Tout message susceptible de 
comporter un engagement doit être confirmé par un écrit dûment signé.

An electronic message is not binding on its sender. Any message referring to a binding 
engagement must be confirmed in writing and duly signed.

Ein elektronischer Brief bzw. eine elektronische Nachricht ist für den Absender nicht 
verbindlich. Jede Nachricht,  welche eine Verpflichtung beinhaltet, muß schriftlich 
bestätigt und ordnungsgemäß unterzeichnet werden.

-





ClassCastException when processing a forward?

2001-06-14 Thread Mike Thompson



Here is the action mapping section of my 
struts-config
 
action-mappings action 
path="/servicemanager" 
type="com.instanton.secureex.web.action.service.ListServicesAction" 
forward name="success" 
path="/service/listservices.jsp"/ 
/action

 action 
path="/servermanager" 
type="com.instanton.secureex.web.action.server.ListServersAction" 
forward name="success" 
path="/server/listservers.jsp"/ 
/action

The first one works like a champ, click on the 
link, ListServicesAction:perform gets called, data gets processed, shoved into 
the context, and it is pulled out and displayed in 
listservices.jsp.

The second one, which does almost the same thing, 
throws this exception. I know that it is making it all the way through my 
perform method in ListServers.

Is there something wrong with my 
action-mappings?
 --m

Here is the exception I get
java.lang.ClassCastException: org.apache.jasper.JasperException
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:259)
	at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1758)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:254)
	at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:198)
	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:177)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2227)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:229)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:162)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
	at java.lang.Thread.run(Thread.java:484)

Michael R. Thompsonhttp://www.instanton.com512.439.3815


Package problem ( think found the reason) !!

2001-06-14 Thread Chuck Amadi


Hi , Can anyone confirm that a custom packages commence / below WEB-INF
level , i am aware that packages are like url's in that they both use hierarchical
,dot-separated naming convention.
I think that the fact my .java haven't produced .class files thus i
need to compile my .java pages .
oops , my java is only at newbie / fundamentals level . Nevertheless
i think im on the right track
Cheers Jonathan 4 looking into it ( On checking via Windows thru
the hierachy i notice i have got .java extensions but no .classes extensions).
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.



Re: Accessing session attributes

2001-06-14 Thread Linnea Ahlbeck

Hi!

You can access session attributes and their values by using the bean:write
tag. For example - in the following tag myScheduleWeekDayStopTime is a
session attribute. (Here the value is written on the form as plain text and
not in a text field).

Hope this can help!

/Linnéa

td class=text_b align=left nowrapbean:write
name=myScheduleWeekDayStopTime//td

- Original Message -
From: James Howe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 14, 2001 4:59 PM
Subject: Accessing session attributes


 This is probably a stupid question, but here it goes.  I have a handful of
 string values that I'm storing in the session object.  These values aren't
 associated with any bean (actually, in a sense the session object is the
 bean).  I have a couple of places where I need to display these values in
a
 form.  I want to use the html:text tag, but I don't know what I need to
 specify.  Let me give an example.  Suppose I have a String value stored in
 the session by the name of filter.  How would I get the filter value
to
 display in a form text field?

 Thanks.






Re: Accessing session attributes

2001-06-14 Thread Ted Husted

The html tags are designed to display what's in a related ActionForm
bean. So the trick would be to get your String into the ActionForm bean.
The place to do this would be in an Action that then forwarded to your
JSP. So the Action would go something like this:

HttpSession session = request.getSession();
YourBean yourBean = (YourBean)
session.getAttribute(yourBean);

YourForm yourForm = (YourForm) form; 
yourForm.setWhatever(yourBean.getWhatever());

return (findForward(success));

You could use the same Action to handle the submit from the form, either
by keying on a value in the form or by submitting to another Action
Mapping with a different parameter property.

If you don't need to display them in a HTML form, then you can just use
the bean:write tag and specify the property you want to write (assuming
it has a getYyyy accessor). 


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


James Howe wrote:
 This is probably a stupid question, but here it goes.  I have a handful of
 string values that I'm storing in the session object.  These values aren't
 associated with any bean (actually, in a sense the session object is the
 bean).  I have a couple of places where I need to display these values in a
 form.  I want to use the html:text tag, but I don't know what I need to
 specify.  Let me give an example.  Suppose I have a String value stored in
 the session by the name of filter.  How would I get the filter value to
 display in a form text field?



RE: Can another bean besides the FormBean be used inside a Form?

2001-06-14 Thread Shamdasani Nimmi-ANS004

Never Mind I found the solution

-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 10:24 AM
To: struts-user@jakarta. apache. org (E-mail)
Subject: Can another bean besides the FormBean be used inside a Form?


Hi,

I have a form  which has a SELECT type field. The value selected from the Select 
options should set the corresponding field in the FormBean but the options available 
in this Select field are in another bean in the session scope. How do I  specify such 
a Select field using html:select  html:options tags?

TIA

-Nimmi



Re: ClassCastException when processing a forward?

2001-06-14 Thread Mike Thompson



Whoops, was an error in my .jsp. Sorry to 
bother...
 --m


  - Original Message - 
  From: 
  Mike Thompson 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, June 14, 2001 10:21 
  AM
  Subject: ClassCastException when 
  processing a forward?
  
  Here is the action mapping section of my 
  struts-config
   
  action-mappings action 
  path="/servicemanager" 
  type="com.instanton.secureex.web.action.service.ListServicesAction" 
  forward name="success" 
  path="/service/listservices.jsp"/ 
  /action
  
   action 
  path="/servermanager" 
  type="com.instanton.secureex.web.action.server.ListServersAction" 
  forward name="success" 
  path="/server/listservers.jsp"/ 
  /action
  
  The first one works like a champ, click on the 
  link, ListServicesAction:perform gets called, data gets processed, shoved into 
  the context, and it is pulled out and displayed in 
  listservices.jsp.
  
  The second one, which does almost the same thing, 
  throws this exception. I know that it is making it all the way through 
  my perform method in ListServers.
  
  Is there something wrong with my 
  action-mappings?
   --m
  
  Here is the exception I get
  java.lang.ClassCastException: org.apache.jasper.JasperException
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:259)
	at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1758)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:254)
	at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:198)
	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:177)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2227)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:229)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:162)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
	at java.lang.Thread.run(Thread.java:484)

  Michael R. Thompsonhttp://www.instanton.com512.439.3815


Re: help with package struts-classpath

2001-06-14 Thread Jonathan

FIRST
you need put the jars that are in the ora directory inside the lib directory
instead
take the struts-documentation, the struts-example etc.etc. etc.  out of
WEB-INF.  They dont belong there. In fact, the .war files are what you
should be working with and they should be in c:\jakarta-tomcat-3.2.1\webapps
inside the lib directory you should have struts.jar

ALSO
for compiling your project your classpath should be
c:\..the jars inside c:\jakarta-tomcat-3.2.1\lib
c:\..the jars inside
c:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\lib
c:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\classes


Now try and tell me what happened




- Original Message -
From: Chuck Amadi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 14, 2001 10:50 AM
Subject: Re: help with package struts-classpath


 Is This Better Jonathan  !! Cheers Chuck

 Jonathan wrote:

 Part 1.1Type: Plain Text (text/plain)
 Encoding: quoted-printable

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.






Re: struts-config.xml - How do I open a success path as a new window???

2001-06-14 Thread dhay



You could use javascript to set the target in the form tag to _blank if you want
it in a new window.  As Pete said, however, the drawback is that they may have
Javascript turned off.

Dave





Linnea Ahlbeck [EMAIL PROTECTED] on 06/14/2001
10:30:04 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Re: struts-config.xml - How do I open a success path as a new
  window???






Hi Abraham and Pete!

Thanks for your help! The problem is  - I don´t use a link directly from my
jsp page to reach this new window. I have two submit buttons on my jsp-page,
Save and Insert Address . The form:action on the jsp-page is:

html:form action=/saveComposeMessageAction.do?action=Save

in Struts-Config.xml this action looks like this:
!-- Save compose message --
   action  path=/saveComposeMessage
type=com.appium.UM.Control.Web.Mail.SaveComposeMessageAction
name=composeMessageForm
scope=session
validate=false
  forward name=success  path=/ComposeMessage.jsp?action=Create/
  forward name=success2 path=/viewInsertAddress.do?action=Insert/
  forward name=failure  path=/ErrorLDAP.jsp/
  forward name=failure2 path=/ComposeMessage.jsp/
   /action

If i click on the submit button InsertAddress, saveComposeAction is the
first action. From the action class I check if Insert Address was the button
the user clicked on, if this is the case I return success2 and the path is:

path=/viewInsertAddress.do?action=Insert/

The action in struts_config.xml looks like this:

!-- View insert address--
   action  path=/viewInsertAddress
type=com.appium.UM.Control.Web.Mail.ViewInsertAddressAction
name=insertAddressForm
scope=session
validate=false
  forward name=successpath=/InsertAddress.jsp/
  forward name=failurepath=/ErrorLDAP.jsp/
   /action

From this class I return success and the path is :

path=/InsertAddress.jsp/

As it is now InsertAddress.jsp is onpened in the same window as the first
jsp-page but a want a new window!! Where do I enter this information and
how??
Any suggestions???

Thank you in advance!

/lLinnéa



- Original Message -
From: Peter Alfors [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 14, 2001 3:57 PM
Subject: Re: struts-config.xml - How do I open a success path as a new
window???


 Your javascript code looks correct.  :)

 However, if at all possible, I would avoid using javascript.  Basically,
 because the user may have javascript turned off in their browser.

 Pete

 Abraham Kang wrote:

  Hi Linnea,  I think it would be easier to usea class=leftnav
  href=javascript:window.open('yourAction.do','windowName',
  'status=no')Your action will return mapping.findForward(success)
  to load the popup windows contents.Pete,  my javascript is rusty so if
  you see any errors please correct.--Abraham
 
   -Original Message-
   From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, June 13, 2001 1:52 AM
   To: [EMAIL PROTECTED]
   Subject: struts-config.xml - How do I open a success path
   as a new window???
 
   Hi!!
 
   I want to my path
 
   forward name=success path=/InsertAddress.jsp/
 
   to open the jsp-page as a new window/page ( like the html
   tag
 
   td align=lefta class=leftnav href=http://./;
   target=_blankbean:message key=icon.calendar//td )
 
   Any ideas how to do this with struts???
 
   Thanks / Linnéa
 
 
 









Re: Storing Edited elements from an html form in a collection

2001-06-14 Thread dhay



Mark,

Not sure if I understand your question, but I think that Struts will handle it
for you.  For example, if you are iterating through a collection a displaying a
text field in each row which is editable, Struts will automatically make any
changes entered to the underlying collection.

Cheers,

Dave





Mark Kettner [EMAIL PROTECTED] on 06/14/2001 07:00:42
AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Storing Edited elements from an html form in a collection



Hi All,

Unfortunately nobody has answered to my mail on 06/13/2001 (How to
access getIndex method of iterate
tag in a jsp page). Indirectly Martin Cooper replied (Re: Iterate tag
update), but this can only be accomplished
by a new struts version which he will publish this afternoon.

What I like to do is to edit a collection of data in a form. The
collection is displayed using the logic:iterate tag.
How do I store the modified values in the right element of the collection?
Can somebody please post a jsp code snippet of how this is done using
struts?

Mark

--
--o-o--
Mark Kettner
http://www.fredhopper.com
Amsterdam, The Netherlands
Phone:  +31 20 3206203 Mobile: +31 620 609 817
fax:+31 20 8848747
E-mail: [EMAIL PROTECTED], [EMAIL PROTECTED]










Help with TLDParser for UltraDev by Dan Mandell

2001-06-14 Thread Becky Moyer

Hi all...
   I'm trying to get this to work...the Struts extension for Dreamweaver 
UltraDev found at http://www.shokker.com/ctlx/ctlx.zip .  I've installed it, 
but I can't get it to recognize my tld files.  I get the following null 
pointer exception in my tomcat log...any ideas?  I've set up everything as 
far as I can tell exactly as the documentation say, as far as I can tell.  I 
am using Dreamweaver 4.
   Much appreciated,
   Becky

2001-06-14 12:19:40 - Ctx( /TLDParser ): Exception in: R( /TLDParser + 
/servlet/TLDParser + null) - java.lang.NullPointerException
at TLDParser.outputTLDList(TLDParser.java:379)
at TLDParser.doGet(TLDParser.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Unknown Source)



_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Multiple Forwards

2001-06-14 Thread Hans Bure

Hi all,

I am a relatively new struts user, so if the question I'm asking has been 
answered before, I appologize ahead of time.

What I'm trying to do, is create a framework integrated with struts that, 
among other things, allows users to set up multiple forwards dependent on 
the broswer type.  This could be Netscape, IE, WAP browser, or others.

What I would like to do is something like the following in the 
struts-config.xml file:

...
action name=test
  ...
  forward name=success browser=IE path=/ie/test.jsp/
  forward name=success browser=NS path=/ns/test.jsp/
  forward name=success browser=WAP path=/wap/test.jsp/
  ...
/action
...

The reasoning behind this, would be to create an additional attribute that 
could be used by my framework internals that determines the browser and 
calls the correct JSP for the user automatically.

Something like:

  ...
  return myMapping.findForward(success);
  ...

Which calls into a wrapper class that I create and determines the browser, 
then calling the appropriate JSP as defined in the config file.  This makes 
it very simple for the user, as he only needs to define a series of 
'success's, and the Action code is simple as defined above.

Now, obviously, adding an additional attribute to the forward above is not 
trivial.  So my question, is has anyone seen anything like this, and is 
there a way I haven't thought of to do this within the current struts 
framework?

One thought I've had would be to do the following:

  forward name=ie_success path=/ie/test.jsp/
  forward name=ns_success path=/ns/test.jsp/
  forward name=wap_success path=/wap/test.jsp/

This would work and not require many changes to the framework, but I would 
rather not do this, as it would make things very difficult for my users to 
create their own actions.

Another possibility is the following:

  forward name=success path=test.jsp /
  browserforward name=success browser=ie path=/ie/test.jsp /
  browserforward name=success browser=ns path=/ns/test.jsp /
  browserforward name=success broswer=wap path=/wap/test.jsp /

In this case, I would need to create another XML entry that kept all of the 
'success' forwards for each action in its own little HashTable, much like 
the normal forwards, except keyed by a combination of the name and the 
browser attributes.

I honestly don't know how difficult this would be, but it seems like the 
best solution I've come up with so far.  One obvious drawback to this one is 
that the struts DTD would need to be altered to include the 'browserforward' 
element.  I am not sure of the implications of this.

Any thoughts?

Thanks for your time.

Hans Bure
_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Having problems passing more than one parameter with html:link tag

2001-06-14 Thread Shamdasani Nimmi-ANS004

Hi,

I am trying to pass 2 parameters with html:link. Since it is not legal to use the same 
attribute name more than once in the same tag, I created another reference 'tempId'  
to my 'submitQuotesForm' bean using  bean:define tag but I am only getting the last 
param 'supplier_seq'  added to my link.

Here's my JSP code:

  bean:define id=tempId  name=submitQuotesForm 
type=com.motorola.mms.msqc.beans.SubmitQuotesForm /
  html:link href=part.do 
  paramId=motorola_part paramName=submitQuotesForm paramProperty=partNbr
  paramId=supplier_seq paramName=tempId paramProperty=supplierSeq 
  bean:write name=submitQuotesForm property= partNbr  /
  /html:link


What am I doing wrong?

-Nimmi




Re: Doubt in I18N

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Sunil P.S. wrote:

 Is there anything extra to be done for application to work in other
 languages. The docs says that it is same as JDK internationalization
 and we have to just modify the web.xml and pass the properties file as
 init paramter to the ActionServlet. 
 
 Is there anything extra to be done in the code
 

If you are using bean:message to display internationalized messages (or
the appropriate calls to the application's MessageResources object in your
Actions), you don't have to make any code changes to work in multiple
languages -- just add your properties files for the messages in each
appropriate language.  This works well as long as all of the languages can
be displayed in the same character encoding -- if you need different
encodings for different languages, you may need to organize your app
differently.

 
 -sunil.
 

Craig McClanahan





Re: HREF link question

2001-06-14 Thread Craig R. McClanahan



On Wed, 13 Jun 2001, Rick Horowitz wrote:

 Hi,
 
 I'm trying to use href links with Struts templates, and can't figure out 
 how to make my href links work properly.  [Templates seem to work just 
 fine, otherwise.]... my compliments.
 
 1. I want to use Struts html:link tags so that to automatically do URL 
 session encoding.
 

Struts does this automatically for you.

 2. I want to use absolute URLs to make coding of urls more robust. For 
 example, if I have a directory structure of JSPs:
  jsp
  jsp/prodinfo
  jsp/faq
   ...I want to be able to code the url something like... 
 jsp/faq/faq1.jsp or jsp/prodinfo/info1.jsp, in case I change the directory 
 structure, rather than using relative links, e.g. ../faq/faq1.jsp.
 

I have found it best to use context-relative URLs starting with a
/ character throughout my applications, rather than trying to use
relative links -- for the reasons that you are probably familiar with.  To
do that for links, use the page attribute to specify the destination --
Struts will prepend the context path of the current application for you,
so that the browser always goes the right place.  For example, you might
code:

html:link page=/jsp/faq/faq1.jspTo the FAQ/html:link

 3. For the portion of the website that I'm currently working on, I am 
 creating href links from one JSP to other JSPs.  [For other portions of the 
 website, I will be using an MVC architecture, hence forwarding from a 
 servlet to a JSP and vice versa.]
 

It works either way, but remember that links directly from one page to
another bypasses the controller -- and therefore bypasses the stuff that
the controller servlet does for you.


 4. I have tried various approaches to using the html:base/ tag in the 
 HTML HEAD section of my Struts template file, not using a base tag, and 
 have tried using the following to set the html base:
  BASE HREF=%= http://;
  +request.getServerName() +:
  +request.getServerPort()
  +request.getContextPath() %/ 
   Although the latter works with regular a href  tags, it does not 
 seem to work with html:link Struts tags.
 

See the html:base/ tag for a way to do this automatically.

However, whether you create it yourself or not, the base element affects
only relative hyperlinks.  If you follow my suggestion above (always use
context-relative links), you won't need it.

 I have tried a variety of combinations of these base tags with a variety of 
 combinations of url encodings, but cannot seem to get them to work -- 
 except with regular a href tags using the
  BASE HREF=%= http://;
  +request.getServerName() +:
  +request.getServerPort()
  +request.getContextPath() %/ 
  base tag setting.
 
 Thank you in advance to anyone who can help,
 
 
 Rick Horowitz
 
 

Craig





nested logic:present tags do not short-circuit

2001-06-14 Thread Steve Salkin
Title: nested logic:present tags do not short-circuit





Hi-


Am I correct to say that in the case of nested logic:present tags, the false evaluation of the first one will not short-circuit, or prevent the evaluation of, the second one?

For example, in the case that a Form has a Bean A, which itself has a Bean B, and when B is null, the following:
 logic:present name=A property=B
 logic:present name=A property=B.property
 some jsp/html
 /logic:present
 /logic:present


will still fail because the second logic tag is evaluated and the null-pointer is dereferenced. 


If this is correct, is this by design? Is this a bug? Is there a way to accomplish what I am trying to do here?


Any thoughts appreciated.


Thanks,


S-





Re: Struts on Weblogic ...

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001 [EMAIL PROTECTED] wrote:

 
 Hi,
 
 I am using weblogic 5.1 server  struts 1.0 b3. I get the following error
 
 Error in tag library at: 'form': The Tag class
 'org.apache.struts.taglib.html.ImageTag' has no setter method corresponding
 to TLD declared attribute 'path', (JSP 1.1 spec, 5.4.)
 
 Has anyone encountered such prob? Any suggestions on solving it.
 

Are you using the struts-form.tld tag library?  This is deprecated -- you
should be using the struts-html.tld library instead.  The form library
got renamed to html, and the old TLD is there only for backwards
compatibility.

 Thanks,
 Nagalli
 
 
 
 
 

Craig McClanahan





Re: ActionForms for read-only data??

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, hi there wrote:

 Craig,
 
 The ActionForm class definition seems to imply that it was intended to 
 contain only editable data (i.e., the reset and validate methods).  
 Distinguishing between read and write functionality in the enterprise 
 systems I have developed was always a major advantage, both in extensibility 
 and code maintainability, as usually each type of functionality had 
 different processing requirments.  It seems that if we mix read and write 
 functionality into one ActionForm instance, we will have some bulky 
 classes to maintain.  Any comments?  Thanks.
 

There are probably multiple reasonable approaches to dealing with 
read-only data.  Let's consider some of the ways you can do this:

(1) Expose the data as JavaBeans *other than* the form bean:

This is quite easy, since you can do things like bean:write
to generate the output, logic: to test, and so on.
However, you are mildly increasing the linkage between the
model layer and the view layer -- now the developers have to
agree on the bean name, and the properties to be used.  The
tradeoff is that you might be able to reuse beans (such as
value objects in an EJB based app) that already exist.

(2) Copy the read-only data into the form bean:

This is particularly useful in several use cases:
- You only want to access the data nested inside the html:form
- You don't want to create the extra dependency on a bean name
  (since you can reference the form bean implicitly)
- A particular property might be read-only in some uses of the
  form and read-write in others (see the username field of the
  RegistrationForm bean in the example application).
However, adding new properties means going back and updating the
form bean class every time, which can be tedious if it's not being
automatically generated.

In practice, I have used both techniques -- but in particular I find
myself needing data outside the nested body of an html:form, in which
case I really need to use technique (1) anyway.

Part of my internal system documentation (for the various developers) is a
clear description of the bean names (and scopes), and the properties that
they expose, that the page developer can count on.  This seems to deal
with most of the manageability issues, but none of these apps have had a
very long life yet since Struts has only been around a year :-).

Craig McClanahan


 From: Craig R. McClanahan [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: ActionForms for read-only data??
 Date: Mon, 11 Jun 2001 17:01:31 -0700 (PDT)
 
 
 
 On Mon, 11 Jun 2001 [EMAIL PROTECTED] wrote:
 
   I have a Struts theory question on use of action forms versus java beans
   for read-only data.
  
   We have extended workflow on our website such that the same form can 
 look a
   bit different depending on where you are in the workflow.
   For example, the quote request will have limit and retention fields in 
 the
   business request section.  Once you get to quote, those fields are
   read-only and there's an additional quote amount field.  When the client
   requests binder, all those fields are read-only and there is a checkbox.
   Once bound, everything is read-only.
  
   There is some disagreement on the team as to how to handle this case.  
 We
   will obviously have four JSPs, one for each of these presentations.  The
   question is the data mapping to beans.
  
   Half of the team feels that to use Struts in its purest sense, we need 
 to
   have java beans that represent the read-only data, and action forms to
   represent the editable data.  That would mean four action forms, one for
   each JSP.
  
   The other half of the team wants to re-use the same action form for all
   four cases, bean:define it in the session, and use bean:write to print 
 out
   the data if read-only.  The major advantage is simplicity - we have one
   bean that represents all of the data - there is no need to understand 
 what
   part of the workflow we are in when translating the data from the data
   model to the presentation layer beans.  It is also easier to understand 
 for
   an HTML programmer or developer that the same bean is used regardless of
   whether it is a bean:write or any of the html tags.
  
   We certainly don't want to end up in a position where we have broken the
   framework and hurt our extensibility in future releases.  The first
   scenario would seem to follow the framework more closely, but in this
   special case, is it a problem to deviate and use the ActionForm for what 
 it
   is - a bean?
   We would appreciate any advice and experiences.
   Thank you.
  
 
 Ted covered a couple of the issues in his response -- I'd like to add a
 few more thoughts.  I don't think there are cut-and-dried answers to an
 issue like this, so it's a question of balancing the tradeoffs.
 
 If you are using the same JSP page itself for the 

RE: RE: [Not registered, use system identifier] - the cause of mypro

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, dsf65b y b3763476b3 wrote:

 If by resources you mean these files:
 
   struts-config_1_0_1.dtd
   web-app_1_2.dtd
   web-app_2_3.dtd
 
 I'm afraid I already did that, to no avail.
 

 In fact my struts-config.xml and webapp.xml start like this respectively:
 
   !DOCTYPE struts-config SYSTEM
   http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd;
 
   !DOCTYPE web-app SYSTEM
   http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;


No, you need to use the *PUBLIC* identifiers.  See the struts-config.xml
and web.xml files from the example application.

I can guarantee that this works -- I did an online Struts demo in my
JavaOne session on web application architectures, without a connection to
the Internet.  :-)

 
 I've tried editing those so they read:
 
   !DOCTYPE struts-config SYSTEM
   
file://C:/progra~1/ibm/visual~1/ide/projec~1/ibmweb~1/hosts/defaul~1/mywebapp/servlets/apache/struts/resources/struts-config_1_0.dtd
 
 But this resulted in that it can't even load the ActionServlet!
 
 So it seems I'm stuck :(
 
 brgds,
 S. Bro
 

Craig





RE: Iterate tag update?

2001-06-14 Thread Shamdasani Nimmi-ANS004

Martin,

Could you please give an example of how it can be used? I just did the index naming 
the old fashioned way(i.e., adding index to the property string)  and would like to 
replace it.

Thanks.

-Nimmi
-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 11:43 PM
To: [EMAIL PROTECTED]
Subject: Re: Iterate tag update?


I just checked in a change to the iterate tag which allows you to access the
current index as a scripting variable. If you specify the 'indexId'
attribute, a scripting variable with the specified name will contain the
current index (as an Integer) on each iteration. This will be available in
the 6/14 nightly build, and also in Struts 1.0.

--
Martin Cooper


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 13, 2001 9:36 AM
Subject: Iterate tag update?




 I have a question similar to Mark Kettner's.

 Could someone give an update on the iterate tag, and where it stands with
the
 ability to get hold of the current index.

 I need to have each field in each table row with a different name (ie
include
 the index in it) to reference particular one using javascript.

 do I need a custom tag for this, or is one available?

 thanks very much,

 Dave







Re: struts-config.xml - How do I open a success path as a new window???

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Peter Alfors wrote:

 
 What happens when you execute this?
 
 td align=lefta class=leftnav href=myAction.do
 target=_blankbean:message key=icon.calendar//td
 
 I would think that this should do what you want??
 

You can also use the target attribute on an html:form or html:link
tag:

  td align=left
html:link styleclass=leftnav page=/myAction.do
   target=_blank
  bean:message key=icon.calendar/
/html:link
  /td

One advantage to this is that URL rewriting is automatically applied to
maintain session state even if you're not using cookies.

 Pete
 

Craig


 
   -Original Message-
   From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, June 13, 2001 1:52 AM
   To: [EMAIL PROTECTED]
   Subject: struts-config.xml - How do I open a success path
   as a new window???
 
   Hi!!
 
   I want to my path
 
   forward name=success path=/InsertAddress.jsp/
 
   to open the jsp-page as a new window/page ( like the html
   tag
 
   td align=lefta class=leftnav href=http://./;
   target=_blankbean:message key=icon.calendar//td )
 
   Any ideas how to do this with struts???
 
   Thanks / Linnéa
 
 
 
 




Re: Accessing session attributes

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, James Howe wrote:

 This is probably a stupid question, but here it goes.  I have a handful of 
 string values that I'm storing in the session object.  These values aren't 
 associated with any bean (actually, in a sense the session object is the 
 bean).  I have a couple of places where I need to display these values in a 
 form.  I want to use the html:text tag, but I don't know what I need to 
 specify.  Let me give an example.  Suppose I have a String value stored in 
 the session by the name of filter.  How would I get the filter value to 
 display in a form text field?
 
 Thanks.
 
 

You can use the bean:write name=foo/ tag to simply write out the value
of a string stored under key foo to the output page.  However, if you
want to pre-initialize a field to be displayed by html:text, you need to
arrange to call the appropriate property setter on your form bean.

Craig McClanahan





RE: My app no longer loads message resources

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Noel Sebastien wrote:

 Hello,
 
 I would like to launch additional initializations at strut servlet start-up,
 such as instantiating myObject that must read its configuration in a file.
 Where can I put code in order to be sure that it will be executed at
 start-up (I mean once) ?
 Thank you in advance.
 

In a servlet 2.2 environment, there is not a really good way to do
this.  What most people do is create a separate servlet that is marked
load-on-startup in the web.xml file, and then do the initialization in
the init() method.  The Struts example application does exactly this --
check out the DatabaseServlet class.

In a servlet 2.3 environment, one of the new features is called
application event listeners.  You will be able to register a listener
class that is notified when the application is started up, and when it is
shut down.  This will be a handy place to do the kind of setup you are
talking about, once 2.3-based containers are broadly available.


  - Sébastien Noel - 
  

Craig McClanahan




Re: Having problems passing more than one parameter with html:link tag

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Shamdasani Nimmi-ANS004 wrote:

 Hi,
 
 I am trying to pass 2 parameters with html:link. Since it is not legal to use the 
same attribute name more than once in the same tag, I created another reference 
'tempId'  to my 'submitQuotesForm' bean using  bean:define tag but I am only 
getting the last param 'supplier_seq'  added to my link.
 
 Here's my JSP code:
 
   bean:define id=tempId  name=submitQuotesForm 
type=com.motorola.mms.msqc.beans.SubmitQuotesForm /
   html:link href=part.do 
   paramId=motorola_part paramName=submitQuotesForm 
paramProperty=partNbr
   paramId=supplier_seq paramName=tempId paramProperty=supplierSeq 
   bean:write name=submitQuotesForm property= partNbr  /
   /html:link
 

Using paramId and paramName only works if you want to add a *single*
parameter to the link.  XML does not allow you to specify the same
attributes twice in a single tag.

If you want to add multiple parameters, use the following approach:
* Create a Map (such as a HashMap or TreeMap) where the keys
  are the parameter names and the values are either String (for
  a single parameter value) or array of String (for multiple
  parameter value).
* Use bean:define or some other technique to introduce this
  object into some appropriate scope.  I tend to do this in
  my Actions (or business logic that they delegate to).
* Code your link tag like this:
bean:define id=parametersMap .../
html:link href=part.do name=parametersMap
  ...
/html:link

 
 What am I doing wrong?
 
 -Nimmi
 
 

Craig





Re: Multiple Forwards

2001-06-14 Thread Ted Husted

You could start by adding a method to a base class for your application
that would append a tag according to the browser detected, and then use
this scheme: 

   forward name=ie_success path=/ie/test.jsp/
   forward name=ns_success path=/ns/test.jsp/
   forward name=wap_success path=/wap/test.jsp/

by returning something like 
return ( findForward( browserTag(success) ) ;

where browserTag prepended the ie part. 

The idea of being to forward to relative directories also came up here
the other day:


http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg01779.html


Hans Bure wrote:
 
 Hi all,
 
 I am a relatively new struts user, so if the question I'm asking has been
 answered before, I appologize ahead of time.
 
 What I'm trying to do, is create a framework integrated with struts that,
 among other things, allows users to set up multiple forwards dependent on
 the broswer type.  This could be Netscape, IE, WAP browser, or others.
 
 What I would like to do is something like the following in the
 struts-config.xml file:
 
 ...
 action name=test
   ...
   forward name=success browser=IE path=/ie/test.jsp/
   forward name=success browser=NS path=/ns/test.jsp/
   forward name=success browser=WAP path=/wap/test.jsp/
   ...
 /action
 ...
 
 The reasoning behind this, would be to create an additional attribute that
 could be used by my framework internals that determines the browser and
 calls the correct JSP for the user automatically.
 
 Something like:
 
   ...
   return myMapping.findForward(success);
   ...
 
 Which calls into a wrapper class that I create and determines the browser,
 then calling the appropriate JSP as defined in the config file.  This makes
 it very simple for the user, as he only needs to define a series of
 'success's, and the Action code is simple as defined above.
 
 Now, obviously, adding an additional attribute to the forward above is not
 trivial.  So my question, is has anyone seen anything like this, and is
 there a way I haven't thought of to do this within the current struts
 framework?
 
 One thought I've had would be to do the following:
 
   forward name=ie_success path=/ie/test.jsp/
   forward name=ns_success path=/ns/test.jsp/
   forward name=wap_success path=/wap/test.jsp/
 
 This would work and not require many changes to the framework, but I would
 rather not do this, as it would make things very difficult for my users to
 create their own actions.
 
 Another possibility is the following:
 
   forward name=success path=test.jsp /
   browserforward name=success browser=ie path=/ie/test.jsp /
   browserforward name=success browser=ns path=/ns/test.jsp /
   browserforward name=success broswer=wap path=/wap/test.jsp /
 
 In this case, I would need to create another XML entry that kept all of the
 'success' forwards for each action in its own little HashTable, much like
 the normal forwards, except keyed by a combination of the name and the
 browser attributes.
 
 I honestly don't know how difficult this would be, but it seems like the
 best solution I've come up with so far.  One obvious drawback to this one is
 that the struts DTD would need to be altered to include the 'browserforward'
 element.  I am not sure of the implications of this.
 
 Any thoughts?
 
 Thanks for your time.
 
 Hans Bure



Re: Having problems passing more than one parameter with html:link tag

2001-06-14 Thread Ted Husted

I think you would need to use a map here.

 http://jakarta.apache.org/struts/struts-html.html#link 

Normally, the hyperlink you specify with one of the attributes
described in the previous
paragraph will be left unchanged (other than URL rewriting if
necessary). However, there
are two ways you can append one or more dynamically defined query
parameters to the
hyperlink -- specify a single parameter with the paramId attribute (and
its associated
attributes to select the value), or specify the name (and optional
property) attributes to
select a java.util.Map bean that contains one or more parameter ids and
corresponding values.

Shamdasani Nimmi-ANS004 wrote:
 I am trying to pass 2 parameters with html:link. Since it is not legal to use the 
same attribute name more than once in the same tag, I created another reference 
'tempId' to my 'submitQuotesForm' bean using  bean:define tag but I am only getting 
the last param 'supplier_seq' added to my link.



RE: struts-config.xml - How do I open a success path as a new window???

2001-06-14 Thread Abraham Kang

Thanks Pete,
Abraham

 -Original Message-
 From: Peter Alfors [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 14, 2001 6:57 AM
 To: [EMAIL PROTECTED]
 Subject: Re: struts-config.xml - How do I open a success path as a new
 window???


 Your javascript code looks correct.  :)

 However, if at all possible, I would avoid using javascript.  Basically,
 because the user may have javascript turned off in their browser.

 Pete

 Abraham Kang wrote:

  Hi Linnea,  I think it would be easier to usea class=leftnav
  href=javascript:window.open('yourAction.do','windowName',
  'status=no')Your action will return mapping.findForward(success)
  to load the popup windows contents.Pete,  my javascript is rusty so if
  you see any errors please correct.--Abraham
 
   -Original Message-
   From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, June 13, 2001 1:52 AM
   To: [EMAIL PROTECTED]
   Subject: struts-config.xml - How do I open a success path
   as a new window???
 
   Hi!!
 
   I want to my path
 
   forward name=success path=/InsertAddress.jsp/
 
   to open the jsp-page as a new window/page ( like the html
   tag
 
   td align=lefta class=leftnav href=http://./;
   target=_blankbean:message key=icon.calendar//td )
 
   Any ideas how to do this with struts???
 
   Thanks / Linnéa
 
 
 





Tomcat 4.0

2001-06-14 Thread Marc-andre Thibodeau


Hi,

I'm trying to upgrade from Tomcat 3.2.1 to Tomcat 4.0.  I had no problem
installing 3.2.1, but 4.0 just doesn't work for me.  I'm on Linux and
when I execute ./startup.sh, I have the first two echo lines appearing:

Using CLASSPATH:
usagers/eree_devel/soft/jakarta-tomcat-4.0-b5/bin/bootstrap.jar:
/usagers/eree_devel/soft/jdk1.3.x/lib/tools.jar
Using CATALINA_HOME: /usagers/eree_devel/soft/jakarta-tomcat-4.0-b5


but then nothing happens, even if that part of the catalina.sh script
seems to be executed:

$JAVA_HOME/bin/java $CATALINA_OPTS -classpath $CP \
 -Dcatalina.home=$CATALINA_HOME \
 org.apache.catalina.startup.Bootstrap $@ start \
  $CATALINA_HOME/logs/catalina.out 21 


I've set CATALINA_HOME and JAVA_HOME correctly and put the downloaded
servlet.jar file in $CATALINA_HOME/lib.
Any idea what can be the problem??

MA




Opening a file

2001-06-14 Thread Jonathan



Hello All.
If I want to read in a file from a class which is 
NOT A SERVLET, such as Action, how do I refer to it. Let me clarify 
this. If it was a servlet I could have got the context, and from there a 
relative path. BUT, from within a class there IS NO CONTEXT. For 
example, I am running weblogic. When I search for a file without 
specifying the path it searches from the "weblogic" directory, the place where I 
ran the startup script. I only know this to be true because after 1000 
painfull attempts it finally loaded my xml file from that directory when I 
placed it there. How do you refer to a file from within a non servlet 
class? Here is my code to refer to the file I want to open:

File mappingfile = new 
File("character_mappings.xml");


RE: Declarative security constraints

2001-06-14 Thread Gogineni, Pratima

I have a general question regarding security constraints - if you are using
the form based authentication - is the login page allowed to match one of
the url-patterns in the security constraints.

I found that this kind of set up goes into an infinite loop -
understandably.
The question is - it should be possible to detect this  not go into an
infinite loop?
I couldnt find anything in the servlet spec 2.2 regarding this...

thanks
pratima
-Original Message-
From: Geddes, Mark (ANTS) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 5:42 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Declarative security constraints


Craig wrote:

Have you tried a URL pattern like this?

  url-pattern/action1.do/url-pattern

The syntax of URL patterns used in security constraints is exactly like
that used in servlet mappings, and this would be an exact match pattern
for path /action1 (assuming you are using the usual *.do mapping for the
controller servlet).

Well I thought I had, but obviously I hadn't, as it works fine. Thanks.


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: 13 June 2001 18:04
To: Struts-User@Jakarta. Apache. Org (E-mail)
Subject: Re: Declarative security constraints




On Wed, 13 Jun 2001, Geddes, Mark (ANTS) wrote:

 I am using the security-constraint tag in web.xml to protect access to
my
 pages.
 I have been unable to use this method to restrict access to specific
 requests, say 'action1.do'. I assume this is because only the resources
are
 protected (i.e. the actual JSPs).
 The upshot is that I am protecting the whole web-app using
 url-pattern/*/url-pattern.
 This is fine. It is an intranet site and it means that I can use
 request.isUserInRole() and request.getUserPrincipal() in the confidence
that
 I know the user has been forced to authenticate themselves.
 The problem comes when I want to restrict certain actions based upon the
 user's role. In the perform() method of my Action class I have to use
 request.isUserInRole(). I would like to be able to do this declaratively
 rather than programmatically, either using the security-constraint
 declaration in web.xml, or possibly as part of the action declaration in
 struts-config.xml.
  
 Question1: Have I missed something obvious in my use of the
 security-constraint mechanism?

Have you tried a URL pattern like this?

  url-pattern/action1.do/url-pattern

The syntax of URL patterns used in security constraints is exactly like
that used in servlet mappings, and this would be an exact match pattern
for path /action1 (assuming you are using the usual *.do mapping for the
controller servlet).

 Question2: If not, would this make a useful extension to the Struts
 framework?
  

I've thought about the idea of incorporating role-based checking into the
controller servlet itself, but it seems like a duplication of what you can
already do in the container (such as the above).  However, a place where
it might be useful is if you have a scripted workflow of some sort, and
certain steps would be executed or skipped based on the roles possessed by
the authenticated user.

 Thanks in advance.
  
 Mark
 

Craig McClanahan



***
This email message contains confidential information for the above addressee
only.  If you are not the intended addressee you must not disclose or use
the information in any manner whatsoever.

Any opinion or views contained in this email message are those of the
sender, do not represent those of the Company in any way and reliance should
not be placed upon its contents.

Unless otherwise stated this email message is not intended to be
contractually binding.  Where an Agreement exists between our respective
companies and there is conflict between the contents of this email message
and the Agreement then the terms of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered
Office:  Abbey House, Baker Street, London NW1 6XL.  Company Registration
No: 2338548.  Regulated by the SFA
***



Re: Help with struts-example...

2001-06-14 Thread Ryan Cornia

This makes much more sense now. However, I was looking at the Javadoc, and it appears 
PropertyUtils.copyProperties is deprecated. Is there other functionality somewhere to 
use to copy the properties from the form (where properties are all strings) to the 
data bean (where properties might be Long, Integer, Date, etc...)? How does it take 
care of the conversion? 

Thanks,
Ryan


 [EMAIL PROTECTED] 06/13/01 12:39PM 


On Wed, 13 Jun 2001, Ryan Cornia wrote:

 In the struts-example, there is an OrganizationForm, and an
 Organization bean. They have identical fields and getters and setters.
 Why is the logic duplicated in both places? Couldn't OrganizationForm
 extend Organization, or have a organization bean in it that you
 could reference from a form somehow? This seems like a lot of
 duplication that doesn't add value.
 
 Am I missing something here?
 
 Ryan
 
 
 

The key issue is that the two objects have different purposes.

Organization is a data access object, representing the real live
information in your database.  As such, you do not want to be making any
changes to it unless you've validated that those changes are correct.  
There will typically be one Organization style class per different
business object in your database, possibly with pointers to other business
objects as well.

OrganizationForm is required to be a subclass of ActionForm, and it is
really part of the view layer of an MVC architecture.  It's primary
purpose is to be able to reproduce the input that the user typed, if
validation fails and the user is returned to that particular input form
again.

Consider what would happen if you've got an integer property in your
database object (not true with Organization, but very common in real
life).  The corresponding property type on your data access object would
undoubtedly be an int.  But you would *not* want to do this on your
OrganizationForm bean.  You want the property to be a String instead.

Why?  Consider that the HTML representation of the input field lets the
user type anything they want, and say your user types 1A3.  You want
your form bean's validate() method to be able to catch this, create an
appropriate error message, and -- when the user is returned to the input
form again -- have the field pre-filled-out with 1A3 (exactly what the
user typed).  This is a standard user expectation based on the way GUI
programs work, and web apps that violate this expectation will get low
marks for user friendliness.

Another consideration is that a data access object will typically contain
properties for all of the underlying database information, while form
beans need to have only the properties that are required for this form.  
Different developers take different views of whether a form bean should
include all the properties (I tend to be a minimalist, and only define
properties for the fields actually on the form), but having different
objects that are not in the same inheritance hierarchy gives you the
option to mix and match as needed.

Craig






RE: html:link only uses the last param* attributes

2001-06-14 Thread Peter Doyle

Hi,
 No I never solved that problem. What I did is what Struts tells you to do
which is create a Hashtable or something and put your parameters into that.
Then you can have as many as you want.

Here is what I do in one case in an Edit Action to set up the form.

Hashtable parameters = new Hashtable();
parameters.put(action, Edit);
parameters.put(creativeType, Box);
destForm.setUploadBoxLinkParameters(parameters);

Then in the jsp
html:link page=/readyUploadCreative.do name=boxInfoForm
property=uploadBoxLinkParameters

Peter


-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: 14 June 2001 17:45
To: '[EMAIL PROTECTED]'
Subject: html:link only uses the last param* attributes


Hi peter,

I read this e-mail of yours in struts archives:

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

Were you able to solve this problem. If yes then could you please send me
your solution.

TIA.

-Nimmi




RE: html:link only uses the last param* attributes

2001-06-14 Thread Shamdasani Nimmi-ANS004

Peter,

In my case the 2 parameters to be passed with html:link are dynamic. The link is for 
a column on each row of an editable table and the parameters passed are specific to 
each row. 

I wonder if someone has a solution. Anyone???

-Nimmi

-Original Message-
From: Peter Doyle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 1:43 PM
To: Shamdasani Nimmi-ANS004
Cc: [EMAIL PROTECTED]
Subject: RE: html:link only uses the last param* attributes


Hi,
 No I never solved that problem. What I did is what Struts tells you to do
which is create a Hashtable or something and put your parameters into that.
Then you can have as many as you want.

Here is what I do in one case in an Edit Action to set up the form.

Hashtable parameters = new Hashtable();
parameters.put(action, Edit);
parameters.put(creativeType, Box);
destForm.setUploadBoxLinkParameters(parameters);

Then in the jsp
html:link page=/readyUploadCreative.do name=boxInfoForm
property=uploadBoxLinkParameters

Peter


-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: 14 June 2001 17:45
To: '[EMAIL PROTECTED]'
Subject: html:link only uses the last param* attributes


Hi peter,

I read this e-mail of yours in struts archives:

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

Were you able to solve this problem. If yes then could you please send me
your solution.

TIA.

-Nimmi



adding checkbox to form

2001-06-14 Thread Mike Thompson



I am displaying a collection of beans in a form 
with logic:iterate. Here is the loop
 html:form 
action="updateservices.do" 
name="serviceForm" 
type="com.instanton.secureex.web.form.ServiceForm" 
logic:iterate id="service" 
name="services" 
TR 
TD 
align="center" 
html:text name="service" 
property="name"/ 
/TD

 
TD 
align="center" 
html:checkbox name="service" 
property="authenticated"/ 
/TD

 
TD align = 
"center" 
html:checkbox name="service" 
property="encrypted"/ 
/TD 
/TR 
/logic:iterate

 
TR 
TD/TDTD/TD 
TD 
align="right" 
html:submit 
bean:message 
key="main.update"/ 
/html:submit 
/TD 
/TR /html:form

Note I am not using any getter setter methods from 
the form itself. What I would like to do is add a checkbox for each row 
for a delete and an update button. The update would rip through the 
collection and update the appropriate rows and delete the row if the delete 
button was checked. Seems pretty standard. I am not sure how to go 
about doing this. In my action, how do I get a hold of my original 
collection? How do I get a hold of the values of the checkboxes? How 
do I use the ActionForm in this case when I am not reading data from it? 
Would I use theActionForm to pass the checkbox and updated items to the 
action class? How are getter/setter methods handled when I have a 
collection?

 --confused

Michael R. Thompsonhttp://www.instanton.com512.439.3815


RE: Struts on Weblogic ...

2001-06-14 Thread Abraham Kang

Hi Nagalli,

   I got this problem with some of the builds of Struts.  I thought this was
fixed recently.  My solution was to try different builds.

--Abraham

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]
 Sent: Thursday, June 14, 2001 2:23 AM
 To: [EMAIL PROTECTED]
 Subject: Struts on Weblogic ...



 Hi,

 I am using weblogic 5.1 server  struts 1.0 b3. I get the following error

 Error in tag library at: 'form': The Tag class
 'org.apache.struts.taglib.html.ImageTag' has no setter method
 corresponding
 to TLD declared attribute 'path', (JSP 1.1 spec, 5.4.)

 Has anyone encountered such prob? Any suggestions on solving it.

 Thanks,
 Nagalli









RE: help with package struts-classpath

2001-06-14 Thread Abraham Kang

Chuck,

   Can you tell which classes are getting the invalid package declaration?

   By the way,  I haven't used NetBeans before but I am having a hard time
understanding why you have ActionForward and ActionMapping in two places
under classes.

   I thought these classes were in the org.apache.struts.action package.  My
guess is you are providing custom ActionForward and ActionMapping classes.

--Abraham

 -Original Message-
 From: Chuck Amadi [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 14, 2001 7:50 AM
 To: [EMAIL PROTECTED]
 Subject: Re: help with package struts-classpath


 Is This Better Jonathan  !! Cheers Chuck

 Jonathan wrote:

 Part 1.1Type: Plain Text (text/plain)
 Encoding: quoted-printable

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.






RE: Declarative security constraints

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Gogineni, Pratima wrote:

 I have a general question regarding security constraints - if you are using
 the form based authentication - is the login page allowed to match one of
 the url-patterns in the security constraints.
 

Yes it's allowed.  Otherwise, you could not use a URL pattern like /* to
protect the entire web application.

 I found that this kind of set up goes into an infinite loop -
 understandably.
 The question is - it should be possible to detect this  not go into an
 infinite loop?
 I couldnt find anything in the servlet spec 2.2 regarding this...
 

Tomcat 3.2, if I remember correctly, has problems with this.  Tomcat 4.0
(and I'm sure other servers do to) handles it correctly.

 thanks
 pratima

Craig




Re: Help with struts-example...

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Ryan Cornia wrote:

 This makes much more sense now. However, I was looking at the Javadoc,
 and it appears PropertyUtils.copyProperties is deprecated. Is there
 other functionality somewhere to use to copy the properties from the
 form (where properties are all strings) to the data bean (where
 properties might be Long, Integer, Date, etc...)? How does it take
 care of the conversion?
 
 Thanks,
 Ryan
 

The PropertyUtils and BeanUtils classes are deprecated only in the sense
that they will be replaced with equivalent classes from the Jakarta
Commons project, once they are released.  The calling sequences will stay
the same -- only the import clauses will change.

Currently, conversion is supported in the BeanUtils versions of these
classes (by use of the ConvertUtils utility methods).  One of the desired
enhancements in Struts 1.1 will be a way to configure conversions for more
than the standard supported stuff (basically just the Java primitive
types).

Craig





RE: Having problems passing more than one parameter with html:link tag

2001-06-14 Thread Shamdasani Nimmi-ANS004

Craig,

In my case the link is on a column of an editable indexed properties table. And the 2 
parameters for each row would be specific to that row. So where/how would I get the 
parameters into a HashMap?

The JSP code is like this:

  % int i=0; %
  logic:iterate id=rfq name=submitQuotesForm property=rfqListBean.rfqList
  tr
td
  bean:write name=submitQuotesForm property= '%= rfqListBean.rfqList[ + i 
+].usingLocationCode %' /
/td

td
  html:link href=part.do paramId=motorola_part paramName=submitQuotesForm 
paramProperty='%= rfqListBean.rfqList[ + i +].motorolaPartNbr %' bean:write 
name=submitQuotesForm property= '%= rfqListBean.rfqList[ + i +].motorolaPartNbr 
%'  /
  /html:link
/td

td
  html:text property='%= rfqListBean.rfqList[ + i +].PriceObjective %' 
size=5 /
/td

 and so on..

  tr
/logic:iterate

Thanks

-Nimmi
-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 12:46 PM
To: struts-user@jakarta. apache. org (E-mail)
Subject: Re: Having problems passing more than one parameter with
html:link tag




On Thu, 14 Jun 2001, Shamdasani Nimmi-ANS004 wrote:

 Hi,
 
 I am trying to pass 2 parameters with html:link. Since it is not legal to use the 
same attribute name more than once in the same tag, I created another reference 
'tempId'  to my 'submitQuotesForm' bean using  bean:define tag but I am only 
getting the last param 'supplier_seq'  added to my link.
 
 Here's my JSP code:
 
   bean:define id=tempId  name=submitQuotesForm 
type=com.motorola.mms.msqc.beans.SubmitQuotesForm /
   html:link href=part.do 
   paramId=motorola_part paramName=submitQuotesForm 
paramProperty=partNbr
   paramId=supplier_seq paramName=tempId paramProperty=supplierSeq 
   bean:write name=submitQuotesForm property= partNbr  /
   /html:link
 

Using paramId and paramName only works if you want to add a *single*
parameter to the link.  XML does not allow you to specify the same
attributes twice in a single tag.

If you want to add multiple parameters, use the following approach:
* Create a Map (such as a HashMap or TreeMap) where the keys
  are the parameter names and the values are either String (for
  a single parameter value) or array of String (for multiple
  parameter value).
* Use bean:define or some other technique to introduce this
  object into some appropriate scope.  I tend to do this in
  my Actions (or business logic that they delegate to).
* Code your link tag like this:
bean:define id=parametersMap .../
html:link href=part.do name=parametersMap
  ...
/html:link

 
 What am I doing wrong?
 
 -Nimmi
 
 

Craig




Servlet log

2001-06-14 Thread Upadhye, Sujit (GEAE, Foreign National)

Hi,

I have a question regarding servlet log mechanism.

Where does the servlet.log(String msg, int level) write the message to? Can
I set the destination in some configuration file? In Tomcat, there is a
directory users\www\logs. However, this statement apparently does not write
into it.

Thanks in advance,

Sujit



RE: Having problems passing more than one parameter with html:link tag

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Shamdasani Nimmi-ANS004 wrote:

 Craig,
 
 In my case the link is on a column of an editable indexed properties
 table. And the 2 parameters for each row would be specific to that
 row. So where/how would I get the parameters into a HashMap?
 

Well, you've got them already don't you?  The keys are the two things you
are trying to pass for paramId and the values are the corresponding things
you are trying to look up with paramName and paramProperty.

In your page, it looks like you're using runtime expressions to try to get
the values dynamically.  To do it in the page, you'd need to use
scriptlets.  However, I would tend to have created an appropriate HashMaps
in the Action that forwarded to this page, so all I'd have to do is
reference it -- perhaps even create an array of HashMaps (one per row) so
that it corresponds to your data lookups.

Craig




Re: Servlet log

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Upadhye, Sujit (GEAE, Foreign National) wrote:

 Hi,
 
 I have a question regarding servlet log mechanism.
 
 Where does the servlet.log(String msg, int level) write the message to?

That is totally up to the servlet container to decide.

 Can
 I set the destination in some configuration file? In Tomcat, there is a
 directory users\www\logs. However, this statement apparently does not write
 into it.
 

Different versions of Tomcat are configured differently, but they
certainly do write to files in the logs directory if you configure them
to.  For example, in Tomcat 4 you'll see an entry like this in server.xml:

  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_log. suffix=.txt
  timestamp=true/

which establishes that the default logger (unless you override it at a
lower level) writes to files named catalina_log.-MM-DD.txt in the
logs directory.

Other servlet containers will provide their own mechanisms for
configuring where logging goes.

 Thanks in advance,
 
 Sujit
 

Craig





RE: Opening a file

2001-06-14 Thread Abraham Kang



Hi 
Jonathan,

 I have only done this as a stan alone app but I think it 
should work for you as long as the file you want to read is on the 
classpath.

Here 
is the code:

import 
java.io.*;public class Cat { public static void 
main (String args[]) { String 
thisLine; Class cl = Cat.class; 
 try 
{ BufferedReader 
myInput = new 
BufferedReader 
(new InputStreamReader( cl.getResourceAsStream("test.xml") 
));

 while 
((thisLine = myInput.readLine()) != null) { 
 
System.out.println(thisLine); 
} 
} catch (Exception e) 
{ 
e.printStackTrace(); } } 
}

--Abraham

  -Original Message-From: Jonathan 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, June 14, 2001 11:05 
  AMTo: [EMAIL PROTECTED]Subject: Opening a 
  file
  Hello All.
  If I want to read in a file from a class which is 
  NOT A SERVLET, such as Action, how do I refer to it. Let me clarify 
  this. If it was a servlet I could have got the context, and from there a 
  relative path. BUT, from within a class there IS NO CONTEXT. For 
  example, I am running weblogic. When I search for a file without 
  specifying the path it searches from the "weblogic" directory, the place where 
  I ran the startup script. I only know this to be true because after 1000 
  painfull attempts it finally loaded my xml file from that directory when I 
  placed it there. How do you refer to a file from within a non servlet 
  class? Here is my code to refer to the file I want to open:
  
  File mappingfile = new 
  File("character_mappings.xml");


RE: Multiple Forwards

2001-06-14 Thread Niall Pemberton

Hans,

Comments in the text below.

Niall

 -Original Message-
 From: Hans Bure [mailto:[EMAIL PROTECTED]]
 Sent: 14 June 2001 17:40
 To: [EMAIL PROTECTED]
 Subject: Multiple Forwards


 Hi all,

 I am a relatively new struts user, so if the question I'm asking has been
 answered before, I appologize ahead of time.

 What I'm trying to do, is create a framework integrated with struts that,
 among other things, allows users to set up multiple forwards dependent on
 the broswer type.  This could be Netscape, IE, WAP browser, or others.

 What I would like to do is something like the following in the
 struts-config.xml file:

 ...
 action name=test
   ...
   forward name=success browser=IE path=/ie/test.jsp/
   forward name=success browser=NS path=/ns/test.jsp/
   forward name=success browser=WAP path=/wap/test.jsp/
   ...
 /action
 ...

You can't have multiple forwards with the same name because they are stored
in a HashMap which uses the name as the key - so they will just overwrite
each other.



 The reasoning behind this, would be to create an additional
 attribute that
 could be used by my framework internals that determines the browser and
 calls the correct JSP for the user automatically.

 Something like:

   ...
   return myMapping.findForward(success);
   ...

 Which calls into a wrapper class that I create and determines the
 browser,
 then calling the appropriate JSP as defined in the config file.
 This makes
 it very simple for the user, as he only needs to define a series of
 'success's, and the Action code is simple as defined above.

 Now, obviously, adding an additional attribute to the forward
 above is not trivial.

Creating your own custom ActionForward is straight forward, but I don't
think it gives you much benefit.

Extend ActionForward and add the addtional properties you require.


/* CustomActionForward Class ** START **/
public Class CustomActionForward extends ActionForward {

  private String browser;

  public void setBrowser(String browser){
this.browser = browser;
  }

  public String getBrowser(){
return browser;
  }
}
/* CustomActionForward Class ** END **/

Then you need to tell Struts to use your CustomActionForward.

In the servlet entry in the web.xml file add the following init-param

  init-param
param-nameforward/param-name
param-valuemyPackage.CustomActionForward/param-name
  /init-param

Then in your struts-config.xml file use set-property to initialise your
addtional properties:

  action 
forward name=ie_success path=/ie/test.jsp
  set-property property=browser value=ie/
/forward
forward name=ns_success path=/ns/test.jsp
  set-property property=browser value=ns/
/forward
forward name=wap_success path=/wap/test.jsp
  set-property property=browser value=wap/
/forward
  /action

Obviously this is not very elegant and I you probably won't want to do this.

 So my question, is has anyone seen anything like this, and is
 there a way I haven't thought of to do this within the current struts
 framework?

 One thought I've had would be to do the following:

   forward name=ie_success path=/ie/test.jsp/
   forward name=ns_success path=/ns/test.jsp/
   forward name=wap_success path=/wap/test.jsp/

 This would work and not require many changes to the framework,
 but I would
 rather not do this, as it would make things very difficult for my
 users to create their own actions.

Personally this doesn't look any more difficult for you user than what you
are proposing below.


 Another possibility is the following:

   forward name=success path=test.jsp /
   browserforward name=success browser=ie path=/ie/test.jsp /
   browserforward name=success browser=ns path=/ns/test.jsp /
   browserforward name=success broswer=wap path=/wap/test.jsp /

 In this case, I would need to create another XML entry that kept
 all of the
 'success' forwards for each action in its own little HashTable, much like
 the normal forwards, except keyed by a combination of the name and the
 browser attributes.

 I honestly don't know how difficult this would be, but it seems like the
 best solution I've come up with so far.  One obvious drawback to
 this one is
 that the struts DTD would need to be altered to include the
 'browserforward'
 element.  I am not sure of the implications of this.

It would be a pain every time you took a new release of Struts - I wouldn't
do this.


 Any thoughts?

If you don't mind the constraints it imposes how about this for a solution:


For forwards which are browser specific create your entries in
struts-config.xml as follows:

   forward name=success path=/$browser$/test.jsp/

Then in your action you need to do something along the following lines:

  // Determine the Browser being used
  String browser = ?

  // Get the ActionForward
  ActionForward origForward = mapping.findForward(success);

  // replace /$browser$ in the path with the browser
  String 

Radio bution Question = How can I change the radio button name?

2001-06-14 Thread Bill Clinton

Hello -
I am writing a page that has a dynamic list of questions that require 
radio button responses. In my actionform, I am storing the list of 
questions in an ArrayList of QuestionAnswer objects. These 
QuestionAnswer objects are basically the id of the question, the text of 
the question, and the answerId.

My jsp code looks like this:


html:form action=/answerQuestions.do
table
tr
td align=centerQuestion/td
td align=center colspan=3Answer/td
/tr
logic:iterate id=item name=questions scope=request 
property=questionAnswers type=com.company.QuestionAnswer 
property=questionAnswers
tr
tdbean:write name=item property=questionDesc//td
tdhtml:radio name=item property=answerId value=0/n/a/td
tdhtml:radio name=item property=answerId value=1/yes/td
tdhtml:radio name=item property=answerId value=2/no/td
/tr
/logic:iterate
/table
html:submit/
/html:form

So, I basically iterate through the list of questions, and it works, for 
the most part. The problem is that the html:radio tag uses the property 
name as the radio button name, and there seems to be no way to override 
this. So the html code ends up looking like this:

tr
tdQuestion 1:/td
tdinput type=radio name=answerId value=0no answer/td
tdinput type=radio name=answerId value=1 checked=trueyes/td
tdinput type=radio name=answerId value=2no/td
/tr
tr
tdQuestion 2:/td
tdinput type=radio name=answerId value=0no answer/td
tdinput type=radio name=answerId value=1yes/td
tdinput type=radio name=answerId value=2 checked=trueno/td
/tr
tr
tdQuestion 3:/td
tdinput type=radio name=answerId value=0no answer/td
tdinput type=radio name=answerId value=1 checked=trueyes/td
tdinput type=radio name=answerId value=2no/td
/tr


So, instead of getting 3 groups of 3 options, I am essentially getting 1 
group of 9 options, because it is using the same name over and over 
again. Is there any way to overide the name value for the radio tag? 
It does not seem very flexible to me, is this an oversight that may be 
fixed? Would my only option be to write my own custom tag that extends 
the functionality of struts html:radio tag? Or possibly I should rethink 
the way I am storing the questions in my actionform?

Thanks,
Bill




Updating application resource file (Internationalization)

2001-06-14 Thread Sandeep . Yawale





Hi All,



Is it possible to update the application resource file run time?
  (applicationresources.properties file)

I want to change the associated messages at run time.



If yes, how to do that?



- Sandeep





Re: Other Frameworks?

2001-06-14 Thread Ted Husted

Have you seen this:

  http://barracuda.enhydra.org/cvs_source/Barracuda/docs/landscape.html


 Steven Leija wrote:
 
 Hey All,
 
 I was asked to evaluate java frameworks that are available such as
 Struts, Turbine, Barracuda, Smartmode, Velocity, Expresso, Niggle,
 Tapestry, and Swinglets.  Does anyone have any sort of opinion over
 which frameworks are the best?  Which frameworks are not the best or
 ideal to use?  Do any of the frameworks compliment others?  Does
 Struts work well with other frameworks such as Cocoon?
 
 I'm in favor of Struts, but I must evaluate other frameworks to come
 up with a the pro's and con's with each framework and why Struts is
 more dominate over it's competitor frameworks.



Proposal to add indexed to tags for Grid/Matrix-type use of Struts

2001-06-14 Thread dhay



Hi everyone.

I have been working on adding the new functionality of the iterate tag (the
getIndex() method) to relevant tags to allow me to refer to each of them in each
row in a table ie creating indexed names such as
name=myCollection[i].myProperty  (search mailing list for Grid or Matrix for
further ref).

I have had good success by simply adding a few lines of code to the
BaseHandlerTag.java which gets the index of the collection being iterated over
and creates indexed names, if indexed=true is added to the tag.  eg

  html:text name=parameter property=value indexed=true/
   produces
 input type=text name=parameter[0].value value=Mac etc.

This works great for the html:text, html:hidden etc that extend BaseFieldTag.
It is a simple matter to add the functionality to Button, Cancel, Checkbox etc..

Note this is somewhat different to code Jeff Trent posted, in that the index is
NOT specified, but is derived from the iterated collection directly.  It also
adds functionality to the regular Struts tags, rather than creating another set
of Indexedxxx tags (though, I made reference to Jeff's code, along with Martin
Cooper's!)

I would like to propose these simple change are made to the Struts tag (though
probably not for 1.0!!).  It seems to me that are pretty clean, and would make a
big difference to the above type of usage.  If anyone would like to view this
code, please let me know (although it will be next week now, as I am off
tomorrow - yippee!!).

Cheers,

Dave





Re: help with package struts-classpath

2001-06-14 Thread Dan Miser

Take a real close look at the spelling in the following 2 lines.
--
Dan Miser
http://www.distribucon.com

Hi, does anyone no why i now reciveve the following invalid package
declarations

My Package classpath is
struts-bbnpa/WEB-INF/classes/org/breconbeacons/it/ActionForward.java // (and
the retst of the classes.
struts-bbnpa the name of my webapp.
I have declared  package org.breaconbeacons.it;//  top of java classes.




Re: HREF link question

2001-06-14 Thread Rick Horowitz

Hi Craig,

Thanks for your response. Unfortunately, it still doesn't work.  I tried 
two different approaches: with the html:base/ tag and without it, and I 
get the same result in both cases:

 I code the following link:

 html:link 
page=/jsp/prodinfo/prodinfo.jspIntroduction/html:link

 The html source (in the browser, Netscape 4.6.1 or IE 4.72) shows:

 When I use the html:base/ tag:

 base 
href=http://localhost:8080/backup/jsp/prodinfo/prod-info.jsp;   in the 
HTML head section, and

 The link is generated as:

 a 
href=/backup/jsp/prodinfo/prodinfo.jspIntroduction/aas the href link

 When I mouse over the link in the browser, the status line at the 
bottom of the browser window displays:

 http://localhost:8080/backup/jsp/prodinfo/prod-info.jsp

 When I click the link, I get the following in the browser window:

 Not Found (404)
 Original request: /backup/jsp/prodinfo/prodinfo.jsp

 Not found request: /backup/jsp/prodinfo/prodinfo.jsp

Am I doing something wrong?  Must be, since you use this approach all the 
time.  Thanks again for your help.  It is greatly appreciated.

Rick Horowitz


At 09:59 AM 6/14/01 -0700, you wrote:


On Wed, 13 Jun 2001, Rick Horowitz wrote:

  Hi,
 
  I'm trying to use href links with Struts templates, and can't figure out
  how to make my href links work properly.  [Templates seem to work just
  fine, otherwise.]... my compliments.
 
  1. I want to use Struts html:link tags so that to automatically do URL
  session encoding.
 

Struts does this automatically for you.

  2. I want to use absolute URLs to make coding of urls more robust. For
  example, if I have a directory structure of JSPs:
   jsp
   jsp/prodinfo
   jsp/faq
...I want to be able to code the url something like...
  jsp/faq/faq1.jsp or jsp/prodinfo/info1.jsp, in case I change the directory
  structure, rather than using relative links, e.g. ../faq/faq1.jsp.
 

I have found it best to use context-relative URLs starting with a
/ character throughout my applications, rather than trying to use
relative links -- for the reasons that you are probably familiar with.  To
do that for links, use the page attribute to specify the destination --
Struts will prepend the context path of the current application for you,
so that the browser always goes the right place.  For example, you might
code:

 html:link page=/jsp/faq/faq1.jspTo the FAQ/html:link

  3. For the portion of the website that I'm currently working on, I am
  creating href links from one JSP to other JSPs.  [For other portions of 
 the
  website, I will be using an MVC architecture, hence forwarding from a
  servlet to a JSP and vice versa.]
 

It works either way, but remember that links directly from one page to
another bypasses the controller -- and therefore bypasses the stuff that
the controller servlet does for you.


  4. I have tried various approaches to using the html:base/ tag in the
  HTML HEAD section of my Struts template file, not using a base tag, and
  have tried using the following to set the html base:
   BASE HREF=%= http://;
   +request.getServerName() +:
   +request.getServerPort()
   +request.getContextPath() %/ 
Although the latter works with regular a href  tags, it does not
  seem to work with html:link Struts tags.
 

See the html:base/ tag for a way to do this automatically.

However, whether you create it yourself or not, the base element affects
only relative hyperlinks.  If you follow my suggestion above (always use
context-relative links), you won't need it.

  I have tried a variety of combinations of these base tags with a 
 variety of
  combinations of url encodings, but cannot seem to get them to work --
  except with regular a href tags using the
   BASE HREF=%= http://;
   +request.getServerName() +:
   +request.getServerPort()
   +request.getContextPath() %/ 
   base tag setting.
 
  Thank you in advance to anyone who can help,
 
  
  Rick Horowitz
 
 

Craig


Rick Horowitz




RE: Declarative security constraints

2001-06-14 Thread Gogineni, Pratima

Okay that answers my question I guess - I tried this on tomcat3.2

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 12:17 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Declarative security constraints




On Thu, 14 Jun 2001, Gogineni, Pratima wrote:

 I have a general question regarding security constraints - if you are
using
 the form based authentication - is the login page allowed to match one of
 the url-patterns in the security constraints.
 

Yes it's allowed.  Otherwise, you could not use a URL pattern like /* to
protect the entire web application.

 I found that this kind of set up goes into an infinite loop -
 understandably.
 The question is - it should be possible to detect this  not go into an
 infinite loop?
 I couldnt find anything in the servlet spec 2.2 regarding this...
 

Tomcat 3.2, if I remember correctly, has problems with this.  Tomcat 4.0
(and I'm sure other servers do to) handles it correctly.

 thanks
 pratima

Craig



RE: Other Frameworks?

2001-06-14 Thread Flying Cloud

Steven,

Since you asked about what frameworks compliment others

Expresso Framework for example is being integrated with Struts so as to
complement Struts. We're a lot closer with this integration with the release
last week of Expresso 3.1. There is a development roadmap onsite under
Documentation, and as I understand it the full integration is to be out
sometime around the end of July. We have forums on both our User and
Developers Forums discussing this integration. You can find the forums at:
http://www.jcorporate.com/components/internal/projframe.jsp?category=65 and
selecting the Forums link in the left column (you need to be registered for
access).

I tried to catch up with Craig McClanahan during the show to talk to him
about this integration and the night of the Struts BOF I had a prior meeting
to receive an award - so dang missed out on the BOF.  BTW the Jcorporate
Open Source Team for Expresso Framework, received the prestigious 2001 Java
Community Award for Outstanding Group Technical Contribution to the Java
Community, at the Third Annual Java Technology Achievement Awards event,
held during JavaOne in San Francisco. This event was sponsored by Java Pro
magazine and Sun Microsystems. This award was one of 5 Java Community Awards
for 2001.
http://www.java-pro.com/upload/free/Features/Javapro/2001/07jul01/awards/aw0
107-2.asp

Sandra Cann
[EMAIL PROTECTED]




Re: Servlet log

2001-06-14 Thread Peter Alfors


In the tomcat/conf/server.xml file, search for:

Logger name=servlet_log
path=logs/servlet.log

Also, the xml file describes the logging options.

Pete

Upadhye, Sujit (GEAE, Foreign National) wrote:

 Hi,

 I have a question regarding servlet log mechanism.

 Where does the servlet.log(String msg, int level) write the message to? Can
 I set the destination in some configuration file? In Tomcat, there is a
 directory users\www\logs. However, this statement apparently does not write
 into it.

 Thanks in advance,

 Sujit




RE: need some help.......

2001-06-14 Thread Jiten Mohanty
Title: need some help...



Niall
Thanks 
for a quick response.I tried but got the following 
error.

javax.servlet.ServletException: Cannot find bean jas in 
scope null
Jiten

  -Original Message-From: Niall Pemberton 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 13, 
  2001 5:18 PMTo: [EMAIL PROTECTED]Subject: 
  RE: need some help...
  "jas" 
  is not in "session" scope - the iterator is creating it for each iteration 
  (must be page scope?) - try it without the "scope":
  
  bean:write name="jas" 
  property="attr"/
  
  Niall
  
  -Original 
  Message-From: Jiten Mohanty 
  [mailto:[EMAIL PROTECTED]]Sent: 14 June 2001 
  23:57To: [EMAIL PROTECTED]Subject: need 
  some help...
  
Hi folks 
I am trying to iterate through a array of 
objects.Here is the code.. 
logic:iterate id="jas" name="countBeanForm" 
property="mbeanOper" type="Ipseal.JbossOperationForm" 
scope="session"  
 td align="center" 
 
   
 bean:write name="jas" 
property="attr" scope="session"/  
  
 /td /logic:iterate 
property "mbeanOper" : returns 
array[objects] 
Each Object has a property called 
Attr[String](set  get).I want to display the each String in Attr[ ].Whe 
I run the code, i get the following error..
Error: 500 Location: 
/ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find bean 
jas in scope session  
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
 at 
_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299)
 at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
and on.. 
Can some body help on this. 

Jiten Software Enginer 


need some help.......

2001-06-14 Thread Jiten Mohanty
Title: need some help...






Hi folks


I am trying to iterate through a array of objects.Here is the code..


logic:iterate id=jas name=countBeanForm property=mbeanOper type=Ipseal.JbossOperationForm scope=session

  td align=center

  

   bean:write name=jas property=attr scope=session/

 

  

 /td

/logic:iterate


property mbeanOper : returns array[objects]


Each Object has a property called Attr[String](set  get).I want to display the each String in Attr[ ].Whe I run the code, i get the following error..

Error: 500

Location: /ipseal_demo/bean_count.jsp

Internal Servlet Error:

javax.servlet.ServletException: Cannot find bean jas in scope session

 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)

 at _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299)

 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)

and on..


Can some body help on this.


Jiten

Software Enginer





RE: need some help.......

2001-06-14 Thread Niall Pemberton
Title: need some help...



M...the iterator doesn't appear to becreating 
your "jas" bean from the elements of your array - the question is 
why?

1) 
Have you defined the logic taglib at the top of your jsp?
 %@ taglib 
uri="/WEB-INF/struts-logic.tld" prefix="logic" %

2) 
Does the array returned by your getMbeanOper() method contain any 
nulls?

Also...I've just noticed...are you saying the getAttr() 
method returns a String array - meaning you have a grid situation? If so you 
need an iterate within an iterate. Haven't done that but there are messages in 
the archive which talk about it.

Niall


  -Original Message-From: Jiten Mohanty 
  [mailto:[EMAIL PROTECTED]]Sent: 15 June 2001 
  00:30To: [EMAIL PROTECTED]Subject: RE: need 
  some help...
  Niall
  Thanks for a quick response.I tried but got the 
  following error.
  
  javax.servlet.ServletException: Cannot find bean jas 
  in scope null
  Jiten
  
-Original Message-From: Niall Pemberton 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 13, 
2001 5:18 PMTo: [EMAIL PROTECTED]Subject: 
RE: need some help...
"jas" is not in "session" scope - the iterator is 
creating it for each iteration (must be page scope?) - try it without the 
"scope":

bean:write name="jas" 
property="attr"/

Niall

-Original 
Message-From: Jiten Mohanty 
[mailto:[EMAIL PROTECTED]]Sent: 14 June 2001 
23:57To: [EMAIL PROTECTED]Subject: need 
some help...

  Hi folks 
  I am trying to iterate through a array of 
  objects.Here is the code.. 
  logic:iterate id="jas" name="countBeanForm" 
  property="mbeanOper" type="Ipseal.JbossOperationForm" 
  scope="session"  
   td align="center" 
   
 
   bean:write name="jas" 
  property="attr" scope="session"/  

   /td /logic:iterate 
  property "mbeanOper" : returns 
  array[objects] 
  Each Object has a property called 
  Attr[String](set  get).I want to display the each String in Attr[ 
  ].Whe I run the code, i get the following error..
  Error: 500 
  Location: 
  /ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find bean 
  jas in scope session  
  at 
  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
   at 
  _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299)
   at 
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
  and on.. 
  Can some body help on this. 
  
  Jiten Software Enginer 
  


RE: need some help.......

2001-06-14 Thread Niall Pemberton
Title: need some help...



"jas" 
is not in "session" scope - the iterator is creating it for each iteration (must 
be page scope?) - try it without the "scope":

bean:write name="jas" 
property="attr"/

Niall

-Original Message-From: 
Jiten Mohanty [mailto:[EMAIL PROTECTED]]Sent: 14 June 2001 
23:57To: [EMAIL PROTECTED]Subject: need some 
help...

  Hi folks 
  I am trying to iterate through a array of 
  objects.Here is the code.. 
  logic:iterate id="jas" name="countBeanForm" 
  property="mbeanOper" type="Ipseal.JbossOperationForm" 
  scope="session"  
   td align="center" 
   
 
   bean:write name="jas" 
  property="attr" scope="session"/  

   /td /logic:iterate 
  property "mbeanOper" : returns 
  array[objects] 
  Each Object has a property called Attr[String](set 
   get).I want to display the each String in Attr[ ].Whe I run the code, i 
  get the following error..
  Error: 500 Location: /ipseal_demo/bean_count.jsp 
  Internal Servlet Error: 
  javax.servlet.ServletException: Cannot 
  find bean jas in scope session 
   at 
  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
   at 
  _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299)
   at 
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
  and on.. 
  Can some body help on this. 
  Jiten Software Enginer 


RE: need some help.......

2001-06-14 Thread Craig R. McClanahan

There was a string of nightly builds of Struts a couple of months ago
where the iterate tag had a bug (not creating the id item).  This was
fixed -- are you trying this with a recent build like 1.0-b3?

Craig


On Thu, 14 Jun 2001, Niall Pemberton wrote:

 need some help...M...the iterator doesn't appear to be creating your
 jas bean from the elements of your array - the question is why?
 
 1) Have you defined the logic taglib at the top of your jsp?
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 
 2) Does the array returned by your getMbeanOper() method contain any nulls?
 
 Also...I've just noticed...are you saying the getAttr() method returns a
 String array - meaning you have a grid situation? If so you need an iterate
 within an iterate. Haven't done that but there are messages in the archive
 which talk about it.
 
 Niall
 
   -Original Message-
   From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]
   Sent: 15 June 2001 00:30
   To: [EMAIL PROTECTED]
   Subject: RE: need some help...
 
 
   Niall
   Thanks for a quick response.I tried but got the following error.
 
   javax.servlet.ServletException: Cannot find bean jas in scope null
 
   Jiten
 -Original Message-
 From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 13, 2001 5:18 PM
 To: [EMAIL PROTECTED]
 Subject: RE: need some help...
 
 
 jas is not in session scope - the iterator is creating it for each
 iteration (must be page scope?) - try it without the scope:
 
 bean:write name=jas property=attr/
 
 Niall
 
  -Original Message-
 From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]
 Sent: 14 June 2001 23:57
 To: [EMAIL PROTECTED]
 Subject: need some help...
 
 
   Hi folks
 
   I am trying to iterate through a array of objects.Here is the
 code..
 
   logic:iterate id=jas name=countBeanForm property=mbeanOper
 type=Ipseal.JbossOperationForm scope=session
   td align=center
 
   bean:write name=jas property=attr
 scope=session/
 
 
   /td
   /logic:iterate
 
   property mbeanOper : returns array[objects]
 
   Each Object has a property called Attr[String](set  get).I want to
 display the each String in Attr[ ].Whe I run the code, i get the following
 error..
 
   Error: 500
   Location: /ipseal_demo/bean_count.jsp
   Internal Servlet Error:
   javax.servlet.ServletException: Cannot find bean jas in scope session
   at
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
 l.java:459)
   at
 _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_
 0005fcount_0002ejspbean_0005fcount_jsp_44.java:299)
 
   at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
and on..
 
   Can some body help on this.
 
   Jiten
   Software Enginer
 
 




RE: need some help.......

2001-06-14 Thread Jiten Mohanty
Title: need some help...



Hey 
Niall,

You 
are the man..I got it running.Your suggestion about the nested iteration 
worked fine...Thanks buddy.I was trying hard to get this running.Saved my 
day.
Have a 
nice evening.

Jiten
Soft. 
Engineer
Ipseal 
Inc.
Denver, Colorado

  -Original Message-From: Niall Pemberton 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 13, 
  2001 6:08 PMTo: [EMAIL PROTECTED]Subject: 
  RE: need some help...
  M...the iterator doesn't appear to 
  becreating your "jas" bean from the elements of your array - the 
  question is why?
  
  1) 
  Have you defined the logic taglib at the top of your jsp?
   %@ taglib 
  uri="/WEB-INF/struts-logic.tld" prefix="logic" %
  
  2) 
  Does the array returned by your getMbeanOper() method contain any 
  nulls?
  
  Also...I've just noticed...are you saying the 
  getAttr() method returns a String array - meaning you have a grid situation? 
  If so you need an iterate within an iterate. Haven't done that but there are 
  messages in the archive which talk about it.
  
  Niall
  
  
-Original Message-From: Jiten Mohanty 
[mailto:[EMAIL PROTECTED]]Sent: 15 June 2001 
00:30To: [EMAIL PROTECTED]Subject: RE: 
need some help...
Niall
Thanks for a quick response.I tried but got the 
following error.

javax.servlet.ServletException: Cannot find bean 
jas in scope null
Jiten

  -Original Message-From: Niall Pemberton 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 
  13, 2001 5:18 PMTo: 
  [EMAIL PROTECTED]Subject: RE: need some 
  help...
  "jas" is not in "session" scope - the iterator is 
  creating it for each iteration (must be page scope?) - try it without the 
  "scope":
  
  bean:write name="jas" 
  property="attr"/
  
  Niall
  
  -Original 
  Message-From: Jiten Mohanty 
  [mailto:[EMAIL PROTECTED]]Sent: 14 June 2001 
  23:57To: [EMAIL PROTECTED]Subject: need 
  some help...
  
Hi folks 
I am trying to iterate through a array of 
objects.Here is the code.. 
logic:iterate id="jas" 
name="countBeanForm" property="mbeanOper" 
type="Ipseal.JbossOperationForm" scope="session"   td 
align="center"  
   
 bean:write name="jas" 
property="attr" scope="session"/  
  
 /td /logic:iterate 
property "mbeanOper" : returns 
array[objects] 
Each Object has a property called 
Attr[String](set  get).I want to display the each String in Attr[ 
].Whe I run the code, i get the following error..
Error: 500 
Location: 
/ipseal_demo/bean_count.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find 
bean jas in scope session 
 at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
 at 
_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44.java:299)
 at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
and on.. 
Can some body help on 
this. 
Jiten Software Enginer 



RE: need some help.......

2001-06-14 Thread Jiten Mohanty
Title: RE: need some help...






Craig,


Thanks for the response.I got it running


Jiten


-Original Message-

From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]

Sent: Thursday, June 14, 2001 6:21 PM

To: [EMAIL PROTECTED]

Subject: RE: need some help...



There was a string of nightly builds of Struts a couple of months ago

where the iterate tag had a bug (not creating the id item). This was

fixed -- are you trying this with a recent build like 1.0-b3?


Craig



On Thu, 14 Jun 2001, Niall Pemberton wrote:


 need some help...M...the iterator doesn't appear to be creating your

 jas bean from the elements of your array - the question is why?

 

 1) Have you defined the logic taglib at the top of your jsp?

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

 

 2) Does the array returned by your getMbeanOper() method contain any nulls?

 

 Also...I've just noticed...are you saying the getAttr() method returns a

 String array - meaning you have a grid situation? If so you need an iterate

 within an iterate. Haven't done that but there are messages in the archive

 which talk about it.

 

 Niall

 

 -Original Message-

 From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]

 Sent: 15 June 2001 00:30

 To: [EMAIL PROTECTED]

 Subject: RE: need some help...

 

 

 Niall

 Thanks for a quick response.I tried but got the following error.

 

 javax.servlet.ServletException: Cannot find bean jas in scope null

 

 Jiten

 -Original Message-

 From: Niall Pemberton [mailto:[EMAIL PROTECTED]]

 Sent: Wednesday, June 13, 2001 5:18 PM

 To: [EMAIL PROTECTED]

 Subject: RE: need some help...

 

 

 jas is not in session scope - the iterator is creating it for each

 iteration (must be page scope?) - try it without the scope:

 

 bean:write name=jas property=attr/

 

 Niall

 

 -Original Message-

 From: Jiten Mohanty [mailto:[EMAIL PROTECTED]]

 Sent: 14 June 2001 23:57

 To: [EMAIL PROTECTED]

 Subject: need some help...

 

 

 Hi folks

 

 I am trying to iterate through a array of objects.Here is the

 code..

 

 logic:iterate id=jas name=countBeanForm property=mbeanOper

 type=Ipseal.JbossOperationForm scope=session

 td align=center

 

 bean:write name=jas property=attr

 scope=session/

 

 

 /td

 /logic:iterate

 

 property mbeanOper : returns array[objects]

 

 Each Object has a property called Attr[String](set  get).I want to

 display the each String in Attr[ ].Whe I run the code, i get the following

 error..

 

 Error: 500

 Location: /ipseal_demo/bean_count.jsp

 Internal Servlet Error:

 javax.servlet.ServletException: Cannot find bean jas in scope session

 at

 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp

 l.java:459)

 at

 _0002fbean_0005fcount_0002ejspbean_0005fcount_jsp_44._jspService(_0002fbean_

 0005fcount_0002ejspbean_0005fcount_jsp_44.java:299)

 

 at

 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)

 and on..

 

 Can some body help on this.

 

 Jiten

 Software Enginer

 

 





Out of Memory Errors?

2001-06-14 Thread Spencer Smith

This occurs when a very large query is performed.  Anyone know of a way
around this?

Weblogic Output:

; nested exception is:
java.lang.OutOfMemoryError:
Start server side stack trace:
java.lang.OutOfMemoryError




How can I use an Iterator's value twice?

2001-06-14 Thread Digico

This problem loosely related to a couple of others that I've seen recently
on this list, and it's a common enough thing to do that there must be a
simple solution that I just don't see.

I want to produce a list of search results as hyperlinks in which each list
value is displayed AND is used in the link, as in:

ol
lia href=/myapp/fetchItem.do?key=key_1key_1/a
lia href=/myapp/fetchItem.do?key=key_2key_2/a
lia href=/myapp/fetchItem.do?key=key_3key_3/a
... etc ...
/ol

I've tried using the iterate tag and a bean that has an Iterator property,
along with html:link as in the following sample:

logic:iterate id=results name=mainSearchBean
property=resultsIterator 
li
html:link page=/bookDetails.do
paramId=key paramName=? paramProperty=? 
bean:write name=results/
/html:link
/logic:iterate

I've tried setting paramId, paramName, and paramProperty in various ways but
nothing gives me the results I want.  The best I get is a list of hyperlinks
for the results as expected except that the actual links are all the same.
I also tried jamming a copy of the bean:write name=results tag in the
page attribute of html:link but that caused an exception.  Should I just
add a Map property to mainSearchBean and, if so, how would I use it to this
effect?

Thanks.

- Mark.





Beans shouldnt return values (my collegues argue)

2001-06-14 Thread Jonathan



My 2 collegues argue that the ActionForm (or any 
bean) should not return values. They argue that if some day they decide 
they want to insert a service between the Tag and the Bean,  it would complicate 
things because the inserted service would be forced to return the Beans object 
to the Tag:

BEFORE
TagBean

AFTER
TagServiceBean

If the new service wanted to return an int it 
couldnt because the Tag is expecting a bean.

I truthfully dont know the upside or downside to 
this, and I personally am not opposed to returning an object. They would 
like that the bean throw an Exception instead.

Could you all comment on this as I do not see a 
problem with a Bean returning an object


struts and weblogic 5.1 sp9

2001-06-14 Thread Grant Davies

Hi,

I've been trying to get the struts working with weblogic 5.1 sp9.  I have
the latest version of struts (jakarta-struts-1.0-b3)  and I successfully
deployed the struts-example.war.  (I can see it loaded and the servlets
register correctly, I can access the jsp's inside)

I can get the first page to come up by opening

http://localhost:7001/strutsexample

I can then click on the link

Register with the MailReader Demonstration Application

I then fill in a user name, password, 2nd password, full name, from address
and reply to address and then I hit save.

The servlet then fails and the exception I get in the console is:

Thu Jun 14 17:31:08 EDT 2001:E WebAppServletContext-strutsexample
Servlet failed with Exception
weblogic.servlet.jsp.JspException: (line 16): user is not defined as bean
at weblogic.servlet.jsp.JspLexer.jspException(JspLexer.java:673)
at
weblogic.servlet.jsp.JspLexer.mXML_GET_PROPERTY(JspLexer.java:2994)
at weblogic.servlet.jsp.JspLexer.mXML_THING(JspLexer.java:1707)
at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1612)
at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1548)
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:888)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109)
at
weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:312)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:227)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:20
0)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:115)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:138)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:158)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1758)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:915)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:879)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)

Can anyone shed light on this, its driving me nuts.  I've gone through all
the xml, dtd's, java source files and can find nothing wrong, and this is
the example that comes with struts, completely un-touched.

Cheers,
Grant Davies
b l u e t u b e p r o d u c t i o n s
http://www.bluetube.com
The new Bluetube Productions Sampler, coming August 2001




Re: struts and weblogic 5.1 sp9

2001-06-14 Thread Jonathan Asbell

try struts-example (with the hyphen)

- Original Message -
From: Grant Davies [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Phil Lentz (E-mail) [EMAIL PROTECTED]
Sent: Thursday, June 14, 2001 9:36 PM
Subject: struts and weblogic 5.1 sp9


 Hi,

 I've been trying to get the struts working with weblogic 5.1 sp9.  I have
 the latest version of struts (jakarta-struts-1.0-b3)  and I successfully
 deployed the struts-example.war.  (I can see it loaded and the servlets
 register correctly, I can access the jsp's inside)

 I can get the first page to come up by opening

 http://localhost:7001/strutsexample

 I can then click on the link

 Register with the MailReader Demonstration Application

 I then fill in a user name, password, 2nd password, full name, from
address
 and reply to address and then I hit save.

 The servlet then fails and the exception I get in the console is:

 Thu Jun 14 17:31:08 EDT 2001:E WebAppServletContext-strutsexample
 Servlet failed with Exception
 weblogic.servlet.jsp.JspException: (line 16): user is not defined as bean
 at weblogic.servlet.jsp.JspLexer.jspException(JspLexer.java:673)
 at
 weblogic.servlet.jsp.JspLexer.mXML_GET_PROPERTY(JspLexer.java:2994)
 at weblogic.servlet.jsp.JspLexer.mXML_THING(JspLexer.java:1707)
 at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1612)
 at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1548)
 at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:888)
 at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
 at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125)
 at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109)
 at
 weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242)
 at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:312)
 at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:227)
 at

weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:20
 0)
 at

weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
 :115)
 at

weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
 :138)
 at

weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
 l.java:158)
 at

org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
 va:1758)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
 at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
 at

weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
 :120)
 at

weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
 l.java:915)
 at

weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
 l.java:879)
 at

weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
 Manager.java:269)
 at

weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
 at
 weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)

 Can anyone shed light on this, its driving me nuts.  I've gone through all
 the xml, dtd's, java source files and can find nothing wrong, and this is
 the example that comes with struts, completely un-touched.

 Cheers,
 Grant Davies
 b l u e t u b e p r o d u c t i o n s
 http://www.bluetube.com
 The new Bluetube Productions Sampler, coming August 2001





Re: Out of Memory Errors?

2001-06-14 Thread Craig R. McClanahan



On Thu, 14 Jun 2001, Spencer Smith wrote:

 This occurs when a very large query is performed.  Anyone know of a way
 around this?
 
 Weblogic Output:
 
 ; nested exception is:
 java.lang.OutOfMemoryError:
 Start server side stack trace:
 java.lang.OutOfMemoryError
 
 

It means you are out of memory :-)

What happens is that when the JVM is started, it has an upper limit on the
total amount of memory it will allocate on the heap for Java objects.  If
you try to create more objects than you have room for, you get this
exception.

Typically, a JVM will support command line options to change the default
memory maximum (typically 32mb or 64mb).  With the standard Sun JVM, for
example, you do this with the -mx command line option.  Weblogic's
startup scripts might have some documented ways to do it from the command
line, or from a properties file, or something like that.

Craig





  1   2   >