Re: Advice requested, what's the best way to mimic tab panes in Struts?

2002-03-04 Thread Rob Breeds


1 ActionForm (session scope), 5 ActionMappings, one Action, 5 JSPs. Each
tab has link which submits form with that tab's form values, the tab submit
link is differentiated by mapping parameter attribute (or hidden form
field). ActionForm validate checks data is OK. Each submit of the current
tab is redirected back to the input page (the current tab). If the user
changes tabs, the mapping simply redirects to the appropriate page. Only
when the user clicks the final 'commit this lot' link should the Action
actually process the data.

Rob



   

theron.kousek@ 

webmd.netTo: Struts Users Mailing List 
[EMAIL PROTECTED]
 cc:   

04/03/2002   Subject: Advice requested, what's the 
best way to mimic tab panes in Struts?  
17:11  

Please respond 

to Struts 

Users Mailing  

List  

   

   






Hi Folks:

We're converting much of our GUI (written in JFC/Swing) to thin client
using HTML-JavaScript and the struts framework.

I have converted a few of the simpler maintenance screens using the
framework and (thanks to you all) have learned quite a bit with struts.

There is a screen that I need to convert though which has 5 panes in a
JTabbedPane control.Each pane refers to input in a different table but
all 5 panes together serve to obtain information about a Process Setup for
claims.So in other words, you fill out the info for all 5 tabs and when
you hit Ok, required field checks are performed.   If required fields are
ok, then data is gathered from each tab and the corresponding table is
updated for a total of 5 tables.   But they all belong to the same SQL
transaction.So it is not valid to update just 1 of the 5 tables.   It's
either all or none.So if the update/insert fails on any of the 5
tables, then the whole transaction is rolled back and the user is informed
of the problem.

With the JFC/Swing architecture, this is pretty easy to do.With struts
it seems different.   Do I need to have 5 forms (each form mimicing a tab)
with a hyperlink of image files that look like tabs but have href's to the
5 different forms?

Here's my problem:
- Don't forms need to have a Submit button? If so, I can't do this.   I
need to have 5 forms but one submit so that all 5 forms share the same
submit button (the 1 submit button would cause an action to take data off
of the 5 pages (or forms) and populate the tables directly.

What would be the best way to do this?I can't use a wizard as the user
needs to be able to flip back and forth at will thru any of the 5 forms
before they hit the final submit button.

thanks,
Theron


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





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




Re: internationalisation

2002-02-28 Thread Rob Breeds


Struts supports this very well. You just add the resource properties files
you need and Struts uses the correct one according to browser language
setting.

Errors and messages use keys to lookup values in the resource properties.

Rob




   

Struts 

NewsgroupTo: [EMAIL PROTECTED]

(@Basebeans.co   cc:   

m) struts   Subject: internationalisation 

   

28/02/2002 

13:40  

Please respond 

to Struts 

Users Mailing  

List  

   

   





Subject: internationalisation
From: Damien Wavrant [EMAIL PROTECTED]
 ===
how to internationalized an application using struts, like errors messages
per example ?
Is it possible to load dynamicaly a different
ApplicationRessource.properties (ApplicationRessource_FR.properties,
ApplicationRessources_US.properties) when user change the language ?

Thank



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





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




Re: Is internationalization with japanese possible?

2002-02-28 Thread Rob Breeds


Pretty much - add resources as required.

In your JSP add html:html locale=true

You will need to add META HTTP-EQUIV=Content-Type CONTENT=text/html;
charset=UTF-8 to JSP if using UTF-8. And set up your app server to encode
in UTF-8 if you want to support multiple languages in same page.

See Aaron's page at: http://www.anassina.com/struts/i18n/i18n.html

HTH

Rob





   

Torsten   

TrzeciakTo: [EMAIL PROTECTED]  

torsten@trzec   cc:   

iak.de  Subject: Is internationalization with 
japanese possible?  
   

28/02/2002 

18:41  

Please respond 

to Struts 

Users Mailing  

List  

   

   





Hallo,
I come from Germany and I would like to present my web page in japanese.
What is necessary? Just another resource ?

Thanks in advance





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




changing from *.do to /do/* screws up everything?

2002-02-27 Thread Rob Breeds

Hi

I hope this is me being dumb but I have a working Struts application that
uses a *.do servlet mapping for ActionServlet

Because I found that the servlet spec doesn't allow partial URL mappings
for security (eg. I can't specify a url-mapping of '/pub*'), I must now
change my app to use /do/*

Seems like a fine idea, and Ted says its cool :)

So, I changed the servlet mapping to '/do/*' and references to '*.do' in my
JSPs.

Now my app sort of works but all relative links are now broken - CSS,
images, JavaScript files

e.g. I have a URL of 'rest of path/do/header' and this is specified in
the config  file as:

  action path=/header forward=/WEB-INF/pages/header.jsp/

The page loads OK but the JSP references images like this:

img src=images/find_obj.gif

This used to work because images was a directory directly under the war
directory, but now, the image has a path of img src
=/do/images/find_obj.gif which isn't found. Simarly for references to
CSS files and JS files.

why is the /do/ prefix being added?


Please could anyone tell me what I have to do to get my JS, CSS and images
to load without changing every reference  to them in every JSP to include a
/do/?

Thanks

Rob



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




Re: changing from *.do to /do/* screws up everything?

2002-02-27 Thread Rob Breeds


Thanks for suggestion but I can't use html:base because all my JSPs are
under WEB-INF\pages

Putting html:base/ in will cause images (and any relative urls) to have
URLs of
img src=WEB-INF/pages/images/find_obj.gif

which is even worse (doesn't work at all) and defeats the point of putting
pages under WEB-INF!


Rob




|+-
||  Bryan  |
||  Field-Elliot   |
||  bryan_lists@ne|
||  tmeme.org |
|| |
||  27/02/2002 |
||  17:49  |
||  Please respond |
||  to Struts |
||  Users Mailing  |
||  List  |
|| |
|+-
  
---|
  |
   |
  |  To: Struts Users Mailing List [EMAIL PROTECTED]
   |
  |  cc:   
   |
  |  Subject: Re: changing from *.do to /do/* screws up everything?
   |
  |
   |
  |
   |
  
---|




Put this inside the head block of all your JSP pages:

html:base/

Here is a URL to the docs for this tag:

http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base

It solves exactly this problem.

Bryan

On Wed, 2002-02-27 at 10:39, Rob Breeds wrote:
 Hi

 I hope this is me being dumb but I have a working Struts application that
 uses a *.do servlet mapping for ActionServlet

 Because I found that the servlet spec doesn't allow partial URL mappings
 for security (eg. I can't specify a url-mapping of '/pub*'), I must now
 change my app to use /do/*

 Seems like a fine idea, and Ted says its cool :)

 So, I changed the servlet mapping to '/do/*' and references to '*.do' in
my
 JSPs.

 Now my app sort of works but all relative links are now broken - CSS,
 images, JavaScript files

 e.g. I have a URL of 'rest of path/do/header' and this is specified in
 the config  file as:

   action path=/header forward=/WEB-INF/pages/header.jsp/

 The page loads OK but the JSP references images like this:

 img src=images/find_obj.gif

 This used to work because images was a directory directly under the war
 directory, but now, the image has a path of img src
 =/do/images/find_obj.gif which isn't found. Simarly for references to
 CSS files and JS files.

 why is the /do/ prefix being added?


 Please could anyone tell me what I have to do to get my JS, CSS and
images
 to load without changing every reference  to them in every JSP to include
a
 /do/?

 Thanks

 Rob



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



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





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




Re: changing from *.do to /do/* screws up everything?

2002-02-27 Thread Rob Breeds

Because then users can't get to your JSPs directly by entering/guessing the
URL. (As recommended by Ted!)

Rob



|+
||  Eddie Bush|
||  ekbush@swbell|
||  .net |
|||
||  27/02/2002|
||  18:44 |
||  Please respond|
||  to Struts|
||  Users Mailing |
||  List |
|||
|+
  
---|
  |
   |
  |  To: Struts Users Mailing List [EMAIL PROTECTED]
   |
  |  cc:   
   |
  |  Subject: Re: changing from *.do to /do/* screws up everything?
   |
  |
   |
  |
   |
  
---|




Ok, silly question time.  Why would you want to put your pages under
WEB-INF?  Honestly, I don't see why you would, but ... I'm hardly a 'guru'.

Thanks,

Eddie

- Original Message -
From: Rob Breeds [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 11:58 AM
Subject: Re: changing from *.do to /do/* screws up everything?



 Thanks for suggestion but I can't use html:base because all my JSPs are
 under WEB-INF\pages

 Putting html:base/ in will cause images (and any relative urls) to have
 URLs of
 img src=WEB-INF/pages/images/find_obj.gif

 which is even worse (doesn't work at all) and defeats the point of
putting
 pages under WEB-INF!


 Rob




 |+-
 ||  Bryan  |
 ||  Field-Elliot   |
 ||  bryan_lists@ne|
 ||  tmeme.org |
 || |
 ||  27/02/2002 |
 ||  17:49  |
 ||  Please respond |
 ||  to Struts |
 ||  Users Mailing  |
 ||  List  |
 || |
 |+-


---
|
   |
|
   |  To: Struts Users Mailing List
[EMAIL PROTECTED]
|
   |  cc:
|
   |  Subject: Re: changing from *.do to /do/* screws up
everything?   |
   |
|
   |
|


---
|




 Put this inside the head block of all your JSP pages:

 html:base/

 Here is a URL to the docs for this tag:

 http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#base

 It solves exactly this problem.

 Bryan

 On Wed, 2002-02-27 at 10:39, Rob Breeds wrote:
  Hi
 
  I hope this is me being dumb but I have a working Struts application
that
  uses a *.do servlet mapping for ActionServlet
 
  Because I found that the servlet spec doesn't allow partial URL
mappings
  for security (eg. I can't specify a url-mapping of '/pub*'), I must now
  change my app to use /do/*
 
  Seems like a fine idea, and Ted says its cool :)
 
  So, I changed the servlet mapping to '/do/*' and references to '*.do'
in
 my
  JSPs.
 
  Now my app sort of works but all relative links are now broken - CSS,
  images, JavaScript files
 
  e.g. I have a URL of 'rest of path/do/header' and this is specified
in
  the config  file as:
 
action path=/header forward=/WEB-INF/pages/header.jsp/
 
  The page loads OK but the JSP references images like this:
 
  img src=images/find_obj.gif
 
  This used to work because images was a directory directly under the war
  directory, but now, the image has a path of img src
  =/do/images/find_obj.gif which isn't found. Simarly for references
to
  CSS files and JS files.
 
  why is the /do/ prefix being added?
 
 
  Please could anyone tell me what I have to do to get my JS, CSS and
 images
  to load without changing every reference  to them in every JSP to
include
 a
  /do/?
 
  Thanks
 
  Rob
 
 
 
  --
  To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]



 --
 To unsubscribe, e-mail:   
 mailto

Re: changing from *.do to /do/* screws up everything?

2002-02-27 Thread Rob Breeds


Matt

I changed '/header' to 'header', but now if I enter /do/header in the
browser address field it is now not found. Changed it back so it works

For this example, I have one mapping and one JSP file (under WEB-INF) which
has several references to CSS, JS and images each in their respective
directories under the war directory.

Using html:rewrite sorts out JS and CSS OK but to do this for every image
is going to be painful for my 'big app'. Is this where someone tells me I
should use the Struts image tag? :)

btw, I'm not trying to access the JSP directly - this IS going via a
mapping from do/header to the jsp!

Thanks

Rob




|+
||  Matt Raible   |
||  matt_raible@y|
||  ahoo.com |
|||
||  27/02/2002|
||  18:03 |
||  Please respond|
||  to Struts|
||  Users Mailing |
||  List |
|||
|+
  
---|
  |
   |
  |  To: Struts Users Mailing List [EMAIL PROTECTED]
   |
  |  cc:   
   |
  |  Subject: Re: changing from *.do to /do/* screws up everything?
   |
  |
   |
  |
   |
  
---|




Change this line:

action path=/header forward=/WEB-INF/pages/header.jsp/

TO

forward name=header path=/WEB-INF/pages/header.jsp/

and then use html:rewrite to render this in your JSP.

HTH,

Matt

--- Rob Breeds [EMAIL PROTECTED] wrote:
 Hi

 I hope this is me being dumb but I have a working Struts application that
 uses a *.do servlet mapping for ActionServlet

 Because I found that the servlet spec doesn't allow partial URL mappings
 for security (eg. I can't specify a url-mapping of '/pub*'), I must now
 change my app to use /do/*

 Seems like a fine idea, and Ted says its cool :)

 So, I changed the servlet mapping to '/do/*' and references to '*.do' in
my
 JSPs.

 Now my app sort of works but all relative links are now broken - CSS,
 images, JavaScript files

 e.g. I have a URL of 'rest of path/do/header' and this is specified in
 the config  file as:

   action path=/header forward=/WEB-INF/pages/header.jsp/

 The page loads OK but the JSP references images like this:

 img src=images/find_obj.gif

 This used to work because images was a directory directly under the war
 directory, but now, the image has a path of img src
 =/do/images/find_obj.gif which isn't found. Simarly for references to
 CSS files and JS files.

 why is the /do/ prefix being added?


 Please could anyone tell me what I have to do to get my JS, CSS and
images
 to load without changing every reference  to them in every JSP to include
a
 /do/?

 Thanks

 Rob



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



__
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com

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





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




Re: changing from *.do to /do/* screws up everything? - Jerry Springersums up...

2002-02-27 Thread Rob Breeds

OK, thanks Matt and Bryan for your help.

It seems that migrating from a *.do to /do/* is not as straightforward as
I'd hoped. Especially if putting JSPs under WEB-INF (which is better than
leaving them exposed).

While changing the servlet mapping is easy, it introduces an additional
artificial 'do' directory in the path which means that relative links are
relative to the base path/do/ rather than just the base path.

For JSPs that use JavaScript libraries (mine are in war
directory/scripts) and/or stylesheets (war directory/theme), this means
either use a relative URL like '../scripts/thescript.js' or use
html:rewrite  like so:

script language=JavaScript src=html:rewrite page='/
scripts/'/menu_functions.js/script

Likewise for images, I can either get to the images directory with
'../images/painting.gif' or use the Struts img tag, using page attribute
rather than src.

Using html:base seems a nice idea but if JSPs are under WEB-INF, any
reference will include WEB-INF and getting to JSPs like this is not allowed
by the spec.

Thank you and good night :)

Rob




|+
||  Matt Raible   |
||  matt_raible@y|
||  ahoo.com |
|||
||  27/02/2002|
||  19:25 |
||  Please respond|
||  to Struts|
||  Users Mailing |
||  List |
|||
|+
  
---|
  |
   |
  |  To: Struts Users Mailing List [EMAIL PROTECTED]
   |
  |  cc:   
   |
  |  Subject: Re: changing from *.do to /do/* screws up everything?
   |
  |
   |
  |
   |
  
---|




I expected that you would be trying to include the header in a JSP, rather
than
trying to access it directly.

All the html:rewrite does is render the path prefixed with the context.

Yep - img tag is what you need.

Matt

--- Rob Breeds [EMAIL PROTECTED] wrote:

 Matt

 I changed '/header' to 'header', but now if I enter /do/header in the
 browser address field it is now not found. Changed it back so it works

 For this example, I have one mapping and one JSP file (under WEB-INF)
which
 has several references to CSS, JS and images each in their respective
 directories under the war directory.

 Using html:rewrite sorts out JS and CSS OK but to do this for every image
 is going to be painful for my 'big app'. Is this where someone tells me I
 should use the Struts image tag? :)

 btw, I'm not trying to access the JSP directly - this IS going via a
 mapping from do/header to the jsp!

 Thanks

 Rob




 |+
 ||  Matt Raible   |
 ||  matt_raible@y|
 ||  ahoo.com |
 |||
 ||  27/02/2002|
 ||  18:03 |
 ||  Please respond|
 ||  to Struts|
 ||  Users Mailing |
 ||  List |
 |||
 |+



---|

   |
 |
   |  To: Struts Users Mailing List
[EMAIL PROTECTED]
 |
   |  cc:
 |
   |  Subject: Re: changing from *.do to /do/* screws up
everything?
 |
   |
 |
   |
 |



---|





 Change this line:

 action path=/header forward=/WEB-INF/pages/header.jsp/

 TO

 forward name=header path=/WEB-INF/pages/header.jsp/

 and then use html:rewrite to render this in your JSP.

 HTH,

 Matt

 --- Rob Breeds [EMAIL PROTECTED] wrote:
  Hi
 
  I hope this is me being dumb but I have a working Struts application
that
  uses a *.do servlet mapping

RE: changing from *.do to /do/* screws up everything? - Jerry Sp ringersums up...

2002-02-27 Thread Rob Breeds

Mark, see Ted's reasoning in prev. note.

Rob




|+
||  Galbreath,   |
||  Mark |
||  Galbreath@tes|
||  sco.com  |
|||
||  27/02/2002|
||  20:02 |
||  Please respond|
||  to Struts|
||  Users Mailing |
||  List |
|||
|+
  
---|
  |
   |
  |  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
   |
  |  cc:   
   |
  |  Subject: RE: changing from *.do to /do/* screws up everything? - Jerry 
Sp ringer sums up... |
  |
   |
  |
   |
  
---|




They're only as exposed as you make them!  A JSP is a presentation layer
object and belongs in the web-app directory.  Burying them in the same
space
as the controller invites sloppy designs and lazy coding.

(Perhaps I should wait until Friday for this?)

Mark

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 2:54 PM

It seems that migrating from a *.do to /do/* is not as straightforward as
I'd hoped. Especially if putting JSPs under WEB-INF (which is better than
leaving them exposed).

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





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




Possible to setup Hashmap to pass multi params in link without usingscriptlet?

2002-02-04 Thread Rob Breeds

Hi

I'm currently using scriptlet to set up a Hashmap of params to pass in a
html:link. Works great.

Is it possible to use bean:define tags to setup the Hashmap without
scriptlets.

Similarly (?) how do I invoke setter methods on a bean I've defined with
the bean:define tag?

Thank you

Rob



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




RE: Implementing HTTPS in Struts

2002-02-04 Thread Rob Breeds

Steve

That second link gets me the jar. The original link still stops loading at
same point on my machine but now I've got access to a different machine and
that's fine. So it was me! Sorry!

Thanks

Rob



   

Ditlinger,

Steve   To: Rob Breeds/UK/IBM@IBMGB, Struts Users 
Mailing List
SDitlinger@eb[EMAIL PROTECTED] 

uilt.comcc:   

 Subject: RE: Implementing HTTPS in Struts 

04/02/2002 

17:21  

Please respond 

to Struts 

Users Mailing  

List  

   

   






Hmmm. I just tried it again to be sure and it worked.
Maybe it is just slow.

Try this one, maybe you can reach it better.

http://us.f1.yahoofs.com/users/aee2731f/bc/public/Struts+Security+Extension
.jar?bcB4.X8AlFd_32Ts


HTH,

Steve

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 4:07 AM
To: Struts Users Mailing List
Subject: Re: Implementing HTTPS in Struts



Steve

This link fails to load a complete page for me, and doesn't include a link!
Perhaps it's just me?

Rob






Ditlinger,

Steve   To: '[EMAIL PROTECTED]'
[EMAIL PROTECTED],
SDitlinger@eb
'[EMAIL PROTECTED]'
[EMAIL PROTECTED]
uilt.comcc: '[EMAIL PROTECTED]'
[EMAIL PROTECTED]
 Subject: Re: Implementing
HTTPS
in Struts
02/02/2002

00:30

Please respond

to Struts

Users Mailing

List










Robert:

We recently posted just such a solution.  Check it out at
http://struts.ditlinger.com.  There you will find a description of our
solution and a link to download our Struts extensions and example app.  If
you have any questions, please do not hesitate to ask.

Steve


You wrote:
---
Hello all, my name is Rob Scaduto and I have just recently joined the
Struts
user mailing list. I have yet to find any resources talking about how to
handle switching between http and https (and vice versa) using struts. The
only solution I was able to come up with was sub classing the Struts
LinkTag
and adding a secure attribute. This would then dynamically build an
absolute
path based on the jsp. This works great when you use the forward or page
attribute, but doesn't work at all if you use the href attribute. I'd like
to have a solution that works in all cases and I was curious if someone
could add some insight. Thanks in advance, Rob


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





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





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




form target to different frame leaves current frame busy

2002-02-04 Thread Rob Breeds


I've got a problem with forms and frames I hadn't noticed until now. Two
frames - input form in one, which when submitted, the results appear in the
second. Works functionally (results appear in target frame) but the mouse
cursor remains with hourglass image when it is over the source frame.

I am submitting a form with a link, using a JavaScript function like so:

html:form action=saveEntity.do focus=name target=detail
.
.
.
html:link href
=javascript:subForm(document.forms[0],'Entity.Advanced');bean:message
key=link.add_detail//html:link
.
.


the JS functions used is:
function subForm(iform, act) {
  validate(iform, act);
  iform.action=Publish. + act + .do;
  iform.submit();
}

where act is the action to perform, e.g. if act='Chapter' then the
'Publish.Chapter.do' is set as the form action.

What am I doing wrong?

Thank you.

Rob


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




Re: form target to different frame leaves current frame busy

2002-02-04 Thread Rob Breeds

Hmmm, I created a frameset of html files using the generated html from the
JSPs I was using as my two frame sources - and that works without the mouse
cursor staying in 'busy' mode.

Does that suggest this is a Struts/JSP/tags problem? I can't see how though
because the browser never sees the JSP source, only the generated HTML! I
am so confused by this!

Help!

Rob



   

Rob

Breeds/UK/IBM@   To: Struts Users Mailing List 
[EMAIL PROTECTED]  
IBMGBcc:   

 Subject: form target to different frame 
leaves current frame busy 
04/02/2002 

20:13  

Please respond 

to Struts 

Users Mailing  

List  

   

   






I've got a problem with forms and frames I hadn't noticed until now. Two
frames - input form in one, which when submitted, the results appear in the
second. Works functionally (results appear in target frame) but the mouse
cursor remains with hourglass image when it is over the source frame.

I am submitting a form with a link, using a JavaScript function like so:

html:form action=saveEntity.do focus=name target=detail
.
.
.
html:link href
=javascript:subForm(document.forms[0],'Entity.Advanced');bean:message
key=link.add_detail//html:link
.
.


the JS functions used is:
function subForm(iform, act) {
  validate(iform, act);
  iform.action=Publish. + act + .do;
  iform.submit();
}

where act is the action to perform, e.g. if act='Chapter' then the
'Publish.Chapter.do' is set as the form action.

What am I doing wrong?

Thank you.

Rob


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





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




Re: Internationalization issue

2002-01-31 Thread Rob Breeds


Yug

I've just done this very thing with my Struts app which has to accept
multiple languages and output multiple languages on same pages.

I set my application server (WebSphere App Server v4.0.2 AE) encoding to be
UTF-8 for all languages (in WAS, you set 'client.encoding.override' to
'UTF-8@ in the JVM settings).

All my JSPs have the following lines added:

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

in the HEAD:
META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=UTF-8

I also have 'html:html locale=true' in my JSPs to support multiple
resources

I found this thread useful:
http://marc.theaimsgroup.com/?l=struts-userm=100278540022660w=2

As Martin Cooper says ...we don't have to worry about conversions anywhere
- it all happens behind the scenes

HTH

Rob




   
 
Yugandhar_Reddy
 
[EMAIL PROTECTED]   To: 
'[EMAIL PROTECTED]' [EMAIL PROTECTED]
atyam.com   cc: Yugandhar_Reddy 
[EMAIL PROTECTED]   
 Subject: Internationalization 
issue
30/01/2002 14:32   
 
Please respond to  
 
Struts Users Mailing  
 
List  
 
   
 
   
 




HI,

Our application is a web application. Now everything is in English like
displaying the forms, user inputting the data, storing the data in DB and
displaying the results of the user request, properties file etc are in
English.
If I want to make my application to accept the input and display the output
in the different languages like Japenese what are the things I need to make
to my existing application,DB.
Can any one suggest me any material or site which gives me the settings or
the things to be made for making use of our application in different
languages???


Thanks in advance,
Yug

***
This e-mail (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or  copying
or
distribution or forwarding of any or all of the  contents in this message
is
STRICTLY PROHIBITED. If you are not the intended recipeint,please contact
the sender by e-mail and delete all copies; your co-operation in this
regard
is appreciated.


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





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




Re: internationalisation question

2002-01-29 Thread Rob Breeds


You can add a user defined language in IE, say 'ss_IE' and make it the top
level language.

Add:

html:html locale=true

to JSP and then bean:message will pickup the correct resource file.

probably not quite what you were after but an alternative!

Rob





   
 
Timothy Wild   
 
TimothyW@Marr   To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]
akech.com   cc:   
 
 Subject: internationalisation question
 
29/01/2002 
 
12:52  
 
Please respond 
 
to Struts 
 
Users Mailing  
 
List  
 
   
 
   
 




Hi

This question has probably been asked before, but I can't find it anywhere
in the archives :-(

I am trying to create a basic proof-of-concept demo using struts.
Everything
is going great except I can't seem to get multiple languages going. I am
trying to create English (en_IE) and Swedish Chef (ss_IE) versions of the
app. I have two resource files, ApplicationResources.properties and
ApplicationResources_ss.properties, and the following entry in my web.xml

  init-param
  param-nameapplication/param-name

param-valuecom.marrakech.strutstest.ApplicationResources/param-value
/init-param

To allow the user to change their language I invoke an action which
includes
the following code:

  locale = new Locale(ss, IE);
  setLocale(request, locale);

I have confirmed that the locale is set in the session. When I try display
text from the resource file I use a tag like this:

bean:message key=receipt.receiptNumber/

Does anyone know why the swedish chef version of the application is not
being picked up?

Thanks and regards

Tim Wild
--
Blessed is the man who, having nothing to say, abstains from giving words
in evidence of the fact.
- George Elliot



**

Privileged/Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such person),
you may not copy or deliver this message to anyone. In such
case, you should destroy this message and kindly notify the
sender by reply email. Please advise immediately if you or your
employer do not consent to Internet email for messages of this
kind. Opinions, conclusions and other information in this message
that do not relate to the official business of Marrakech and shall
be understood as neither given nor endorsed by it.

**






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




Re: Struts on WebSphere 4.0

2002-01-29 Thread Rob Breeds


If you have an ear or war you should be able to deploy just like any other
web app. What do you mean by configure'? Beware that if you have a version
prior to 4.0.2 you will need a 'patched' version of struts.jar

Rob Breeds




   
 
LWalczak@FLEET 
 
CC.COM   To: [EMAIL PROTECTED]
 
 cc:   
 
25/01/2002   Subject: Struts on WebSphere 4.0  
 
22:40  
 
Please respond 
 
to Struts 
 
Users Mailing  
 
List  
 
   
 
   
 




Anyone have any information on how to configure Struts to work on WebSphere
4.0?



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





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




Re: AW: Struts on WebSphere 4.0

2002-01-29 Thread Rob Breeds


it's a recompiled struts.jar with some function removed to make it work
with WAS 4.0.1 and earlier (which had a bug preventing struts from
working). Version 4.0.2 of WAS resolves it and you can use the standard
download.

See: http://jakarta.apache.org/struts/userGuide/resources.html for link to
WAS-struts

Rob



   
 
Hudayioglu, Fehmi
 
Fehmi.Hudayioglu@Dresdner   To: 'Struts Users Mailing 
List' [EMAIL PROTECTED] 
-Bank.com   cc:   
 
 Subject: AW: Struts on 
WebSphere 4.0   
29/01/2002 13:47   
 
Please respond to Struts  
 
Users Mailing List
 
   
 
   
 




hello what kind of patch is that?

-Ursprüngliche Nachricht-
Von: Rob Breeds [mailto:[EMAIL PROTECTED]]
Gesendet am: Tuesday, January 29, 2002 2:40 PM
An: Struts Users Mailing List
Betreff: Re: Struts on WebSphere 4.0


If you have an ear or war you should be able to deploy just like any other
web app. What do you mean by configure'? Beware that if you have a version
prior to 4.0.2 you will need a 'patched' version of struts.jar

Rob Breeds






LWalczak@FLEET

CC.COM   To:
[EMAIL PROTECTED]

 cc:

25/01/2002   Subject: Struts on WebSphere
4.0
22:40

Please respond

to Struts

Users Mailing

List









Anyone have any information on how to configure Struts to work on WebSphere
4.0?



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





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

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





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




advice on linking to help pages from Struts app

2002-01-22 Thread Rob Breeds


Hi

I need to link my Struts app to a separate help web site such that links in
my JSPs point to context-sensitive anchors in pages on the help site.

If I don't know the base location of the help site until runtime, I can't
put the locations in the mapping configuration file.

What would be the best way to generate links dynamically, given that I can
read the base location of help site at startup?

Thanks

Rob



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




Re: CHARACTER ENCODING !

2002-01-22 Thread Rob Breeds

Wojtek

Are you setting locale with:
html:html locale=true
?

Rob Breeds





   
 
wojtek   
 
wojtekbe@box4   To: Struts Users Mailing List 
[EMAIL PROTECTED]   
3.gnet.pl   cc:   
 
 Subject: CHARACTER ENCODING ! 
 
22/01/2002 
 
17:00  
 
Please respond 
 
to Struts 
 
Users Mailing  
 
List  
 
   
 
   
 




Hi,

I am using struts form some form validation (obvious isn't it?) and I came
across the following error:


National Polish characters returned from the forms are badly encoded !

I am using struts on win2k, jdk 1.3, the jsp page charset is set to
ISO-8859-2

Can anyone help ?

regards

Wojtek




--
Myslisz o otworzeniu wlasnego sklepu internetowego?
A moze o wynajeciu stoiska w wirtualnym pasazu?
W Centrum e-biznesu mozesz miec jedno i drugie. Juz od 290 zl za rok.
Wybierz: e-witryne lub e-sklep. http://handel.getin.pl/


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





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




Re: Quick (And Probably Dumb) Question

2002-01-22 Thread Rob Breeds


# (hash)

Rob




   
 
Matt Koidin  
 
mkoidin@smart   To: Struts Users Mailing List 
[EMAIL PROTECTED]   
ixs.com cc:   
 
 Subject: Quick (And Probably Dumb) 
Question
22/01/2002 
 
18:03  
 
Please respond 
 
to Struts 
 
Users Mailing  
 
List  
 
   
 
   
 




All-

Can comments be added to a ApplicationResource file? If yes, what is the
proper method?

Thanks,
Matt

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





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




Re: FW: Help problem with migrating from websphere v3.5.5 to v4.0.1

2002-01-08 Thread Rob Breeds


The WAS AEs admin console itself is a Struts web app (albeit an older
version)!

Is this a Struts 1.0 application you are migrating from 3.5.5 to 4.01?

The directory structure for web apps deployed in 3.5.5 and 4.0+ is
different I believe so your web.xml and struts-config file may need to be
modified to locate your messages resource files, jsps and classes

I'm surprised there is no output at startup though.

Rob Breeds



   
   
Jay Milam
   
jmilam@radian   To: [EMAIL PROTECTED]  
   
ts.com  cc:   
   
 Subject: FW: Help problem with migrating 
from websphere v3.5.5 to v4.0.1 
08/01/2002 
   
19:26  
   
Please respond 
   
to Struts 
   
Users Mailing  
   
List  
   
   
   
   
   





Hi ...
Can anyone please help we are experiencing difficulty when migrating
our
application developed on websphere 3.5.5 to websphere 4.0.1 Advanced
edition
single server.  We followed the setp and configuration steps while
installing the 4.0.1 environment.  We have the struts frame work in place.

I depolyed a sample application on WAS AEs 4.0.1 on
WinNT. The application is not coming up and while
trying to start the application from admin console, it
says The Application RentACar.ear can not run. There
is no detailed error message in console, log file as
well as in activity file.

Deployment and installation of the application went
well without any error message.

Please advise if you have any information regarding this situation...we
think it may have to do with the configuration setup.

Thanks

Kind Regards,
Jay Milam
Sr. Project Manager
Radiant Systems
Jay Milam
Sr. Project Manager
Radiant Systems


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





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




Struts intermittently not working after startup

2001-12-13 Thread Rob Breeds

I've been developing my first real Struts application for last several
weeks and things have been going OK. But I reached a point (about Sunday)
where the web app now doesn't always work correctly, in that it give errors
like:

Error 500: No action instance for path /findEntity could be created

and other objects that should have been instantiated but arent'. If I
restart the server a few times the web app works again.

There is nothing in the log to suggest that the web app startup is failing
(all action mappings seem to be added ok). It's only when I click on a link
that I see the problem - Struts trys to forward me to appropriate Action
but can't find it. The errors just sem to have appeared as my web app grew
to a certain point but I only have about 30 mappings in the config file - I
can't see that's a limitation. I have a colleague whose Struts app is now
also exhibiting same problem.

Any ideas please? (I'm using Struts 1.0 release version - not nightly
build)

Thanks

Rob




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




html:base screwing mappings - please help

2001-12-06 Thread Rob Breeds


Hi

Everything was going so well but now I've hit a problem which affects my
whole project. I really would appreciate some help.

Here's the situation:

I have a form and I want to submit it using links and not buttons. I have a
JavaScript function to do this:

function subForm(iform, act) {
validate(iform);
iform.action=Publish. + act + .do;
iform.submit();
}

and I call it with a link like this:

html:link href
=javascript:subForm(document.forms[0],'Entity.Advanced');Publish
Entity/html:link

The function then generates the action url of 'Publish.Entity.Advanced.do'
and sets the form's action property to this. The form is submitted using
that action url and it works fine.

But, all my JSPs are under WEB-INF/pages for the security reasons that Ted
Husted has explained.

Now, if I add html:base/ my form doesn't work at all - I get an error: '
Error 400: Invalid path /WEB-INF/pages/Publish.Entity.Advanced was
requested '

and the html source now shows in place of the html:base tag:
base href=http://localhost:9080/myApp/WEB-INF/pages/simpleinput.jsp;
which reveals the location of my web pages on the server!

What is the point of html:base/? And can it be used if my pages are under
WEB-INF?


Please help

Thank you

Rob Breeds




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




html:link href to external URL in a

2001-12-05 Thread Rob Breeds


Hi

This may be in the FAQ/archive but I can't find it!

If I have a dynamically generated external URL available in the
request/session object, e.g. http://www.banana.com;, how do I write a
html:link href tag such that the link takes the user to that external
URL? (Without using scriptlets?)

I effectively want to do: html:link href=bean:write name=abcd property
=xyz/
bean:write name=abcd property=xyz/
/html:link

but can't do nested tags.

How do I dynamically populate the content of the href attribute?

Help please!

Thanks

Rob Breeds




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




RE: html:link href to external URL in a

2001-12-05 Thread Rob Breeds

No way to do this with purely Struts tags?

Thanks

Rob Breeds




   
  
Siggelkow, Bill  
  
bill.siggelkow@m   To: 'Struts Users Mailing List' 
[EMAIL PROTECTED]   
irant.com  cc:
  
Subject: RE: html:link href to 
external URL in a 
05/12/2001 16:17   
  
Please respond to  
  
Struts Users  
  
Mailing List  
  
   
  
   
  




You can do this by just coding the link in with an HTML anchor tag as
folows:
a href=bean:write name=abcd property
=xyz/
bean:write name=abcd property=xyz/
/a

or use an expression

html:link href=%=abcd.getXyz()%
bean:write name=abcd property=xyz/
/html:link

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 11:03 AM
To: Struts Users Mailing List
Subject: html:link href to external URL in a



Hi

This may be in the FAQ/archive but I can't find it!

If I have a dynamically generated external URL available in the
request/session object, e.g. http://www.banana.com;, how do I write a
html:link href tag such that the link takes the user to that external
URL? (Without using scriptlets?)

I effectively want to do: html:link href=bean:write name=abcd property
=xyz/
bean:write name=abcd property=xyz/
/html:link

but can't do nested tags.

How do I dynamically populate the content of the href attribute?

Help please!

Thanks

Rob Breeds




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

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





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




Re: html:link - submit

2001-12-03 Thread Rob Breeds

Use JavaScript to submit the form - the html:link has an onclick event.
Beware of having links and buttons simultaneously - Struts calls  buttons
it generates 'submit' which causes a naming clash.

Rob Breeds





   
   
John Ng
   
jng369@yahoo.   To: [EMAIL PROTECTED]
   
com cc:   
   
 Subject: html:link - submit   
   
03/12/2001 
   
15:58  
   
Please respond 
   
to Struts 
   
Users Mailing  
   
List  
   
   
   
   
   




Is there a way to invoke the form submit action when
one clicks on a link by html:link?

Basically, I would like the submit the form by
clicking the link instead of clicking a button.

Thanks!

John




__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

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





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




RE: session id is same for different Browser

2001-11-30 Thread Rob Breeds


You will see the same session ID for two browser windows if you 'clone' the
browser window with CTRL+N (in IE). To get a separate session ID you need
to start two instances of the browser, not clone the existing window.

Rob Breeds





   
   
bendiolas@nets 
   
cape.net To: [EMAIL PROTECTED] 
(Struts Users Mailing List) 
(Steve   cc:   
   
Bendiola)Subject: RE: session id is same for 
different  Browser   
   
   
29/11/2001 
   
20:55  
   
Please respond 
   
to Struts 
   
Users Mailing  
   
List  
   
   
   
   
   




Gang,
If you are using the same browser (opening 2 versions of IE, Netscape...),
they could be sharing cookies, and thus the same session.


Gao, Gang [EMAIL PROTECTED] wrote:

Hi,
I have a very strange case, When I logon to my site using two different
Browser, I print out the session id and find it is same. Actully I open
two
different Browsers on same machine. How does it have same session id.
Please
help me out. I use struts and weblogic6.0 as web server. I put some value
object in session, it looks like the second logon overwrite the first
value
object in session.
Thanks a lot.
Gang

--




__
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


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





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




Re: Problem: JavaScript in StrutsForm

2001-11-29 Thread Rob Breeds


Wolfgang

You probably have a html:submit tag? Struts generates a button with a
name of 'submit' so JavaScript gets confused. It wasted so much of my time!

You need to give your submit button a different name - can't recall how to
do that right now because I stopped using the submit buttons and used links
instead

Rob Breeds





   

Wolfgang Frank 

wolfgang.fran   To: [EMAIL PROTECTED]

[EMAIL PROTECTED]   cc:   

 Subject: Problem: JavaScript in 
StrutsForm
29/11/2001 

13:00  

Please respond 

to Struts 

Users Mailing  

List  

   

   





Hello there,

may someone help me please?

I tried to call a javascriptfunction from a Struts-Form. I need
to do this because I want to calculate values in another SELECT
box depending
on the choice of this one ... and because a value changed event
in a form doesn´t cause a submit ... i need this?!

And i can´t get it to work:

html:form action=assignDocument.do 
  table
tr
  tdChoose:/td
  td
  html:select property=typeId size=1
onchange='document.forms[0].submit()'
  html:options collection=typeRefCodes
property=refC labelProperty=refT/
   /html:select
  /td
/tr




/html:form

I get an javascript error that submit is not a function.

Does anybody have an idea. It works fine without the javascript
and everything seems to be configured properly.

Thanks in advance
Wolfgang


Herr Dipl. Math. Wolfgang Frank
Email: [EMAIL PROTECTED]





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





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




Two security roles, one ActionServlet?

2001-11-27 Thread Rob Breeds


Hi

I've seen various threads saying that there is no advantage to having
multiple Struts servlets as they are multithreaded.

However, if I want to define two security roles for my application, in
which some actions are secure (via https) and some are insecure (via http),
is there a way to specify security for the servlet such that actions
belonging to Role A will be secure and actions belonging to Role B won't
be? Is it possible to differentiate between roles using URL patterns, e.g.
anything beginning with /sendInfo/* is secure and /getInfo/* is insecure?

I know nothing about servlet security so any help is appreciated!

Thanks

Rob Breeds



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




Dynamic selection of correct language value in pulldown list

2001-11-26 Thread Rob Breeds


Hi

I am creating a pulldown list with a list of languages, English, French,
German... and when form is submitted pass a language code en, fr, de etc.

I think I can work out how to do this with html:options but what I also
need to do is have the display language property pick up the appropriate
language for the user. ie If an English user sees the list they will see
English, French, German. But a French user will see Anglais, Francais,
Allemagne (or whatever the French is!).

In my resource properties file for each language I'd have a key for each
language code, e.g. in Messages_en.properties, lang_fr=French, in
Messages_fr.properties it'd be lang_fr=Francais.

How do I get the message resource value corresponding to the language key
into the pulldown list? Can I do this within the html:select tag or do I
need to prepopulate the form with all the values from the resource bundle
before presenting to the user?

All help appreciated

Thank you


Rob Breeds




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




Re: back button causes form resubmit

2001-11-26 Thread Rob Breeds

And the answer was...

use a transaction token! The archives REALLY are useful sometimes! :)

Rob




   

Rob

Breeds/UK/IBM@   To: Struts Users Mailing List 
[EMAIL PROTECTED]  
IBMGBcc:   

 Subject: back button causes form resubmit 

21/11/2001 

11:40  

Please respond 

to Struts 

Users Mailing  

List  

   

   






I have a form where the user can add and delete values in a collection (by
submitting the form with different params). When they are done
adding/deleting they can hit a 'save' button to invoke an action to save
the data to a database and display a results page.

But if the user hits the browser back button, the last action they invoked
on the data entry screen is invoked. If it was an add, another item is
added to the collection, which although wrong is harmless.

If it was a delete, then an exception array out of bounds is thrown because
the collection no longer contains the previously deleted value.

How can I prevent the user doing a double add/delete? Do I need to use a
transaction token?

Thanks

Rob Breeds




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





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




back button causes form resubmit

2001-11-21 Thread Rob Breeds


I have a form where the user can add and delete values in a collection (by
submitting the form with different params). When they are done
adding/deleting they can hit a 'save' button to invoke an action to save
the data to a database and display a results page.

But if the user hits the browser back button, the last action they invoked
on the data entry screen is invoked. If it was an add, another item is
added to the collection, which although wrong is harmless.

If it was a delete, then an exception array out of bounds is thrown because
the collection no longer contains the previously deleted value.

How can I prevent the user doing a double add/delete? Do I need to use a
transaction token?

Thanks

Rob Breeds




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




Re: Stuts-simple doesn't work (husted.com)

2001-11-15 Thread Rob Breeds


Thomas

struts-simple does work! The struts config file does not have to be in the
WEB-INF dir - it's location is specified in web.xml. The struts.xml file is
the config file in this case.

Rob



   
  
tw.richter@scept   
  
ical.co.uk To: [EMAIL PROTECTED]  
  
   cc: 
  
15/11/2001 08:05   Subject: Stuts-simple doesn't work 
(husted.com)   
Please respond 
  
to Struts Users   
  
Mailing List  
  
   
  
   
  




Hi out there!

I want to run the struts-simple example for wizards found in husted.com.
But it doesn't work. It did not find /do/... There is no struts-config in
/web-inf/, only a struts.xml in /web-inf/conf/. Is this example for another
struts version?

Regards
Thomas

:-) As sceptical as one can be! (-:



--
Get a free, personalised email address at http://another.com
TXT ALRT! Stop wasting money now. Send FREE, personalised txt
from http://another.com

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




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




Re: Stuts-simple doesn't work (husted.com)

2001-11-15 Thread Rob Breeds


Thomas

Sorry I didn't offer anything before. In the web.xml file you should have:

  servlet-mapping id=ServletMapping_2
 servlet-nameaction/servlet-name
 url-pattern/do/*/url-pattern
  /servlet-mapping
  welcome-file-list id=WelcomeFileList_1
 welcome-fileindex.jsp/welcome-file

I imagine you didn't change anything.

If you do a view source on the rendered start page what action do you see
for the form? I get:
action=/simple/do/start

(my base name is 'simple')

I'm not seeing any of the jsessionid stuff appended to paths in any page as
I use the app. Maybe that's a clue? Do you have cookies turned off?

Rob



   

twrichter@anot 

her.com  To: struts users mailing list 
[EMAIL PROTECTED]
 cc:   

15/11/2001   Subject: Re: Stuts-simple doesn't work 
(husted.com)   
13:29  

Please respond 

to Struts 

Users Mailing  

List  

   

   





Sorry Rob,

but it does not work (at least in my environment). I took stuts-simple.war
in /webapps; inserted the configuration in my mod_jk.conf (like with all
other apps) and started index.jsp. When pressing the start button the
browser says: Page not found
http://localhost/struts-simple/do/start;jsessionid=6knsr97rw1;
I deployed struts-simple like all other examples (struts-example,
struts-blank a.s.o). It does not work? Any reason available?

Thank you in advance
Thomas

-Original Message-
From : Rob Breeds [EMAIL PROTECTED]
To : Struts Users Mailing List [EMAIL PROTECTED]
Date : 15 November 2001 10:12:52
Subject : Re: Stuts-simple doesn't work (husted.com)
Thomas

struts-simple does work! The struts config file does not have to be in the
WEB-INF dir - it's location is specified in web.xml. The struts.xml file
is
the config file in this case.

Rob




tw.richter@scept
ical.co.uk To:
[EMAIL PROTECTED]
   cc:
15/11/2001 08:05   Subject: Stuts-simple
doesn't work (husted.com)
Please respond
to Struts Users
Mailing List






Hi out there!

I want to run the struts-simple example for wizards found in husted.com.
But it doesn't work. It did not find /do/... There is no struts-config in
/web-inf/, only a struts.xml in /web-inf/conf/. Is this example for
another
struts version?

Regards
Thomas

:-) As sceptical as one can be! (-:



--
Get a free, personalised email address at http://another.com
TXT ALRT! Stop wasting money now. Send FREE, personalised txt
from http://another.com

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




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



:-) As sceptical as one can be! (-:



--
Personalise your email address at http://another.com
THINK: your slogan or email address on a gorgeous mousemat
CLICK HERE http://another-shop.com
--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]




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




RE: Websphere 4.0/IBM Web server configuration

2001-11-15 Thread Rob Breeds

That 'fixed' version of struts.jar would not cause this problem (you'd be
getting a 'missing attributes' type error message). WAS 4.01 doesn't need
the special struts.jar as the original bug in WebSphere is fixed.

Can you see your deployed application in the WAS admin console?

Rob Breeds




   

moritz

petersenTo: Struts Users Mailing List 
[EMAIL PROTECTED]  
moritzpeterse   cc:   

[EMAIL PROTECTED]   Subject: RE: Websphere 4.0/IBM Web server 
configuration   
   

15/11/2001 

15:36  

Please respond 

to Struts 

Users Mailing  

List  

   

   





I have no experience with WS, but there is a special WS 4 version of struts
available at http://jakarta.apache.org/struts/userGuide/resources.html

-moritz.

 -Original Message-
 From: Jay Sissom [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 15, 2001 4:25 PM
 To: Struts Users Mailing List
 Subject: Websphere 4.0/IBM Web server configuration


 Hello, I am trying to test a struts application in the Websphere 4.0 app
 server using IBM's web server.  My application is in a jar file.  The jar
 file runs fine within Tomcat 4.0.

 When I deploy the application in Websphere 4.0, I can access the
 .jsp pages,
 but when I try to access a .do page, I get a 404 error.  I've
 checked within
 Websphere and it sees my web.xml file and that file maps *.do URL's to
the
 struts action servlet.

 Is there somplace else I need to map *.do URL's?

 Thanks
 Jay



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



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





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




links to javascript with index variables

2001-11-15 Thread Rob Breeds

In my ActionForm I have a collection of names which is added to
dynamically. If I want to give each name its own delete link I'm doing this
with iterate:

logic:iterate id=el name=reallySimpleForm property=names
Name: bean:write name=el/ html:link href
=javascript:subForm(document.forms[0],'del');bean:message key
=link.delete//html:linkBR
/logic:iterate

(where subForm is a JavaScript function to submit the form, and set an
action, of 'del' in this case)

but how do I add an index value into the javascript call for the link? To
generate something like:

html:link href=javascript:subForm(document.forms[0],'del', 0) (last param
being the index)
html:link href=javascript:subForm(document.forms[0],'del', 1)
html:link href=javascript:subForm(document.forms[0],'del', 2)
.
.
.

Is the only way to do this using scriptlets?

Thanks

Rob Breeds




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




Re: If someone is interested

2001-11-15 Thread Rob Breeds


Yuriy

I'm keen to see the source for this - all working examples are useful to
help me (and others) avoid what must be common pitfalls.

Thanks

Rob Breeds





   

Yuriy Zubarev  

yuriy_zubarev   To: [EMAIL PROTECTED]

@yahoo.ca   cc:   

 Subject: If someone is interested 

15/11/2001 

21:45  

Please respond 

to Struts 

Users Mailing  

List  

   

   





Hello colleagues,

I've been developing a web app for myself and since
it's not the first app using Struts I attempted
to solve some general issues by providing some interfaces,
custom tag and generic actions. More specifically I'm talking
about tables, you know that questions about navigation,
sorting, formatting and so on...

To see what's done already, point your browser to
http://english.yuriy-zubarev.com

And if my work raises some interest among people,
I'll beautify the code (if there is no big load in the office)
and share it (with one of the purposes to get feedbacks
and criticism).

Best of luck,
Yuriy Zubarev




__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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





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




Re: links to javascript with index variables

2001-11-15 Thread Rob Breeds


I tried this:

logic:iterate id=el name=reallySimpleForm property=names indexId
=i
Name: bean:write name=el/ html:link href
=javascript:subForm(document.forms[0],'del','%= i.toString()
%');bean:message key=link.delete//html:linkBR
/logic:iterate

but that just generates links of:
javascript:subForm(document.forms[0],'del','%= i.toString() %');

instead of javascript:subForm(document.forms[0],'del','0');

How can I get scripting variables inside the html:link href attribute?

Thanks

Rob



   

Rob

Breeds/UK/IBM@   To: Struts Users Mailing List 
[EMAIL PROTECTED]  
IBMGBcc:   

 Subject: links to javascript with index 
variables 
15/11/2001 

22:58  

Please respond 

to Struts 

Users Mailing  

List  

   

   





In my ActionForm I have a collection of names which is added to
dynamically. If I want to give each name its own delete link I'm doing this
with iterate:

logic:iterate id=el name=reallySimpleForm property=names
Name: bean:write name=el/ html:link href
=javascript:subForm(document.forms[0],'del');bean:message key
=link.delete//html:linkBR
/logic:iterate

(where subForm is a JavaScript function to submit the form, and set an
action, of 'del' in this case)

but how do I add an index value into the javascript call for the link? To
generate something like:

html:link href=javascript:subForm(document.forms[0],'del', 0) (last param
being the index)
html:link href=javascript:subForm(document.forms[0],'del', 1)
html:link href=javascript:subForm(document.forms[0],'del', 2)
.
.
.

Is the only way to do this using scriptlets?

Thanks

Rob Breeds




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





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




Re: links to javascript with index variables

2001-11-15 Thread Rob Breeds

And then I tried it without struts tags:

A HREF=javascript:subForm(document.forms[0],'del','%= i.toString()
%');try this/A

and it works! Why doesn't it work when the same code is put into the Struts
html:link href attribute ?

Rob



   

Rob

Breeds/UK/IBM@   To: Struts Users Mailing List 
[EMAIL PROTECTED]  
IBMGBcc:   

 Subject: Re: links to javascript with 
index variables 
15/11/2001 

23:39  

Please respond 

to Struts 

Users Mailing  

List  

   

   






I tried this:

logic:iterate id=el name=reallySimpleForm property=names indexId
=i
Name: bean:write name=el/ html:link href
=javascript:subForm(document.forms[0],'del','%= i.toString()
%');bean:message key=link.delete//html:linkBR
/logic:iterate

but that just generates links of:
javascript:subForm(document.forms[0],'del','%= i.toString() %');

instead of javascript:subForm(document.forms[0],'del','0');

How can I get scripting variables inside the html:link href attribute?

Thanks

Rob




Rob
Breeds/UK/IBM@   To: Struts Users Mailing
List [EMAIL PROTECTED]
IBMGBcc:
 Subject: links to javascript
with index variables
15/11/2001
22:58
Please respond
to Struts
Users Mailing
List






In my ActionForm I have a collection of names which is added to
dynamically. If I want to give each name its own delete link I'm doing this
with iterate:

logic:iterate id=el name=reallySimpleForm property=names
Name: bean:write name=el/ html:link href
=javascript:subForm(document.forms[0],'del');bean:message key
=link.delete//html:linkBR
/logic:iterate

(where subForm is a JavaScript function to submit the form, and set an
action, of 'del' in this case)

but how do I add an index value into the javascript call for the link? To
generate something like:

html:link href=javascript:subForm(document.forms[0],'del', 0) (last param
being the index)
html:link href=javascript:subForm(document.forms[0],'del', 1)
html:link href=javascript:subForm(document.forms[0],'del', 2)
.
.
.

Is the only way to do this using scriptlets?

Thanks

Rob Breeds




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





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





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




Re: links to javascript with index variables

2001-11-15 Thread Rob Breeds

I then tried this, using a scriptlet to create the javascript first:

% String tryit = javascript:subForm(document.forms[0],'del','+i+');;
%
Name: bean:write name=el/ html:link href=%= tryit %bean:message
key=link.delete//html:link

and that works too!

Now can someone clever please share with me how to do this elegantly
without reverting to scriptlets?

Thanks!

Rob



   

Rob

Breeds/UK/IBM@   To: Struts Users Mailing List 
[EMAIL PROTECTED]  
IBMGBcc:   

 Subject: Re: links to javascript with 
index variables 
15/11/2001 

23:47  

Please respond 

to Struts 

Users Mailing  

List  

   

   





And then I tried it without struts tags:

A HREF=javascript:subForm(document.forms[0],'del','%= i.toString()
%');try this/A

and it works! Why doesn't it work when the same code is put into the Struts
html:link href attribute ?

Rob




Rob
Breeds/UK/IBM@   To: Struts Users Mailing
List [EMAIL PROTECTED]
IBMGBcc:
 Subject: Re: links to
javascript with index variables
15/11/2001
23:39
Please respond
to Struts
Users Mailing
List







I tried this:

logic:iterate id=el name=reallySimpleForm property=names indexId
=i
Name: bean:write name=el/ html:link href
=javascript:subForm(document.forms[0],'del','%= i.toString()
%');bean:message key=link.delete//html:linkBR
/logic:iterate

but that just generates links of:
javascript:subForm(document.forms[0],'del','%= i.toString() %');

instead of javascript:subForm(document.forms[0],'del','0');

How can I get scripting variables inside the html:link href attribute?

Thanks

Rob




Rob
Breeds/UK/IBM@   To: Struts Users Mailing
List [EMAIL PROTECTED]
IBMGBcc:
 Subject: links to javascript
with index variables
15/11/2001
22:58
Please respond
to Struts
Users Mailing
List






In my ActionForm I have a collection of names which is added to
dynamically. If I want to give each name its own delete link I'm doing this
with iterate:

logic:iterate id=el name=reallySimpleForm property=names
Name: bean:write name=el/ html:link href
=javascript:subForm(document.forms[0],'del');bean:message key
=link.delete//html:linkBR
/logic:iterate

(where subForm is a JavaScript function to submit the form, and set an
action, of 'del' in this case)

but how do I add an index value into the javascript call for the link? To
generate something like:

html:link href=javascript:subForm(document.forms[0],'del', 0) (last param
being the index)
html:link href=javascript:subForm(document.forms[0],'del', 1)
html:link href=javascript:subForm(document.forms[0],'del', 2)
.
.
.

Is the only way to do this using scriptlets?

Thanks

Rob Breeds




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





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

RE: request scope and forms

2001-11-14 Thread Rob Breeds

Robert

OK, so even if I forward to a JSP with a form bean in the request, and the
JSP displays data from that form bean, as soon as I submit the form again,
the original form bean is lost. Hmmm, I was hoping I could somehow keep the
forward chain going and Struts would magically keep my ActionForm alive.

Thanks

Rob




   

Robert

Nocera  To: 'Struts Users Mailing List' 
[EMAIL PROTECTED]
rnocera@neosl   cc:   

lc.com  Subject: RE: request scope and forms  

   

14/11/2001 

16:19  

Please respond 

to Struts 

Users Mailing  

List  

   

   





If I understood your question correction, you probably want to use a
session scope bean.  In your case when the JSP is submitted each time a
new form bean is created because at that point it is a new request, not
a forward.

Robert Nocera
New England Open Solutions
www.neosllc.com
You supply the vision, we'll do the rest.


-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 11:03 AM
To: Struts Users Mailing List
Subject: request scope and forms


I'm getting stuck with request scope and ActionForm objects not sticking
around across requests.

If I have a jsp that has an input text field called name that populates
a
corresponding field in an ActionForm called name, then that field gets
populated.

If the Action associated with this ActionForm then takes that name value
and adds it a different property in the ActionForm (say to a Vector) and
then forwards to the SAME input jsp again, why is it that a new
ActionForm
object is instantiated every time (according to the log), such that
theActionForm never gets more than one String added to the Vector?

I was under the impression that if I forwarded, any ActionForm passed to
the Action would be persisted in the request.

Thanks

Rob Breeds



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


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





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




Top Tip!

2001-11-14 Thread Rob Breeds

Don't use a protected modifier on your setter methods in ActionForms. Make
them public so that they can actually be invoked like you expected them to
be.

I did by 'mistake' and now I'm paying for it... : )

Rob



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




how to dynamically add to form

2001-11-13 Thread Rob Breeds


Hi

I have an input JSP with a single form on it. The action for the submit
will invoke the backend business logic and return a results page. Easy
enough.

There are several distinct sections in the input page, one for entering 1
or more names, another for 1 or more descriptions, and other similar
sections requiring multiple inputs.

Considering just the Names section, what I want to do is allow the user to
enter a new name into a text input box and when they click an 'Add' link
next to the name, it adds the name to the current list of names in the
ActionForm (stored in a Vector) and redisplays the input form JSP showing
the current list of names plus a new input text box. The user should be
able to add one name at a time ad infinitum until they finally hit the
submit button for the overall form.

name1  --- first 3 names
already entered
name2  ---
name3  ---
[ text box ] add name   --   link to add another name
and update display

1. How do I get the 'Add' link to pass the value of the input text box into
the ActionForm? I have a field in the ActionForm called newName, and when
the setNewName method is called it will add the new name to the Vector
called names. I can't see how to get to the form from a html:link
forward... and I shouldn't have to submit the form to update each section
of the form should I?

2. For testing, I am submitting the form, and in the Action adding dummy
data into the Vector of names (in NameBean objects with a property of name)
and forwarding back to the input page. I use the bean:iterate tag to
display the contents of the Vector names, but it gives weird results:!

Following works and displays the object references to the items in the
Vector so I know that there are the correct number of items:
bean:write name=saveEntityForm property=names/

This fails, with JSP error 'Cannot find bean el in scope null '
logic:iterate id=el name=saveEntityForm property=names
 bean:write name=el property=name/
/logic:iterate

It's almost as if the ActionForm isn't being saved in the request but then
why does the display work when I don't use iterate?

I'm going round in circles with this so any help to get me moving again is
appreciated.

Thanks

Rob Breeds





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




RE: how to dynamically add to form

2001-11-13 Thread Rob Breeds

Thanks Tom, that's certainly interesting stuff and it may solve my problem
(and for that I am truly grateful!).

Is nesting of tags my problem? I still don't see why testcase fails:

 This fails, with JSP error 'Cannot find bean el in scope null '
 logic:iterate id=el name=saveEntityForm property=names
  bean:write name=el property=name/
 /logic:iterate

Thanks

Rob Breeds




   
   
Tom Klaasen   
   
(TeleRelay)To: Struts Users Mailing List 
[EMAIL PROTECTED]  
tom.klaasen@tele   cc:
   
relay.com  Subject: RE: how to dynamically add to 
form   
   
   
13/11/2001 13:23   
   
Please respond to  
   
Struts Users  
   
Mailing List  
   
   
   
   
   




You should have a look at the nested: taglib from Arron Bates, that
makes both these things really easy.

Quoting his contribution mail:
-
For a built version and the updated example (I didn't want to send more
than was necessary to provide the source)...
http://www.keyboardmonkey.com/StrutMonkey/downloads/index.html

Updated Running example...
http://www.keyboardmonkey.com/StrutMonkey/
-


hth,
tomK


 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: dinsdag 13 november 2001 13:57
 To: Struts Users Mailing List
 Subject: how to dynamically add to form
 Importance: High



 Hi

 I have an input JSP with a single form on it. The action for
 the submit
 will invoke the backend business logic and return a results page. Easy
 enough.

 There are several distinct sections in the input page, one
 for entering 1
 or more names, another for 1 or more descriptions, and other similar
 sections requiring multiple inputs.

 Considering just the Names section, what I want to do is
 allow the user to
 enter a new name into a text input box and when they click an
 'Add' link
 next to the name, it adds the name to the current list of names in the
 ActionForm (stored in a Vector) and redisplays the input form
 JSP showing
 the current list of names plus a new input text box. The user
 should be
 able to add one name at a time ad infinitum until they finally hit the
 submit button for the overall form.

 name1  ---
 first 3 names
 already entered
 name2  ---
 name3  ---
 [ text box ] add name   --   link to add
 another name
 and update display

 1. How do I get the 'Add' link to pass the value of the input
 text box into
 the ActionForm? I have a field in the ActionForm called
 newName, and when
 the setNewName method is called it will add the new name to the Vector
 called names. I can't see how to get to the form from a html:link
 forward... and I shouldn't have to submit the form to update
 each section
 of the form should I?

 2. For testing, I am submitting the form, and in the Action
 adding dummy
 data into the Vector of names (in NameBean objects with a
 property of name)
 and forwarding back to the input page. I use the bean:iterate tag to
 display the contents of the Vector names, but it gives weird results:!

 Following works and displays the object references to the items in the
 Vector so I know that there are the correct number of items:
 bean:write name=saveEntityForm property=names/

 This fails, with JSP error 'Cannot find bean el in scope null '
 logic:iterate id=el name=saveEntityForm property=names
  bean:write name=el property=name/
 /logic:iterate

RE: how to dynamically add to form

2001-11-13 Thread Rob Breeds


Brian

Thanks so much for that pointer - that was the solution to that part of the
problem.

Now I need to work out why the name value I'm submitting isn't getting into
the form... (just get nulls every time)

Rob Breeds



   

Brian Dainton  

daintons@yaho   To: Struts Users Mailing List 
[EMAIL PROTECTED]
o.com   cc:   

 Subject: RE: how to dynamically add to 
form   
13/11/2001 

14:10  

Please respond 

to Struts 

Users Mailing  

List  

   

   





Rob,

I ran into the same thing last week.  Make sure your collection doesn't
contain any
'nulls' (i.e. check for null before adding an item to the collection)

Brian
--- Rob Breeds [EMAIL PROTECTED] wrote:
 Thanks Tom, that's certainly interesting stuff and it may solve my
problem
 (and for that I am truly grateful!).

 Is nesting of tags my problem? I still don't see why testcase fails:

  This fails, with JSP error 'Cannot find bean el in scope null '
  logic:iterate id=el name=saveEntityForm property=names
   bean:write name=el property=name/
  /logic:iterate

 Thanks

 Rob Breeds






 Tom Klaasen

 (TeleRelay)To: Struts Users Mailing
List
 [EMAIL PROTECTED]
 tom.klaasen@tele   cc:

 relay.com  Subject: RE: how to
dynamically add to
 form


 13/11/2001 13:23

 Please respond to

 Struts Users

 Mailing List









 You should have a look at the nested: taglib from Arron Bates, that
 makes both these things really easy.

 Quoting his contribution mail:
 -
 For a built version and the updated example (I didn't want to send more
 than was necessary to provide the source)...
 http://www.keyboardmonkey.com/StrutMonkey/downloads/index.html

 Updated Running example...
 http://www.keyboardmonkey.com/StrutMonkey/
 -


 hth,
 tomK


  -Original Message-
  From: Rob Breeds [mailto:[EMAIL PROTECTED]]
  Sent: dinsdag 13 november 2001 13:57
  To: Struts Users Mailing List
  Subject: how to dynamically add to form
  Importance: High
 
 
 
  Hi
 
  I have an input JSP with a single form on it. The action for
  the submit
  will invoke the backend business logic and return a results page. Easy
  enough.
 
  There are several distinct sections in the input page, one
  for entering 1
  or more names, another for 1 or more descriptions, and other similar
  sections requiring multiple inputs.
 
  Considering just the Names section, what I want to do is
  allow the user to
  enter a new name into a text input box and when they click an
  'Add' link
  next to the name, it adds the name to the current list of names in the
  ActionForm (stored in a Vector) and redisplays the input form
  JSP showing
  the current list of names plus a new input text box. The user
  should be
  able to add one name at a time ad infinitum until they finally hit the
  submit button for the overall form.
 
  name1  ---
  first 3 names
  already entered
  name2  ---
  name3  ---
  [ text box ] add name   --   link to add
  another name
  and update display
 
  1

multiple html:submit buttons with different names?

2001-11-13 Thread Rob Breeds

Hi

Is it possible to have multiple html:submit tags in a  html:form
different only in name such that the action can differentiate between them.

The docs indicate there is no 'name' attribute for the html:submit tag
corresponding to the name attribute for a HTML input type=submit tag.

Ultimately I want one form on the page, with several ways of submitting the
form depending on which section I'm in, and then have the final submit
button indicate to the Action class that the form is complete.

Any ideas please?

Thanks

Rob




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




Re: multiple html:submit buttons with different names?

2001-11-13 Thread Rob Breeds


Brian

That would work but what if the text on the button was multilingual, ie
could be any one of 100 languages depending on user locale setting, which
is what I have to support!

Rob



   

Brian Dainton  

daintons@yaho   To: Struts Users Mailing List 
[EMAIL PROTECTED]
o.com   cc:   

 Subject: Re: multiple html:submit buttons 
with different names?   
13/11/2001 

19:12  

Please respond 

to Struts 

Users Mailing  

List  

   

   





Rob,

Assuming your FormBean has a getter/setter for action:

td height=22 align=right
  html:submit  property=action value=Submit/
/td
td height=22
  html:submit  property=action value=Close/
/td

Within the action,  you could then assign the forward based on the value of
'action'

MyFormBean form1 = (MyFormBean) form;
String sAction = form1.getAction();

if (sAction.equals(Submit))



Brian

--- Rob Breeds [EMAIL PROTECTED] wrote:
 Hi

 Is it possible to have multiple html:submit tags in a  html:form
 different only in name such that the action can differentiate between
them.

 The docs indicate there is no 'name' attribute for the html:submit tag
 corresponding to the name attribute for a HTML input type=submit tag.

 Ultimately I want one form on the page, with several ways of submitting
the
 form depending on which section I'm in, and then have the final submit
 button indicate to the Action class that the form is complete.

 Any ideas please?

 Thanks

 Rob




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



__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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





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




RE: multiple html:submit buttons with different names?

2001-11-13 Thread Rob Breeds

Yes!

Thanks to everyone for your help today - if I can't work it out now there's
no hope! : )

I'm off for sleep now...

Rob Breeds




|+-
||  Nocera, Robert   |
||  [EMAIL PROTECTED]|
||  fizer.com |
|| |
||  13/11/2001 19:39   |
||  Please respond to  |
||  Struts Users Mailing  |
||  List  |
|| |
|+-
  
---|
  |
   |
  |  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
   |
  |  cc:   
   |
  |  Subject: RE: multiple html:submit buttons with different names?   
   |
  |
   |
  |
   |
  
---|





Or you could just do what ted said ;)



LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be
privileged. It is intended for the addressee(s) only. Access to this E-mail
by anyone else is unauthorized. If you are not an addressee, any disclosure
or copying of the contents of this E-mail or any action taken (or not
taken) in reliance on it is unauthorized and may be unlawful. If you are
not an addressee, please inform the sender immediately.

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





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




Incompatible object error trying to instantiate an Action

2001-11-02 Thread Rob Breeds


Hello I've been successfully forwarding a form submit to an Action (A0)
which uses a parameter in the form to forward to another Action (call it
A1) which performs business logic and populates a bean to display in a
result page. It all works.

I now copy that working Action (A1) class to another business logic Action
(A2) and rename it where appropriate.

I set up the config file for the new Action A2, and change my input form so
it offers another parameter such that Action A0 will forward to A2.

When the new Action class (A2 is FindBusinessSimple in this case) is
forwarded to, I get this weird error in the log:

[Servlet LOG]: action: Error creating Action instance for path
'/findBusiness', class name '**.inquire.FindBusinessSimple':
java.lang.VerifyError: (class: /inquire/FindBusinessSimple, method:
perform signature:
(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;)

Incompatible object

If I select the other parameter in the form, class A1 still works as
before.

(I've had to * some of the package names for confidentiality reasons
but that doesn't change the problem!)

Any ideas please? I'm stumped. I'm running in WebSphere App Server 4.0 and
up until now, that hasn't been a problem...

Thanks

Rob Breeds



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




Re: ClassCastException when moving extended Action and ActionForm classesin the classpath

2001-11-02 Thread Rob Breeds


That's the error message I get in the browser for my current problem too
(see earlier post)! I don't think I see a specific ClassCastException
though, only 'incompatible object'.

You're right - it makes no sense

Rob Breeds




   

Leonardo  

MenaTo: [EMAIL PROTECTED]  

lmena@swordfi   cc:   

sh.com.uy   Subject: ClassCastException when moving 
extended Action and ActionForm classes in the classpath   
   

02/11/2001 

15:51  

Please respond 

to Struts 

Users Mailing  

List  

   

   



The web browser shows a processed error
message: The following error occurred: 500 - No action instance for path
/logon could be created.






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




RE: Newbe - problem with Struts-Config.xml

2001-11-02 Thread Rob Breeds


You can have your JSPs in the WEB-INF directory - I use that and it works
fine.

Are you using a html:base/ in your JSP?

Rob Breeds




|+-
||  Drozdowski, Terry|
||  Terry.Drozdowski@s|
||  chwab.com |
|| |
||  02/11/2001 16:57   |
||  Please respond to  |
||  Struts Users  |
||  Mailing List  |
|| |
|+-
  
---|
  |
   |
  |  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
   |
  |  cc:   
   |
  |  Subject: RE: Newbe - problem with Struts-Config.xml   
   |
  |
   |
  |
   |
  
---|




what if you want to use the JSP in WEB-INF technique so you can rely on
container authentication to protect your JSPs from prying eyes?

--
Terry Drozdowski
Staff, Technology Services
SIM Technology - Phoenix
Charles Schwab  Co.
(602)355-8843

Warning: All e-mail sent to this address will be received by the Charles
Schwab Corporate e-mail system and is subject to archival and review by
someone other than the recipient.


-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 9:41 AM
To: 'Struts Users Mailing List'
Subject: RE: Newbe - problem with Struts-Config.xml


Your JSPs should not be in your WEB-INF folder ... try moving it up.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Newbe - problem with Struts-Config.xml


Hello,

I am relatively new to Struts and am encountering a problem with the
struts-config.xml file.  I have set up a global-forwards like below:

forward   name=menu path=/do/Menu/

Then I set up an action like below:

action path=/Menu
forward=/WEB-INF/pages/menu.jsp
/action

Then I wrote the following index.jsp page:

%@ page language=java %
%@ taglib uri=/tags/struts-logic prefix=logic %
logic:forward name=menu/

Now when I hit index.jsp, I receive a blank page from Tomcat 4.0.  If I
review the Tomcat logs, I see that it encountered a 404, but why?  I
thought
it should have found the action /Menu and forward it to the menu.jsp.

I am sure this is something simple, but I can't seem to see what wrong with
the above.  This is running under Struts 1.0 and Tomcat 4.0.

Any assistance is greatly appreciated.

Regards,

Todd G. Nist
[EMAIL PROTECTED]

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

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

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





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




Re: problem with html:errors tag

2001-10-23 Thread Rob Breeds

1. You need to put the html:errors property=whatever/ where you want
them to appear. If you have several input fields, put a html:errors
property=whatever/ next to each input field.

The header and footer are for formatting but they are optional.

Rob Breeds





   
   
Scriven,  
   
Marcos  To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]  
Marcos.Scrive   cc:   
   
[EMAIL PROTECTED]Subject: problem with html:errors tag   
   
   
   
23/10/2001 
   
11:48  
   
Please respond 
   
to struts-user 
   
   
   
   
   




When I get errors with my form validation, I cannot seem to place them
where
I want them.

I have tried html:errors / and html:errors property=firstName/

1) In both cases (and even when there is no errors tag at all), I get all
of
the errors at the top of my page... any ideas why?

2) Once I get errors, I then have a page with no javascript on it - in
which
case the user can then just type garbage, which I want to check on the
client side. How do I get around this one?

I've seen posts that use the errors.header/footer to include some clever
javascript - is this the only way?

Thanks

Marcos






RE: problem with html:errors tag

2001-10-23 Thread Rob Breeds

you still get error messages even without the html:errors/ tag? Sounds
like a restart web app required?

in the ActionForm validation() method, how do you populate Errors?

Rob





   
   
Scriven,  
   
Marcos  To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]  
Marcos.Scrive   cc:   
   
[EMAIL PROTECTED]Subject: RE: problem with html:errors 
tag  
   
   
23/10/2001 
   
12:18  
   
Please respond 
   
to struts-user 
   
   
   
   
   




Thanks - but that's exactly what I did!

I have two text boxes, firstName and lastName

I triple checked the property names and capitalisation, and I still get all
the errors.

Also, I would have thought that not including any error tag would mean no
errors would be displayed.

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:07
 To: [EMAIL PROTECTED]
 Subject: Re: problem with html:errors tag


 1. You need to put the html:errors property=whatever/
 where you want
 them to appear. If you have several input fields, put a html:errors
 property=whatever/ next to each input field.

 The header and footer are for formatting but they are optional.

 Rob Breeds








 Scriven,


 Marcos  To:
 '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
 Marcos.Scrive   cc:


 [EMAIL PROTECTED]Subject: problem
 with html:errors tag




 23/10/2001


 11:48


 Please respond


 to struts-user












 When I get errors with my form validation, I cannot seem to place them
 where
 I want them.

 I have tried html:errors / and html:errors property=firstName/

 1) In both cases (and even when there is no errors tag at
 all), I get all
 of
 the errors at the top of my page... any ideas why?

 2) Once I get errors, I then have a page with no javascript on it - in
 which
 case the user can then just type garbage, which I want to check on the
 client side. How do I get around this one?

 I've seen posts that use the errors.header/footer to include
 some clever
 javascript - is this the only way?

 Thanks

 Marcos









RE: problem with html:errors tag

2001-10-23 Thread Rob Breeds


looks OK to me. Do the variables _firstName and _lastName get populated by
setFirstName() and setLastName()?

Other than that I'm afraid I've no idea - I'm still writing my first struts
app!

Rob


   
   
Scriven,  
   
Marcos  To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]  
Marcos.Scrive   cc:   
   
[EMAIL PROTECTED]Subject: RE: problem with html:errors 
tag  
   
   
23/10/2001 
   
13:26  
   
Please respond 
   
to struts-user 
   
   
   
   
   




Hi Rob

Here is my validate method (from the ActionForm bean):

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
log.debug(Validating form);
ActionErrors errors = new ActionErrors();
if ((_firstName == null) || (_firstName.length()  1)) {
errors.add(firstName, new
ActionError(error.firstname.required));
}
if ((_lastName == null) || (_lastName.length()  1)) {
errors.add(lastName, new
ActionError(error.lastname.required));
}

return errors;
}

The problem occurs regardless of whether or not I restart the web server.
Here is my entire JSP:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

script src=date.js/script
script src=strings.js/script
script src=validation.js/script

html:html locale=true
head
titleAdd Sales Person/title
html:base/
link rel=stylesheet href=/stylesheets/gs1.css type=text/css
/head
body bgcolor=#003399 text=#FF



html:form action=/sourcefiles/dealinfo/addSalesPerson focus=firstName

table border=0 width=100%

  tr
td align=right class=text8lilac
First Name
/td
td align=left
html:text styleClass=form2 property=firstName size=16
maxlength=16 onBlur=javascript:validateName(this);/
html:errors property=firstName/

/td
  /tr

  tr
td align=right class=text8lilac
  Last Name
/td
td align=left
  html:text styleClass=form2 property=lastName size=16
maxlength=16 onBlur=javascript:validateName(this);/
  html:errors property=lastName/
/td
  /tr

  tr
td align=right
  html:submit styleClass=form1 property=submit value=Submit/
/td
td align=left
  html:reset styleClass=form1/
/td
  /tr

/table

/html:form
/body
/html:html

Any help gratefully received!

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:46
 To: [EMAIL PROTECTED]
 Subject: RE: problem with html:errors tag


 you still get error messages even without the html:errors/
 tag? Sounds
 like a restart web app required?

 in the ActionForm validation() method, how do you populate Errors?

 Rob








 Scriven,


 Marcos  To:
 '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
 Marcos.Scrive   cc:


 [EMAIL PROTECTED]Subject: RE:
 problem with html:errors tag




 23/10/2001


 12:18


 Please respond


 to struts-user












 Thanks - but that's exactly what I did!

 I have two text boxes, firstName and lastName

 I triple checked the property names and capitalisation, and I
 still get all
 the errors.

 Also, I would have thought that not including any error tag
 would mean no
 errors would be displayed.

 Marcos

  -Original Message-
  From: Rob Breeds [mailto:[EMAIL PROTECTED]]
  Sent

errors not clearing when hitting BACK

2001-10-20 Thread Rob Breeds

Hi

I have a simple input form, an ActionForm, and validating set to true.

In the validate() method of ActionForm I check the length of the input
field (say max 5 chars) and if too long populate the errors collection.

The error message correctly displays if I enter a name longer than 5 chars.

If I then enter a valid length name, I get the forwarded page saying
Success - so far so good.

But if I now click the browser BACK button I get the input form displayed
(correct), with the input field containing the correct length input value
(correct) but with the error message saying name too long, which is wrong.

I have a reset() method in my ActionForm setting the name value to null but
this has no effect.

Any ideas please on how to prevent the error message(s) displaying when the
page is displayed after hitting back button?

Thank you

Rob Breeds





how to refer to images from JSPs in WEB-INF?

2001-10-19 Thread Rob Breeds

The Struts example (or I read it somewhere on the husted.com pages)
recommends putting JSPs under the WEB-INF folder so the JSPs can't be
served directly - only by action path. This seems a good thing but I can't
get it to work satisfactorily. And no examples I've found ever put the JSPs
under WEB-INF!

The problem this creates (for me) is that if I want to include an image in
a JSP, and that image is above the WEB-INF directory, how do I refer to it?

Do I use relative links: IMG SRC=../theimage.gif  ? This works but will
be a pain to maintain.

I can't use an absolute URL because the JSP doesn't know the web app
context base path and hardcoding the base path would be nasty.

I can't use the html:base generated base because that is within the
WEB-INF directory

I can't put images under WEB-INF  because that will reveal the real action
path. e.g. http://host/myapp/WEB-INF/images/theimage.gif and will not show
the image (can't serve from WEB-INF)

Can anyone help please?

Thanks



Rob Breeds






Re: how to refer to images from JSPs in WEB-INF?

2001-10-19 Thread Rob Breeds

OK I've sussed it myself.

Got to use the html:img tags with a page attribute to get context
relative path.

I need to avoid using html:base/ in any JSPs because it reveals the
absolute URL to the JSP.

e.g. if I include it I get this appearing in the rendered page source:

base href=http://localhost:9080/myApp/WEB-INF/pages/index.jsp;

and that's bad because users shouldn't be able to get to WEB-INF directly
should they?


Rob Breeds




   
   
Rob
   
Breeds/UK/IBM@   To: [EMAIL PROTECTED]
   
IBMGBcc:   
   
 Subject: how to refer to images from JSPs 
in WEB-INF?
19/10/2001 
   
10:40  
   
Please respond 
   
to struts-user 
   
   
   
   
   




The Struts example (or I read it somewhere on the husted.com pages)
recommends putting JSPs under the WEB-INF folder so the JSPs can't be
served directly - only by action path. This seems a good thing but I can't
get it to work satisfactorily. And no examples I've found ever put the JSPs
under WEB-INF!

The problem this creates (for me) is that if I want to include an image in
a JSP, and that image is above the WEB-INF directory, how do I refer to it?

Do I use relative links: IMG SRC=../theimage.gif  ? This works but will
be a pain to maintain.

I can't use an absolute URL because the JSP doesn't know the web app
context base path and hardcoding the base path would be nasty.

I can't use the html:base generated base because that is within the
WEB-INF directory

I can't put images under WEB-INF  because that will reveal the real action
path. e.g. http://host/myapp/WEB-INF/images/theimage.gif and will not show
the image (can't serve from WEB-INF)

Can anyone help please?

Thanks



Rob Breeds









Form validation errors in different frame?

2001-10-18 Thread Rob Breeds


I'm writing my first Struts application and want to use one frame
containing the input form and another frame to display the results.

If I use validation in the ActionForm (or populate ActionErrors in the
Action object), I know I can use html:errors/ to display errors in the
input form.

But do I HAVE to display the errors in the same frame as the input form?
Could I do a html:errors/ in the results frame and get them to display
there?

I can't use TARGET=resultsframe because if an error occurs, the input
form will be displayed in the results frame. I'd need to refresh the
results frame from the input frame. But if the errors collection is only
stored in the request, it'd be too late to retrieve the errors I think.

Can anyone offer a solution?

Thanks

Rob Breeds