RE: iterate tag

2002-08-02 Thread Becky Moyer


I don't know if this will work...but you could try
Can you take the indexId
and make it the size of the array/collection/etc that you are iterating
over?
Maybe this will only work for arrays.
What you could also do is sonething like this...

logic:iterate
  logic:lessThan (some condition under which you'd like your loop to run) 
Contents of loop
 /logic:lessThan
logic:iterate

This will only print the contents of your loop until some condition (the
opposite of what's defined by your nested logic tag) is reached.

Becky

 -Original Message-
 From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 02, 2002 9:58 AM
 To: 'Struts Users Mailing List'
 Subject: RE: iterate tag


 H sounds like an interesting idea.  If there's a way, I'ld like to
 know about it!  I don't know how you would though, unless you
 extended/modified the tag or something.

 ~ Keith
 http://www.buffalo.edu/~kkamholz



 -Original Message-
 From: SR [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 02, 2002 8:47 AM
 To: Struts Users Mailing List
 Subject: iterate tag


 Hello,


 Is there a way to break out of the iterate tag?? something like
 the break in
 the for loop?

 Thanks,
 Sanjana

 --
 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: Ending a Session After Browser Has Gone Away

2002-08-01 Thread Becky Moyer

Just set a short session timeout.  3 minutes of inactivity, session expires.
So by the time they reboot, they have to log in again.
Yeah, if someone stares at the page for 3 minutes and does something, they
have to log in again, but if you're that concerned with sessions getting
cleared, then it's not such a big deal.

Anything wrong with this?
Becky

 -Original Message-
 From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 01, 2002 11:33 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Ending a Session After Browser Has Gone Away


 Any suggestions?

 -Original Message-
 From: James Mitchell [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 01, 2002 11:34 AM
 To: Struts Users Mailing List
 Subject: RE: Ending a Session After Browser Has Gone Away


 The web being the stateless environment that it is, you have no way know
 (without using javascript) that a user has closed a browser.

 I wouldn't advise to doing this anyway, because the user may have
 more than
 one window open, so if they close one of them and try to continue
 using your
 site, they will be met (rather rudely) with your login screens.

 I can't speak for other people, but whenever I'm navigating a
 site that does
 a shit job of navigation hierarchy, I always use shift+click if I want to
 keep the current page and not be sent off deep in the site with no hope of
 finding the original spot that sent me.  If the site did as you propose,
 this would result in a very pissed off user.  And you could bet that you'd
 hear about it (from me at least).

 Oh well, that's my 2 cents.



 James Mitchell
 Software Engineer\Struts Evangelist
 Struts-Atlanta, the Open Minded Developer Network
 http://www.open-tools.org/struts-atlanta




  -Original Message-
  From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, August 01, 2002 11:06 AM
  To: [EMAIL PROTECTED]
  Subject: Ending a Session After Browser Has Gone Away
 
 
  Is there a way to end a user session if the browser has closed either
  through user action or non-user actions such as power outages?
  If not, what
  are typical ways to get around this?  We are talking about
  allowing the user
  to login again, checking for a current user session, and if
 they have one,
  killing it and starting a new one.  Is this a sound approach?  Thanks.
 
 
  Sean Cohan
  Software Performance 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]

 --
 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: formatting test in prepopulated form

2002-05-03 Thread Becky Moyer

Bill,
  I thought of that, and that's probably what I'll end up doing.  I didn't 
know if anyone knew of a way to wrap the text that gets printed in that text 
box with a tag in some manner.  I thought that would end up being much 
cleaner - a nicer seperation of presentation and logic...
But that's not always possible without doing some acrobatic feat, so I'll 
have to just go with the extra getters and setters.
   Thanks for your input!
   Becky


Original Message Follows
From: Bill Page [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: formatting test in prepopulated form
Date: Thu, 2 May 2002 17:23:07 -0400

what about 2 getters and setters.  one the deals in pig latin and one that
deals in english that has to translate on a get (maybe you don't need the
set).

bp

  -Original Message-
  From: Becky Moyer [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 02, 2002 5:20 PM
  To: [EMAIL PROTECTED]
  Subject: formatting test in prepopulated form
 
 
  Hi all...
 Can't find anything about this anywhere, thought i'd ask...
 
I am storing a piece of data in a special format.  So, for
  a bizarre
  example, I store a name in pig latin in the database.  When I
  display the
  name, I want it to show up formatted properly.  Trouble is,
  this is in a
  form, and i want to format it inside a struts html:text box.
 
  So in the database I store the name as onjhae ithsmae.  I
  populate my form
  with the value name=onjhae ithsmae.  I have a custom tag
  that if I do
  something like this
  mytags:formatbean:write name=myform
  property=name//mytags:format
 
  will print out John Smith.
 
  Problem is when I want the user to be able to edit their name
  in a form, and
  I want to prepopulate the form, I end up with a dilemma.  I
  want to keep the
  name in pig latin in my form, and only want to display it in
  English.
  They'll enter it in English, but I'll translate it back to
  pig latin in the
  validate method or the action.  So if I already have
  html:text name=myform property=name/, how do I use my
  tag to format
  the text?  I don't think I can even do
 
  html:text name=myform property=name
mytags:format
  %=myform.getName()%
/mytags:format
  /html:text
 
 
  I'm using Struts 1.0.  Is there a way to do this, or do I
  have to do all
  sorts of weird conversion back and forth???
 
  Any suggestions greatly appreciated.
  Thanks!!!
  Becky
 
  _
  Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
  --
  To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




formatting test in prepopulated form

2002-05-02 Thread Becky Moyer

Hi all...
   Can't find anything about this anywhere, thought i'd ask...

  I am storing a piece of data in a special format.  So, for a bizarre 
example, I store a name in pig latin in the database.  When I display the 
name, I want it to show up formatted properly.  Trouble is, this is in a 
form, and i want to format it inside a struts html:text box.

So in the database I store the name as onjhae ithsmae.  I populate my form 
with the value name=onjhae ithsmae.  I have a custom tag that if I do 
something like this
mytags:formatbean:write name=myform property=name//mytags:format

will print out John Smith.

Problem is when I want the user to be able to edit their name in a form, and 
I want to prepopulate the form, I end up with a dilemma.  I want to keep the 
name in pig latin in my form, and only want to display it in English.  
They'll enter it in English, but I'll translate it back to pig latin in the 
validate method or the action.  So if I already have
html:text name=myform property=name/, how do I use my tag to format 
the text?  I don't think I can even do

html:text name=myform property=name
  mytags:format
%=myform.getName()%
  /mytags:format
/html:text


I'm using Struts 1.0.  Is there a way to do this, or do I have to do all 
sorts of weird conversion back and forth???

Any suggestions greatly appreciated.
Thanks!!!
Becky

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


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




RE: Splitting ApplicationResource.properties

2002-01-22 Thread Becky Moyer

So, if I understand what everyone is telling me...

There is no way in Struts 1.0 to grab the existing MessageResources object 
and add new messages.

To do this, I *think* that I'll have to extend MessageResources with my own 
version of PropertyMessageResources that has some sort of an add method 
which maybe lets me add new messages one at a time, or maybe lets me add a 
whole Properties object.

Then I'll have to do a getServletContext().setAttribute(Action.MESSAGES_KEY, 
application); to place the entire collection of messages back where any 
bean:message key=foo/ tag can get at them.

Essentially, I would prefer not to have to use the bundle property of the 
message tag.

Am I on the right track?

Thanks,
Becky

Original Message Follows
From: Jeff Oberlander [EMAIL PROTECTED]
To: 'Becky Moyer' [EMAIL PROTECTED]
Subject: RE: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:22:15 -0800

Becky, it seems (although I haven't tried this) that you can do it through a
combination of:

1) using the bundle attribute of message -
http://jakarta.apache.org/struts/struts-bean.html#message

2) Initializing a different MessagesResource object:
 public static MessageResources messages =

MessageResources.getMessageResources(com.mycompany.mypackage.Messages);
(from
http://jakarta.apache.org/struts/api-1.0/org/apache/struts/util/package-summ
ary.html#doc.Messages)




-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 2:04 PM
To: [EMAIL PROTECTED]
Subject: RE: Splitting ApplicationResource.properties


Margaret,
Thanks for the code!  That helps a lot.  I have to look through the
Struts code with the sample you sent me in mind.

Thanks again...
Becky


Original Message Follows
From: Martin, Margaret [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:41:59 -0600

Becky,
Attached is an extension of ActionServlet that I wrote which loads multiple
resource bundles based on a properties file that specifies everything to
load. This may not be exactly what you want, but it might give you some good
ideas -

Hope it helps -
Margaret



-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 3:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Splitting ApplicationResource.properties


So, from Martin Cooper's post at
http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04548.html, I

gather that while there is an apparent assumption that each application has

a single source of message resources in both Struts 1.0.x and the latest
code, I can infer there is a way around it??

The new subapp concept looks pretty cool.  But does that mean you can
install subapps on the fly, while your servlet engine is running?

My ActionServlet has a set of pages that allow developers to upload an
almost-war file (that has a struts-config.xml but no web.xml file) and it's
read in and available immediately, all classes are loaded in... things are
put in set places.  This allows new sections of the site to be added without

reloading tomcat.

Anyway, back to the topic at hand, I am still confused.  With Struts 
1.0,
can I add new messages without restarting (as I can add ActionMappings, etc,

without restarting)?  I have been trying to look at the Struts code to see
how it's done now, and I am just not seeing a way I can add my messages.

Thanks for your reply,
 Becky

Original Message Follows
From: Ted Husted [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:01:21 -0500

There's some recent work going on in the nightly build that might
interest you.

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


Becky Moyer wrote:
   
Hello all...
   I can't seem to find the answer to my question in the archive, the
javadoc, or the source, so I was hoping someone could figure this one
out.
   
   I have a class extending ActionServlet to read struts-config.xml
files
from places other then WEB-INF/ in order to split apart the different
aspects of my webapp.  I would also like to be able to split up my
resource.properties files.  I can find these files in my ActionServlet,
but
I can't figure out how to read them in so that they will be available
for
bean:message key=mykey/ tags.  I've tried doing a props.load and a
System.setProperties(props), and after I did that I saw that Struts
stores
those messages using its own Properties object...I'm just not sure how 
I
can
get the new properties in without losing the old properties, since it
looks
like I have to create a new MessageResource object in the ActionServlet

Splitting ApplicationResource.properties

2002-01-21 Thread Becky Moyer

Hello all...
   I can't seem to find the answer to my question in the archive, the 
javadoc, or the source, so I was hoping someone could figure this one out.

   I have a class extending ActionServlet to read struts-config.xml files 
from places other then WEB-INF/ in order to split apart the different 
aspects of my webapp.  I would also like to be able to split up my 
resource.properties files.  I can find these files in my ActionServlet, but 
I can't figure out how to read them in so that they will be available for 
bean:message key=mykey/ tags.  I've tried doing a props.load and a 
System.setProperties(props), and after I did that I saw that Struts stores 
those messages using its own Properties object...I'm just not sure how I can 
get the new properties in without losing the old properties, since it looks 
like I have to create a new MessageResource object in the ActionServlet to 
add in a new properties file.

  I'm going to keep staring at the code and the javadoc, but does someone 
have any ideas as to what I need to do with the properties to make them 
available to bean:message??   I feel like I am missing something staring me 
in the face!


   Thanks in advance,
   Becky

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


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




Re: Splitting ApplicationResource.properties

2002-01-21 Thread Becky Moyer

So, from Martin Cooper's post at
http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04548.html, I 
gather that while there is an apparent assumption that each application has 
a single source of message resources in both Struts 1.0.x and the latest 
code, I can infer there is a way around it??

The new subapp concept looks pretty cool.  But does that mean you can 
install subapps on the fly, while your servlet engine is running?

  My ActionServlet has a set of pages that allow developers to upload an 
almost-war file (that has a struts-config.xml but no web.xml file) and it's 
read in and available immediately, all classes are loaded in... things are 
put in set places.  This allows new sections of the site to be added without 
reloading tomcat.

  Anyway, back to the topic at hand, I am still confused.  With Struts 1.0, 
can I add new messages without restarting (as I can add ActionMappings, etc, 
without restarting)?  I have been trying to look at the Struts code to see 
how it's done now, and I am just not seeing a way I can add my messages.

  Thanks for your reply,
   Becky

Original Message Follows
From: Ted Husted [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:01:21 -0500

There's some recent work going on in the nightly build that might
interest you.

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


Becky Moyer wrote:
 
  Hello all...
 I can't seem to find the answer to my question in the archive, the
  javadoc, or the source, so I was hoping someone could figure this one 
out.
 
 I have a class extending ActionServlet to read struts-config.xml files
  from places other then WEB-INF/ in order to split apart the different
  aspects of my webapp.  I would also like to be able to split up my
  resource.properties files.  I can find these files in my ActionServlet, 
but
  I can't figure out how to read them in so that they will be available for
  bean:message key=mykey/ tags.  I've tried doing a props.load and a
  System.setProperties(props), and after I did that I saw that Struts 
stores
  those messages using its own Properties object...I'm just not sure how I 
can
  get the new properties in without losing the old properties, since it 
looks
  like I have to create a new MessageResource object in the ActionServlet 
to
  add in a new properties file.
 
I'm going to keep staring at the code and the javadoc, but does someone
  have any ideas as to what I need to do with the properties to make them
  available to bean:message??   I feel like I am missing something staring 
me
  in the face!
 
 Thanks in advance,
 Becky
 
  _
  Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
  --
  To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]

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



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


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




RE: Splitting ApplicationResource.properties

2002-01-21 Thread Becky Moyer

Margaret,
   Thanks for the code!  That helps a lot.  I have to look through the 
Struts code with the sample you sent me in mind.

   Thanks again...
   Becky


Original Message Follows
From: Martin, Margaret [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:41:59 -0600

Becky,
Attached is an extension of ActionServlet that I wrote which loads multiple
resource bundles based on a properties file that specifies everything to
load. This may not be exactly what you want, but it might give you some good
ideas -

Hope it helps -
Margaret



-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 3:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Splitting ApplicationResource.properties


So, from Martin Cooper's post at
http://www.mail-archive.com/struts-dev%40jakarta.apache.org/msg04548.html, I

gather that while there is an apparent assumption that each application has

a single source of message resources in both Struts 1.0.x and the latest
code, I can infer there is a way around it??

The new subapp concept looks pretty cool.  But does that mean you can
install subapps on the fly, while your servlet engine is running?

   My ActionServlet has a set of pages that allow developers to upload an
almost-war file (that has a struts-config.xml but no web.xml file) and it's
read in and available immediately, all classes are loaded in... things are
put in set places.  This allows new sections of the site to be added without

reloading tomcat.

   Anyway, back to the topic at hand, I am still confused.  With Struts 1.0,
can I add new messages without restarting (as I can add ActionMappings, etc,

without restarting)?  I have been trying to look at the Struts code to see
how it's done now, and I am just not seeing a way I can add my messages.

   Thanks for your reply,
Becky

Original Message Follows
From: Ted Husted [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Splitting ApplicationResource.properties
Date: Mon, 21 Jan 2002 15:01:21 -0500

There's some recent work going on in the nightly build that might
interest you.

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


Becky Moyer wrote:
  
   Hello all...
  I can't seem to find the answer to my question in the archive, the
   javadoc, or the source, so I was hoping someone could figure this one
out.
  
  I have a class extending ActionServlet to read struts-config.xml 
files
   from places other then WEB-INF/ in order to split apart the different
   aspects of my webapp.  I would also like to be able to split up my
   resource.properties files.  I can find these files in my ActionServlet,
but
   I can't figure out how to read them in so that they will be available 
for
   bean:message key=mykey/ tags.  I've tried doing a props.load and a
   System.setProperties(props), and after I did that I saw that Struts
stores
   those messages using its own Properties object...I'm just not sure how I
can
   get the new properties in without losing the old properties, since it
looks
   like I have to create a new MessageResource object in the ActionServlet
to
   add in a new properties file.
  
 I'm going to keep staring at the code and the javadoc, but does 
someone
   have any ideas as to what I need to do with the properties to make them
   available to bean:message??   I feel like I am missing something staring
me
   in the face!
  
  Thanks in advance,
  Becky
  
   _
   Send and receive Hotmail on your mobile device: http://mobile.msn.com
  
   --
   To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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



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


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

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


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




Redirect fails in templates

2001-11-13 Thread Becky Moyer

I am trying to redirect a user to the login page if they bookmark a page and 
don't have the right authorization when they access it.  Essentailly, once 
someone is securely logged in, I store an object in the session - it's 
presence proves they are logged in.  If it isn't there, then they should be 
redirected.  I put the logic in my actual page, it works.  If I put it in 
the body of my template (since I want it on every page) it can't redirect.  
Why?  I know that the redirect code gets executed, but I either end up 
seeing the page i wanted to access, or I end up seeing a blank page.  I've 
tried the following tags:

html:redirect page=/login.jsp /

% response.sendRedirect(/login.jsp); %

html:forward name=loginpage / where the ActionForward that refers to is:
forward name=loginpage path=/login.jsp redirect=true /

Any thoughts?  My workaround now is to put the tag in each page 
individually, but I'd really like to be able to put it in my templates.

Thanks!
Becky


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


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




RE: Redirect fails in templates

2001-11-13 Thread Becky Moyer


That's what I am doing already...
When I put these tags in my template.jsp page:
logic:notPresent name=securityObject
logic:redirect page=/login.jsp/
/logic:notPresent

They do not redirect if the securityObject is not present.

If I put them in entry.jsp below...

logic:notPresent name=securityObject
  logic:redirect page=/login.jsp/
/logic:notPresent

template:insert template='/templates/template.jsp'
  template:put name='content' content='/entry_content.jsp'/
/template:insert

They work fine.  What is it about the template.jsp page that keeps it from 
being able to redirect?

Thanks,
Becky

Original Message Follows
From: Nguyen, Khuong [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Redirect fails in templates
Date: Tue, 13 Nov 2001 11:21:40 -0500

Try using the present tag since you inserted an object into the session for
a valid user. If you are using the standard container security, then declare
those pages in web.xml. The container does the rest for logging in. You may
want to check for the presence of other beans used on the page and redirect
to an action to populate those before displaying.

logic:notPresent name=loginID
logic:redirect href=/login/
/logic:notPresent

-Original Message-
From: Becky Moyer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 9:53 AM
To: [EMAIL PROTECTED]
Subject: Redirect fails in templates


I am trying to redirect a user to the login page if they bookmark a page and

don't have the right authorization when they access it.  Essentailly, once
someone is securely logged in, I store an object in the session - it's
presence proves they are logged in.  If it isn't there, then they should be
redirected.  I put the logic in my actual page, it works.  If I put it in
the body of my template (since I want it on every page) it can't redirect.
Why?  I know that the redirect code gets executed, but I either end up
seeing the page i wanted to access, or I end up seeing a blank page.  I've
tried the following tags:

html:redirect page=/login.jsp /

% response.sendRedirect(/login.jsp); %

html:forward name=loginpage / where the ActionForward that refers to is:
forward name=loginpage path=/login.jsp redirect=true /

Any thoughts?  My workaround now is to put the tag in each page
individually, but I'd really like to be able to put it in my templates.

Thanks!
Becky


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


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



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


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




Re: ActionServlet.addMapping() persistence

2001-08-16 Thread Becky Moyer

Thanks for the replies - they have helped a lot.  Sorry it's taken me so 
long to get back and thank you for them - things have been busy in other 
directions.

At any rate, we're still trying to figure out what implementation of 
splitting apart struts-config.xml via entities will work best for our 
application, but this is the route I think we'll take.

Now I am wondering if someone could further explain the ActionServlet method 
definitions in the javadoc.  Once i add a new definition to my webapp, I'd 
like to reread struts-config.xml and its associated entities so that I read 
in the new files.  Is there a method to do this?  I've been looking at the 
various init methods, but I'm afraid that using these will kill any sessions 
that are active when I add something new.  If this is the case, I should 
dynamically add the new struts-config.xml files while saving them for when 
the server is restarted later.

So, trying to summarize what looks to be a confusing paragraph, is there a 
method in the ActionServlet to reread the struts-config.xml file in such a 
way that it won't seriously interrupt active sessions?

Or...is there a way to pass the ActionServlet an additional 
struts-config.xml and have it read it in while active and still using the 
existing one?  I imagine this answer is no, I have to parse the new file 
myself and create action-mappings and forwards and then add them one by one 
to the ActionServlet.

Again MUCH THANKS for the replies, they are very helpful.
-Becky-

Original Message Follows
From: Becky Moyer [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: ActionServlet.addMapping() persistence
Date: Wed, 08 Aug 2001 12:58:02 -0400

Hi all...
I want to write an Action that will add mappings to the ActionServlet on the
fly.  Am I correct in thinking that any ActionMappings and such that I add
in this way will not be persisted, and that I also have to modify
struts-config.xml if I want the mappings to be available for future restarts
of my servlet engine?

Also, is there a way to specify multiple config paths in the ActionServlet
so that i can have more then one struts-config.xml in one webapplication?
  So, for example, I would have a webapp test, which has
test/WEB-INF/struts-config.xml.  If I added something later to it,
test/subtest, with its own new Actions, could I make a file
test/subtest/WEB-INF/struts-config.xml and have that file ALSO be read by
the ActionServlet on startup?

I suppose I could update struts-config.xml and then tell the ActionServlet
to reread it in the Action I talked about in the first paragraph...I'd like
to be able to seperate this out, if possible, to make the seperate
components of my webapplication seperate.  The problem with putting this all
into individual webapps is that I want the session to be passed from one
part of the webapp to the next.

Any thoughts?
Thanks,
Becky

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



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




Re: multiple struts-config.xml

2001-08-16 Thread Becky Moyer

See the mail archive: 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg13197.html
it's in the middle of the message.


Original Message Follows
From: Mike Dewhirst [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: multiple struts-config.xml
Date: Thu, 16 Aug 2001 13:27:45 +0100

is it possible to have struts-config split over several files? and use some
xml include directive?


=**

If you are not the intended recipient, employee or agent responsible for 
delivering the message to the intended recipient, you are hereby notified 
that any dissemination or copying of this communication and its attachments 
is strictly prohibited.

If you have received this communication and its attachments in error, please 
return the original message and attachments to the sender using the reply 
facility on e-mail.

Internet communications are not secure and therefore the UCLES Group does 
not accept legal responsibility for the contents of this message.  Any views 
or opinions presented are solely those of the author and do not necessarily 
represent those of the UCLES Group unless otherwise specifically stated.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses although this does not 
guarantee that this email is virus free.

**=


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




ActionServlet.addMapping() persistence

2001-08-08 Thread Becky Moyer

Hi all...
I want to write an Action that will add mappings to the ActionServlet on the 
fly.  Am I correct in thinking that any ActionMappings and such that I add 
in this way will not be persisted, and that I also have to modify 
struts-config.xml if I want the mappings to be available for future restarts 
of my servlet engine?

Also, is there a way to specify multiple config paths in the ActionServlet 
so that i can have more then one struts-config.xml in one webapplication?
  So, for example, I would have a webapp test, which has 
test/WEB-INF/struts-config.xml.  If I added something later to it, 
test/subtest, with its own new Actions, could I make a file 
test/subtest/WEB-INF/struts-config.xml and have that file ALSO be read by 
the ActionServlet on startup?

I suppose I could update struts-config.xml and then tell the ActionServlet 
to reread it in the Action I talked about in the first paragraph...I'd like 
to be able to seperate this out, if possible, to make the seperate 
components of my webapplication seperate.  The problem with putting this all 
into individual webapps is that I want the session to be passed from one 
part of the webapp to the next.

Any thoughts?
Thanks,
Becky

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




When session invalidates, template doesn't clear out....

2001-08-06 Thread Becky Moyer

Hi all...
   I have a webapp that uses Struts templates.  I have a place in my 
template where I plug in the current user's username and basic info.  I can 
sucessfully do a session.invalidate(), but then when I link back to my 
loginpage, their info still shows up on the template.  How do they really 
work?  I thought they would get reloaded everytime, but it seems that they 
don't fully reload.  Is this true?

   Thanks,
   Becky


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




Tomcat/Struts Design Issues and Questions

2001-07-24 Thread Becky Moyer

Struts-users!
   Sorry if this is not the best forum for this; I am asking this here 
becuase I think Struts factors into my question.

   I am creating a web site that allows for the future addition of new 
webapps to extend the original site.  I would like to allow users to make 
their add on as a full webapp, and I'll store the link to the new webapp in 
my database.

   One of the requirements I have is that I need to pass my session onto the 
new webapp. But, oops, you can't do that.  Tomcat (and the Servlet API) 
doesn't let you pass a session to a new webapp - as far as I can tell.  I 
could pass the important tidbits as strings along in the URL and recreate a 
session once I get to the new webapp, but that has its own set of 
problems...it's insecure (no matter how i encode the URL), and it completely 
messes up the first webapp, becuase when I return to that webapp the session 
will probably have timed out.

   Does anyone know of a way that I can maintain a list of trusted webapps 
which I can pass session between?  How about if there is a way to deploy an 
entire webapp within the context of another?  I don't want future developers 
to need to mess with my code to get their apps into my context.

   And here is the STRUTS part of my question.  If I allow future developers 
to simply put all of their JSPs/images/templates/etc. into a subdirectory in 
my webapp, is there a way to allow them to either add their own 
struts-config.xml file or make struts reread the struts-config.xml file 
while Tomcat is still running?  I also have a requirement of leaving the 
server running while i deploy so that i don't lose sessions.

   Any thoughts would be welcome and appreciated.  I have looked through 
archives for Tomcat and Struts and can't seem to find an answer.

  Thanks in advance!
   Becky

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




Architecture Question - forward to another webapp

2001-07-23 Thread Becky Moyer

Hi all...
  Can someone tell me how to write an entry in my struts-config.xml file 
that will link me to another webapp/context.  Do I have to put the entire 
URL?  I really don't want to do that so I don't have to worry about changing 
server names all over the place.
   So for example, I have 2 webapps (I'm running in Tomcat), webapp1 and 
webapp2.  I'd want to have links to both jsp files and ActionClasses in the 
struts-config.xml file.

To get to the index of webapp2 from inside webapp1, I don't think this will 
work - it will go to http://servername/webapp1/webapp2/index.jsp, and I want 
it to go to http://servername/webapp2/index.jsp.
   forward name=forward1 path=/webapp2/index.jsp/

What do I do?

Thanks
Becky



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




Struts Bug? My Bug? Help!! Please!

2001-07-20 Thread Becky Moyer

   I've got a multibox/iterate combination form.  My webapp works when there 
is something to submit.  When I check at least one value checked in my 
multiboxes, I get the expected result.  When there is nothing checked in my 
multiboxes, my form object is the same as it was before I changed the 
checkboxes.  For example, I'll have 4 checkboxes displayed, representing 4 
strings, String1, String2, String3, String4.  I will check String2, press 
submit, and I receive the correct form in my ActionClass.  After updating 
the form object and returning to my multibox page, if I uncheck String2 and 
submit, the form I receive contains String2 as being checked.

My form contains 3 String arrays, one of which contains links, one contains 
the string names, and the other contains the string names which are checked.

I have done as much testing as I can, gone through my code, and cannot find 
a bug.  Is this a bug (or perhaps it is a feature ;-) ) of Struts?

If this isn't enough info, I can send code.  What is going on?

Thanks so much!
Becky


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




RE: Struts Bug? My Bug? Help!! Please!

2001-07-20 Thread Becky Moyer

Here is a simplified overview of what you need to do.  If you still would 
like code, I can still supply you with it, but I think this will be easier 
to understand.

ActionForm:

2 fields with associated getter and setters:

String[] CheckboxNames

String[] CheckboxValues

You must populate this form before you hit the JSP to display it (if you 
want to preset the values).  So, figure out all the possible values, and 
then figure out what you want checked.  So, for example...

checkboxNames[0] = String1;
checkboxNames[1] = String2;
checkboxNames[2] = String3;
checkboxNames[3] = String4;

and

checkboxValues[0] = String2;
checkboxValues[1] = String4;

Then say

MyForm form = new MyForm();
form.setCheckboxNames(checkboxNames);
form.setCheckboxValues(checkboxValues);

And put the form in the session.

When you get to your jsp, retreive the form from the session, and place it 
into the page context:

pageContext.setAttribute(MyForm, myform , PageContext.PAGE_SCOPE);

Then, where you want the multiple checkboxes on your jsp, do the following:

html:form name=MyForm action=entry.do type=com.mypackagemname.MyForm
TABLE border=1
logic:iterate name=MyForm property=CheckboxNames id=item1
  TR
TD align=center
  bean:write name=item1 /
/TD
TD align=center
  html:multibox property=CheckboxValues
bean:write name=item1 /
  /html:multibox
/TD
/TR
/logic:iterate
/TABLE
html:submit value=Save Changes/
   html:reset/
/html:form


THen when you press submit and go to your actionClass, you can compare 
CheckboxNames to CHeckboxValues to see what was checked.

Did that explain it enough?

Hope it helps,
Becky



Original Message Follows
From: Prashanth_Thm [EMAIL PROTECTED]
To: Becky Moyer [EMAIL PROTECTED]
Subject: RE: Struts Bug?  My Bug? Help!! Please!
Date: Fri, 20 Jul 2001 16:23:53 -0400

Hi,
can you send me the code?
Actually i want to get the checked strings in my Action class which
i am not
able toyour code would be helpful to me.
and let me try to help you also if possible.

Prashanth.


  -Original Message-
  From:Becky Moyer [SMTP:[EMAIL PROTECTED]]
  Sent:Friday, July 20, 2001 1:20 PM
  To:  [EMAIL PROTECTED]
  Subject: Struts Bug?  My Bug? Help!! Please!
 
 I've got a multibox/iterate combination form.  My webapp works when
  there
  is something to submit.  When I check at least one value checked in my
  multiboxes, I get the expected result.  When there is nothing checked in
  my
  multiboxes, my form object is the same as it was before I changed the
  checkboxes.  For example, I'll have 4 checkboxes displayed, representing 
4
 
  strings, String1, String2, String3, String4.  I will check String2, press
  submit, and I receive the correct form in my ActionClass.  After updating
  the form object and returning to my multibox page, if I uncheck String2
  and
  submit, the form I receive contains String2 as being checked.
 
  My form contains 3 String arrays, one of which contains links, one
  contains
  the string names, and the other contains the string names which are
  checked.
 
  I have done as much testing as I can, gone through my code, and cannot
  find
  a bug.  Is this a bug (or perhaps it is a feature ;-) ) of Struts?
 
  If this isn't enough info, I can send code.  What is going on?
 
  Thanks so much!
  Becky
 
 
  _
  Get your FREE download of MSN Explorer at 
http://explorer.msn.com/intl.asp


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




RE: Struts Bug? My Bug? Help!! Please!

2001-07-20 Thread Becky Moyer

Thank you!
I forgot about that.  Thanks for jogging my memory.  I know I've read about 
that in the mailing list somewhere before, but I couldn't find it.  I 
appreciate your quick response.

Becky

Original Message Follows
From: Abraham Kang [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Struts Bug?  My Bug? Help!! Please!
Date: Fri, 20 Jul 2001 14:07:44 -0700

Hi Becky,

Did you override the reset () method of ActionForm?  If you didn't you
need to set the Attribute of your ActionForm object that represents the
multibox to null.

Like:

 public void reset(ActionMapping mapping, HttpServletRequest request) {

 this.action = Create;
 this.autoConnect = false;
 this.yourMultiboxNames = null;

 }

--Abraham

  -Original Message-
  From: Becky Moyer [mailto:[EMAIL PROTECTED]]
  Sent: Friday, July 20, 2001 1:20 PM
  To: [EMAIL PROTECTED]
  Subject: Struts Bug? My Bug? Help!! Please!
 
 
 I've got a multibox/iterate combination form.  My webapp works
  when there
  is something to submit.  When I check at least one value checked in my
  multiboxes, I get the expected result.  When there is nothing
  checked in my
  multiboxes, my form object is the same as it was before I changed the
  checkboxes.  For example, I'll have 4 checkboxes displayed,
  representing 4
  strings, String1, String2, String3, String4.  I will check String2, press
  submit, and I receive the correct form in my ActionClass.  After updating
  the form object and returning to my multibox page, if I uncheck
  String2 and
  submit, the form I receive contains String2 as being checked.
 
  My form contains 3 String arrays, one of which contains links,
  one contains
  the string names, and the other contains the string names which
  are checked.
 
  I have done as much testing as I can, gone through my code, and
  cannot find
  a bug.  Is this a bug (or perhaps it is a feature ;-) ) of Struts?
 
  If this isn't enough info, I can send code.  What is going on?
 
  Thanks so much!
  Becky
 
 
  _
  Get your FREE download of MSN Explorer at 
http://explorer.msn.com/intl.asp
 
 



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




Re: indexing in tag 'iterate'

2001-06-29 Thread Becky Moyer

This is mostly a guess, but in the iterate tag's description, it states that 
the indexID must be a pagescope bean.  I think you must do something like:
%
int entryId=0;
pageContext.setAttribute(entryId, entryId, PageContext.PAGE_SCOPE);
%
And this will initialize an entryId int and place it into the page scope.
   Hope this helps...
   Becky

Original Message Follows
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: indexing in tag 'iterate'
Date: Fri, 29 Jun 2001 18:21:38 +0200

Hi

I need a form representing a two-dimensional array of input fields.

Can anybody tell me what the appropriate solution in Struts 1.0 looks like?

Despite numerous attempts to solve this with Struts, I did not succeed. My
attempted solution (in fact, one of them) looks like that
('account', 'amount' and 'remark' are indexed properties of the Bean
represented by 'report'):

...
table
tr
thAccount/ththAmount/ththRemark/th
/tr
bean:define id=report type=ReportForm toScope=session  name=select
property=report scope=session/
html:form name=report type=ReportForm scope=session action=log.do
logic:iterate name=report property=entries id=entry indexId
=entryId
tr
 tdhtml:text name=report property=account[entryId]//td
 tdhtml:text name=report property=amount[entryId]//td
 tdhtml:text name=report property=remark[entryId]//td
/tr
/logic:iterate
trtd colspan=3center
 html:submit
   bean:message key=button.submit/
 /html:submit
/td/tr
/html:form
/table

This causes the exception:

java.lang.IllegalArgumentException: Invalid indexed property
'account[entryId]'
 at
org.apache.struts.util.PropertyUtils.getIndexedProperty(PropertyUtils.java:308)
 at
org.apache.struts.util.PropertyUtils.getNestedProperty(PropertyUtils.java,
Compiled Code)
 at
org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils.java:453)
 at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:503)
 at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:188)
 at _0002freport_0002ejspreport_jsp_38._jspService
(_0002freport_0002ejspreport_jsp_38.java, Compiled Code)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java,
Compiled Code)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
 at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1758)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
 at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
 at java.lang.Thread.run(Thread.java:479)

If I replace the index variable 'entryId' by a literal number (see below),
this works so far (though it is not 'meaningful', ); thus the environment
(beans etc.) seems to be OK.
...
table
tr
thAccount/ththAmount/ththRemark/th
/tr
bean:define id=report type=ReportForm toScope=session  name=select
property=report scope=session/
html:form name=report type=ReportForm scope=session action=log.do
logic:iterate name=report property=entries id=entry indexId
=entryId
tr
 tdhtml:text name=report property=account[2]//td
 tdhtml:text name=report property=amount[2]//td
 tdhtml:text name=report property=remark[2]//td
/tr
/logic:iterate
trtd colspan=3center
 html:submit
   bean:message key=button.submit/
 /html:submit
/td/tr
/html:form
/table

I suppose 

Re: indexing in tag 'iterate'

2001-06-29 Thread Becky Moyer

I got this completely working in a test, so if you need more help then to 
put entryId as an Integer equalling 0, let me know.  Oh, and if you couldn't 
figure this out, when you use it as an index, it will come out as an Integer 
value, and you'll need to say something like:
tdhtml:text name=report property=account[entryId.intValue()]//td

Becky


Original Message Follows
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: indexing in tag 'iterate'
Date: Fri, 29 Jun 2001 18:21:38 +0200

Hi

I need a form representing a two-dimensional array of input fields.

Can anybody tell me what the appropriate solution in Struts 1.0 looks like?

Despite numerous attempts to solve this with Struts, I did not succeed. My
attempted solution (in fact, one of them) looks like that
('account', 'amount' and 'remark' are indexed properties of the Bean
represented by 'report'):

...
table
tr
thAccount/ththAmount/ththRemark/th
/tr
bean:define id=report type=ReportForm toScope=session  name=select
property=report scope=session/
html:form name=report type=ReportForm scope=session action=log.do
logic:iterate name=report property=entries id=entry indexId
=entryId
tr
 tdhtml:text name=report property=account[entryId]//td
 tdhtml:text name=report property=amount[entryId]//td
 tdhtml:text name=report property=remark[entryId]//td
/tr
/logic:iterate
trtd colspan=3center
 html:submit
   bean:message key=button.submit/
 /html:submit
/td/tr
/html:form
/table

This causes the exception:

java.lang.IllegalArgumentException: Invalid indexed property
'account[entryId]'
 at
org.apache.struts.util.PropertyUtils.getIndexedProperty(PropertyUtils.java:308)
 at
org.apache.struts.util.PropertyUtils.getNestedProperty(PropertyUtils.java,
Compiled Code)
 at
org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils.java:453)
 at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:503)
 at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:188)
 at _0002freport_0002ejspreport_jsp_38._jspService
(_0002freport_0002ejspreport_jsp_38.java, Compiled Code)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java,
Compiled Code)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
 at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1758)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
 at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
 at java.lang.Thread.run(Thread.java:479)

If I replace the index variable 'entryId' by a literal number (see below),
this works so far (though it is not 'meaningful', ); thus the environment
(beans etc.) seems to be OK.
...
table
tr
thAccount/ththAmount/ththRemark/th
/tr
bean:define id=report type=ReportForm toScope=session  name=select
property=report scope=session/
html:form name=report type=ReportForm scope=session action=log.do
logic:iterate name=report property=entries id=entry indexId
=entryId
tr
 tdhtml:text name=report property=account[2]//td
 tdhtml:text name=report property=amount[2]//td
 tdhtml:text name=report property=remark[2]//td
/tr
/logic:iterate
trtd colspan=3center
 html:submit
   bean:message key=button.submit/
 /html:submit
/td/tr
/html:form
/table

I 

submit button size

2001-06-28 Thread Becky Moyer

Hi all...
   I am trying to determine how I can set a standard size for dynamically 
generated submit buttons.  I don't see a parameter for the html:submit tag 
that allows you to specify size...is there a way to do it with stylesheets?  
I can't see one... Do I have to scrap the Struts submit tag and do it by 
hand?

   Thanks,
   Becky


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




Re: Multibox confusion after reading Struts mail-archive

2001-06-22 Thread Becky Moyer

Steve!!! Thanks!!!
I just got it working!  I got my form working in the same fashion you had 
yours.  One of my problems had been with not importing the bean taglibs 
properly (as my face turns slightly red) and I had tried to put the empty 
values of one of the arrays in my form to be null when a box shouldn't get 
checked, and that was causing a null pointer.  Anyway, thanks SO MUCH for 
your replies, they helped a lot.
   Thanks again,
Becky


Original Message Follows
From: Steve A Drake [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Multibox confusion after reading Struts mail-archive
Date: Thu, 21 Jun 2001 15:05:38 -0600 (MDT)

On Thu, 21 Jun 2001, Becky Moyer wrote:

  Steve,
 Thanks so much for your reply, it gave me some more leads to follow.  
I
  have been playing with this for the last 2 days...I have tried to change 
my
  webapp to be similar to yours.

That could get ugly. =:]

   I made my form have 2 string arrays, but
  when I try to iterate over my form as you have done in the example you 
gave,
  I either had to iterate over one string array or the other, and when I 
tried
  to specify the property in the multibox tag, it couldn't find the 
getter...I
  am assuming that, in step with the example you gave, Struts is trying to 
do
  a advancedQueryForm.getFindAssets().getSelectedAssets() for the multibox,
  when I think you are saying it should be doing an
  advancedQueryForm.getSelectedAssets().
 I am still plodding along, but haven't made much progress.  Is there
  something I'm missing?
 Thanks,
 Becky

  It sounds like you are getting close to what I'm using. I'm only
iterating over the String[] that contains all the possible values.
Values in the other String[] that match the array you are iterating
over will cause the checkboxes to be set to checked (but you don't need
to iterate over this second String[]). Also make sure the array you are
iterating over always contains all of the possible attributes, either by
saving it in session scope or repopulating it each time in request scope
(i.e., don't set it to null in reset()). In the ActionForm, I have:


 private String[] findAssets = null;
 private String[] selectedAssets = null;

/**
  * Get
  */
 public String[] getFindAssets() {
   return (this.findAssets);
 }
/**
  * Set
  *
  * @param
  */
 public void setFindAssets(String[] findAssets) {
   this.findAssets = findAssets;
 }


/**
  * Get
  */
 public String[] getSelectedAssets() {
   return (this.selectedAssets);
 }
/**
  * Set
  *
  * @param
  */
 public void setSelectedAssets(String[] selectedAssets) {
   this.selectedAssets = selectedAssets;
 }



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




Re: struts-blank on iPlanet

2001-06-19 Thread Becky Moyer


The missing message for index.title error message indicates that it cant 
find your ApplicationResources.properties file that should be in the 
WEB-INF/classes directory.  This file will contain index.title=Strtuts 
Starter Application and some other values necessary to build index.jsp.

-Becky-


Original Message Follows
From: Matt Raible [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: struts-blank on iPlanet
Date: Tue, 19 Jun 2001 12:53:15 -0700 (PDT)

I am trying to get a bare-bones, blank application to
work on iPlanet Application Server, SP2, and I get the
following error:

Any ideas?

directory structure is as follows:

uiframework
 index.jsp
 WEB-INF
 *.tld
 *.xml
 lib
 struts.jar


[19/Jun/2001 13:46:26:7] info:
--
javax.servlet.jsp.JspException: Missing message for
key index.title
 at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
 at
jsp.APPS.uiframework.index._jspService(index.java:73)
 at
jsp.APPS.uiframework.index.service(index.java:35)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
 at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
 at
com.netscape.server.servlet.servletrunner.ServletRunner.callJSP(Unknown
Source)
 at



__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/

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




Help with TLDParser for UltraDev by Dan Mandell

2001-06-14 Thread Becky Moyer

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

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



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




multibox question

2001-06-12 Thread Becky Moyer Julie Palmer

Hi all
   Struts newbie here.  I was wondering if someone could help me out with 
multibox.  Here's a code snippet from my jsp file:
html:form action=subscription.do
logic:iterate id=item1 name=entryData
  TR
TD align=center
html:multibox 
value=%=((EntryData)item1).getSubscriptionStatus().toString()% 
property=isSubscribed/
/TD
  /TR
/logic:iterate
/html:form

When I try to access this, I get the following error:
javax.servlet.ServletException: No getter method available for property 
isSubscribed for bean under name org.apache.struts.taglib.html.BEAN


I have tried making a JavaBean that has a getter for getIsSubscribed.  I 
have the jsp:useBean tag for it higher in the page - it looks like this:
jsp:useBean id=entrySubscriptionHolder scope=session
class=testpackage.EntrySubscriptionHolder/

My bean is only setting a single value for now, I realize I'll need an array 
eventually.  I've tested the boolean value in the multibox tag, it's 
returning what I want it to.  Does anyone see what I'm doing wrong?

  Thanks in advance!
   Becky



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