how to find a value in a list

2004-03-23 Thread sean jones
I have a user object in the session

The user object contains a List object that conatins an entry for each role the 
person has.


User {
private Roles r = new Roles();
user() {}

(getters  setters)..
}

i have a Console.jsp (this is used to show items that need processing by the 
user).  

the preceeding action put a consoleUserData object in the request.

for each role i have to iterate over the the consoleUserData object
to build that section of the console page.

h1 data entry 1 /h1
logic:iterate id=data name=consoleData

/logic:iterate 


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



Re: how to find a value in a list

2004-03-23 Thread sean jones
Pady Srinivasan Pady.Srinivasan at Heroix.com writes:

 
 Assuming you can get a Collection of roles, using jstl,
 
 c:forEach items=${requestScope.ROLES} var=role
 c:if test=${role.name == 'myRole'}
 Do something...
 /c:if
 /c:forEach
 
 
 Thanks
  

thanks, but this is about what i have now using the struts iterate tag

i have actually decided to create a console page for each role and

have the consoleAction  decide what page to include in the template.

String incl=defaultConsole.jsp;
if (user.verifyRole(thisrole))
   incl = ConsoleThisRole.jsp;
elseif (user.verifyRole(thatrole))
   incl = ConsoleThatRole.jsp

CreateTemplate(request, constants.empty, constants.empty, MasterTemplate.jsp, 
incl);



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



Re: Form name from JSP page

2004-03-03 Thread sean




if you have 1 and only one form on the page you can do

document.all.fieldname 


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



bean:write problem

2004-03-03 Thread sean
a onclick='returnData(bean:write name=xloc property=script /)' 
bean:write name=xloc property=locCode/
/a

this a tag should output something like this

onclick = 'returnData(y-2342,234,home office, 10230 your street, nj,
union, 02932, 12fl)

but instead it does this

onclick = 'returnData(quot;y-2342quot;,quot;234quot;,quot;home
officequot;, quot;10230 your streetquot;, quot;njquot;, quot;unionquot;,
quot;02932quot;, quot;12flquot;)

how can i prevent that.  is there something to stop the translation of the \
character

//get method for the bean defined as xloc
public String  getScript() {
String qt = \;
String comma = ,; 
StringBuffer buf = new StringBuffer();
buf.append(qt + locCode + qt + comma);
buf.append(qt + costCtr + qt + comma);
buf.append(qt + branch + qt + comma);
buf.append(qt + str3 + qt + comma);
buf.append(qt + st + qt + comma);
buf.append(qt + city + qt + comma);
buf.append(qt + zip + qt + comma);
buf.append(qt + flr + qt );


return buf.toString();
}




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



Re: bean:write problem

2004-03-03 Thread sean
sean sean.jones at ubs.com writes:

 
 a onclick='returnData(bean:write name=xloc property=script /)' 
 bean:write name=xloc property=locCode/
 /a
 


bean:write name=obj property=getter filter = true/

adding the filter=true did the trick





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



Iterate of List - need to test if list is null

2004-02-27 Thread sean jones


I have an object named Wizard in the request. 

Wizard has a property defined as

pubic Class Wizard {
  private List progressBar = null;
  public Wizard() {}
  public List getProgressBar() { return progressBar; }
}

in JSP i do this

logic:iterate name=wizard property=progressBar
/logic:iterate

how can i test if the progressBar is null before i start the iterate.

right now i get an error, cant find collection.  

i tried to used logic:notEmpty but i am not using struts 1.1




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



Re: Iterate of List - need to test if list is null

2004-02-27 Thread sean jones


Thanks Tim,

Hopefully the heads of state won't balk at the JSTL code. 

thanks again.





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



Implementing A Search Dialog - Struts

2004-02-25 Thread sean jones

Requirements.  

Clicking any button on the page must submit any changes the user has made up to 
the point of clicking the button. 

Problem. 

I have a 14 page wizard where some pages require the user to look up values.

IE : instead of typing vendor name and validating the vendor name, let the user
 search the vendors table and store the vendor code and only display the
 vendor name. 

 I cannot use a list that has all the vendors entries becuase there could
 be several hundred. 


How can i carry the values the user has keyed  - onto the search.jsp - the 
searchResults.JSP and back to Pagexx.jsp


One solution was to incorporate the searchFields in the MainForm Bean and use
that bean throughout the search process (means carrying over 70 hidden fields 
in the search.jsp and searchresults.jsp)  


The other was to put a bean in the session and update that bean with the 
results chosen by the user (problem - we have a size limit for objects stored 
in the session and this would probably blow up the session). 

All suggestions will be appreciated.
















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



Re: Implementing A Search Dialog - Struts

2004-02-25 Thread sean jones
Wendy Smoak Wendy.Smoak at asu.edu writes:

 
  From: news [mailto:news at sea.gmane.org] On Behalf Of sean jones
  How can i carry the values the user has keyed  - onto the 
  search.jsp - the searchResults.JSP and back to Pagexx.jsp
 
 You listed the two usual solutions.  If neither of those work, my next
 idea would be (assuming there's a database behind this somewhere) to go
 ahead and write to the database after each page of the wizard.  You
 might have to define a new table, a sort of hold file where you
 accumulate the input, then you'll have to deal with cleanup if the user
 disappears.  If you use a session listener, you can execute code that
 will delete the unneeded records when the session dies.
 
 It's not clear if this webapp is display-only or if you're doing
 database updates at the end of the wizard.
 

SessionListner - hmmm,

I really could use that technology,  can you explain how and or provid a simple 
example. 


as for HOLD file (work tables),  

yes my original design suggested using work tables (for saving data with 
validating) and production tables that would only get written to when the user 
clicks the next button and all validating is carried out.  


That idea was shot down and i am left with one huge table that contains all the 
data (hated it).  

that plus the mandate 
if the user inputs data into a field it should be retained even when
the save button is pushed.

using an pop-window would also do the trick, but that idea has also been shot 
down (siiighhs)




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



Re: Implementing A Search Dialog - Struts

2004-02-25 Thread sean jones


yes, i had a DB solution but that was shot down as i have posted earlier. 

if using the pop-up window (window.returnValue)  doesn t fly then i will just
create a small object with the values that could have changed (based on the 
page in the wizard) and store that in the session.  

That object would be a Map or HashMap 

in the action i would read the bean from the DB and check each field against
the formbean and for every value that is different i would store the fieldname
and value in the Map.  

Let me know what you think about this.  

Will checking each value in the bean create to much overhead ?








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



Using a java.util.List with a HTML:SELECT

2004-02-13 Thread sean jones

is it possible to use a java.util.List object with an HTML:SELECT control.

import java.util.List;
import java.util.ArrayList;

public final class Roles extends Ojbect {
public Roles() {}
public static List getRoles() {
 List r = new ArrayList();
 r.add(ADMIN);
 r.add(SUPERADMIN);
 r.add(CLERK);
 r.add(SUPERCLERK);
 return r;
}
}

in jsp 

i would use
html:form action=. 
html:select property=formprop

!-- what goest inside the html:select aattribute --
html:options..

html:select
/html:form



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



Re: Using a java.util.List with a HTML:SELECT

2004-02-13 Thread sean jones

i am aware of this option but DAO only returns a list of Strings and i prefer 
that to a list of beans.  The reason is i am more interested in the role name 
than the role_id.  

I plan to delete all the roles then put them back with a batchupdate.

This allows the user to selected all the roles to get rid of in one shot -vs- 
one at a time. 

Also roles cannot be deleted if they are in use (USER_ROLES - {user_id, 
role_id})

Maybe i am wrong, and should change the DAO to return a List 
of  LabelValueBeans




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



Re: array iteration

2004-02-13 Thread sean jones
Niall Pemberton niall.pemberton at blueyonder.co.uk writes:

 
 Why not just try it and see if it works - should do - have and iterate tag
 embedded in another iterate tag
 
 
 - Original Message - 
 From: LILES, DAVID (CONTRACTOR) DAVID.LILES at DFAS.MIL
 To: struts-user at jakarta.apache.org
 Sent: Friday, February 13, 2004 5:29 PM
 Subject: array iteration
 
 
 I am trying to iterate through a two dimensional array and have hit a
 wall below is source code from a class that displays the values in a
 calendar style format. How can I do the same thing by using the Struts
 iterate tags?
 
 public String formatMatrix(int[][] aMatrix) {
 StringBuffer sb = new StringBuffer();
 
 for (int i = 0; i  aMatrix.length; i++) {
 for (int j = 0; j  aMatrix[i].length; j++) {
 if (aMatrix[i][j]  0) {
 sb.append(aMatrix[i][j]  10 ?   + aMatrix[i][j] :
 String.valueOf(aMatrix[i][j]));
 sb.append( );
 }
 else {
 sb.append(   );
 }
 }
 sb.append(\n);
 }
 return sb.toString();
 }
 
 This is how I'm trying to display the contents
 
 1  2   3  4  5  6  7
 8  9  10 11 12 17 18
 19 20 21 22 23 24 25
 
 -
 To unsubscribe, e-mail: struts-user-unsubscribe at jakarta.apache.org
 For additional commands, e-mail: struts-user-help at jakarta.apache.org
 
wouldn't be simpler to have a calendar bean do the processing and 
use struts to dispaly the calendar bean properties.

Class MonthlyCalender {

private Date dte
private java.util.List days = new ArrayList(42);
private int lastDay;   // 31, 30, 29 or 28
private int strtPos;   // 1 - 7 : day of week for the 1st of the month ** 
public void setDate(String d) {this.dte = new Date(d);  fillDays() }
public Date getDate(return dte.toString()) ;

private void fillDays() {
int counter=1;
   for (int d =0; d  42; d++) {
  if (d  strtPos -1) 
   days.add();   // nice would be count back from lstday of lastmon
  else
   days.add(counter++);
   }
}


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



corporate hierarchy

2004-02-13 Thread sean jones
Is there any struts tricks or tips that would help

display an orgranizational tree

i have a 17 level tree that i want to represent as a tree
on a jsp page.  i want to use +, -  images to expand and 
collapse the tree. 

is there a java class avalable to do this also. 

anyone any ideas. 

Thanks Sean


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



Re: stop user from clicking the submit button twice

2004-01-30 Thread Sean Radford
Or use the Struts Workflow extension...


Sean

On Fri, 2004-01-30 at 10:26, Simon McCaughey wrote:
 From: Ashish Kulkarni [EMAIL PROTECTED]
 Sent: Thursday, January 29, 2004 10:30 PM
 Subject: stop user from clicking the submit button twice
  Hi
  I have a process which takes about 30 seconds, i want
  to show some kind of image or disable the submit
  button untill the process is complete and tell user
  that the process is running
  How can i do it, i m using struts1.1
  any code example or article will greatly help
 
 
 You could use some simple JavaScript to disable the button once its been
 clicked, or a simple JavaScript function to count the number of clicks and
 increment, if count!=1  then pop up an OK dialog saying page processing -
 please wait.
 
 If you want to stay away from JS, you could set up your form submit to
 redirect to a processing please wait type page, and then do the actual
 processing as a submission of that page. Should be fairly simple.
 
 HTH
 
 S.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/


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



[OT] Java printf, fprintf and sprintf classes

2004-01-09 Thread Sean Radford
Hi,

Anyone know of some (preferably open source) Java implementations of the
good-old C functions printf, fprintf and sprintf?

Regards,

Sean
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/


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



Tiles - Localization possible through tiles-def?

2003-10-12 Thread Sean Dockery
I am relatively new to Tiles, so forgive me if there's a simple solution to
this...

I came across the following situation:

tiles-defs.xml:
tiles-definitions
definition name=.default.layout path=/WEB-INF/jsp/Default.jsp
put name=title value=Unknown/
/definition
definition name=.welcome.layout extends=.default.layout
put name=title value=Welcome/
/definition
/tiles-definitions

Default.jsp:
%@ taglib uri=/struts/tiles.tld prefix=tiles%
html
head
titletiles:getAsString name=title//title
/head
body
h1tiles:getAsString name=title//h1
/body
/html

I can't think of a way to _directly_ localize on tiles:getAsString, so I was
wondering what is the recommended approach?  Of course, I could put a
bean:message key=welcome/ in a JSP and use tiles:get name=title/ to
fetch it.  Is the use of tiles:getAsString disrecommended anywhere for
internationalized applications?  If not, should it be?

Here's an idea:  What if the put element supported a key attribute (mutually
exclusive to the value attribute) to fetch values from a resource bundle.
Comments?





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



Re: Must everything go through an action?...

2003-10-06 Thread Sean Dockery
It seems to me that a tiles controller can play the role of view helper.  It
is definitely more convenient that writing custom tags.  :-)


-- 
Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com


Ted Husted [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 The current trend is to define two sets of Actions. One set represents
 the business actions, the client stories. This Action interacts with the
 business layer and, based on what happens, selects the next View. Back
 in the Struts 0.5 days, the ActionForward would often points to a server
 page, so the Action would, essentially, forward directly to a JSP.

 Most of us now find it convenient to create a second set of View
 Actions. These Actions work as page controllers. Instead of forwarding
 to the JSP, we forward to these Actions instead. These Actions can then
 prepare the request with whatever chrome the page may need.

 It's a good practice to define an ActionMapping for every presentation
 page in the application, whether it's a server page or HTML, local or
 remote, even if it just forwards out to a page. If you need to add an
 Action class later, or switch in a server page for a static page, you
 can do that without changing anything else.

 In Strut 1.1, I find it useful to separate the business Actions and the
 view Actions into separate configuration files, and may give the View
 Actions their own virtual path. So there might be a /SelectPermitAction
 and a /view/SelectPermitAction.

 There is talk of adding a specific extension point for a view Action
 as part of the ActionForward construct, but AFAIK, no one's rolled up
 their sleeves and given it a try. This would save a trip through the
 container, and simplify cases where you want to redirect to another
 business Action.

 HTH, Ted.

 Keith Pemberton wrote:
  Experts,
 
  I'm struggling with using the View Helper pattern.  In my logical
way of
  thinking, when a request to any jsp page is made, then the request goes
to
  the ActionServlet.  The ActionServlet then looks up the appropriate view
  helper initiallizes it with any parameters that were passed in through
the
  request.  The ActionServlet then requests that the view helper put the
  required java bean object in the request scope and then the servlet
forwards
  to the page that was requested.  This doesn't seem to be the case,
though,
  with how struts works.  Please correct me if I am wrong, but every link
in
  my jsp pages where the page that I am requesting has content that comes
from
  a java bean (form bean) must be linked to some action component.  So,
just
  say that I have an index page where I am displaying only five items at a
  time out of database that are ranked based on their index number in the
  database.  To get the next five entries from the database I would have
to
  use the struts tags and put an html:link element in the page that
pointed to
  some action class.  I, guess, am just looking for an assurance that I am
  implementing the view helper pattern the correct way according to
struts.
  Any help you can provide would be much appreciated!
 
  Keith Pemberton
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -- 
 Ted Husted,
Junit in Action  - http://www.manning.com/massol/,
Struts in Action - http://husted.com/struts/book.html,
JSP Site Design  - http://www.amazon.com/exec/obidos/ISBN=1861005512.

 Get Ready, We're Moving Out!! - http://www.clark04.com




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



Re: Craig: Tomcat 5.0 WAR Deployment

2003-10-06 Thread Sean Dockery
I believe that you mean deploy and undeploy.  Haven't install and remove
been deprecated under Tomcat 5?  I couldn't find an example that uses the
install or remove tasks on the page you cited.  :-)

Craig R. McClanahan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Mark Galbreath wrote:

 Craig,
 
 I'm writing a simple Struts standalone app to Tomcat 5.0 (trying to learn
 Struts + JDO) and Tomcat is not auto-deploying the WAR after Ant
compiles,
 assembles, and puts it in the webapps root.  Auto-deploy is set to true
in
 server.xml...anything else I am missing?
 
 
 I don't like the autodeploy from the webapps feature because you can't
 undeploy.  I tend to use the install and remove and reload Ant
 tasks instead:


http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant

 Note that you don't have to copy anything -- just tell Tomcat to deploy
 directly from your build directory (if you're on the same machine).  An
 example build.xml that supports this feature can be found at:

 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html

 Thx,
 Mark
 
 
 Craig




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



Re: How to use jaas with Struts and Tomcat

2003-10-06 Thread Sean Dockery
From another recent thread on this subject:

snip
Try this :
http://www.theserverside.com/resources/article.jsp?l=JAAS
/snip

Marcial Atienzar Navarro [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

  I need to know how to use jaas with struts in tomcat. Is there some kind
of
 example in the network? Where can I find more information about this?

  A lot of thanks,

   Marcial Atienzar




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



Re: Struts and user-authentication

2003-10-06 Thread Sean Dockery
You can use tiles to optionally display information based on a user's role.
Another possibility is to use the Struts logic tags to test if the user is
in a given role; the body of the tag will either be rendered or
not--depending on whether or not a use is in a given role.

Ilja [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Thanks! Very helpfull, but still some questions:

 How can you programmaticly make use of struts-config.xml? Now the
 loginpage is hardcoded:

 String loginPage = request.getContextPath()+/logon.do;

 Can't you make it more generic so that it uses the config-file to look it
 up?

 Secondly: How can you display userinformation in a jsp-page when you have
 your own authentication-system? I probably have to write my own taglibs
 right?

 Ilja

 On Mon, 6 Oct 2003 18:10:56 +0530, Deepak [EMAIL PROTECTED] said:
  Try this :
  http://www.theserverside.com/resources/article.jsp?l=JAAS
 
  - Original Message - 
  From: Ilja [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, October 06, 2003 6:00 PM
  Subject: Struts and user-authentication
 
 
   Is there any good example on how to incorporate strict
   user-authentication with Struts?
  
   Currently I'm working on a way to implement user-authentication with
   OSUser (www.opensymphony.com/osuser) and hibernate (www.hibernate.org)
  
   What's the best way to implement user-security? Where should the
   authentication method be put in? In every action? Is it possible to
   create one generic class that authorizes a user and sends it to the
   appropiate page (either the page he requested, an error or a
login-page)
   without coding it on every single action page?
  
   Thanks,
  
   Ilja
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




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



Design Question

2003-09-17 Thread sean schofield
I am working on a struts-based web application and I have an interesting design issue 
that I'd like to get some feedback on.  I think this problem is actually quite generic 
and there must be some good ideas out there already that I could sponge off!

Basically I have a struts form with a bunch of fields that will be presented to the 
user through the usual JSP-based view.  The user will have the opportunity to makes 
edits and then submit to an action.  What I would like to do is be able to identify 
which fields changed and then take certain actions based on these changes.

Here is one rough ideas I have so far.  Any thoughts on this plus additional ideas 
would be greatly appreciated.

1.) Extend ActionForm and customize the populate method so that it makes a copy of the 
old version of the form that is already stored in the session (since it will have 
session scope)

2.) Populate new form

3.) Compare two forms and store list of changes in new form

4.) Discard copy of old.

Any thoughts, comments?
TIA,

sean


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



RE: Design Question

2003-09-17 Thread sean schofield
You are correct that my problem requires more information that just something 
changed.  But your solution may prove useful for a different problem ...

Basically the user has the option of bringing up different forms without submitting 
their changes.  I'd like to be able to present them with Are you sure you don't want 
to submit your changes? message but only if something actually changed.  I could use 
onchange for each field and also keep track of the original values but the digest idea 
might be nice.

Thanks for the timely response.  I'd be happy to hear feedback on this idea plus my 
original problem from anybody.

Regards,

- sean

-- Original Message --
From: Andrew Hill [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date:  Wed, 17 Sep 2003 23:02:41 +0800

oops.
Forget what I said - didnt read it properly. You need to be able to tell
which fields changed. The digest will merely tell you if any changed. Sorry.

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 17 September 2003 23:01
To: Struts Users Mailing List
Subject: RE: Design Question


Actually you could just store a digest of the previous values, and then
compare that with a digest of the new.



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



Re: using struts with filters

2003-09-16 Thread Sean Radford
Have you looked at securityfilter?

(a project on sourceforge)


On Tue, 2003-09-16 at 22:15, David Erickson wrote:
 Check this link:
 http://www-106.ibm.com/developerworks/java/library/j-tomcat/
 
 We parse the requested url to get the action name.. then perform matching on
 the logged in user to see if he has permission to that action or whatever
 resource it may be.
 -David
 
 - Original Message - 
 From: as as [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 11:59 AM
 Subject: using struts with filters
 
 
  Hi,
 
  I am trying to use filters for login authentication using Jakarta struts
 framework with Tomcat. Has anyone done this earlier...any helpful
 tutorial/pointers/website...
 
  Thanks,
  Samy
 
 
  -
  Do you Yahoo!?
  Yahoo! SiteBuilder - Free, easy-to-use web site design software
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



Re: filters

2003-07-23 Thread Sean Radford
Struts will work with Container based authentication/authorisation (a+a)
and with Servlet Filters. If you plan/need to use a Filter to do a+a
with a Filter, take a look at http://securityfilter.org/

Sean

On Wed, 2003-07-23 at 14:40, Balaji R wrote:
 Am using Struts with tomcat.
 Can I use ServletFilters for processing login permissions on URLs?
 Or would I have to rewrite the controller Action Class adding a if-then-else
 there?
 'Cause the web.xml dosent have the servlet entries for rest of the action
 classes.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



RE: Login Form

2003-07-10 Thread Sean Radford
All,

Please find attached my securityfilter realm adaptor. The other code I
was waiting for hasn't materialised, so I couldn't do any comparison -
but it seems to work for me... Good luck, and any probs just shout.

And nope, I have know idea if the extra functionality is to be resolved
in the near future within an updated container specification. Any one
know how we could 'force' the issue?

Regards,

Sean
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems

On Wed, 2003-07-09 at 15:33, Erez Efrati wrote:
 Sean,
 
 many thanks for keeping up with my questions - appreciate it. And yes
 you are correct. I am using JBoss 3.0.7 / Tomcat 4.1.24. By the way have
 you got any idea if this issue is about to be resolved at the Servlet
 Container Spec ? 
 
 Thanks,
 Erez
 
 
 
 -Original Message-
 From: Sean Radford [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, July 09, 2003 11:19 AM
 To: Struts Users Mailing List
 Subject: RE: Login Form
 
 On Tue, 2003-07-08 at 20:34, Erez Efrati wrote:
  Thanks Sean, 
  
  I looked at it and it does avoid the BIG limitation posed by the
  standard spec in fact. Still I cannot use it since it disables the
  passing of the principal identity through calls to EJB methods.
  
 That's what it says in the introductory documentation, but...
 
 You're using JBoss/Tomcat right? Well give me a day and I'll email you a
 class that should do all you want... It's a RealmAdaptor for
 securityfilter/Jboss that uses the JBoss security extension and so
 correctly instantiates the Principal for the EJB layer. It works for me
 with JBoss4/Jetty, so you should give it a try. (I'm waiting on some
 code from another guy whose done similar and so just want to compare -
 if his stuff doesn't arrive shortly, I'll send mine as it)
 
 
  Now, I am new to the web development and it amazes me that such a
 basic
  feature is missing from the Servlet spec and is not addressed. Why is
 it
  that way? Is it so unusual to want to have the login fields on the
 start
  page??
 
 Not unusual at all... And many Java sites have it that way, but they
 don't necessarily use container authentication and they probably don't
 use EJB's (many people steer clear - deep seated reservations from 1.0
 are still abound).
 
 If I get time I'm going to try and get the Jetty guys to 'surface' their
 web Authenticators to allow developers to roll their own... I've looked
 at the code and shouldn't be too difficult - one or two areas I'm not
 sure about, but...
 
 
  
  Thanks,
  Erez 
  
  
  -Original Message-
  From: Sean Radford [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, July 08, 2003 8:21 PM
  To: Struts Users Mailing List
  Subject: RE: Login Form
  
  Have a look at this (you may find what you want):
  
  http://sourceforge.net/projects/securityfilter/
  
  Sean
  
  
   -Original Message-
   From: Erez Efrati [mailto:[EMAIL PROTECTED] 
   Sent: July 8, 2003 10:11 AM
   To: 'Struts Users Mailing List'
   Subject: Login Form
   
   
   Hi,
   
   My question is a bit off Struts but still since I am using Struts
 and
   it's too urgent for me I thought to try my luck here, maybe someone
  had
   stumbled on this issue too.
   
   I am running JBoss/Tomcat/Struts using the JAAS for handling the
   application security aspects. I have used the
   auth-methodFORM/auth-method clauses inside the Web.xml file.
   
   In my web site I want to have the site home page to have also a
 small
   login form where the user could enter username and password and
 login
  to
   the site. The home page, contains other links as well, which lead to
   other parts of the site or even to external pages on other sites.
   
   From what I've read so far, it seems to me that the FORM method is
   activated only when the web user tries to access a protected page.
  Then
   the Web Server (Tomcat in my case) returns the loginPage stated in
 the
   Web.xml file, and only after the login is performed
 (j_security_check)
   the Tomcat then redirects the web user to the original portected
 page.
   
   Is it possible to have the site home page as the login page still
  using
   mechanisms of FORM and JAAS? If so I would really appreciate any
 help
  on
   how to do it, and what are the configurations required. 
   
   Thanks,
   Erez
   
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]

/*
 * @author sradford
 * pCreated 07-Jul-2003/p
 * pCopyright  2002-2003, Aegeus Technology Limited.
 * pAll rights reserved./p
 * pUse at you desire with no liability to the author./p
 */
package com.aegeus.securityfilter

import java.security.Principal;
import java.util.HashSet;
import java.util.Set

RE: Login Form

2003-07-10 Thread Sean Radford
Erez,

Things you need to do:

1. Get your EJB's installed and working with your JAAS plugin (or one of
the supplied JBoss ones). So standard J2EE settings in ejb-jar.xml, and
a standard jboss.xml (your security-domain in particular).

2. Create your web app as per the security filter instructions. That
means moving the security defintions that are normally in web.xml to the
securityfilter-config.xml file, and defining the Filter in web.xml. And
in jboss-web.xml you need to define the security-domain. Then you just
need to specify 'my' class as the realm in the
securityfilter-config.xml:

realm className=com.aegeus.securityfilter.JBossRealmAdapter/realm

Hope that helps,

Sean
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems

On Thu, 2003-07-10 at 12:01, Erez Efrati wrote:
 Sean,
 
 Thanks for the code. I have downloaded everything and I am about to
 start playing with it. But from reading still, I am a bit confused here.
 
 Is this code + SecurityFilter replaces the container security
 configuration of JBoss/Tomcat in ejb-jar.xml, web.xml, jboss.xml,
 jboss-web.xml ?
 
 Thanks,
 Erez
 
 -Original Message-
 From: Sean Radford [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 10, 2003 11:26 AM
 To: Struts Users Mailing List
 Subject: RE: Login Form
 
 All,
 
 Please find attached my securityfilter realm adaptor. The other code I
 was waiting for hasn't materialised, so I couldn't do any comparison -
 but it seems to work for me... Good luck, and any probs just shout.
 
 And nope, I have know idea if the extra functionality is to be resolved
 in the near future within an updated container specification. Any one
 know how we could 'force' the issue?
 
 Regards,
 
 Sean



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



RE: Login Form

2003-07-09 Thread Sean Radford
On Tue, 2003-07-08 at 20:34, Erez Efrati wrote:
 Thanks Sean, 
 
 I looked at it and it does avoid the BIG limitation posed by the
 standard spec in fact. Still I cannot use it since it disables the
 passing of the principal identity through calls to EJB methods.
 
That's what it says in the introductory documentation, but...

You're using JBoss/Tomcat right? Well give me a day and I'll email you a
class that should do all you want... It's a RealmAdaptor for
securityfilter/Jboss that uses the JBoss security extension and so
correctly instantiates the Principal for the EJB layer. It works for me
with JBoss4/Jetty, so you should give it a try. (I'm waiting on some
code from another guy whose done similar and so just want to compare -
if his stuff doesn't arrive shortly, I'll send mine as it)


 Now, I am new to the web development and it amazes me that such a basic
 feature is missing from the Servlet spec and is not addressed. Why is it
 that way? Is it so unusual to want to have the login fields on the start
 page??

Not unusual at all... And many Java sites have it that way, but they
don't necessarily use container authentication and they probably don't
use EJB's (many people steer clear - deep seated reservations from 1.0
are still abound).

If I get time I'm going to try and get the Jetty guys to 'surface' their
web Authenticators to allow developers to roll their own... I've looked
at the code and shouldn't be too difficult - one or two areas I'm not
sure about, but...


 
 Thanks,
 Erez 
 
 
 -Original Message-
 From: Sean Radford [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 08, 2003 8:21 PM
 To: Struts Users Mailing List
 Subject: RE: Login Form
 
 Have a look at this (you may find what you want):
 
 http://sourceforge.net/projects/securityfilter/
 
 Sean
 
 
  -Original Message-
  From: Erez Efrati [mailto:[EMAIL PROTECTED] 
  Sent: July 8, 2003 10:11 AM
  To: 'Struts Users Mailing List'
  Subject: Login Form
  
  
  Hi,
  
  My question is a bit off Struts but still since I am using Struts and
  it's too urgent for me I thought to try my luck here, maybe someone
 had
  stumbled on this issue too.
  
  I am running JBoss/Tomcat/Struts using the JAAS for handling the
  application security aspects. I have used the
  auth-methodFORM/auth-method clauses inside the Web.xml file.
  
  In my web site I want to have the site home page to have also a small
  login form where the user could enter username and password and login
 to
  the site. The home page, contains other links as well, which lead to
  other parts of the site or even to external pages on other sites.
  
  From what I've read so far, it seems to me that the FORM method is
  activated only when the web user tries to access a protected page.
 Then
  the Web Server (Tomcat in my case) returns the loginPage stated in the
  Web.xml file, and only after the login is performed (j_security_check)
  the Tomcat then redirects the web user to the original portected page.
  
  Is it possible to have the site home page as the login page still
 using
  mechanisms of FORM and JAAS? If so I would really appreciate any help
 on
  how to do it, and what are the configurations required. 
  
  Thanks,
  Erez
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



RE: Login Form

2003-07-08 Thread Sean Radford
Have a look at this (you may find what you want):

http://sourceforge.net/projects/securityfilter/

Sean


 -Original Message-
 From: Erez Efrati [mailto:[EMAIL PROTECTED] 
 Sent: July 8, 2003 10:11 AM
 To: 'Struts Users Mailing List'
 Subject: Login Form
 
 
 Hi,
 
 My question is a bit off Struts but still since I am using Struts and
 it's too urgent for me I thought to try my luck here, maybe someone had
 stumbled on this issue too.
 
 I am running JBoss/Tomcat/Struts using the JAAS for handling the
 application security aspects. I have used the
 auth-methodFORM/auth-method clauses inside the Web.xml file.
 
 In my web site I want to have the site home page to have also a small
 login form where the user could enter username and password and login to
 the site. The home page, contains other links as well, which lead to
 other parts of the site or even to external pages on other sites.
 
 From what I've read so far, it seems to me that the FORM method is
 activated only when the web user tries to access a protected page. Then
 the Web Server (Tomcat in my case) returns the loginPage stated in the
 Web.xml file, and only after the login is performed (j_security_check)
 the Tomcat then redirects the web user to the original portected page.
 
 Is it possible to have the site home page as the login page still using
 mechanisms of FORM and JAAS? If so I would really appreciate any help on
 how to do it, and what are the configurations required. 
 
 Thanks,
 Erez
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



Re: [lists-strutsuser] Re: [Workflow] ClassCastException withTilesWorkflowRequestProcessor

2003-06-02 Thread Sean Radford
Yes, com.livinglogic.struts.workflow.WorkflowRequestProcessor
initialises, but
com.livinglogic.struts.workflow.TilesWorkflowRequestProcessor does not.
Seems odd hey!

I'm using workflow-1.0.2

The jars that my war file's lib contains are:
struts-1.1.rc1.jar
struts-workflow-1.0.2.jar
commons-validator-1.0.jar
commons-resources.jar
commons-logging-1.0.2.jar
commons-lang-1.0.1.jar
commons-digester-1.4.1.jar

commons-beanutils-1.6.jar and commons-collections-2.1.jar are in my ear
file and loaded from there via application.xml (I'm using JBoss3)

Any ideas?

Regards,

Sean


On Mon, 2003-06-02 at 08:35, Matthias Bauer wrote:
 Looks like a classloader problem. Are you sure, 
 TilesWorkflowRequestProcessor is in your classpath?
 
 Are you saying, that the exception does not occur, if you change
 com.livinglogic.struts.workflow.TilesWorkflowRequestProcessor to
 com.livinglogic.struts.workflow.WorkflowRequestProcessor in your 
 configuration file?
 
 Which version of the Struts Workflow Extension are you using?
 
 --- Matthias
 
 
 Sean Radford wrote:
 
 Any ideas why I should be getting the following:
 
 2003-05-30 15:59:07,028 INFO  [org.jboss.deployment.MainDeployer]
 Deployed package:
 file:/usr/java/jboss/jboss-4.0.0alpha/server/itrust/deploy/itrustmanager-0.1.SNAPSHOT.ear
 2003-05-30 15:59:25,152 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
 insert page='/WEB-INF/template.jsp'.
 2003-05-30 15:59:31,624 INFO 
 [org.apache.struts.util.PropertyMessageResources] Initializing,
 config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
 2003-05-30 15:59:31,631 INFO 
 [org.apache.struts.util.PropertyMessageResources] Initializing,
 config='org.apache.struts.util.LocalStrings', returnNull=true
 2003-05-30 15:59:31,648 INFO 
 [org.apache.struts.util.PropertyMessageResources] Initializing,
 config='org.apache.struts.taglib.logic.LocalStrings', returnNull=true
 2003-05-30 15:59:31,697 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
 insert page='/WEB-INF/htmlhead.jsp'.
 2003-05-30 15:59:36,240 INFO 
 [org.apache.struts.util.PropertyMessageResources] Initializing,
 config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
 2003-05-30 15:59:36,241 INFO 
 [org.apache.struts.util.PropertyMessageResources] Initializing,
 config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
 2003-05-30 15:59:36,245 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
 insert page='/WEB-INF/header.jsp'.
 2003-05-30 15:59:42,043 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
 insert page='/WEB-INF/menu.jsp'.
 2003-05-30 15:59:44,781 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
 insert page='/WEB-INF/actionerrors.jsp'.
 2003-05-30 15:59:47,870 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
 insert page='/WEB-INF/actionmessages.jsp'.
 2003-05-30 15:59:51,878 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
 insert page='/WEB-INF/welcome_content.jsp'.
 2003-05-30 15:59:53,746 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
 insert page='/WEB-INF/footer.jsp'.
 2003-05-30 15:59:56,827 DEBUG [org.apache.struts.util.RequestUtils] Get
 module name for path /identity/startCreateIdentity.do
 2003-05-30 15:59:56,827 DEBUG [org.apache.struts.util.RequestUtils]
 Module name found: default
 2003-05-30 15:59:56,874 WARN  [org.jboss.jbossweb] WARNING: Exception
 for /itrustmanager/identity/startCreateIdentity.do
 javax.servlet.UnavailableException: Cannot initialize RequestProcessor
 of class com.livinglogic.struts.workflow.TilesWorkflowRequestProcessor:
 java.lang.ClassCastException
 at
 org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:857)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
 at
 org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
 at
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
 at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
 at
 org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
 at org.mortbay.http.HttpServer.service(HttpServer.java:863)
 at org.jboss.jetty.Jetty.service(Jetty.java:497)
 at
 org.mortbay.http.HttpConnection.service(HttpConnection.java:773)
 at
 org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:937)
 at
 org.mortbay.http.HttpConnection.handle(HttpConnection.java:790)
 at
 org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
 at
 org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289

[Worflow] ClassCastException with TilesWorkflowRequestProcessor

2003-05-31 Thread Sean Radford
Any ideas why I should be getting the following:

2003-05-30 15:59:07,028 INFO  [org.jboss.deployment.MainDeployer]
Deployed package:
file:/usr/java/jboss/jboss-4.0.0alpha/server/itrust/deploy/itrustmanager-0.1.SNAPSHOT.ear
2003-05-30 15:59:25,152 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/template.jsp'.
2003-05-30 15:59:31,624 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
2003-05-30 15:59:31,631 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true
2003-05-30 15:59:31,648 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.taglib.logic.LocalStrings', returnNull=true
2003-05-30 15:59:31,697 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/htmlhead.jsp'.
2003-05-30 15:59:36,240 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
2003-05-30 15:59:36,241 INFO 
[org.apache.struts.util.PropertyMessageResources] Initializing,
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
2003-05-30 15:59:36,245 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/header.jsp'.
2003-05-30 15:59:42,043 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/menu.jsp'.
2003-05-30 15:59:44,781 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/actionerrors.jsp'.
2003-05-30 15:59:47,870 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/actionmessages.jsp'.
2003-05-30 15:59:51,878 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/welcome_content.jsp'.
2003-05-30 15:59:53,746 DEBUG [org.apache.struts.taglib.tiles.InsertTag]
insert page='/WEB-INF/footer.jsp'.
2003-05-30 15:59:56,827 DEBUG [org.apache.struts.util.RequestUtils] Get
module name for path /identity/startCreateIdentity.do
2003-05-30 15:59:56,827 DEBUG [org.apache.struts.util.RequestUtils]
Module name found: default
2003-05-30 15:59:56,874 WARN  [org.jboss.jbossweb] WARNING: Exception
for /itrustmanager/identity/startCreateIdentity.do
javax.servlet.UnavailableException: Cannot initialize RequestProcessor
of class com.livinglogic.struts.workflow.TilesWorkflowRequestProcessor:
java.lang.ClassCastException
at
org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:857)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.jboss.jetty.Jetty.service(Jetty.java:497)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java:773)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:937)
at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:790)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)


(If I use the com.livinglogic.struts.workflow.WorkflowRequestProcessor
all seems to work ok)

Regards,

Sean
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



Re: [lists-strutsuser] Forwarding problem (.... has been moved to...)

2003-05-31 Thread Sean Radford
Have you got redirect=true set for the ActionForward?


On Fri, 2003-05-30 at 17:51, Jose Andrs Prez wrote:
 Hi to all,
 
 Ive definded several actions in a struts config file. When I execute one of
 them (i.e. action A) it takes the action class that performs the logic for
 that action. It catches the right forward that is JSP. But the problem is
 that it seems it does not catch the JSP, and appears on the screen of the
 WAP emulator the following:
 
   http://./action_A.do has been moved to http://./another_action.do
 
 
 Any ideas of what is happen?
 
 
 Thanks in advance,
 Jose
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Dr. Sean Radford, MBBS, MSc
[EMAIL PROTECTED]
http://bladesys.demon.co.uk/
Blade Systems


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



bean:write and scriptlet write

2003-03-17 Thread Cohan, Sean
I have a bean defined on a page.  I can write some of the methods using
scriptlet code, but not others.  However, I can write the others with
bean:write.  For example, the following code causes a cannot resolve
symbol  : method getIndexFactor () servlet exception.:
 
%=  sortedQueueCursor.getIndexFactor() %

 
But this works on the same page:
 
bean:write name=sortedQueueCursor property=indexFactor/

But I can do the following successfully with the same bean on the same page:
 
%=  sortedQueueCursor.getComparatorName() %
 
Both methods return Strings.
 
What am I missing?  
 
Thanks


RE: [OT] Don't beat on James! (was RE: [OT] JavaScript: ActionForm Does Not Contain Dynamically Set Data)

2003-03-05 Thread Sean Chambers
my ZX81 had a 16k RAM pack.

 -Original Message-
 From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
 Sent: 05 March 2003 13:45
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: RE: [OT] Don't beat on James! (was RE: [OT] JavaScript:
 ActionForm Does Not Contain Dynamically Set Data)
 
 
 You know it was! The ZX81 was the first machine I owned. The 
 first machinesI used were a ZX80 and an Acorn Atom at our 
 school computer club.
 
 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 04, 2003 8:53 PM
 To: Struts Users Mailing List
 Subject: RE: [OT] Don't beat on James! (was RE: [OT] JavaScript:
 ActionForm Does Not Contain Dynamically Set Data)
 
 
 Wossit a ZX81 perchance?
 
 
 -Original Message-
 From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 5 March 2003 05:34
 To: Struts Users Mailing List
 Subject: RE: [OT] Don't beat on James! (was RE: [OT] JavaScript:
 ActionForm Does Not Contain Dynamically Set Data)
 
 
 My first two computers didn't even have floppy drives ... 300 
 baud tape and
 1024 bytes of memory!
 
 -Original Message-
 From: James Turner [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 04, 2003 3:28 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Don't beat on James! (was RE: [OT] JavaScript:
 ActionForm Does Not Contain Dynamically Set Data)
 
 
  From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
 
 
  Gladly  only I had you figured as an old guy!
 
  Simon Programmed in RPG/400 once and now regret it Chappell
 
 
 Well, I'm old to the computer industry, but only a year 
 with Struts...
 
 James Has punched cards for OS/VS1 on an IBM/360 Turner
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


**
CONFIDENTIALITY / DISCLAIMER NOTICE

This communication contains information, which is confidential 
and may also be privileged. It is for the exclusive use of 
the recipient(s). If you are not the intended recipient(s)
please note that any distortion, copying or use of this
communication or the information in it is strictly prohibited.
Any  views or opinions presented are solely those of the
author and do not necessarily represent those of
Euro RSCG Wnek Gosper.

If you have received this communication in error please notify 
us by e-mailing the author or by telephoning (020  7240 4111)
and then delete the communication and any copies of it.

This footnote also confirms that this email message has been
swept by MIMEsweeper for the presence of computer viruses.

http://www.eurorscg.co.uk
**


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



RE: Modern Computing (was RE: [OT] Ancient computing)

2003-03-05 Thread Sean Chambers
i still have the zx81

 -Original Message-
 From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
 Sent: 05 March 2003 16:18
 To: Struts Users Mailing List
 Subject: Modern Computing (was RE: [OT] Ancient computing)
 
 
 OK, enough reminising ... what do people currently have?
 
 I have a Mac tower with dual 550MHz G4 CPUs, 1.5Gb of RAM and 
 the 22 CinemaDisplay flat panel monitor. I run Mac OS X 
 10.2.4 on it. And, it almost goes without saying that, I love it.
 
 Simon
 
 -Original Message-
 From: du Plessis, Corneil C [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 10:13 AM
 To: Struts Users Mailing List
 Subject: RE: [OT] Ancient computing
 
 
 Playing the Space shuttle games on the Commodore 64 was just awesome!
 
 -Original Message-
 From: Nelson, Laird [mailto:[EMAIL PROTECTED]
 Sent: 05 March, 2003 18:10
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Ancient computing
 
 
  -Original Message-
  From: Tim Shadel [mailto:[EMAIL PROTECTED]
  First family computer I remember: 8080
  
  First that I used: Atari or Commodore64 with BASIC (hooked it 
  to the TV, 
  screen was blue with white letters [forboadings of M$??], 
  eventually had 
  a 5 1/4 disk drive)
 
 First computer used: Commodore PET (was that what they were called?)
 First computer used extensively: Radio Shack TRS-80
 First computer that awed me: Commodore 64
 
 Laird
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 __
 
 Disclaimer and confidentiality note
 
 
 Everything in this e-mail and any attachments relating to the 
 official business of 
 Standard Bank Group Limited is proprietary to the company. It 
 is confidential, legally 
 privileged and protected by law. Standard Bank does not own 
 and endorse any other content. 
 Views and opinions are those of the sender unless clearly 
 stated as being that of Standard Bank. 
 
 The person addressed in the e-mail is the sole authorised 
 recipient. Please notify the sender 
 immediately if it has unintentionally reached you and do not 
 read, disclose or use the content
 in any way. 
 
 Standard Bank can not assure that the integrity of this 
 communication has been maintained nor 
 that it is free of errors, virus, interception or interference.
 
 __
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


**
CONFIDENTIALITY / DISCLAIMER NOTICE

This communication contains information, which is confidential 
and may also be privileged. It is for the exclusive use of 
the recipient(s). If you are not the intended recipient(s)
please note that any distortion, copying or use of this
communication or the information in it is strictly prohibited.
Any  views or opinions presented are solely those of the
author and do not necessarily represent those of
Euro RSCG Wnek Gosper.

If you have received this communication in error please notify 
us by e-mailing the author or by telephoning (020  7240 4111)
and then delete the communication and any copies of it.

This footnote also confirms that this email message has been
swept by MIMEsweeper for the presence of computer viruses.

http://www.eurorscg.co.uk
**


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



RE: Modern Computing (was RE: [OT] Ancient computing)

2003-03-05 Thread Sean Chambers
yeah but i only have the ZX81  ;)


Joel Wickard wrote:

I still have an IBM system23 with 8 or 10 (haven't looked at them 
lately )
floppies.

 -Original Message-
 From: Joel Wickard [mailto:[EMAIL PROTECTED]
 Sent: 05 March 2003 16:59
 To: Struts Users Mailing List
 Subject: Re: Modern Computing (was RE: [OT] Ancient computing)
 
 
 Sean Chambers wrote:
 
 i still have the zx81
 
   
 
 -Original Message-
 From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
 Sent: 05 March 2003 16:18
 To: Struts Users Mailing List
 Subject: Modern Computing (was RE: [OT] Ancient computing)
 
 
 OK, enough reminising ... what do people currently have?
 
 I have a Mac tower with dual 550MHz G4 CPUs, 1.5Gb of RAM and 
 the 22 CinemaDisplay flat panel monitor. I run Mac OS X 
 10.2.4 on it. And, it almost goes without saying that, I love it.
 
 Simon
 
 
 
 -Original Message-
 From: du Plessis, Corneil C [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 10:13 AM
 To: Struts Users Mailing List
 Subject: RE: [OT] Ancient computing
 
 
 Playing the Space shuttle games on the Commodore 64 was 
 just awesome!
 
 -Original Message-
 From: Nelson, Laird [mailto:[EMAIL PROTECTED]
 Sent: 05 March, 2003 18:10
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Ancient computing
 
 
   
 
 -Original Message-
 From: Tim Shadel [mailto:[EMAIL PROTECTED]
 First family computer I remember: 8080
 
 First that I used: Atari or Commodore64 with BASIC (hooked it 
 to the TV, 
 screen was blue with white letters [forboadings of M$??], 
 eventually had 
 a 5 1/4 disk drive)
 
 
 First computer used: Commodore PET (was that what they 
 were called?)
 First computer used extensively: Radio Shack TRS-80
 First computer that awed me: Commodore 64
 
 Laird
 
 ---
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED]
 
 __
 
 Disclaimer and confidentiality note
 
 
 Everything in this e-mail and any attachments relating to the 
 official business of 
 Standard Bank Group Limited is proprietary to the company. It 
 is confidential, legally 
 privileged and protected by law. Standard Bank does not own 
 and endorse any other content. 
 Views and opinions are those of the sender unless clearly 
 stated as being that of Standard Bank. 
 
 The person addressed in the e-mail is the sole authorised 
 recipient. Please notify the sender 
 immediately if it has unintentionally reached you and do not 
 read, disclose or use the content
 in any way. 
 
 Standard Bank can not assure that the integrity of this 
 communication has been maintained nor 
 that it is free of errors, virus, interception or interference.
 
 __
 
 ---
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED]
 
 
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 *
 *
 CONFIDENTIALITY / DISCLAIMER NOTICE
 
 This communication contains information, which is confidential 
 and may also be privileged. It is for the exclusive use of 
 the recipient(s). If you are not the intended recipient(s)
 please note that any distortion, copying or use of this
 communication or the information in it is strictly prohibited.
 Any  views or opinions presented are solely those of the
 author and do not necessarily represent those of
 Euro RSCG Wnek Gosper.
 
 If you have received this communication in error please notify 
 us by e-mailing the author or by telephoning (020  7240 4111)
 and then delete the communication and any copies of it.
 
 This footnote also confirms that this email message has been
 swept by MIMEsweeper for the presence of computer viruses.
 
 http://www.eurorscg.co.uk
 *
 *
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   
 
 I still have an IBM system23 with 8 or 10 (haven't looked at them 
 lately )
 floppies.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


**
CONFIDENTIALITY / DISCLAIMER NOTICE

This communication contains information, which is confidential 
and may also be privileged. It is for the exclusive use of 
the recipient(s). If you are not the intended recipient(s)
please note that any distortion, copying or use

RE: [OT] RE: Modern Computing (was RE: [OT] Ancient computing)

2003-03-05 Thread Sean Chambers
centrino is out soon of course, so you get longer battery life and built in
wireless.

http://www.intel.com/products/mobiletechnology/index.htm?iid=Homepage+Highli
ght_030127a

 -Original Message-
 From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]
 Sent: 05 March 2003 17:38
 To: Struts Users Mailing List
 Subject: [OT] RE: Modern Computing (was RE: [OT] Ancient computing)
 
 
 I love my laptop, well, I shouldn't call it a laptop-- more 
 properly termed a mobile desktop since the beautiful 16 
 screen leaves you with about 2 hours of battery life at a 
 given sitting (I leave it plugged in all the time).  For the 
 mobile P4 processor, I've been extremely happy with the 
 performance, apps load up in a flash.  Granted you have to do 
 some tweaking to remove all of the pre-installed Sony applications.
  
 The screen though is like a billboard, just amazing, running 
 at 1280x1024, everything is crisp and colorful.  Make sure 
 you get some kind of service coverage, the batteries for it 
 will run you about 400 dollars US.
  
 GET ONE!
  
 -Original Message- 
 From: Jarnot Voytek Contr AU HQ/SC 
 [mailto:[EMAIL PROTECTED] 
 Sent: Wed 3/5/2003 11:29 AM 
 To: 'Struts Users Mailing List' 
 Cc: 
 Subject: RE: Modern Computing (was RE: [OT] Ancient computing)
 
 
 
   I've been thinking about those 16 Sonys, how are they 
 size-wise WRT
   portability?  How is the 'desktop' version of the P4 
 when running on
   battery?
   
   --
   Voytek Jarnot
   Quidquid latine dictum sit, altum viditur.
   
   
-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 11:11 AM
To: Struts Users Mailing List
Subject: RE: Modern Computing (was RE: [OT] Ancient computing)
   
   
I have:
Sony GRV550 P4 2.4GHz Laptop w/ 512 MB DDR and 16 
 Screen w/ XP Pro
Server P4 1.5GHz 1GB RDRAM, 15 LCD, 200 GB HD with 8MB
cache, Red Hat 8
   
  -Original Message-
  From: Chappell, Simon P 
 [mailto:[EMAIL PROTECTED]
  Sent: Wed 3/5/2003 10:18 AM
  To: Struts Users Mailing List
  Cc:
  Subject: Modern Computing (was RE: [OT] Ancient 
 computing)
 
 
   
  OK, enough reminising ... what do people currently have?
 
  I have a Mac tower with dual 550MHz G4 CPUs, 1.5Gb of
RAM and the 22 CinemaDisplay flat panel monitor. I run Mac
OS X 10.2.4 on it. And, it almost goes without saying 
 that, I love it.
 
  Simon
 
  -Original Message-
  From: du Plessis, Corneil C 
 [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 05, 2003 10:13 AM
  To: Struts Users Mailing List
  Subject: RE: [OT] Ancient computing
  
  
  Playing the Space shuttle games on the Commodore 64
was just awesome!
  
  -Original Message-
  From: Nelson, Laird [mailto:[EMAIL PROTECTED]
  Sent: 05 March, 2003 18:10
  To: 'Struts Users Mailing List'
  Subject: RE: [OT] Ancient computing
  
  
   -Original Message-
   From: Tim Shadel [mailto:[EMAIL PROTECTED]
   First family computer I remember: 8080
  
   First that I used: Atari or Commodore64 with 
 BASIC (hooked it
   to the TV,
   screen was blue with white letters 
 [forboadings of M$??],
   eventually had
   a 5 1/4 disk drive)
  
  First computer used: Commodore PET (was that what they
were called?)
  First computer used extensively: Radio Shack TRS-80
  First computer that awed me: Commodore 64
  
  Laird
  
 

 -
  To unsubscribe, e-mail:
[EMAIL PROTECTED]
  For additional commands, e-mail:
[EMAIL PROTECTED]
  
  __
  
  Disclaimer and confidentiality note
  
  
  Everything in this e-mail and any attachments 
 relating to the
  official business of
  Standard Bank Group Limited is proprietary to 
 the company. It
  is confidential, legally
  privileged and protected by law. Standard Bank 
 does not own
  and endorse any other content.
  Views and opinions are those of the sender 
 unless clearly
  stated as being that of Standard Bank.
  
  The person addressed in the 

RE: [OT] Simulating Concurrent Users

2003-03-05 Thread Sean Chambers
dont flame me for this, but you could try micro$ofts web appliaction stress
test tool. it only *runs* on NT x but u can use it to stress anything i
think.. and apparently its pretty simple to use.

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/itsolutio
ns/intranet/downloads/webstres.asp

 -Original Message-
 From: Jim Krygowski [mailto:[EMAIL PROTECTED]
 Sent: 05 March 2003 19:45
 To: Struts Users Mailing List
 Subject: RE: [OT] Simulating Concurrent Users
 
 
 Does JMeter fit the bill?  
 http://jakarta.apache.org/jmeter/index.html
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 05, 2003 2:20 PM
  To: [EMAIL PROTECTED]
  Subject: [OT] Simulating Concurrent Users
  
  
  Hi,
  Is there some open source tool or technique that I can use to
  simulate concurrent users for our application? I especially want 
  to test our
  connection pooling implementation.
  
  Thanks,
  Gaurav
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


**
CONFIDENTIALITY / DISCLAIMER NOTICE

This communication contains information, which is confidential 
and may also be privileged. It is for the exclusive use of 
the recipient(s). If you are not the intended recipient(s)
please note that any distortion, copying or use of this
communication or the information in it is strictly prohibited.
Any  views or opinions presented are solely those of the
author and do not necessarily represent those of
Euro RSCG Wnek Gosper.

If you have received this communication in error please notify 
us by e-mailing the author or by telephoning (020  7240 4111)
and then delete the communication and any copies of it.

This footnote also confirms that this email message has been
swept by MIMEsweeper for the presence of computer viruses.

http://www.eurorscg.co.uk
**


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



RE: [OT] Simulating Concurrent Users

2003-03-05 Thread Sean Chambers
sorry, should point out that its blatantly not open source.  but it is
free-ish

 -Original Message-
 From: Sean Chambers [mailto:[EMAIL PROTECTED]
 Sent: 05 March 2003 19:52
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Simulating Concurrent Users
 
 
 dont flame me for this, but you could try micro$ofts web 
 appliaction stress
 test tool. it only *runs* on NT x but u can use it to stress 
 anything i
 think.. and apparently its pretty simple to use.
 
 http://www.microsoft.com/technet/treeview/default.asp?url=/tec
 hnet/itsolutio
 ns/intranet/downloads/webstres.asp
 
  -Original Message-
  From: Jim Krygowski [mailto:[EMAIL PROTECTED]
  Sent: 05 March 2003 19:45
  To: Struts Users Mailing List
  Subject: RE: [OT] Simulating Concurrent Users
  
  
  Does JMeter fit the bill?  
  http://jakarta.apache.org/jmeter/index.html
  
  
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, March 05, 2003 2:20 PM
   To: [EMAIL PROTECTED]
   Subject: [OT] Simulating Concurrent Users
   
   
   Hi,
 Is there some open source tool or technique that I can use to
   simulate concurrent users for our application? I especially want 
   to test our
   connection pooling implementation.
   
   Thanks,
   Gaurav
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
   
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 **
 
 CONFIDENTIALITY / DISCLAIMER NOTICE
 
 This communication contains information, which is confidential 
 and may also be privileged. It is for the exclusive use of 
 the recipient(s). If you are not the intended recipient(s)
 please note that any distortion, copying or use of this
 communication or the information in it is strictly prohibited.
 Any  views or opinions presented are solely those of the
 author and do not necessarily represent those of
 Euro RSCG Wnek Gosper.
 
 If you have received this communication in error please notify 
 us by e-mailing the author or by telephoning (020  7240 4111)
 and then delete the communication and any copies of it.
 
 This footnote also confirms that this email message has been
 swept by MIMEsweeper for the presence of computer viruses.
 
 http://www.eurorscg.co.uk
 **
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


**
CONFIDENTIALITY / DISCLAIMER NOTICE

This communication contains information, which is confidential 
and may also be privileged. It is for the exclusive use of 
the recipient(s). If you are not the intended recipient(s)
please note that any distortion, copying or use of this
communication or the information in it is strictly prohibited.
Any  views or opinions presented are solely those of the
author and do not necessarily represent those of
Euro RSCG Wnek Gosper.

If you have received this communication in error please notify 
us by e-mailing the author or by telephoning (020  7240 4111)
and then delete the communication and any copies of it.

This footnote also confirms that this email message has been
swept by MIMEsweeper for the presence of computer viruses.

http://www.eurorscg.co.uk
**


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



RE: [OT] Simulating Concurrent Users

2003-03-05 Thread Sean Chambers
i dont know it that well but from the documentation below you have to modify
the browsers proxy settings so that the proxy server is pointing to
Localhost and the port used is 8000. 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnduwon/htm
l/d5wast_2.asp

you should be able to make this change, even without local admin rights...

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 05 March 2003 23:00
 To: [EMAIL PROTECTED]
 Subject: RE: [OT] Simulating Concurrent Users
 
 
 Sean, downloaded this software and set it up. Its pretty 
 simple to use.
 Getting a problem though. Its not able to find the link to my 
 application.
 It talks about changing the proxy server of IE. However i 
 don't have the
 rights to do that on my system. Do you have any ideas on this?
 
 Thanks.
 
 -Original Message-
 From: Sean Chambers [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2003 2:15 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Simulating Concurrent Users
 
 
 sorry, should point out that its blatantly not open source.  but it is
 free-ish
 
  -Original Message-
  From: Sean Chambers [mailto:[EMAIL PROTECTED]
  Sent: 05 March 2003 19:52
  To: 'Struts Users Mailing List'
  Subject: RE: [OT] Simulating Concurrent Users
  
  
  dont flame me for this, but you could try micro$ofts web 
  appliaction stress
  test tool. it only *runs* on NT x but u can use it to stress 
  anything i
  think.. and apparently its pretty simple to use.
  
  http://www.microsoft.com/technet/treeview/default.asp?url=/tec
  hnet/itsolutio
  ns/intranet/downloads/webstres.asp
  
   -Original Message-
   From: Jim Krygowski [mailto:[EMAIL PROTECTED]
   Sent: 05 March 2003 19:45
   To: Struts Users Mailing List
   Subject: RE: [OT] Simulating Concurrent Users
   
   
   Does JMeter fit the bill?  
   http://jakarta.apache.org/jmeter/index.html
   
   
   
-Original Message-
From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 2:20 PM
To: [EMAIL PROTECTED]
Subject: [OT] Simulating Concurrent Users


Hi,
Is there some open source tool or technique 
 that I can use to
simulate concurrent users for our application? I 
 especially want 
to test our
connection pooling implementation.

Thanks,
Gaurav


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


   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
  
  
  **
  
  CONFIDENTIALITY / DISCLAIMER NOTICE
  
  This communication contains information, which is confidential 
  and may also be privileged. It is for the exclusive use of 
  the recipient(s). If you are not the intended recipient(s)
  please note that any distortion, copying or use of this
  communication or the information in it is strictly prohibited.
  Any  views or opinions presented are solely those of the
  author and do not necessarily represent those of
  Euro RSCG Wnek Gosper.
  
  If you have received this communication in error please notify 
  us by e-mailing the author or by telephoning (020  7240 4111)
  and then delete the communication and any copies of it.
  
  This footnote also confirms that this email message has been
  swept by MIMEsweeper for the presence of computer viruses.
  
  http://www.eurorscg.co.uk
  **
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 **
 
 CONFIDENTIALITY / DISCLAIMER NOTICE
 
 This communication contains information, which is confidential 
 and may also be privileged. It is for the exclusive use of 
 the recipient(s). If you are not the intended recipient(s)
 please note that any distortion, copying or use of this
 communication or the information in it is strictly prohibited.
 Any  views or opinions presented are solely those of the
 author and do not necessarily represent those of
 Euro RSCG Wnek Gosper.
 
 If you have received this communication in error please notify 
 us by e-mailing the author or by telephoning (020  7240 4111)
 and then delete the communication and any copies of it.
 
 This footnote also confirms that this email message has been
 swept by MIMEsweeper for the presence of computer viruses.
 
 http://www.eurorscg.co.uk

RE: [OT] Text editor usage (was RE: [OT]: What is vim?)

2003-03-03 Thread Sean Chambers
who are ginger and mary anne?

 -Original Message-
 From: Jaye Bass [mailto:[EMAIL PROTECTED]
 Sent: 04 March 2003 01:43
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Text editor usage (was RE: [OT]: What is vim?)
 
 
 First off...I'd take Mary Ann any day. Second I love IntelliJ. Does it
 make me a better programmer...I think it probably does: alt-enter,
 refactoring, multiple paste buffers, optimizing imports, 
 finding usages,
 ok CVS support and a pretty decent debugger. I know it makes me a
 happier programmer.
 
 -Original Message-
 From: Jeff Kyser [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 03, 2003 4:57 PM
 To: Struts Users Mailing List
 Subject: Re: [OT] Text editor usage (was RE: [OT]: What is vim?)
 
 Wow, this argument is about as winnable as a 'Ginger or Mary Anne' 
 discussion
 and not nearly as interesting. Although the diatribes about 
 productivity are
 kinda humorous, given the context ;)
 
 -jeff
 
 
 On Monday, March 3, 2003, at 04:42  PM, Assenza, Chris wrote:
 
  If one were to make a value judgement such as better then 
 one would
  require a common basis for comparison.  I would be safe in assuming 
  that not
  everyone here is analyzing this question based on a common frame of
  reference, in fact I bet we all have slightly different concepts of 
  who or
  what makes a better programmer.
 
  Therefore, the first question to ask must instead be: What does it 
  mean to
  be a good programmer? or even: What is a good programmer.  For 
  argument's
  sake, as part of our answer to that question we say that 
 one trait of 
  a good
  programmer is thorough knowledge (or perhaps memorization) of a 
  syntax.  If
  that is true, then someone who uses a text editor is more 
 likely to be
  considered a better programmer.
 
  However, it can be argued that syntax memorization is not so 
  all-important.
  For example, there are many excellent writers and thinkers 
 who cannot 
  spell
  worth a dime, yet they work with words all day long.  As such, the
  programmer who uses an IDE may well be a better programmer in the 
  sense
  that A) the IDE supplements their knowledge of the syntax and B) 
  separates
  the programmer from a requirement to memorize syntax and instead 
  allows them
  to focus on what they're supposed to be doing: engineering software 
  through
  solid design principles, etc.
 
  Ultimately, I think the answer is completely subjective and depends 
  wholly
  on what one means by better programmer. Certainly someone 
 who lives 
  in an
  IDE cannot jump into Textpad and be expected to be nearly as 
  productive, but
  that does not necessarily diminish their core aptitude as a
 programmer!
 
  All that being said, if you don't use Textpad you're a n00b! =)
 
  -Chris
 
  -Original Message-
  From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 03, 2003 4:58 PM
  To: Struts Users Mailing List
  Subject: RE: [OT] Text editor usage (was RE: [OT]: What is vim?)
 
 
  No. I very specifically said that the better programmers 
 CAN use text
  editors and command-line tools. This does not mean that 
 they have to, 
  only
  that they COULD use them if they choose to. I now use the 
 Eclipse IDE 
  for
  alot of my personal programming because it is like a text 
 editor that 
  wants
  to be helpful. I like the wrappers that it gives me for the 
 compiles 
  and
  junit tests, but that it keeps out of the way for the 
 actual editing 
  if I
  don't invoke any of the helpful intelli-wotsits.
 
  Simon
 
  -Original Message-
  From: Chen, Gin [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 03, 2003 3:49 PM
  To: 'Struts Users Mailing List'
  Subject: RE: [OT] Text editor usage (was RE: [OT]: What is vim?)
 
 
  I think your confusing personal perference with programming skill.
  Thats like saying that Ted drink Sprite when most of the
  better programmers
  drinks Mountain Dew.
  -Tim
 
  -Original Message-
  From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 03, 2003 4:38 PM
  To: Struts Users Mailing List
  Subject: [OT] Text editor usage (was RE: [OT]: What is vim?)
 
 
  Actually, my primary point was text editor usage and
  programmer ability.
 
  It is my personal observation that the better programmers use
  text editors.
  (vi or emacs or jedit or vim ... I don't care ... that's not
  the argument
  here). I'm not quite saying that IDEs are bad, although 
 I'm certainly
  tempted to say that some days, but programmers who CAN program
  with text
  editors and command-line tools are orders of magnitude better
  than those who
  can't. You are more than welcome to tell me that you believe
  this is not so,
  but I have observed it enough that, to me, it is a truism.
 
  Simon
 
  -Original Message-
  From: David Graham [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 03, 2003 2:56 PM
  To: [EMAIL PROTECTED]
  Subject: RE: [OT]: What is vim?
 
 
 
  VIM (vi) beats the hell 

RE: bean:message

2003-02-21 Thread Cohan, Sean
Thanks guys.  I wasn't aware of the formatKey property.  And I'm not aware
of what docs to look at to find out more.  I looked in Taglib Documentation
and scanned the JavaDocs.  If there's an obvious place where I should have
found this, please enlighten me.  I'd like to know more. 

Thanks again.

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 1:52 PM
To: Struts Users Mailing List
Subject: RE: bean:message


Because I am competing for the Rube Goldberg award:)

Thanks for reminding me to read the docs.

Sri

 -Original Message-
 From: James Mitchell [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, February 20, 2003 1:50 PM
 To: 'Struts Users Mailing List'
 Subject: RE: bean:message
 
 
 Why don't you just use formatKey?
 
 bean:write name=hwa 
 property=placedOnHWATs 
formatKey=date.digit.format/
 
 
 
 --
 James Mitchell
 Software Engineer/Struts Evangelist
 http://www.open-tools.org/
 
 The man who does not read good books has no advantage over 
 the man who cannot read them.
   - Mark Twain (1835-1910)
 
 
 
  -Original Message-
  From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, February 20, 2003 1:38 PM
  To: Struts Users Mailing List
  Subject: RE: bean:message
  
  
  You can't nest as you have shown.  Here's an alternative:
  
  bean:define id=foo
bean:message key=date.digit.format/
  /bean:define
  
  bean:write 
name=hwa
property=placedOnHWATs
  format=%=foo%/
  
  Sri
  
   -Original Message-
   From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, February 20, 2003 1:39 PM
   To: Struts (E-mail)
   Subject: bean:message
   
   
   Is it possible to nest a bean:message tag within a
   bean:write tag?  I want to get the format property out of 
   the application.resources file, but I get an  
   jsp.error.unterminated.tag error.

   Here's how I'm trying to do it:

   bean:write name=hwa property=placedOnHWATs bean:message
   key=date.digit.format/ /

   and in the resource file I have:

   date.digit.format=format=MM/dd/


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

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

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




bean:message

2003-02-20 Thread Cohan, Sean
Is it possible to nest a bean:message tag within a bean:write tag?  I
want to get the format property out of the application.resources file, but I
get an  jsp.error.unterminated.tag error.
 
Here's how I'm trying to do it:
 
bean:write name=hwa property=placedOnHWATs bean:message
key=date.digit.format/ /
 
and in the resource file I have:
 
date.digit.format=format=MM/dd/
 
 
Thanks.



RE: Server detection of Javascript enabled?

2003-02-13 Thread Sean Chambers
It doesnt really get round the problem of not using javascript on teh
client; but perhaps a better way to do this is to interrogate the DOM.  If
you use one of teh standards objects like document.image it returns a
boolean showing whther or not javascript is installed.  In addition you
could explicitly test for the existence of an object from a specific
version, so you could tell which version of js was being used.

but as i say, both of these involve using js on the client. 

-Original Message-
From: James Childers [mailto:[EMAIL PROTECTED]]
Sent: 13 February 2003 21:38
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Server detection of Javascript enabled?


No. HTTP headers contain information about the request to the server.
Unfortunately none of those headers have information about JavaScript.

The only way that I could see you being able to do this is to send a simple
page with JavaScript to the client and have the JavaScript forward to a
separate page on your server. If your server receives the request, you know
that JavaScript is enabled.

Kludgy and heavy, but that's all I got.

-= J

 -Original Message-
 From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 13, 2003 3:34 PM
 To: Struts User
 Subject: Server detection of Javascript enabled?
 
 
 Without using Javascript on the client, can the server detect 
 if the client
 has Javascript enabled?  Is there something in the HTTP 
 request header that
 indicates this?
 
 [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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


**
CONFIDENTIALITY / DISCLAIMER NOTICE

This communication contains information, which is confidential 
and may also be privileged. It is for the exclusive use of 
the recipient(s). If you are not the intended recipient(s)
please note that any distortion, copying or use of this
communication or the information in it is strictly prohibited.
Any  views or opinions presented are solely those of the
author and do not necessarily represent those of
Euro RSCG Wnek Gosper.

If you have received this communication in error please notify 
us by e-mailing the author or by telephoning (020  7240 4111)
and then delete the communication and any copies of it.

This footnote also confirms that this email message has been
swept by MIMEsweeper for the presence of computer viruses.

http://www.eurorscg.co.uk
**


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




Re: Newbie Question

2003-02-11 Thread Sean Dockery
Wouldn't that be...

!A || B


- Original Message -
From: Gemes Tibor [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, February 11, 2003 01:29
Subject: Re: Newbie Question


2003. február 11. 09:07 dátummal Ray Madigan ezt írtad:
 Thanks for the advice - i didn't know this stuff existed.

 I was just pondering how to implement logic like
 if ! A || ( A  B )

A  !B

Tib

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




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




Re: Application Startup

2003-02-11 Thread Sean Dockery
It seems to me that the best place to make the connection in
ServletContextListener.contextCreated.  If the application is unavailable,
you can store that in the application context and when requests come in for
that resource, you can display in the response that the resource was
unavailable.

You would also be able to periodically retry establishing the connection if
you weren't able to create the connection when the application first
started.  Having the application send you (or your system administrator) an
email or pager message could also be done.

- Original Message -
From: Heligon Sandra [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, February 11, 2003 01:39
Subject: RE: Application Startup


 I would like to know when the ServletContextListener.contextCreated()
 function is
 called when Tomcat starts ? or is it possible to call this function only
on
 the first request?
 In fact when the first request arrives to Tomcat I have to open an
 application session on
 our application server to get business data.
 This application session is the same for all the clients.
 But the creation of this session is transparent for the clients, I cannot
 ask him to go to see in the files of Tomcat's log.
 That's why if an error occurs at the application session creation, on the
 first action
 of the client I would like to display an error. Because if the application
 session is not
 created the client can nothing make.

 If I understood the various remarks well, there are several ways of
making:

 - Place code in the ServletContextListener.contextCreated() and use Token
 objects
   to indicate an error; But we decide to start Tomcat as Windows service
but
 not our
   application server. So I can use this method only if this method is
called
 on the
   first request and not on the Tomcat startup.

 - Override the init() method of the TilesRequestProcessor class; I try
this
 but
   the debug doesn't enter in the overridden method;

 - Use Filter; I am not informed any on this subject where can I find the
 best doc about
   filters;

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 06 February 2003 22:56
 To: Struts Users Mailing List
 Subject: RE: Application Startup




 On Thu, 6 Feb 2003, Heligon Sandra wrote:

  Date: Thu, 6 Feb 2003 15:01:44 +0100
  From: Heligon Sandra [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Subject: RE: Application Startup
 
  The problem with the ServletContextListener is that we can not
  display error to the client if an error occur, isn'it ?
 

 If you're doing things at application startup, there *are* no users yet.

 A ServletContextListener.contextCreated() method that detects an error
 should write messages to the appropriate log file to describe what
 happened (for example, you could call ServletContext.log() for this), plus
 throw an exception back to the container.  That will cause the container
 to not put the application into service, because something was wrong at
 startup time.

 In a Servlet 2.2 environment, you'd do exactly the same sort of thing, but
 in t he init() method of a servlet marked for load-on-startup instead.

 In either case, the initialization will have been completed by the
 container before the application is allowed to start processing requests.

 Craig

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

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




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




Re: html:errors / trouble

2003-02-10 Thread Sean Dockery
What forwards are defined for your action in struts-config.xml?


- Original Message - 
From: alexj [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 10, 2003 10:56
Subject: Re: html:errors / trouble


 (in fact when I run the app and enter bad datas I didn't get any
 errors message displayed on my login page)
 



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




RE: AW: easy struts 0.6.3 ?

2003-02-05 Thread Sean Chambers
translation:
thank you for this useful/meaningful? message  
 

 -Original Message-
 From: Emmanuel Boudrant [mailto:[EMAIL PROTECTED]]
 Sent: 05 February 2003 13:57
 To: Struts Users Mailing List
 Subject: Re: AW: easy struts 0.6.3 ?
 
 
 Hi,
 
 I can speak french, I can speak english, I can understand 
 spanish...but german, I can't ;)
 
 altavista-translate
 vielen Dank für diese aussagekräftige Nachricht
   in french 
 merci beaucoup pour cette information valable
 /altavista-translate
 
 BTW: I write a response in french for Alex and by mistake I 
 send it to struts-user list, sorry.
 
 -emmanuel
 
   --- Hirschmann, Bernhard 
 [EMAIL PROTECTED] a écrit :  
  emmanuel,
  
  vielen Dank für diese aussagekräftige Nachricht.
  
  Freundliche Grüße,
  Bernhard Hirschmann
  
  -Ursprüngliche Nachricht-
  Von: Emmanuel Boudrant [mailto:[EMAIL PROTECTED]]
  Gesendet: Mittwoch, 5. Februar 2003 14:24
  An: [EMAIL PROTECTED]
  Cc: Struts Users Mailing List
  Betreff: Re: easy struts 0.6.3 ?
  
  
  HEllo Alex,
  
  J'imagine que c'est à propos du bug avec les projets Tomcat 
 Sysdeo, si oui
  alors il est corrigé
  dans CVS mais j'ai pas eu le temps de faire une release 
 (j'ai pas CVS au
  boulot).
  
  Voici un pointeur vers le fichier concerné :
  
  
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/easystruts/easystruts-plugin/
 src/org/easystruts/eclipse/wizards/NewStrutsSupportWizardPage.java
 
 a+
 -emmanuel
 
 
  --- alexj [EMAIL PROTECTED] a écrit :  Hi  anybody know when the easy
 struts 0.6.3 plug in for
 eclipse 
  will be released ?
  Or anybody know in the source code where to update the add easy struts
  support ?
  
  Thanks
  
  --
  Alexandre Jaquet
  -
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
   
 
 ___
 Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
 Yahoo! Mail : http://fr.mail.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
  

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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


**
CONFIDENTIALITY / DISCLAIMER NOTICE

This communication contains information, which is confidential 
and may also be privileged. It is for the exclusive use of 
the recipient(s). If you are not the intended recipient(s)
please note that any distortion, copying or use of this
communication or the information in it is strictly prohibited.
Any  views or opinions presented are solely those of the
author and do not necessarily represent those of
Euro RSCG Wnek Gosper.

If you have received this communication in error please notify 
us by e-mailing the author or by telephoning (020  7240 4111)
and then delete the communication and any copies of it.

This footnote also confirms that this email message has been
swept by MIMEsweeper for the presence of computer viruses.

http://www.eurorscg.co.uk
**


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




Multi-Select List Box

2003-02-01 Thread Cohan, Sean
If I use a collection to create a multi-select  html:select, how do I get
the selected items back to my action class?  Thanks.

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




RE: Multi-Select List Box

2003-02-01 Thread Cohan, Sean
Thanks.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 01, 2003 11:56 AM
To: [EMAIL PROTECTED]
Subject: Re: Multi-Select List Box


Define a String[] in your form bean with the same name as your select box.

David






From: Cohan, Sean [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts (E-mail) [EMAIL PROTECTED]
Subject: Multi-Select List Box
Date: Sat, 1 Feb 2003 11:39:40 -0500

If I use a collection to create a multi-select  html:select, how do I get
the selected items back to my action class?  Thanks.

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


_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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

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




Collection within Collection

2003-01-14 Thread Cohan, Sean
I have a collection (of ArrayLists) within a collection of (ArrayLists).
That is:

public class HistoryItemImpl implements HistoryItem {

private String objectName;
private List deltaList; ...
}

public class DeltaItemImpl implements DeltaItem {

private String columnName;
private Object oldValue;
private Object newValue; ...
}

In my action class I call a method that returns a collection of
historyItems.  I set that in request scope:

 request.setAttribute(historyItems, historyList);

And then iterate though it on me page:

  logic:iterate id=historyItem name=historyItems
type=com.gosps.cbd.util.HistoryItem 

For each historyItem iteration, I want to iterate though the deltaItems:

logic:iterate id=deltaItem name=deltaItems
type=com.gosps.cbd.util.DeltaItem 

How can I do this?  How do I refer to the deltaItem collection within each
historyItem collection?

Thanks.


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




RE: Collection within Collection

2003-01-14 Thread Cohan, Sean
That was quick!  Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 9:57 AM
To: [EMAIL PROTECTED]
Subject: RE: Collection within Collection


Try nested:iterate tag

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
Sent: January 14, 2003 9:59 AM
To: Struts (E-mail)
Subject: Collection within Collection

I have a collection (of ArrayLists) within a collection of (ArrayLists).
That is:

public class HistoryItemImpl implements HistoryItem {

private String objectName;
private List deltaList; ...
}

public class DeltaItemImpl implements DeltaItem {

private String columnName;
private Object oldValue;
private Object newValue; ...
}

In my action class I call a method that returns a collection of
historyItems.  I set that in request scope:

 request.setAttribute(historyItems, historyList);

And then iterate though it on me page:

  logic:iterate id=historyItem name=historyItems
type=com.gosps.cbd.util.HistoryItem 

For each historyItem iteration, I want to iterate though the deltaItems:

logic:iterate id=deltaItem name=deltaItems
type=com.gosps.cbd.util.DeltaItem 

How can I do this?  How do I refer to the deltaItem collection within each
historyItem collection?

Thanks.


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

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




RE: Collection within Collection

2003-01-14 Thread Cohan, Sean
Excuse my naiveté, how would I refer to collection within a collection?
Thanks

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 10:20 AM
To: 'Struts Users Mailing List'
Subject: RE: Collection within Collection


You can use the Index property of the iterate tag to iterate through a
collection of collections.

Mark

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 14, 2003 10:04 AM


 I have a collection (of ArrayLists) within a collection of 
 (ArrayLists). In my action class I call a method that returns a 
 collection of historyItems.  I set that in request scope: For each 
 historyItem iteration, I want to iterate though the deltaItems: How 
 can I do this?  How do I refer to the deltaItem collection within each 
 historyItem collection?

Is JSTL an option?  You can nest c:forEach tags and iterate through
collections of collections.

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



--
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: Collection within Collection

2003-01-14 Thread Cohan, Sean
I'm lost with this stuff.  I can't seem to get it working.  I'm getting the
following error:

[ServletException in:/tiles/cc/cat_history_content.jsp] No selector
attribute (cookie/header/name/parameter) was specified'

I set my collection in my action class in request attribute:

request.setAttribute(historyItems, historyList);

Then in my page I have:

logic:iterate id=historyItem name=historyItems
type=com.gosps.cbd.util.HistoryItem indexId=hiIndex 

  logic:iterate id=deltaItem name=historyItem property=deltaList
type=com.gosps.cbd.util.DeltaItem indexId=diIndex 

bean:write name=deltaItem property=columnName /

  /logic:iterate
/logic:iterate

Setting the types to java.util.List doesn't help either.


Any ideas.

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 12:31 PM
To: 'Struts Users Mailing List'
Subject: RE: Collection within Collection


If you have a collection like an ArrayList, every element has an index.  At
each of these element addresses, you have another ArrayList.  With Struts,
if you iterate through the parent collection based on the indexId (first
element = 0, last element = n-1), you can retrieve the contents of each
collection stored at the element index of the collection automatically:

logic:iterate name=parentCollection
   property=parentProperty
   indexId=parentIndex  //arbitrary name
   id=parent//arbitrary name
   type=java.util.List
  logic:iterate name=parent
 property=childProperty
 indexId=childIndex  //arbitrary name
 id=child//arbitrary name
 type=java.util.List
bean:write name=child property=_whatever_ /
// etc.
  /logic:iterate
/logic:iterate


Mark

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 14, 2003 11:08 AM


Excuse my naiveté, how would I refer to collection within a collection?
Thanks



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

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




RE: Collection within Collection

2003-01-14 Thread Cohan, Sean
Yes,  I have the entire historyList printed out in the action class to make
sure it has data.  The historyList has a length of 9.  Each historyItem
contains a list of DeltaItems of length 3.  The attributes are correct.

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 3:51 PM
To: 'Struts Users Mailing List'
Subject: RE: Collection within Collection


Do you really have a DeltaItem object with an attribute named columnName?
BTW:  You don't need the indexId unless you want to specifically access an
element (e.g., if( diIndex == 2 ){...}).

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 14, 2003 3:10 PM


I'm lost with this stuff.  I can't seem to get it working.  I'm getting the
following error:

[ServletException in:/tiles/cc/cat_history_content.jsp] No selector
attribute (cookie/header/name/parameter) was specified'

I set my collection in my action class in request attribute:

request.setAttribute(historyItems, historyList);

Then in my page I have:

logic:iterate id=historyItem name=historyItems
type=com.gosps.cbd.util.HistoryItem indexId=hiIndex 

  logic:iterate id=deltaItem name=historyItem property=deltaList
type=com.gosps.cbd.util.DeltaItem indexId=diIndex 

bean:write name=deltaItem property=columnName /

  /logic:iterate
/logic:iterate

Setting the types to java.util.List doesn't help either.


Any ideas.

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 12:31 PM
To: 'Struts Users Mailing List'
Subject: RE: Collection within Collection


If you have a collection like an ArrayList, every element has an index.  At
each of these element addresses, you have another ArrayList.  With Struts,
if you iterate through the parent collection based on the indexId (first
element = 0, last element = n-1), you can retrieve the contents of each
collection stored at the element index of the collection automatically:

logic:iterate name=parentCollection
   property=parentProperty
   indexId=parentIndex  //arbitrary name
   id=parent//arbitrary name
   type=java.util.List
  logic:iterate name=parent
 property=childProperty
 indexId=childIndex  //arbitrary name
 id=child//arbitrary name
 type=java.util.List
bean:write name=child property=_whatever_ /
// etc.
  /logic:iterate
/logic:iterate


Mark

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 14, 2003 11:08 AM


Excuse my naiveté, how would I refer to collection within a collection?
Thanks



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

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



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

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




RE: Collection within Collection

2003-01-14 Thread Cohan, Sean
I got it working pretty much the way you instructed Mark.  Thanks very
much!!!  My head was getting sore from banging it against the wall.  

I think, ultimately, it was me not referring to the bean attributes
correctly (or something I did wrong, not really sure, but thankful that it's
finally working.)

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 3:51 PM
To: 'Struts Users Mailing List'
Subject: RE: Collection within Collection


Do you really have a DeltaItem object with an attribute named columnName?
BTW:  You don't need the indexId unless you want to specifically access an
element (e.g., if( diIndex == 2 ){...}).

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 14, 2003 3:10 PM


I'm lost with this stuff.  I can't seem to get it working.  I'm getting the
following error:

[ServletException in:/tiles/cc/cat_history_content.jsp] No selector
attribute (cookie/header/name/parameter) was specified'

I set my collection in my action class in request attribute:

request.setAttribute(historyItems, historyList);

Then in my page I have:

logic:iterate id=historyItem name=historyItems
type=com.gosps.cbd.util.HistoryItem indexId=hiIndex 

  logic:iterate id=deltaItem name=historyItem property=deltaList
type=com.gosps.cbd.util.DeltaItem indexId=diIndex 

bean:write name=deltaItem property=columnName /

  /logic:iterate
/logic:iterate

Setting the types to java.util.List doesn't help either.


Any ideas.

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 12:31 PM
To: 'Struts Users Mailing List'
Subject: RE: Collection within Collection


If you have a collection like an ArrayList, every element has an index.  At
each of these element addresses, you have another ArrayList.  With Struts,
if you iterate through the parent collection based on the indexId (first
element = 0, last element = n-1), you can retrieve the contents of each
collection stored at the element index of the collection automatically:

logic:iterate name=parentCollection
   property=parentProperty
   indexId=parentIndex  //arbitrary name
   id=parent//arbitrary name
   type=java.util.List
  logic:iterate name=parent
 property=childProperty
 indexId=childIndex  //arbitrary name
 id=child//arbitrary name
 type=java.util.List
bean:write name=child property=_whatever_ /
// etc.
  /logic:iterate
/logic:iterate


Mark

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 14, 2003 11:08 AM


Excuse my naiveté, how would I refer to collection within a collection?
Thanks



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

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



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

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




Cannot find bean...

2003-01-12 Thread Cohan, Sean
I'm struggling with the exception below trying to figure out how to resolve
it.  It appears when I add the following hidden parameter to the form.

  html:hidden property=method/

I have the parameter getter and setters in the form class, and as a
parameter in the action mapping.  Can someone steer me in the right
direction? Thanks.

Here's the exception

org.apache.jasper.JasperException: Cannot find bean
org.apache.struts.taglib.html.BEAN in any scope


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




RE: Cannot find bean...

2003-01-12 Thread Cohan, Sean
Yes, both the form and action classes are in the server lib (and in the
calsspath.)

-Original Message-
From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 12, 2003 11:07 AM
To: 'Struts Users Mailing List'
Subject: RE: Cannot find bean...


Well, do you have that class anywhere in the servers lib dir?

Ilya

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, January 12, 2003 11:05 AM
To: Struts (E-mail)
Subject: Cannot find bean...


I'm struggling with the exception below trying to figure out how to
resolve it.  It appears when I add the following hidden parameter to the
form.

  html:hidden property=method/

I have the parameter getter and setters in the form class, and as a
parameter in the action mapping.  Can someone steer me in the right
direction? Thanks.

Here's the exception

org.apache.jasper.JasperException: Cannot find bean
org.apache.struts.taglib.html.BEAN in any scope


--
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: Logic Equals and Interface Constants

2003-01-11 Thread Cohan, Sean
There are multiple classes that build a collection which is presented on
only one jsp.  For simplicity, I'll refer to constants in the classes and
literals on the one jsp.  Then if the constants change, I only have to
change them in the interface and jsp.

Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 7:31 PM
To: [EMAIL PROTECTED]
Subject: Re: Logic Equals and Interface Constants


 Sean == Sean Cohan Cohan writes:

Sean I'd like to somehow use some final static int's defined in an
interface
Sean within logic:equal tags.  Something like:

Sean logic:equal name=columnType value=DeltaItem.LONGTEXT

Sean Can I do this or something like it (e.g., using chars instead of
int's)?

You'll have to use expression scriptlets for the attribute value.  In those
expressions, you can produce any Java expression you want.

If you want/need to avoid scriptlets, then you'd have to use a more involved
process, using Struts-EL, along with a class that uses reflection to load
static final constants into a HashMap which can be referenced through the
EL.

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




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




Logic Equals and Interface Constants

2003-01-10 Thread Cohan, Sean
I'd like to somehow use some final static int's defined in an interface
within logic:equal tags.  Something like:

logic:equal name=columnType value=DeltaItem.LONGTEXT

Can I do this or something like it (e.g., using chars instead of int's)?

Thanks.

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




Iterate Index Evaluation

2003-01-03 Thread Cohan, Sean
I need to iterate over a collection and be able to tell whether the current
index is odd or even.  Any ideas on how I can use the logic tag for this?

logic:match name=index value=odd or even?


Thanks.


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




RE: Iterate Index Evaluation

2003-01-03 Thread Cohan, Sean
Thanks, but I think there will be a problem with the bean:define since the
jsp 1.1 spec does not allow you to use the same bean name more than once in
a single page (which is what we would be doing in an iterate tag.)  Unless
I'm misinterpreting.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Try something like ...

logic:iterate indexId=index ...
  bean:define id=indexMod2 value='%= index % 2 %'/
  logic:equal name=indexMod2 value=0
markup for even row here
  /logic:equal
  logic:notEqual name=indexMod2 value=0
markup for odd row here
  /logic:equal
/logic:iterate

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:40 PM
To: Struts (E-mail)
Subject: Iterate Index Evaluation


I need to iterate over a collection and be able to tell whether the current
index is odd or even.  Any ideas on how I can use the logic tag for this?

logic:match name=index value=odd or even?


Thanks.


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

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

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




RE: Iterate Index Evaluation

2003-01-03 Thread Cohan, Sean
chuckle, chuckle...

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:43 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Er ... I think you may be right ... I know it can be done using scriptlet
for example:

logic:iterate indexId=index ...
  % if ((index % 2) == 0) {%
even row markup here
  % } else { %
odd row markup here
  % } %
/logic:iterate

But we all know how evil this is!

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:05 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Thanks, but I think there will be a problem with the bean:define since the
jsp 1.1 spec does not allow you to use the same bean name more than once in
a single page (which is what we would be doing in an iterate tag.)  Unless
I'm misinterpreting.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Try something like ...

logic:iterate indexId=index ...
  bean:define id=indexMod2 value='%= index % 2 %'/
  logic:equal name=indexMod2 value=0
markup for even row here
  /logic:equal
  logic:notEqual name=indexMod2 value=0
markup for odd row here
  /logic:equal
/logic:iterate

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:40 PM
To: Struts (E-mail)
Subject: Iterate Index Evaluation


I need to iterate over a collection and be able to tell whether the current
index is odd or even.  Any ideas on how I can use the logic tag for this?

logic:match name=index value=odd or even?


Thanks.


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

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

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

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

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




RE: Iterate Index Evaluation

2003-01-03 Thread Cohan, Sean
Thanks very much!  I will.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:53 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Strike that ... reverse it!  I was able to use the bean:define as follows:

logic:iterate indexId=ndx ...
  bean:define id=tmpMod value=%= String.valueOf(ndx.intValue() % 2)
%/
  logic:equal name=tmpMod value=0
even markup here
  /logic:equal
  logic:notEqual name=tmpMod value=0
odd markup here
  /logic:notEqual
/logic:iterate

Give it a try!  The expression is still a little wicked but not as evil as
the scriptlet.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:43 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Er ... I think you may be right ... I know it can be done using scriptlet
for example:

logic:iterate indexId=index ...
  % if ((index % 2) == 0) {%
even row markup here
  % } else { %
odd row markup here
  % } %
/logic:iterate

But we all know how evil this is!

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:05 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Thanks, but I think there will be a problem with the bean:define since the
jsp 1.1 spec does not allow you to use the same bean name more than once in
a single page (which is what we would be doing in an iterate tag.)  Unless
I'm misinterpreting.

-Original Message-
From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:49 PM
To: 'Struts Users Mailing List'
Subject: RE: Iterate Index Evaluation


Try something like ...

logic:iterate indexId=index ...
  bean:define id=indexMod2 value='%= index % 2 %'/
  logic:equal name=indexMod2 value=0
markup for even row here
  /logic:equal
  logic:notEqual name=indexMod2 value=0
markup for odd row here
  /logic:equal
/logic:iterate

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:40 PM
To: Struts (E-mail)
Subject: Iterate Index Evaluation


I need to iterate over a collection and be able to tell whether the current
index is odd or even.  Any ideas on how I can use the logic tag for this?

logic:match name=index value=odd or even?


Thanks.


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

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

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

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

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




Artimus Tomcat 4

2002-12-11 Thread Sean A. Mandel
(StandardPipeline.java:643)

 at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:471)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)

 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
 at java.lang.Thread.run(Thread.java:479)

I'd love to get this thing up and running.  Could someone enlighten me as to why this 
is happening?  

Thanx in advance,
Sean.



problem with startup of 1.1

2002-12-04 Thread Curtis, Sean
Hey all..

just trying to get my server started witht the web-example, and Im getting
an initialization error trying to deploy the sample app:

anyone have a similar problem that they could share some insight on?


Thanks

Sean
..
[04/Dec/2002:14:13:59] info ( 3323): Loading IWSSessionManager by
default.
[04/Dec/2002:14:13:59] info ( 3323): IWSSessionManager: Maximum number
of sessions is 1000
[04/Dec/2002:14:13:59] info ( 3323): Starting reaper for
com.iplanet.server.http.session.IWSSessionMana
ger@171afc
[04/Dec/2002:14:13:59] info ( 3323):  Adding servlet 'jsp' class
'org.apache.jasper.servlet.JspServlet'
[04/Dec/2002:14:13:59] failure ( 3323): Internal error: Unexpected error
condition thrown (unknown exce
ption,no description), stack: java.lang.ExceptionInInitializerError:
java.lang.NullPointerException
at
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:326)
at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:375)
at
org.apache.struts.action.ActionServlet.clinit(ActionServlet.java:375)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at
com.iplanet.server.http.servlet.WServletEntity.loadAndInitServlet(WServletEn
tity.java:71)
at
com.iplanet.server.http.servlet.WebApplication.init(WebApplication.java:315)
at
com.iplanet.server.http.servlet.VirtualServer.init(VirtualServer.java:181)
at
com.iplanet.server.http.servlet.NSServletRunner.VSInit(NSServletRunner.java:
686)

[04/Dec/2002:14:13:59] failure ( 3323): Internal Error: Failed to
initialize web application environmen
t (web-apps.xml) for virtual server (https-struts)
[04/Dec/2002:14:13:59] info ( 3323): Internal Error: Failed to
initialize web application environment (
web-apps.xml) for virtual server (https-struts)
[04/Dec/2002:14:13:59] failure ( 3323): 1 subystems could not be rolled
back
[04/Dec/2002:14:13:59] failure ( 3323): Failed to set configuration



==
MLB Mail Domain made the following
 annotations on 12/04/02 14:31:56

[INFO] -- Virus Manager:
No Viruses were detected in this message.

==


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




Newbie question - ActionMapping

2002-12-03 Thread Curtis, Sean
hey all..

just installed struts, got demo up and running fine on iPlanet Web Server.
just trying to create a simple demo app.
1 view(jsp) 2 fields
1 form, matching fields
1 action

It seems that my jsp forwards correctly to my action mapping, my bean is
populated correctly and validated. my logs look like this:
[03/Dec/2002:13:50:23] info ( 2956):  action: Processing a POST for
/submitform1  
[03/Dec/2002:13:50:23] info ( 2956):  action: Setting locale 'en_US'  
[03/Dec/2002:13:50:23] info ( 2956):  action: Looking for ActionForm bean
under attribute 'form1'  
[03/Dec/2002:13:50:23] info ( 2956):  action: Creating new ActionForm
instance of class 'com.sc.struts.form.Form1'  [03/Dec/2002:13:50:23] info (
2956):  action: Storing instance under attribute 'form1' in scope 'session'
[03/Dec/2002:13:50:23] info ( 2956):  action: Populating bean properties
from this request  
[03/Dec/2002:13:50:23] info ( 2956):  action: Validating input form
properties  
[03/Dec/2002:13:50:23] info ( 2956):  action: No errors detected, accepting
input  
[03/Dec/2002:13:50:23] info ( 2956):  action: Looking for Action instance
for class com.sc.struts.action.Form1Action  [03/Dec/2002:13:50:23] info (
2956):  action: Double checking for Action instance already there  
[03/Dec/2002:13:50:23] info ( 2956):  action: Creating new Action instance 

and my app just displays a blank screen (no errors, no errors in log file)
in my browser with my new '.do' url. It doesnt seem as if im able to return
the correct action mapping object. I have now resorted to throwing an
exception in the first line of my Action.execute method, which as you can
see, isnt being thrown. Is this just a setup problem?


Has anyone else had this problem and/or know how I can fix this?

thanks 
Sean


pretty simple struts config as well:
struts-config


  form-beans

!-- Logon form bean --
   
form-bean  name=form1
type=com.sc.struts.form.Form1/
  /form-beans



  global-forwards
  /global-forwards


  action-mappings type=org.apache.struts.action.ActionMapping

!-- process form 1 --
action
path=/submitform1
type=com.sc.struts.action.Form1Action
name=form1
scope=request
input=/form1.jsp
/action

  /action-mappings

/struts-config

==
MLB Mail Domain made the following
 annotations on 12/03/02 14:11:22

[INFO] -- Virus Manager:
No Viruses were detected in this message.

==


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




TLD in Every Tile?

2002-11-22 Thread Cohan, Sean
Is there a way to not have to include the struts and tile tlds in each and
every jsp that makeup a layout?  Can't we just include it one high level jsp
somehow and have it inherited from every other jsp that makes up a
particular layout?

Thanks.

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




Index Based Names in Iterate Tag

2002-11-21 Thread Cohan, Sean
I want to present a collection of beans using the logic:iterate tag.  One
of the fields in the collection is another collection of beans.  This second
collection of beans I want presented in an html select object.  In my Action
Class, I'd like to iterate through the first collection creating http
request attributes, each one containing an instance of the second
collection.  Something like this:

List list = (List) getList();
Iterator it = list.iterator();

for (i=1; it.hasNext(), i++) {
  MyBean myBean = (MyBean) it.next();
  request.setAttribute (select+ i, (List) myBean.getOtherList());
}

I want to use the html:options tag to populate the select objects.  The
collection parameter of html:options will have to the name of the
attributes created above (i.e., select1, select2, select3,...)  

How can I create the collection name in each html:options tag in the jsp?
Can I use the indexId of the Iterate tag somehow to create it?  For example,
something like:

  table border=0 cellpadding=0 cellspacing=0 
  logic:iterate ...
tr 
  td
 html:select property=key
   html:options collection=select + indexOf property=id
labelProperty=description /
 /html:select
  /td
/tr
  /logic:iterate 
  /table

I know my use of indexOf can't be right.  I'm just trying to show the idea
of what I'm trying to do.


Thanks.



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




RE: Index Based Names in Iterate Tag

2002-11-21 Thread Cohan, Sean
Where I say indexOf below, I meant to say indexId.  Thanks again.

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 8:44 AM
To: Struts (E-mail)
Subject: Index Based Names in Iterate Tag


I want to present a collection of beans using the logic:iterate tag.  One
of the fields in the collection is another collection of beans.  This second
collection of beans I want presented in an html select object.  In my Action
Class, I'd like to iterate through the first collection creating http
request attributes, each one containing an instance of the second
collection.  Something like this:

List list = (List) getList();
Iterator it = list.iterator();

for (i=1; it.hasNext(), i++) {
  MyBean myBean = (MyBean) it.next();
  request.setAttribute (select+ i, (List) myBean.getOtherList());
}

I want to use the html:options tag to populate the select objects.  The
collection parameter of html:options will have to the name of the
attributes created above (i.e., select1, select2, select3,...)  

How can I create the collection name in each html:options tag in the jsp?
Can I use the indexId of the Iterate tag somehow to create it?  For example,
something like:

  table border=0 cellpadding=0 cellspacing=0 
  logic:iterate ...
tr 
  td
 html:select property=key
   html:options collection=select + indexOf property=id
labelProperty=description /
 /html:select
  /td
/tr
  /logic:iterate 
  /table

I know my use of indexOf can't be right.  I'm just trying to show the idea
of what I'm trying to do.


Thanks.



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

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




Parameter

2002-11-13 Thread Cohan, Sean
I'm in one action class and I'm want to forward to another DispatchAction
class.  The second DispatchAction class requires a 'method' parameter which
is used to determine which method to call within the DispatchAction.  How
can I set the method parameter in the first action class so it can be used
by the DispatchAction?  

Right now, I trying request.setAttribute(method,
getChangesSinceLastCertified) just before forwarding, but I'm getting a 
HTTP Status 400 - Request[/recertify] does not contain handler parameter
named method.  

Thanks.


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




HTML:checkbox question

2002-11-10 Thread Sean Gay
Hey all,

The problem I am having is setting the default state of a checkbox and
having the state retained over form submission.

If I set the default state to be selected (true in the underlying
actionform) when the form is submitted the checkbox remains selected even if
it has been de-selected before form submission.

If I set the default state to be not selected (false in the underlying
actionform) the state before submission is retained.

This wouldn't be a problem if the default state I required is to be not
selected, however Murphy's law does prohibit this and I need the checkbox to
be selected upon form entry. Code examples are provided below. If anyone can
help on this matter I would be most greatful as I can then stop banging my
head on the desk repeatedly. :)

I have altered the reset method, the initial value etc etc, but I just cant
seem to get this working.

Form:
public class KeywordSearchForm extends ActionForm
{
/**
 * Member variables
 */
private String businessType = null;
private String businessName = null;
private String location = null;
private boolean serviceArea = true;//when this is set to false
everything works correctly.
private String suburbPostcode   = null;

/**
 * Getter and Setters
 */
public String getBusinessType() { return businessType; }
public String getBusinessName() { return businessName; }
public String getLocation() { return location; }
public String getSuburbPostcode()   { return suburbPostcode; }
public boolean isServiceArea()  { return serviceArea; }

public void setBusinessType(String businessType){
this.businessType = businessType; }
public void setBusinessName(String businessName){
this.businessName = businessName; }
public void setLocation(String location){ this.location
= location; }
public void setServiceArea(boolean serviceArea) {
this.serviceArea = serviceArea; }
public void setSuburbPostcode(String suburbPostcode){
this.suburbPostcode = suburbPostcode; }

/**
 * Validation Methods
 */
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
{
ActionErrors errors = new ActionErrors();

validateBusinessParams(errors);
validateLocationParams(errors);

return errors;
}

//checks to ensure valid business information has been entered.
private void validateBusinessParams(ActionErrors errors)
{
if((getBusinessName().length() == 0)  (getBusinessType().length()
== 0))
{
errors.add(NoBusinessInfo, new
ActionError(error.businessInfo.required));
}
}

//checks to ensure valid location information
private void validateLocationParams(ActionErrors errors)
{
if((-1.equals(getLocation()))  (getSuburbPostcode().length() ==
0))
{
errors.add(NoLocationInfo, new
ActionError(error.locationInfo.required));
}
}

public void reset(ActionMapping mapping, HttpServletRequest request)
{
this.businessType   = null;
this.businessName   = null;
this.location   = null;
this.serviceArea= false;
this.suburbPostcode = null;
}
}

Action:
Nothing is going on here at all. Just a stub at the moment - processing to
be inserted later.

JSP:
html:form action=/search/performKeywordSearch.do focus=businessType
html:text property=businessType styleClass=inputTxt
style=width:215px /
html:text property=businessName styleClass=inputTxt
style=width:215px /
html:text property=location styleClass=inputTxt style=width:215px
/
html:text property=suburbPostcode styleClass=inputTxt
style=width:215px /
html:checkbox property=serviceArea /
/html:form


Thanks in advance,
Sean





Struts 1.1b2, IBM Websphere 4.0

2002-10-23 Thread Sullivan, Sean C - MLG

I'm having some trouble deploying Struts 1.1b2 on IBM Websphere 4.0 

I am using Websphere 4.0 on Windows 2000 

I recompiled everything using IBM's 1.3.0 VM (the came with websphere) and
also the j2ee.jar library that came with Websphere 4.

Still I get a ClassCastException when hitting the first JSP page. Looks like
I might try recompiling Struts 
(taglibs are throwing the exception), but it's just a shot in the dark. 

java.lang.ClassCastException: org.apache.struts.taglib.tiles.UseAttributeTei

at
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm
pl.java:560) 
at
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
va:489) 
at
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:301) 
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java:794) 
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:116) 
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:216) 
at org.apache.jasper.compiler.Parser.parse(Parser.java:1085) 
at org.apache.jasper.compiler.Parser.parse(Parser.java:1036) 
at org.apache.jasper.compiler.Parser.parse(Parser.java:1032) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:236) 
at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:677) 
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:230) 
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:247) 
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415) 
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:827) 
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:159) 
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:286) 
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:106) 
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
2) 
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:1012) 
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:913) 
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:499) 
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:278) 
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:105) 
at
com.ibm.servlet.engine.webapp.SimpleFileServlet.doGet(SimpleFileServlet.java
:198) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:827) 
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:159) 
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:286) 
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:106) 
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
2) 
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:1012) 
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:913) 
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:499) 
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:278) 
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:105) 
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)

at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:123) 
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67) 
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:122) 
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:315) 
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
va:60) 
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242) 
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122) 



--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




IBM Websphere 4.0.4, Struts 1.1b2, Cannot find message resources under key

2002-10-23 Thread Sullivan, Sean C - MLG

I am using:

  IBM Websphere 4.0.4 on Windows 2000
  Jakarta Struts 1.1b2

I deployed struts-example.war in Websphere.

Deployment appears to have succeeded.

I am trying to view the application using this 
URL:

  http://localhost:80/struts-example/index.jsp

This error appears in the web browser:
 
  Error 500: Cannot find message resources under 
  keyorg.apache.struts.action.MESSAGE


What is the cause of this error?

Is it possible that this error is due to the fact 
that IBM's Websphere Admin Console uses an old version 
of struts.jar ?

I thought that struts-example.war would have no problem 
because struts-example.war file contains struts.jar in the WEB-INF/lib 
directory.

Perhaps I will double-check Websphere's classloader configuration options.

Cheers,

-Sean


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: [OT] Tomcat not extracting war

2002-10-18 Thread Sean Harrison




Mark,

If you're getting a FileNotFoundException when Tomcat tries to unpack the war
file, check the permissions of your webapps directory. I had the same problem. I
resolved it by giving the tomcat4 group write permissions to the webapps
directory so it could create the necessary folders/files.

Sean Harrison
Internet Services Administrator






--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




alt tags error?

2002-10-15 Thread Cohan, Sean

Could there a problem with the alt tag for html:image or  html:img tags?
We see nothing when we hover over them.  Thanks.

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




html:select / option defaultSelected or selected

2002-10-14 Thread Cohan, Sean

Is there any way I can specify the defaultSelected or selected property for
an html:select or an html:option?  I use the html:options to populate the
options with an ArrayList of beans.  I need to also specify the value that
should be initially selected. 

Thanks.

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




FW: Forwarding Back to one Of Many Pages

2002-10-11 Thread Cohan, Sean

No takers on this one???

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 4:48 PM
To: 'Struts Users Mailing List'
Subject: Forwarding Back to one Of Many Pages


I'm sure this has been asked before.  Several pages can link or forward to
my page.  My page is mapped to a DispatchAction (because I need to get some
initial data and then process the submitted data.)  After submitting, the
user is forwarded to another 'action succeeded' page.  I need to know how to
get the user back to whatever page they used to arrive at my initial page.
The user could cancel and I would have to get them back to the original
page, or the action succeeds and I have to get them back to the original
page from the 'action succeeded' page.  How can I do this?

Lastly, how can I prevent the user from bookmarking the form page or 'action
succeeded' page.  Or at least, how can I make the bookmark be a page I want
it to be (i.e., the initiating page in a chain of pages?)

Thanks.

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

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




RE: Forwarding Back to one Of Many Pages

2002-10-11 Thread Cohan, Sean

ok, ok.  it is almost beer o'clock.  thanks.

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 11, 2002 2:54 PM
To: Struts Users Mailing List
Subject: RE: Forwarding Back to one Of Many Pages


It's Friday afternoon man! Even Mark isn't thinking about Struts over there
in Blighty, most likely nursing a warm beer. ;-)

A way of knowing where you came from, is to pass a parameter called url
that has the value of the page where you came from. But, I want to STRONGLY
DISCOURAGE you from doing such a thing. Treat your web app as a state
machine and if you know where you are and what your state is, then you'll
only ever have to worry about where you can go next and ignore piddly
details like where you have just come from. This WORKS VERY WELL, and I just
did it so I'm not talking from anywhere south of my neck!

:-)

Simon

-
Simon P. Chappell [EMAIL PROTECTED]
Java Programming Specialist  www.landsend.com
Lands' End, Inc.   (608) 935-4526


-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 11, 2002 1:48 PM
To: '[EMAIL PROTECTED]'
Subject: FW: Forwarding Back to one Of Many Pages


No takers on this one???

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 4:48 PM
To: 'Struts Users Mailing List'
Subject: Forwarding Back to one Of Many Pages


I'm sure this has been asked before.  Several pages can link 
or forward to
my page.  My page is mapped to a DispatchAction (because I 
need to get some
initial data and then process the submitted data.)  After 
submitting, the
user is forwarded to another 'action succeeded' page.  I need 
to know how to
get the user back to whatever page they used to arrive at my 
initial page.
The user could cancel and I would have to get them back to the original
page, or the action succeeds and I have to get them back to 
the original
page from the 'action succeeded' page.  How can I do this?

Lastly, how can I prevent the user from bookmarking the form 
page or 'action
succeeded' page.  Or at least, how can I make the bookmark be 
a page I want
it to be (i.e., the initiating page in a chain of pages?)

Thanks.

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

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


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

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




Forwarding Back to one Of Many Pages

2002-10-10 Thread Cohan, Sean

I'm sure this has been asked before.  Several pages can link or forward to
my page.  My page is mapped to a DispatchAction (because I need to get some
initial data and then process the submitted data.)  After submitting, the
user is forwarded to another 'action succeeded' page.  I need to know how to
get the user back to whatever page they used to arrive at my initial page.
The user could cancel and I would have to get them back to the original
page, or the action succeeds and I have to get them back to the original
page from the 'action succeeded' page.  How can I do this?

Lastly, how can I prevent the user from bookmarking the form page or 'action
succeeded' page.  Or at least, how can I make the bookmark be a page I want
it to be (i.e., the initiating page in a chain of pages?)

Thanks.

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




RE: ArrayList in Options

2002-10-09 Thread Cohan, Sean

Very cool.  Thanks.

-Original Message-
From: Pavel Kolesnikov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09, 2002 4:19 PM
To: Struts Users Mailing List
Subject: Re: ArrayList in Options 


On Wed, 9 Oct 2002, Cohan, Sean wrote:

 I'll have an ArrayList of beans in my ActionClass.  Can I set the
ArrayList
 in the html:options collection property? 

Yes.

 The doc says the collection
 attribute is interpreted as the name of a JSP bean, in some scope.  ??? 
 
 If I can do this, how do I expose this ArrayList to the jsp page and refer
 to it in the jsp page?  

Let's suppose beans in your collection have methods getId()
and getName().

Then your action class should contain somthing like this:

// expose your array list to the request scope
request.setAttribute (blah, yourArrayList);

Your JSP (forwarded from action class mentioned above):

%-- render your select-box using collection from your action --%
html:options collection=blah property=id labelProperty=Name /

See http://jakarta.apache.org/struts/struts-html.html#options

Pavel




--
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: IP Address

2002-09-18 Thread Cohan, Sean

Is that the correct method?  I get a 'can;t resolve symbol' compiler error.
Thanks.

-Original Message-
From: Emmanuel Boudrant
To: Struts Users Mailing List
Sent: 9/18/02 6:09 AM
Subject: Re: IP Address

try this:
 
 request.getRemoteXxx();

-emmanuel


 --- Cohan, Sean [EMAIL PROTECTED] a écrit :  
 How do I get the referrer's IP address in my action class?  Thanks.
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
  

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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

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




Automated Site testing

2002-09-18 Thread Sean Gay

Hey All,

I was hoping that someone of the list would be able to help me out. Our
company currently uses JUnit to perform automated tests on the back end of
our sites, and was wondering if something similar existed for doing tests on
the front end. I have looked into httpunit but that doesn't seem to be able
to adequately do what we are after, or provide further benefit than
performing JUnit tests on our actions?

If anyone has any tried suggestions I would be most appreciative.

Thanks in advance,
Sean



IP Address

2002-09-17 Thread Cohan, Sean


How do I get the referrer's IP address in my action class?  Thanks.

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




RE: Two Phase ActionClass

2002-09-12 Thread Cohan, Sean

Craig, in this thread you said I shouldn't have to have hidden fields
because the username
and password fields should still be set on the form bean associated with
loginUser.  Do I have to do anything in the Logon action to make these
fields available to the loginWarning.jsp (like
session.setAttribute(mapping.getAttribute(), form);)?  I wasn't doing so.

thanks. 

-Original Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 2:54 PM
To: Struts Users Mailing List
Subject: Re: Two Phase ActionClass


Create hidden fields (html:hidden) on the loginWarning.jsp page with the
same name of the username and password fields.  So long as they are within
the html:form tag as the others, it should pickup the values from the
FormBean that were set in login.jsp.

Actually, you shouldn't even need the hidden fields, because the username
and password fields should still be set on the form bean associated with
loginUser.  This is the same action you are using for the Continue button.
So basically, inside the continue method as well as the continue else branch
of showWarningIfNecessary you should be able to dig those values out of the
form.

Let me know if that works for you,

Craig.


- Original Message -
From: Cohan, Sean [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Monday, September 09, 2002 2:36 PM
Subject: RE: Two Phase ActionClass


 After clicking on continue on the loginWarning.jsp page, I no longer have
 the username and password fields that are validated in the validate method
 of the loginForm.  How should I make this available?  Thanks.

 -Original Message-
 From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 06, 2002 11:01 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Two Phase ActionClass


 Sean, not sure if I would recycle the login page to show the warning,
 instead I would have another page called loginWarning.jsp which showed
them
 a message and then presented a Continue and Cancel button.  The Continue
 button would send them back to the logon Action class and the Cancel
button
 would simply be a link back to the login.jsp page.

 However, I would change my Action class to a DispatchAction class and
setup
 things like they have in the DispatchAction API doc, in your case,
something

 like this:

 action path=/loginUser
type=my.package.LoginUserAction
name=subscriptionForm
scope=request
input=/login.jsp
parameter=action

forward name=warn path=/loginWarning.jsp/
forward success path=afterLogin.jsp/
 /action

 I would then have two jsps, one for logging in (login.jsp) and then the
one
 for warning (loginWarning.jsp), and I would code my DispatachAction class
as

 follows:

 import org.apache.struts.action.DispatchAction;

 public class LoginUserAction extends DispatchAction {
 //have one method named for each possible function name you will be
 //passing in the action parameter

 //invoked when our Action class is called with
action=showWarningIfNecessary
 public ActionForward showWarningIfNecessary(ActionMapping mapping,
 ActionForm form, HttpServletRequest request, HttpServletResponse response)
 throws Exception
 {
//if the user is already logged in
//return mappings.findForward(warning);
//else return mappings.findForward(success);
 }

 //invoked when our Action class is called with action=continue
 public ActionForward continue(ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse response) throws Exception
 {
return mappings.findForward(success);
 }

 }

 In login.jsp, you would have a hidden form field with a name of action
and

 a value of showWarningIfNecessary:

 html:hidden name=action value=showWarningIfNecessary/

 In loginWarning.jsp your continue button could just be a link to:
 loginUser.do?action=continue (or you could have a hidden field named
action
 like in login.jsp, but the value would be continue)

 And your cancel button could be a link to:
 login.jsp

 If you read the API doc on DispatchAction, this will all make sense.

 Hope that helped!

 Craig.

 From: Cohan, Sean [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: Two Phase ActionClass
 Date: Fri, 6 Sep 2002 20:14:37 -0400
 
 Within my logon ActionClass, I want to check the user's user id/password
 and
 whether they are currently logged on anywhere else.  If they are logged
on
 elsewhere, I want to go back to the logon page to warn them and give them
a
 chance to continue or to bail.  If they continue, I want to skip over the
 check whether they are logged on elsewhere.  I'm struggling with how from
 my
 logon.jsp page I can instruct the logon action to one thing one time and
 another thing another time.  I was thinking maybe the ActionMapping
 parameter, but I don't really know how to use it.  I'm searching.  Can
 someone give me a good way to do what I'm trying

Disable Navigation

2002-09-12 Thread Cohan, Sean

For our app, if the user logs in for the first time or if the user's
password is 30 days old, we require that they change it immediately logging
in.  So from the logon action we send them to a password.jsp.  But the user
should also be able to go to password.jsp anytime after logging in from
(just about) any other jsp.

For the former case, we would want to disable any navigation on
password.jsp.  And for the latter case enable the navigation.  How can I
distinguish when I should disable the navigation?  That is, how do I know
that they came from the logon action and not some other jsp?  

Or should I be using two separate password pages?

Thanks.

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




RE: FW: Disable Navigation

2002-09-12 Thread Cohan, Sean

Thanks very much guys.  I think I'll have it popup only if thy get there
from within the app by their own choosing.  And I'll use a logic:present tag
to configure the continue / close button.

-Original Message-
From: Bartley, Chris P [PCS] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 6:19 PM
To: 'Struts Users Mailing List'
Subject: RE: FW: Disable Navigation


And if you need to have the popup window be a certain size (or with no
location bar, buttons, etc) you can open the window with JavaScript.  See
here for more info:

   http://developer.irt.org/script/90.htm

Your link could then be something like this:

a
href=javascript:window.open('/pathTo/myAction.do','myPopup','scrollbars=yes
,status=yes,width=300,height=300')Click here to get a popup of results
from your action/a

You might also look around here for everything you (n)ever wanted to know
about windows and javascript:

   http://developer.irt.org/script/window.htm

chris

 -Original Message-
 From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 12, 2002 5:05 PM
 To: Struts Users Mailing List
 Subject: RE: FW: Disable Navigation
 
 
 Eddie's technically right, but I think you meant:  
 
 How do I make one of my links go through an action class and 
 popup the results in a new window?  
 
 ...and the answer is:
 
 
 a href=/pathTo/myAction.do target=myPopup Click here to 
 get a popup of results from your action/a
 
 
 You can conditionally output a popup or non-popup version of 
 the link using logic:equal or logic:present tags if that's 
 what you want to do.
 
 
 peace,
 Joe
 
  -Original Message-
  From: Eddie Bush [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 12, 2002 3:02 PM
  To: Struts Users Mailing List
  Subject: Re: FW: Disable Navigation
  
  
  Not possible.  You'll have to use javascript to do that --- 
  or a target 
  on the link to something other than _top.
  
  Regards,
  
  Eddie
  
  Cohan, Sean wrote:
  
  BTW, how do I make the password page popup in a new window 
  from an action
  class?
  
  Thanks.
  
  
  
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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

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




Recognizing Cancel Button over Submit Button

2002-09-10 Thread Cohan, Sean

I am sure this a newbie question, but how can I determine that the cancel
button (html:cancel) was clicked instead of the submit button (html:submit)
using an html:form.  They both end up in the same method of my
DispatchAction?  Thanks.

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




RE: Recognizing Cancel Button over Submit Button

2002-09-10 Thread Cohan, Sean

Thanks, Eddie.  It looks exactly what I'm looking for.  

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 1:43 PM
To: Struts Users Mailing List
Subject: Re: Recognizing Cancel Button over Submit Button


http://www.husted.com/struts/tips

There was a recent commit to make ImageButtonBean a piece of struts.  I 
*think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to 
find it).  I *think* if you look at Ted's tip #1, you'll find what 
you're looking for.  Maybe I misunderstand your requirements though.

Regards,

Eddie

Cohan, Sean wrote:

Thanks, but what if I want to use html:image and don't want the
bean:message
tag to display text on the page?

I should have mentioned that in the first email.  What I really is two
image
buttons within the same form.  Can I have them go to the same action class
where I can know which button was pressed and perform different actions
accordingly?  




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




Tip #1

2002-09-10 Thread Cohan, Sean

Should we be extending ActionForm for this tip?  

I'm guessing yes since the sample Action code was listed as:

String selected = ((myForm) form).getSelected();

if (Constants.CANCEL.equals(selected)) ...


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 1:43 PM
To: Struts Users Mailing List
Subject: Re: Recognizing Cancel Button over Submit Button


http://www.husted.com/struts/tips

There was a recent commit to make ImageButtonBean a piece of struts.  I 
*think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to 
find it).  I *think* if you look at Ted's tip #1, you'll find what 
you're looking for.  Maybe I misunderstand your requirements though.

Regards,

Eddie

Cohan, Sean wrote:

Thanks, but what if I want to use html:image and don't want the
bean:message
tag to display text on the page?

I should have mentioned that in the first email.  What I really is two
image
buttons within the same form.  Can I have them go to the same action class
where I can know which button was pressed and perform different actions
accordingly?  




--
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: Tip #1

2002-09-10 Thread Cohan, Sean

NeverMind.  Brain freeze.

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 2:57 PM
To: 'Struts Users Mailing List'
Subject: Tip #1


Should we be extending ActionForm for this tip?  

I'm guessing yes since the sample Action code was listed as:

String selected = ((myForm) form).getSelected();

if (Constants.CANCEL.equals(selected)) ...


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 1:43 PM
To: Struts Users Mailing List
Subject: Re: Recognizing Cancel Button over Submit Button


http://www.husted.com/struts/tips

There was a recent commit to make ImageButtonBean a piece of struts.  I 
*think* it will live in o.a.s.util.ImageButtonBean (browse the JAR to 
find it).  I *think* if you look at Ted's tip #1, you'll find what 
you're looking for.  Maybe I misunderstand your requirements though.

Regards,

Eddie

Cohan, Sean wrote:

Thanks, but what if I want to use html:image and don't want the
bean:message
tag to display text on the page?

I should have mentioned that in the first email.  What I really is two
image
buttons within the same form.  Can I have them go to the same action class
where I can know which button was pressed and perform different actions
accordingly?  




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




html:image pageKey

2002-09-10 Thread Cohan, Sean

I'm having trouble trying to use html:image pagekey=... /  Am I using the
correct syntax?  In my jsp I have:

   html:image pageKey=login.image/

and in my ApplicationResources.properties I have:

login.image=/images/login.gif

In my struts_config.xml I have:

  message-resources
parameter=gov.doc.bis.ecass2k.ui.struts.ApplicationResources/

and in my web.xml I have:

servlet
servlet-nameaction/servlet-name
 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
   param-nameapplication/param-name
 
param-valuegov.doc.bis.ecass2k.ui.struts.ApplicationResources/param-value

/init-param

Thanks.

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




RE: Two Phase ActionClass

2002-09-09 Thread Cohan, Sean

Craig, I greatly appreciate you taking the time to provide such a detailed
answer.  This is a tremendous help.  Thanks.

-Original Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 06, 2002 11:01 PM
To: [EMAIL PROTECTED]
Subject: Re: Two Phase ActionClass


Sean, not sure if I would recycle the login page to show the warning, 
instead I would have another page called loginWarning.jsp which showed them 
a message and then presented a Continue and Cancel button.  The Continue 
button would send them back to the logon Action class and the Cancel button 
would simply be a link back to the login.jsp page.

However, I would change my Action class to a DispatchAction class and setup 
things like they have in the DispatchAction API doc, in your case, something

like this:

action path=/loginUser
   type=my.package.LoginUserAction
   name=subscriptionForm
   scope=request
   input=/login.jsp
   parameter=action

   forward name=warn path=/loginWarning.jsp/
   forward success path=afterLogin.jsp/
/action

I would then have two jsps, one for logging in (login.jsp) and then the one 
for warning (loginWarning.jsp), and I would code my DispatachAction class as

follows:

import org.apache.struts.action.DispatchAction;

public class LoginUserAction extends DispatchAction {
//have one method named for each possible function name you will be
//passing in the action parameter

//invoked when our Action class is called with action=showWarningIfNecessary
public ActionForward showWarningIfNecessary(ActionMapping mapping, 
ActionForm form, HttpServletRequest request, HttpServletResponse response) 
throws Exception
{
   //if the user is already logged in
   //return mappings.findForward(warning);
   //else return mappings.findForward(success);
}

//invoked when our Action class is called with action=continue
public ActionForward continue(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws Exception
{
   return mappings.findForward(success);
}

}

In login.jsp, you would have a hidden form field with a name of action and

a value of showWarningIfNecessary:

html:hidden name=action value=showWarningIfNecessary/

In loginWarning.jsp your continue button could just be a link to:
loginUser.do?action=continue (or you could have a hidden field named action 
like in login.jsp, but the value would be continue)

And your cancel button could be a link to:
login.jsp

If you read the API doc on DispatchAction, this will all make sense.

Hope that helped!

Craig.

From: Cohan, Sean [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Two Phase ActionClass
Date: Fri, 6 Sep 2002 20:14:37 -0400

Within my logon ActionClass, I want to check the user's user id/password 
and
whether they are currently logged on anywhere else.  If they are logged on
elsewhere, I want to go back to the logon page to warn them and give them a
chance to continue or to bail.  If they continue, I want to skip over the
check whether they are logged on elsewhere.  I'm struggling with how from 
my
logon.jsp page I can instruct the logon action to one thing one time and
another thing another time.  I was thinking maybe the ActionMapping
parameter, but I don't really know how to use it.  I'm searching.  Can
someone give me a good way to do what I'm trying to do?  Should I go to a
different ActionClass instead of trying to use the same one?

Also, I was going to return the warning to the user in ActionErrors.  Is
there a way I can poll the error from the jsp (logic tag?) and then if it's
this warning put a yes/no form on the logon page?  Or should I warn them on
a different page?  I do want other ActionErrors to display without the
yes/no form (e.g., username required.)  Thanks.

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



Craig W. Tataryn
Programmer/Analyst
Compuware

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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

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




RE: Two Phase ActionClass

2002-09-09 Thread Cohan, Sean

After clicking on continue on the loginWarning.jsp page, I no longer have
the username and password fields that are validated in the validate method
of the loginForm.  How should I make this available?  Thanks.

-Original Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 06, 2002 11:01 PM
To: [EMAIL PROTECTED]
Subject: Re: Two Phase ActionClass


Sean, not sure if I would recycle the login page to show the warning, 
instead I would have another page called loginWarning.jsp which showed them 
a message and then presented a Continue and Cancel button.  The Continue 
button would send them back to the logon Action class and the Cancel button 
would simply be a link back to the login.jsp page.

However, I would change my Action class to a DispatchAction class and setup 
things like they have in the DispatchAction API doc, in your case, something

like this:

action path=/loginUser
   type=my.package.LoginUserAction
   name=subscriptionForm
   scope=request
   input=/login.jsp
   parameter=action

   forward name=warn path=/loginWarning.jsp/
   forward success path=afterLogin.jsp/
/action

I would then have two jsps, one for logging in (login.jsp) and then the one 
for warning (loginWarning.jsp), and I would code my DispatachAction class as

follows:

import org.apache.struts.action.DispatchAction;

public class LoginUserAction extends DispatchAction {
//have one method named for each possible function name you will be
//passing in the action parameter

//invoked when our Action class is called with action=showWarningIfNecessary
public ActionForward showWarningIfNecessary(ActionMapping mapping, 
ActionForm form, HttpServletRequest request, HttpServletResponse response) 
throws Exception
{
   //if the user is already logged in
   //return mappings.findForward(warning);
   //else return mappings.findForward(success);
}

//invoked when our Action class is called with action=continue
public ActionForward continue(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws Exception
{
   return mappings.findForward(success);
}

}

In login.jsp, you would have a hidden form field with a name of action and

a value of showWarningIfNecessary:

html:hidden name=action value=showWarningIfNecessary/

In loginWarning.jsp your continue button could just be a link to:
loginUser.do?action=continue (or you could have a hidden field named action 
like in login.jsp, but the value would be continue)

And your cancel button could be a link to:
login.jsp

If you read the API doc on DispatchAction, this will all make sense.

Hope that helped!

Craig.

From: Cohan, Sean [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Two Phase ActionClass
Date: Fri, 6 Sep 2002 20:14:37 -0400

Within my logon ActionClass, I want to check the user's user id/password 
and
whether they are currently logged on anywhere else.  If they are logged on
elsewhere, I want to go back to the logon page to warn them and give them a
chance to continue or to bail.  If they continue, I want to skip over the
check whether they are logged on elsewhere.  I'm struggling with how from 
my
logon.jsp page I can instruct the logon action to one thing one time and
another thing another time.  I was thinking maybe the ActionMapping
parameter, but I don't really know how to use it.  I'm searching.  Can
someone give me a good way to do what I'm trying to do?  Should I go to a
different ActionClass instead of trying to use the same one?

Also, I was going to return the warning to the user in ActionErrors.  Is
there a way I can poll the error from the jsp (logic tag?) and then if it's
this warning put a yes/no form on the logon page?  Or should I warn them on
a different page?  I do want other ActionErrors to display without the
yes/no form (e.g., username required.)  Thanks.

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



Craig W. Tataryn
Programmer/Analyst
Compuware

_
Chat with friends online, try MSN Messenger: http://messenger.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]




DB hit from ActionForm Validate method

2002-09-06 Thread Cohan, Sean

We need to implement '3 strikes and your out' functionality to our logon
process.  If the user is unsuccessful after 3 logon attempts, we disable
their account.  I put some of the user id / password functionality in the
validate method of the LogonForm class.  However, in between each attempt, I
need find out what number of logon attempt they are on, and if this is not
their 3rd attempt, bump up the logon attempt number. If it's their second
attempt and they fail, I  need to let them know they only have 1 ore chance
to get it right.  If they successfully logon, we also need to show them how
many attempts it took them to logon the last time their account was
accessed.  

We were thinking we'd store their current and previous logon attempt number
in the DB.  My question is whether it is acceptable or common practice to
access the DB from the validate method or should DB access only be done in
the LogonAction class (which means I'd move the perform functionality to the
LogonAction class)?  

Thanks.


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




Two Phase ActionClass

2002-09-06 Thread Cohan, Sean

Within my logon ActionClass, I want to check the user's user id/password and
whether they are currently logged on anywhere else.  If they are logged on
elsewhere, I want to go back to the logon page to warn them and give them a
chance to continue or to bail.  If they continue, I want to skip over the
check whether they are logged on elsewhere.  I'm struggling with how from my
logon.jsp page I can instruct the logon action to one thing one time and
another thing another time.  I was thinking maybe the ActionMapping
parameter, but I don't really know how to use it.  I'm searching.  Can
someone give me a good way to do what I'm trying to do?  Should I go to a
different ActionClass instead of trying to use the same one?

Also, I was going to return the warning to the user in ActionErrors.  Is
there a way I can poll the error from the jsp (logic tag?) and then if it's
this warning put a yes/no form on the logon page?  Or should I warn them on
a different page?  I do want other ActionErrors to display without the
yes/no form (e.g., username required.)  Thanks.

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




Newbie with App Resources

2002-09-05 Thread Cohan, Sean

I'm trying retrieve some text from the AppplicationResources.properties file
and put it on my index.jsp page.  How do I do this?  I can't find the
answer.  Thanks.

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




Newbie on image

2002-09-05 Thread Cohan, Sean

This must be a no-brainer, but I'm not real familiar with where to look for
things yet.  

I'd like to use a gif for a submit pushbutton.  I think I use the
html:image tag and specify the gif with the src property.  Correct?  How
do I specify what the action should be when clicked - I want it to perform
the submit action of the html:form?  Thanks.

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




Struts advantages, Struts alternatives

2002-09-04 Thread Sullivan, Sean C - MLG

My employer needs to decide if we should choose Struts 
as the standard Web/MVC framework for our company.

Jakarta Struts
==

 http://jakarta.apache.org/struts/

Struts advantages:
==

1) large user base
2) momentum
3) mindshare
4) has an active development team
5) is a Jakarta project
6) good documentation


Alternatives to Struts:
===


Barracuda

http://barracuda.enhydra.org/


article:  Barracuda versus other frameworks
http://barracuda.enhydra.org/cvs_source/Barracuda/docs/landscape.html


WebWork

http://www.theserverside.com/home/thread.jsp?thread_id=15137

http://www.opensymphony.com/webwork/


Tea (from Disney / Starwave )

http://opensource.go.com/

http://www-106.ibm.com/developerworks/java/library/wa-tea1.html


Other resources:


Jason Hunter's article: The Problems with JSP

 http://www.servlets.com/soapbox/problems-jsp.html

Wafer project

 http://www.waferproject.org/




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




RE: template

2002-09-02 Thread Sean Gay

Hey Kevin,

I think I know what is going on here.

When you are doing template:put name='header' content='/welcome.html'
direct='true'/ you are using direct=true which directly outputs the string
/welcome.html as the file to be used for the header. This would mean that
any contextPath that you have for your server is not being applied and as
such no file can be found as it is looking for it in the root of your web
server.

I think that what you should be using is something like the following which
will include the file rather than just outputting the string. template:put
name='header' content='/welcome.html'/

The same would apply for the content.

Hopefully this solves your problem. I usually only create separate files if
they are going to be used over multiple pages, such as navigation, page
headers etc. You could also do something like this to save having
superfluous files lying around.

template:put name='content'
INSERT YOUR PAGE CONTENT IN HERE
/template:put

Regards,
Sean

-Original Message-
From: Keven [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 8:48 AM
To: Struts Users Mailing List
Subject: template


Hi, All:

I have a template jsp called template.jsp. The content of template.jsp is:

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

html
head
titletemplate:get name='title'//title
/head

frameset  rows=20%,*

  FRAME src=template:get name='header' flush='true'/
  FRAME src=template:get name='content' flush='true'/

/frameset
/html

I have another jsp file called  index.jsp which uses the template.jsp. The
content of index.jsp is:

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

template:insert template='/template.jsp'

  template:put name='title' content='Templates' direct='true'/
  template:put name='header' content='/welcome.html' direct='true'/
  template:put name='content' content='/tour.html' direct='true' /
/template:insert

Whenever I tried to run it in tomcat, I got
Apache Tomcat/4.0.4 - HTTP Status 404 - /welcome.html

type Status report

message /Welcome.html

description The requested resource (/Welcome.html) is not available.


Apache Tomcat/4.0.4 - HTTP Status 404 - /tour.html

type Status report

message /tour.html

description The requested resource (/tour.html) is not available.



I got the above messages in different frame.I don't know what cause the
problem. Some one knows how to fix it?

Thank you very much

Keven






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




  1   2   >