RE: Validation of user input depending upon the user locale.

2003-07-08 Thread Andrew Hill
Yep. Your Japanese users are sure gonna love that feature when they try to
enter the names of their German clients into the application (or whatever).

-Original Message-
From: Sagar A. Phanse [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 July 2003 14:32
To: [EMAIL PROTECTED]
Subject: Validation of user input depending upon the user locale.


Hi!
I need some help.
I have a textfield in my JSP where user can enter the text.
Now I wanted to validate the user entered text into the textfield such that
when jsp-form is submitted it will let only those characters to be entered
in the textfield which are
belonging to the language/locale of the user.. Depending upon the user
locale.
E.g. If user is in Japanese Locale and if user enters ä or ü (german
characters) it should be validated giving an error.
Is there any fascility available in struts for this?
If there is any other way than struts to achive this, even then do let me
know.

-Thanks in Advance
Sagar





*--
This message and any attachment(s) is intended only for the use of the
addressee(s) and may contain information that is PRIVILEGED and
CONFIDENTIAL. If you are not the intended addressee(s), you are hereby
notified that any use, distribution, disclosure or copying of this
communication is strictly prohibited. If you have received this
communication in error, please erase all copies of the message and its
attachment(s) and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and
not of Kanbay.

Although we have taken steps to ensure that this e-mail and any
attachment(s) are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.



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



Re: Refreshing screens

2003-07-08 Thread Nagendra Kumar O V S








  hi,
  1. first thing u need to do is turn off the client caching by setting 
  nocache=true in the controller element of the struts-config file
  2. if this does't solve ur problem, pl check if ur updating the 
  records in the scope after updating to the datasource.
   
  -- nagi
   
   
   
  ---Original Message---
   
  
  From: Struts Users Mailing 
  List
  Date: Wednesday, July 
  09, 2003 11:58:21 AM
  To: 'Struts Users Mailing 
  List'
  Subject: Refreshing 
  screens
   HiThis is a question about the best practice 
  followed when refreshingscreens to reflect new data in the 
  database.1. View 1 has a 'search' button.2. The searched 
  records are displayed with a hyperlink for editingthem.3. The edit 
  page opens a new JSP. After editing the first page isshown 
  again.4. The edited values will not be reflected until the 'search' 
  buttonis clicked another time in the first page. The records are in 
  the scope inthe presentation tier.What is the popular practice 
  for this ? It is something like yahoomail that doesn't refresh the 
  screenautomatically.Do I call the same 'search' action every 
  time I edit a record sothat the user need not click the button 
  ?Mohan-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




  IncrediMail - 
Email has finally evolved - Click 
Here



Re: Workflow engine status

2003-07-08 Thread Matthias Bauer
Seems like we are about to start a flame war on this ;-)

It didn't say that this is a workflow engine. I just tried to point 
Kevin to a this extension because it might cover what he is looking for.

--- Matthias





JavaXML Developer wrote:

Its a workflow extension NOT engine.

*/Sandeep Takhar <[EMAIL PROTECTED]>/* wrote:

That is not a workflow engine per se.

sandeep
--- Matthias Bauer
wrote:
> I don't think that there has been anybody working on
> this proposal for
> several months. It is definitely not part of the
> latest Struts releases.
>
> Depending on what your requirements are, you might
> want to have a look
> at the Struts Workflow Extension at
> http://www.livinglogic.de/Struts .
>
> --- Matthias
>
>
> Kevin K wrote:
>
> >I was looking at Jakarta for a workflow engine and
> I
> >found this URL -
>
>http://jakarta.apache.org/struts/proposal-workflow.html.
> >What I can't find is when this proposal was written
> >and if this workflow engine is included in the
> latest
> >releas e of Struts.
> >
> >Thanks for your help,
> >Kevin
> >
> >__
> >Do you Yahoo!?
> >SBC Yahoo! DSL - Now only $29.95 per month!
> >http://sbc.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!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Do you Yahoo!?
SBC Yahoo! DSL 
 
- Now only $29.95 per month! 




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


Validation of user input depending upon the user locale.

2003-07-08 Thread Sagar A. Phanse
Hi!
I need some help.
I have a textfield in my JSP where user can enter the text.
Now I wanted to validate the user entered text into the textfield such that when 
jsp-form is submitted it will let only those characters to be entered in the textfield 
which are 
belonging to the language/locale of the user.. Depending upon the user locale.
E.g. If user is in Japanese Locale and if user enters ä or ü (german characters) it 
should be validated giving an error.
Is there any fascility available in struts for this?
If there is any other way than struts to achive this, even then do let me know.

-Thanks in Advance
Sagar

 



*--
This message and any attachment(s) is intended only for the use of the addressee(s) 
and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the 
intended addressee(s), you are hereby notified that any use, distribution, disclosure 
or copying of this communication is strictly prohibited. If you have received this 
communication in error, please erase all copies of the message and its attachment(s) 
and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and not of 
Kanbay.

Although we have taken steps to ensure that this e-mail and any attachment(s) are free 
from any virus, we advise that in keeping with good computing practice the recipient 
should ensure they are actually virus free.



Refreshing screens

2003-07-08 Thread Mohan Radhakrishnan
Hi

This is a question about the best practice followed when refreshing
screens to reflect new data in the database.


1. View 1 has a 'search' button.
2. The searched records are displayed with a hyperlink for editing
them.
3. The edit page opens a new JSP. After editing the first page is
shown again.
4. The edited values will not be reflected until the 'search' button
is clicked another time in the first page. The records are in the scope in
the presentation tier.

What is the popular practice for this ? It is something like yahoo
mail that doesn't refresh the screen
automatically.

Do I call the same 'search' action every time I edit a record so
that the user need not click the button ?

Mohan







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



Re: how to access tiles defs in inserted jsp ?

2003-07-08 Thread Michael Muller
After another evening of flailing, I managed to make this work in a 
rather inelegant way:

In "myPageTemplate.jsp", I added this tag:



and I changed "myBodyImpl.jsp" to say:

foo = <%= request.getAttribute("foo") %>

This works, but I'mnot very happy with it.  Does anyone have a better 
solution?

  -- Mike

Michael Muller wrote:

i tried this, and got the following error in my jsp:

Error - tag.getAsString : attribute 'foo' not found in context. Check 
tag syntax'

I had to change the tag to say



since attribute is not an attribute of getAsString.

  -- Mike

Hibbs, David wrote:

Sneaky little issue on this one.  Try the following...

in tiles-defs.xml change

to

and in myBodyImpl.jsp change
foo = 
to
foo = 
David Hibbs
Staff Programmer / Analyst
Distributed Applications Development and Support
American National Insurance Company

-Original Message-
From: Michael Muller [mailto:[EMAIL PROTECTED]
Sent: Monday, July 07, 2003 11:11 PM
To: Struts Users Mailing List
Subject: how to access tiles defs in inserted jsp ?


How do I access the value of a tiles setting from a JSP that is 
inserted into a template?  For instance, in the following scenario, I 
want a rendering of "myTilesPageDef" to say "foo = bar", but 
it just says "foo = ".  I've tried some ugly hacks, which in 
addition to be ugly, didn't work.

Help!

Thanks,

  -- Mike

tiles-defs.xml:

  


  
myPageTemplate.jsp:

  

myBodyImpl.jsp:

  foo = 







**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**




-
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: Tag inside a tag

2003-07-08 Thread Kishan . Bisht

My apologies, It works (the text is disabled) although it prints
disabled="disabled">

Thanks guys

Kishan




[EMAIL PROTECTED] on 09/07/2003 14:55:02

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:"Struts Users Mailing List" <[EMAIL PROTECTED]>
cc:

Subject:Re: Tag inside a tag


Kris, the solution of using equal tag is not working. The html in the page
displayed has following text



I do not know why it is writing disabled="disabled"when I am giving it
disabled="true" in the struts html text tag like


   


It is not able to convert properly the struts html tag to html tag.

Any ideas.

Thanks

Kishan





Kris Schneider <[EMAIL PROTECTED]> on 09/07/2003 12:26:51

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:Struts Users Mailing List <[EMAIL PROTECTED]>
cc:

Subject:Re: Tag inside a tag

But you've still got a few choices:

Standard Struts w/logic tags:

   


   


Standard Struts w/request-time expression:


Struts-EL:


And probably a few others...

David Graham wrote:
> --- [EMAIL PROTECTED] wrote:
>
>>Is it a limitation of HTML or struts tag implementation?
>>Does struts 1.1 solve this issue (JSTL or otherwise).
>
>
> It has nothing to do with HTML or Struts.  This is a syntax error
> according to the JSP spec which means that no tag library can use a tag
as
> another tag's attribute value.
>
> David
>
>
>>Kishan
>>
>>
>>
>>
>>
>>"Benjamin Stewart" <[EMAIL PROTECTED]> on 09/07/2003 11:39:09
>>
>>Please respond to "Struts Users Mailing List"
>>   <[EMAIL PROTECTED]>
>>
>>To:"Struts Users Mailing List" <[EMAIL PROTECTED]>
>>cc:
>>
>>Subject:Re: Tag inside a tag
>>
>>you cant use tags inside tags... I discovered this recently :-( There
>>are
>>ways around it using jstl etc.
>>
>>[EMAIL PROTECTED] writes:
>>
>>
>>>Hi,
>>>
>>>Can I specify a disabled attribute of a text tag using another tag.
>>>
>>>For example:
>name="form" property="textDisabled" value="yes">disabled
>>>/>
>>>
>>>Here I have to disable the text depending upon the property
>>>"textDisabaled". The above thing is not working.
>>>
>>>Has anyone tried this thing before. I am using struts 1.02.
>>>
>>>Thanks in advance,
>>>
>>>Kishan

--
Kris Schneider 
D.O.Tech   



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












NOTICE - This message is intended only for the use of the
addressee named above and may contain privileged and
confidential information.  If you are not the intended recipient
of this message you are hereby notified that you must not
disseminate, copy or take any action based upon it.  If you
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.



-
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: how to access tiles defs in inserted jsp ?

2003-07-08 Thread Michael Muller
i tried this, and got the following error in my jsp:

Error - tag.getAsString : attribute 'foo' not found in context. Check 
tag syntax'

I had to change the tag to say



since attribute is not an attribute of getAsString.

  -- Mike

Hibbs, David wrote:

Sneaky little issue on this one.  Try the following...

in tiles-defs.xml change

to

and in myBodyImpl.jsp change
foo = 
to
foo = 
David Hibbs
Staff Programmer / Analyst
Distributed Applications Development and Support
American National Insurance Company

-Original Message-
From: Michael Muller [mailto:[EMAIL PROTECTED]
Sent: Monday, July 07, 2003 11:11 PM
To: Struts Users Mailing List
Subject: how to access tiles defs in inserted jsp ?


How do I access the value of a tiles setting from a JSP that 
is inserted 
into a template?  For instance, in the following scenario, I want a 
rendering of "myTilesPageDef" to say "foo = bar", but it just 
says "foo = ".  I've tried some ugly hacks, which in 
addition to 
be ugly, didn't work.

Help!

Thanks,

  -- Mike

tiles-defs.xml:

  


  
myPageTemplate.jsp:

  

myBodyImpl.jsp:

  foo = 







**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**




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


How to build a paging view(first/previous/next/last) within struts?

2003-07-08 Thread leonZ
I use the iterate tag to show the records set. But is there any good way to
show the records in several pages and with first,previous,next,last button
in each pages?





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



RE: readonly - select box

2003-07-08 Thread sriram
I don't think  supports "readOnly".
That's the reason why we need to use hidden variable to store the current value of 



-Original Message-
From: leonZ [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2003 8:35 AM
To: [EMAIL PROTECTED]
Subject: Re: readonly - select box


Why don't u use the "readOnly" instead of "disabled"?
That's not necessary to use the hidden input in this case.

"sriram" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> How to make a  readonly (not disabled).
>
> For , I can use 'readonly' but this does not exist for

>
> Any suggestions? Please inform.
>
>




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


RE: PAC pattern (Presentation-Abstraction-Controller)

2003-07-08 Thread Navjot Singh
correct me if i am wrong but here are my $ 0.02 --

In PAC - presentation is dumb. It can't make callbacks to model layer.
Responsibility of controller is higher to prepare the entire presentation
and then throw back.
In MVC - presentation has accces to model.

-navjot

|-Original Message-
|From: Dos Santos [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, July 08, 2003 11:01 PM
|To: Struts Users Mailing List
|Subject: Re: PAC pattern (Presentation-Abstraction-Controller)
|
|
|Are you sure? I've read papers published by the author
|of PAC and she states that they are different.
|
|PAC has a controller between the abstraction and the
|interface (presentation). MVC has 2 interfaces (View
|and Controller) both of which interact with the
|abstraction (Model). I think that conceptually they
|are different.
|
|What do you think?
|
|--- Carlos Duque <[EMAIL PROTECTED]> wrote:
|> Aren't these synonymous?  Back in the day when MVC
|> was intended to model a
|> GUI there might have been a real distinction, but
|> the two have morphed into
|> one pattern usually under the MVC label.  But they
|> are one and the same today.
|>
|> Carlos
|>
|> At 10:17 AM 7/8/2003, you wrote:
|> >Hi! I was wondering if anybody has info regarding
|> the
|> >PAC pattern being implemented using Struts.
|> >
|> >I know Struts is oriented towards the MVC pattern
|> but
|> >I would like to know what you think about using it
|> for
|> >PAC purposes.
|> >
|> >I truly appreciate your help.
|> >
|> >Regards.
|> >
|> >__
|> >Do you Yahoo!?
|> >SBC Yahoo! DSL - Now only $29.95 per month!
|> >http://sbc.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!?
|SBC Yahoo! DSL - Now only $29.95 per month!
|http://sbc.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]



Re: Tag inside a tag

2003-07-08 Thread Kishan . Bisht

Kris, the solution of using equal tag is not working. The html in the page
displayed has following text



I do not know why it is writing disabled="disabled"when I am giving it
disabled="true" in the struts html text tag like


   


It is not able to convert properly the struts html tag to html tag.

Any ideas.

Thanks

Kishan





Kris Schneider <[EMAIL PROTECTED]> on 09/07/2003 12:26:51

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:Struts Users Mailing List <[EMAIL PROTECTED]>
cc:

Subject:Re: Tag inside a tag

But you've still got a few choices:

Standard Struts w/logic tags:

   


   


Standard Struts w/request-time expression:


Struts-EL:


And probably a few others...

David Graham wrote:
> --- [EMAIL PROTECTED] wrote:
>
>>Is it a limitation of HTML or struts tag implementation?
>>Does struts 1.1 solve this issue (JSTL or otherwise).
>
>
> It has nothing to do with HTML or Struts.  This is a syntax error
> according to the JSP spec which means that no tag library can use a tag
as
> another tag's attribute value.
>
> David
>
>
>>Kishan
>>
>>
>>
>>
>>
>>"Benjamin Stewart" <[EMAIL PROTECTED]> on 09/07/2003 11:39:09
>>
>>Please respond to "Struts Users Mailing List"
>>   <[EMAIL PROTECTED]>
>>
>>To:"Struts Users Mailing List" <[EMAIL PROTECTED]>
>>cc:
>>
>>Subject:Re: Tag inside a tag
>>
>>you cant use tags inside tags... I discovered this recently :-( There
>>are
>>ways around it using jstl etc.
>>
>>[EMAIL PROTECTED] writes:
>>
>>
>>>Hi,
>>>
>>>Can I specify a disabled attribute of a text tag using another tag.
>>>
>>>For example:
>name="form" property="textDisabled" value="yes">disabled
>>>/>
>>>
>>>Here I have to disable the text depending upon the property
>>>"textDisabaled". The above thing is not working.
>>>
>>>Has anyone tried this thing before. I am using struts 1.02.
>>>
>>>Thanks in advance,
>>>
>>>Kishan

--
Kris Schneider 
D.O.Tech   



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












NOTICE - This message is intended only for the use of the 
addressee named above and may contain privileged and 
confidential information.  If you are not the intended recipient
of this message you are hereby notified that you must not 
disseminate, copy or take any action based upon it.  If you 
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.



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



Basic Code for Indexed Properties

2003-07-08 Thread Ajay Patil
>> I know this question would have been posted earlier also.
>> I want to know how to work with the indexed form fields and their 
>> property in the action form class.
>> Any link or ample code will be helpful.

>> Anurag Garg

Dear Anurag,

I have pasted the basic code that you need in the JSP, 
Form and Bean class to implement indexed properties.

This will show a page with dynamic number of textboxes and
For each textbox, it will get/set the particular property
within your collection of beans that is inside your form.

HTH,
Ajay

JSP Page









Form Class
--

public ArrayList getIndexedBeans() {
  return this.myBeans;
}

// THIS METHOD IS REQUIRED IF YOUR FORM IS OF REQUEST SCOPE.
public MyBean getIndexedBeans(int index) {

  while (this.myBeans.size() < index) 
this.myBeans.add(new MyBean());

  return (MyBean) this.myBeans.get(index);
}

Bean Class
--

public class MyBean {
  private String prop1;
  private String prop2;
  
  public String getProp1() { 
   return prop1; 
  }
  
  public void setProp1(String prop1) {
   this.prop1 = prop1:
  }

  public String getProp1() {
   return this.prop2;
  }

  public void   setProp2(String prop2) {
this.prop2 = prop2;
  }
}


Ajay Patil
Vertex Software Pvt. Ltd.
[EMAIL PROTECTED]
http://www.vertex.co.in



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



Error with validator-rules.xml - No stream could be opened

2003-07-08 Thread sriram
I am trying to use validator with validator-rules.xml (for struts1.0). When I deploy 
the .ear file on JBoss, I'm getting the following error: 

10:07:15,247 INFO  [Engine] validator: Skipping validation rules file from '/WEB 
-INF/validator-rules.xml'.  No stream could be opened.

I tried removing lot of code in validator-rules.xml and finally to test it I've 
removed almost all the code. Here is the code contained in validator-rules.xml:


   
  

  
   


Still I'm getting the same error. Any idea how to get rid of this will be helpful to 
me.

Sriram


RE: readonly - select box

2003-07-08 Thread sriram
I am trying to use validator with validator-rules.xml (for struts1.0). When I deploy 
the .ear file on JBoss, I'm getting the following error: 

10:07:15,247 INFO  [Engine] validator: Skipping validation rules file from '/WEB
-INF/validator-rules.xml'.  No stream could be opened.

I tried removing lot of code in validator-rules.xml and finally to test it I've 
removed almost all the code.
Here is the code contained in validator-rules.xml:


   
  

  
   


Still I'm getting the same error. Any idea how to get rid of this will be helpful to 
me.

Sriram


Multibox over a collection

2003-07-08 Thread Sussu Struts
Hello,
 
I have read thru the archives on this topic and want to know is there a way of using 
multibox over a collection . All that every one put as example is from Ted's tip , 
which uses a string buffer(which has item as string array etc etc)
My problem is that I have a table in which every row is a object of a formbean and has 
checkbox on the left which is a column of the table. So every row of the table has a 
checkbox. Iam populating the table using the iterate tag over a Arraylist. Now problem 
is getting the row which a user select back in action class for further processing.
 
pls. help and thanks in advance
 
Thanks 
Sushil 
 
PS:- Btw I read in one of the mail that Struts doesnot support multibox over 
collection and work only against a arrayis it true!!!



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Design question: Confirm action after validation ?

2003-07-08 Thread Ajay Patil
Hello,

In my Struts application, the validation is done on server-side 
for every page. If the validation is successful, the user would
like to see a page to confirm his action. The Confirm page should
also have a Cancel button allowing him to go back to the previous
page showing the data entered so far.

This functionality is needed for every action.

I am thinking if there is a generic way by which I can achieve this
functionality. 

I also realize that I might end up making scope=session for
every form, in trying to implement this requirement. (and I am
worried about this too).

Any ideas, pointers and/or thoughts will be very useful.

Ajay


Ajay Patil
Vertex Software Pvt. Ltd.
[EMAIL PROTECTED]
http://www.vertex.co.in



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



NestedIterateTag won't let go of collection

2003-07-08 Thread Sri Sankaran
Using: Struts 1.1
Servlet Container: Tomcat 4.1.24

In the process of studying the memory footprint of my application, I found that 
certain objects were not getting garbage collected even though there were no apparent 
references.  The biggest culprit was a rather large collection that was being 
displayed using .  

I am mentioning *how* it is being displayed only because JProbe revealed that the 
reason the collection isn't getting free'd is because the associated NestedIterateTag 
object was maintaining a reference to it - even after the user session was 
invalidated.  

I realize that this may not be Struts-issue per se but one of how Tomcat manages 
(reuses) tags.  Have you seen such behavior and is there a way to coerce tag to free 
the application object?

Thanks

Sri

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



Two questions (MySQL Pooling and ActionForm)

2003-07-08 Thread Ali . Naddaf
Hello everyone.
I am new to struts. I have the following two questions:

(1) About MySQL DataSource Pooling: I have set up my struts-config.xml 
like the following:

   
 
 
 
 
 
 
 
 
   
 
and I am using "mysql-connector-java-3.0.8-stable-bin.jar" driver. All is 
good and I can access my pool but when I leave my application overnight, 
the next morning I get an exception, when it wants to use the pool. The 
README file coming with the above driver says that the "stale" connections 
die after 8 hours and suggested to add the attribute "autoReconnect=true" which I did 
but am still getting the same result. Does anyone have any 
suggestion? 

(2) I have an ActionForm which has a checkbox. This checkbox is supposed 
to reflect the state of a boolean attribute in a certain database. I have 
an "student" instance (of a class Student)which is saved to the session 
and student.getStatus() returns the current state. Anyhow, what I want to 
do is the following: when I access the JSP page  which is associated with 
that ActionForm true the form-tag action, I want the checkbox to show the 
status based on the student.getStatus(). At the same time, when I toggle 
the checkbox, and click on submit, I want the database to be updated. The 
problem that I see is that 
(a) If I use the reset(...) method of the ActionForm to say something 
like:
this.status = ((Student) 
request.getSession().getAttribute("student")).getStatus();
then on opening the jsp page for the first time, I get the correct state 
for my checkbox but when I toggle that and submit, it doesn't really 
accept my new state
(b) On the other hand, if in that reset() method, I simply say:
this.status = false;
then the first time I access the page, it is always unchecked but toggling 
that and submitting the form does update the database.

So what is the proper way of doing this? My ActionForm is different from 
my "entity" (i.e. "student") since they had many stuff which were not 
common between them.

Any help is greatly appreciated.
Thanks,
Ali.


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



Re: readonly - select box

2003-07-08 Thread leonZ
Why don't u use the "readOnly" instead of "disabled"?
That's not necessary to use the hidden input in this case.

"sriram" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How to make a  readonly (not disabled).
>
> For , I can use 'readonly' but this does not exist for

>
> Any suggestions? Please inform.
>
>




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



Converting an ActionError to a string programmatically

2003-07-08 Thread Kornelis Sietsma
Hi all.

I am looking for a good way to turn an ActionError into a string, without having a
PageContext or anything else so useful (so I can't use the RequestUtils.message()
function).

Is there a simple way to do this?  I can probably do it the hard way, by digging
through the RequestUtils source and working out what it does, but I'm hoping that
either (a) there is another utility class I've missed that will do this, or (b)
someone else has done this and can save me the pain!

The reason I need this is that I have some code that updates a back-end system, and
returns ActionErrors if there are any validation failures.  Usually this gets called
from a struts action, and the errors get displayed to the user with the 
tag.

However, now we need to do some background batch updates, called from a thread
spawned from a servlet (which is outside our normal struts pages).  The batch process
is likely to be slow, and so we want the results of any validation failures to get
logged to an error file, rather than getting displayed to the user.

Any suggestions?

- Korny
--
Kornelis Sietsma   http://www.sietsma.com/korny  [EMAIL PROTECTED]
goofey: korny  yahoo: kornysietsma  icq: 2039172 ph: 0421 079 693

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



Accessing Application properties from business classes.

2003-07-08 Thread Zoran Avtarovski
Hi guys,

I know I've asked this before but I'm after some clarity. I have a web
application which gets deployed on a number of different systems and each
one has different settings with respect to file locations and email server
settings.  I'd like to set the mail server and directory settings in the
application.properties file (one central location, automatically picked up
by the app, etc).

I need a way to easily access the file from business classes. At the moment
I am using a couple of different workarounds: getting the settings in the
action file and then passing the appropriate values to business methods, or
passing the request object to the business methods, neither of which seem
very efficient.

I'd like to know if there is a way of retrieving the values in a simpler
fashion, using the application object for example.

As always any input always appreciated.

Zoran


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



Re: Tag inside a tag

2003-07-08 Thread Kris Schneider
But you've still got a few choices:

Standard Struts w/logic tags:

  


  

Standard Struts w/request-time expression:

Struts-EL:

And probably a few others...

David Graham wrote:
--- [EMAIL PROTECTED] wrote:

Is it a limitation of HTML or struts tag implementation?
Does struts 1.1 solve this issue (JSTL or otherwise).


It has nothing to do with HTML or Struts.  This is a syntax error
according to the JSP spec which means that no tag library can use a tag as
another tag's attribute value.
David


Kishan





"Benjamin Stewart" <[EMAIL PROTECTED]> on 09/07/2003 11:39:09

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>
To:"Struts Users Mailing List" <[EMAIL PROTECTED]>
cc:
Subject:Re: Tag inside a tag

you cant use tags inside tags... I discovered this recently :-( There
are
ways around it using jstl etc.
[EMAIL PROTECTED] writes:


Hi,

Can I specify a disabled attribute of a text tag using another tag.

For example:
disabled
/>
Here I have to disable the text depending upon the property
"textDisabaled". The above thing is not working.
Has anyone tried this thing before. I am using struts 1.02.

Thanks in advance,

Kishan
--
Kris Schneider 
D.O.Tech   


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


Re: Tag inside a tag

2003-07-08 Thread David Graham
--- [EMAIL PROTECTED] wrote:
> 
> Is it a limitation of HTML or struts tag implementation?
> Does struts 1.1 solve this issue (JSTL or otherwise).

It has nothing to do with HTML or Struts.  This is a syntax error
according to the JSP spec which means that no tag library can use a tag as
another tag's attribute value.

David

> 
> Kishan
> 
> 
> 
> 
> 
> "Benjamin Stewart" <[EMAIL PROTECTED]> on 09/07/2003 11:39:09
> 
> Please respond to "Struts Users Mailing List"
><[EMAIL PROTECTED]>
> 
> To:"Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc:
> 
> Subject:Re: Tag inside a tag
> 
> you cant use tags inside tags... I discovered this recently :-( There
> are
> ways around it using jstl etc.
> 
> [EMAIL PROTECTED] writes:
> 
> > Hi,
> >
> > Can I specify a disabled attribute of a text tag using another tag.
> >
> > For example:
> >  > name="form" property="textDisabled" value="yes">disabled
> > />
> >
> > Here I have to disable the text depending upon the property
> > "textDisabaled". The above thing is not working.
> >
> > Has anyone tried this thing before. I am using struts 1.02.
> >
> > Thanks in advance,
> >
> > Kishan
> >
> >
> >
> >
> > 
> > NOTICE - This message is intended only for the use of the
> > addressee named above and may contain privileged and
> > confidential information.  If you are not the intended recipient
> > of this message you are hereby notified that you must not
> > disseminate, copy or take any action based upon it.  If you
> > received this message in error please notify HIC immediately.
> > Any views expressed in this message are those of the individual
> > sender, except where the sender specifically states them to be
> > the views of HIC.
> > 
> >
> >
> > -
> > 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]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Tag inside a tag

2003-07-08 Thread Kishan . Bisht

Is it a limitation of HTML or struts tag implementation?
Does struts 1.1 solve this issue (JSTL or otherwise).

Kishan





"Benjamin Stewart" <[EMAIL PROTECTED]> on 09/07/2003 11:39:09

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:"Struts Users Mailing List" <[EMAIL PROTECTED]>
cc:

Subject:Re: Tag inside a tag

you cant use tags inside tags... I discovered this recently :-( There are
ways around it using jstl etc.

[EMAIL PROTECTED] writes:

> Hi,
>
> Can I specify a disabled attribute of a text tag using another tag.
>
> For example:
>  name="form" property="textDisabled" value="yes">disabled
> />
>
> Here I have to disable the text depending upon the property
> "textDisabaled". The above thing is not working.
>
> Has anyone tried this thing before. I am using struts 1.02.
>
> Thanks in advance,
>
> Kishan
>
>
>
>
> 
> NOTICE - This message is intended only for the use of the
> addressee named above and may contain privileged and
> confidential information.  If you are not the intended recipient
> of this message you are hereby notified that you must not
> disseminate, copy or take any action based upon it.  If you
> received this message in error please notify HIC immediately.
> Any views expressed in this message are those of the individual
> sender, except where the sender specifically states them to be
> the views of HIC.
> 
>
>
> -
> 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: How can I set the defualt selection?

2003-07-08 Thread leonZ
example.jsp code segment:
...


1
2
3

...

Don't forget adding the set and get method for submit_flag to the
exampleForm.java

exampleAction.java code segment:
...
public ActionForward perform(ActionMapping actionMapping, ActionForm
actionForm, HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse) {
MessageResources messages = getResources();
Locale locale = getLocale(httpServletRequest);
String flag =
httpServletRequest.getParameter("submit_flag")==null?"":httpServletRequest.g
etParameter("submit_flag");
if(flag.equals("")){
( (exampleForm) actionForm).setType("2");  /** set the defualt
selection **/
return (new ActionForward(actionMapping.getInput()));   /**
here the example.jsp will be show  **/
}
..
...
}

and you have to visit the exampleAction(something like exampleAction.do)
instead of example.jsp for the webpage view.

that's my solution, I hope it will be helpful.






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



Re: Tag inside a tag

2003-07-08 Thread Benjamin Stewart
you cant use tags inside tags... I discovered this recently :-( There are 
ways around it using jstl etc. 

[EMAIL PROTECTED] writes: 

Hi, 

Can I specify a disabled attribute of a text tag using another tag. 

For example:

name="form" property="textDisabled" value="yes">disabled
/> 

Here I have to disable the text depending upon the property
"textDisabaled". The above thing is not working. 

Has anyone tried this thing before. I am using struts 1.02. 

Thanks in advance, 

Kishan 

 


NOTICE - This message is intended only for the use of the 
addressee named above and may contain privileged and 
confidential information.  If you are not the intended recipient
of this message you are hereby notified that you must not 
disseminate, copy or take any action based upon it.  If you 
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.
 

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


Tag inside a tag

2003-07-08 Thread Kishan . Bisht
Hi,

Can I specify a disabled attribute of a text tag using another tag.

For example:
disabled
/>

Here I have to disable the text depending upon the property
"textDisabaled". The above thing is not working.

Has anyone tried this thing before. I am using struts 1.02.

Thanks in advance,

Kishan





NOTICE - This message is intended only for the use of the 
addressee named above and may contain privileged and 
confidential information.  If you are not the intended recipient
of this message you are hereby notified that you must not 
disseminate, copy or take any action based upon it.  If you 
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.



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



Re: ClassCastException using the DynaValidatorForm

2003-07-08 Thread Michael Muller
That would explain it.  The struts-config got re-loaded telling it that 
"myForm" was a dyna bean, but the re-serialized bean in the session was 
still one of my custom beans.

Thank you!  I had no idea that Tomcat serialized the session data when 
it shut down.

  -- Mike

Wendy Smoak wrote:

this resulted in the ClassCastException i described earlier, despite 
reloading the webapp and even restarting tomcat.


Did you also close the browser window you were using to test?  IIRC, Tomcat
serializes session data when you shut it down.  Just a guess, but I think
you had a session sitting around with the "old" form bean, and since the
name was the same, it got used.  If you had changed the name from the
beginning (myForm2) you likely never would have seen this.




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


RE: ClassCastException using the DynaValidatorForm

2003-07-08 Thread Wendy Smoak
> this resulted in the ClassCastException i described earlier, despite 
> reloading the webapp and even restarting tomcat.

Did you also close the browser window you were using to test?  IIRC, Tomcat
serializes session data when you shut it down.  Just a guess, but I think
you had a session sitting around with the "old" form bean, and since the
name was the same, it got used.  If you had changed the name from the
beginning (myForm2) you likely never would have seen this.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 


Specify Error Messages For Automatic Validation

2003-07-08 Thread Caroline Jen
I am trying to put entries in the
MessageResource.properties file for the error messages
generated by the automatic validation. 

I used "mask" to provide a number of validation rules.

How do I specify those error messages?  (I used "mask"
for a number of text field to report various errors.) 
I would like to see an example.

I could find examples for email and date:
errors.email={0} is an invalid e-mail address.
errors.date={0} is not a date.



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: PAC pattern (Presentation-Abstraction-Controller)

2003-07-08 Thread Carlos Duque
Methinks you're basing your assumption upon the original MVC model for 
GUIs.  Here is the Sun version, and it does talk of PAC as a related 
pattern, but you'll find, I think, that it's splitting hairs.

http://java.sun.com/blueprints/patterns/MVC-detailed.html

Carlos
At 10:30 AM 7/8/2003, you wrote:
Are you sure? I've read papers published by the author
of PAC and she states that they are different.
PAC has a controller between the abstraction and the
interface (presentation). MVC has 2 interfaces (View
and Controller) both of which interact with the
abstraction (Model). I think that conceptually they
are different.
What do you think?

--- Carlos Duque <[EMAIL PROTECTED]> wrote:
> Aren't these synonymous?  Back in the day when MVC
> was intended to model a
> GUI there might have been a real distinction, but
> the two have morphed into
> one pattern usually under the MVC label.  But they
> are one and the same today.
>
> Carlos
>
> At 10:17 AM 7/8/2003, you wrote:
> >Hi! I was wondering if anybody has info regarding
> the
> >PAC pattern being implemented using Struts.
> >
> >I know Struts is oriented towards the MVC pattern
> but
> >I would like to know what you think about using it
> for
> >PAC purposes.
> >
> >I truly appreciate your help.
> >
> >Regards.
> >
> >__
> >Do you Yahoo!?
> >SBC Yahoo! DSL - Now only $29.95 per month!
> >http://sbc.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!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.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]


Re: ClassCastException using the DynaValidatorForm

2003-07-08 Thread Michael Muller
originally, i had a custom form bean with the name "myForm" and an 
action with the same name.

i set up validation, and all was well.  my form has oodles of fields, 
however, so i figured i could save myself a load of development and 
maintenance by using the dyna-form beans.

so, i created another form bean (a DynaValidatorForm) in my 
struts-config. i named it "myForm", and re-named the old "myForm" to be 
"foo" so that i wouldn't have two forms with the same name.

this resulted in the ClassCastException i described earlier, despite 
reloading the webapp and even restarting tomcat.

so i switched and renamed the dyna-bean "foo" and the custom form bean 
"myForm".  things started working again.

THEN, i changed the name of the form bean used by the action to "foo" 
(which is now the name of the dynamic from bean).  to my surprise, that 
works!  and that's where i am now.  functional, but confused.

i can hear the PHP guys snickering.  :(

  -- mike

Adam Hardy wrote:

Sorry, no comprendo. What are you changing in the action mapping? Do 
your mappings & form names & validator xml correspond?

I appreciate your concern about your PHP colleagues :)

Michael Muller wrote:

i don't know what's in 'instance', i'm just guessing it's not a 
DynaBean because of the exception i'm getting.

i have discovered that if, instead of renaming the forms, i change the 
name of the form in the action mapping, validation works.

so now i have a form named "foo".  :(

not very elegant.  my php-centric coworkers will mock me.  i'll be the 
laughingstock of the company.

  -- mike

Adam Hardy wrote:

I missed your second post. My mailer didn't thread it. So what is 
struts putting in 'instance' if it's not a dynabean?

I don't suppose it would be so simple as the wrong form specified in 
the action mapping?

Michael Muller wrote:

Here's the struts source that's throwing the exception:

// Can we recycle the existing form bean instance (if there is one)?
if (instance != null) {
if (config.getDynamic()) {
String className = ((DynaBean) 
instance).getDynaClass().getName();
if (className.equals(config.getName())) {

Apparently, "instance" is not a DynaBean.  It would appear that 
something other than a DynaBean is being stored where struts expects 
to find a DynaBean.

Does this help anyone figure out what I'm doing wrong?

  -- Mike

Adam Hardy wrote:

I got ClassCast exceptions, but not necessarily this one, because I 
was using field class types other than Strings in my 
DynaActionForm. DynaValidator will only validate strings, btw.

Adam

Michael Muller wrote:

I've got the validation framework working for me using my own form 
bean which is derived from ValidatorForm.  I changed the form bean 
to be a DynaValidatorForm, and now I get a ClassCastException, the 
guts of which is appended below.

What gives?  Am I using the wrong validator form class?  Did I 
neglect to make some other configuration change?

I'm using Tomcat 4.1, Struts 1.1 final, and jdk 1.4.1.

  -- Mike



java.lang.ClassCastException
at 
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:783) 

at 
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364) 

at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253) 

at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 

at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) 

at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) 

at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) 

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.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 

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.catalina.core.StandardContext.invoke(StandardContext.java:2415) 

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.catali

Re: Reloading mappings

2003-07-08 Thread Jing Zhou

- Original Message - 
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 12:10 PM
Subject: Re: Reloading mappings


>
>
> On Tue, 8 Jul 2003, Rajesh Khater wrote:
>
> > Date: Tue, 8 Jul 2003 18:23:15 +0530
> > From: Rajesh Khater <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: Reloading mappings
> >
> >
> > Hi,
> >
> > I need to get hold of the default struts-config.xml which contains the
> > mapping for ActionServlet to reload the struts-config.xml dynamically on
> > change.
> >
> > Where can I get that ??
> > Alternatively, can somebody send me what should I put in
> > struts-config.xml to enable dynamic reloading of mappings ?
> >
>
> Struts 1.1 does not support dynamic reloading of mappings (or any other
> config information) for two basic reasons:
>
> * The in-memory data structures are frozen, so they don't need
>   to be synchronized when they are read (which happens a LOT).
>
> * Reloading the configuration information is only half the battle --
>   you're also going to want to reload recompiled Action and form
>   bean classes, and there is absolutely nothing Struts can do to
>   help you with that.

The two reasons are legitimate in general. I am not against to them,
here just to provide some *fresh* ideas in our practices:

When we consider the action mappings and the compiled action and
form bean classes as ONE thing, we do have the above concerns.
However, when we consider the action mappings and corresponding
JSP pages as ONE thing, we have some opportunities to advance:
Modifying a configuration term in an action mapping could be made
equivalent to modifying a JSP page, because both of them assume the
compiled classes are not changed. So a tool could remove
JSP pages and action mappings and then add them back as needed.

This is our idea to manage large number of JSP pages and action
mappings. We put a flag in an application module which indicates the
module should be frozen or not after initialization. If a module is
not frozen (managed by administrators), designers could publish
new action mappings with the corresponding JSP pages or
withdraw them as needed. Action mapping themselves are
always frozen. Of course, such organization will open holes that
some web forms may not find their action mappings because
they are withdrawn. But those errors are tolerative in many use
cases or can be reduced to miminum if some deployment rules
are implemented. Any other ideas or concerns, I am not very
clear at the moment.

>
> You should really be using the application reload facilities of your
> servlet container to do this sort of thing.  I typically develop against
> Tomcat, and use the custom Ant tasks to dynamically install, reload, and
> remove an app while Tomcat is running.
>
>   http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html
>
> > Thanks,
> > Rajesh.
>
> Craig
>
>

Jing

> >
> > **Disclaimer
> >
> > Information contained in this E-MAIL being proprietary to Wipro Limited
is
> > 'privileged' and 'confidential' and intended for use only by the
individual
> >  or entity to which it is addressed. You are notified that any use,
copying
> > or dissemination of the information contained in the E-MAIL in any
manner
> > whatsoever is strictly prohibited.
> >
> >
***
> >
> > -
> > 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: ClassCastException using the DynaValidatorForm

2003-07-08 Thread Joe Germuska
At 10:09 -0600 7/8/03, Michael Muller wrote:
i don't know what's in 'instance', i'm just guessing it's not a 
DynaBean because of the exception i'm getting.

i have discovered that if, instead of renaming the forms, i change 
the name of the form in the action mapping, validation works.
The name in action mapping needs to relate back to a name in the 
form-beans configuration.  So you should be able to change the name, 
as long as you change it in both places.  If you use the "name" 
property in your  JSP tags, you have to change it there 
also, although during the 1.1 development cycle this was changed so 
that the html:form tag would look up the form bean from the mapping 
found with the html:form action attribute.

You shouldn't be stuck with a "foo" form, but you may need to make 
changes in more than one place.

Joe




so now i have a form named "foo".  :(

not very elegant.  my php-centric coworkers will mock me.  i'll be 
the laughingstock of the company.

  -- mike

Adam Hardy wrote:

I missed your second post. My mailer didn't thread it. So what is 
struts putting in 'instance' if it's not a dynabean?

I don't suppose it would be so simple as the wrong form specified 
in the action mapping?

Michael Muller wrote:

Here's the struts source that's throwing the exception:

// Can we recycle the existing form bean instance (if there is one)?
if (instance != null) {
if (config.getDynamic()) {
String className = ((DynaBean) instance).getDynaClass().getName();
if (className.equals(config.getName())) {
Apparently, "instance" is not a DynaBean.  It would appear that 
something other than a DynaBean is being stored where struts 
expects to find a DynaBean.

Does this help anyone figure out what I'm doing wrong?

  -- Mike

Adam Hardy wrote:

I got ClassCast exceptions, but not necessarily this one, because 
I was using field class types other than Strings in my 
DynaActionForm. DynaValidator will only validate strings, btw.

Adam

Michael Muller wrote:

I've got the validation framework working for me using my own 
form bean which is derived from ValidatorForm.  I changed the 
form bean to be a DynaValidatorForm, and now I get a 
ClassCastException, the guts of which is appended below.

What gives?  Am I using the wrong validator form class?  Did I 
neglect to make some other configuration change?

I'm using Tomcat 4.1, Struts 1.1 final, and jdk 1.4.1.

  -- Mike



java.lang.ClassCastException
at 
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:783)
at 
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
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.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
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.catalina.core.StandardContext.invoke(StandardContext.java:2415)
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.invoke

Re: ClassCastException using the DynaValidatorForm

2003-07-08 Thread Adam Hardy
Sorry, no comprendo. What are you changing in the action mapping? Do 
your mappings & form names & validator xml correspond?

I appreciate your concern about your PHP colleagues :)

Michael Muller wrote:
i don't know what's in 'instance', i'm just guessing it's not a DynaBean 
because of the exception i'm getting.

i have discovered that if, instead of renaming the forms, i change the 
name of the form in the action mapping, validation works.

so now i have a form named "foo".  :(

not very elegant.  my php-centric coworkers will mock me.  i'll be the 
laughingstock of the company.

  -- mike

Adam Hardy wrote:

I missed your second post. My mailer didn't thread it. So what is 
struts putting in 'instance' if it's not a dynabean?

I don't suppose it would be so simple as the wrong form specified in 
the action mapping?

Michael Muller wrote:

Here's the struts source that's throwing the exception:

// Can we recycle the existing form bean instance (if there is one)?
if (instance != null) {
if (config.getDynamic()) {
String className = ((DynaBean) 
instance).getDynaClass().getName();
if (className.equals(config.getName())) {

Apparently, "instance" is not a DynaBean.  It would appear that 
something other than a DynaBean is being stored where struts expects 
to find a DynaBean.

Does this help anyone figure out what I'm doing wrong?

  -- Mike

Adam Hardy wrote:

I got ClassCast exceptions, but not necessarily this one, because I 
was using field class types other than Strings in my DynaActionForm. 
DynaValidator will only validate strings, btw.

Adam

Michael Muller wrote:

I've got the validation framework working for me using my own form 
bean which is derived from ValidatorForm.  I changed the form bean 
to be a DynaValidatorForm, and now I get a ClassCastException, the 
guts of which is appended below.

What gives?  Am I using the wrong validator form class?  Did I 
neglect to make some other configuration change?

I'm using Tomcat 4.1, Struts 1.1 final, and jdk 1.4.1.

  -- Mike



java.lang.ClassCastException
at 
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:783) 

at 
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364) 

at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253) 

at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 

at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) 

at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) 

at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) 

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.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 

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.catalina.core.StandardContext.invoke(StandardContext.java:2415) 

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(Http11Pr

RE: using getInputForward vs new ActionForward(mapping.getInput())

2003-07-08 Thread Adam Levine
Or, I can just tie the errors into my session object and use my own tags to 
pull and push them as needed (still ugly, but keeps the url clean).

Perhaps there's a struts developer reading this list who has some insight.

--a

From: "Yansheng Lin" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: using getInputForward vs new ActionForward(mapping.getInput())
Date: Tue, 8 Jul 2003 15:30:24 -0600
Huh.  I am surprised that it worked for you before.

And yes, if you want the URL to change in the address bar, you will need 
some
sort of redirect.  (Correct me if I am wrong here).  However, once you 
redirect
the page, you lose anything that's returned in the response, including the
errors collection.

An ugly hack is to pass the errors in the URL.  But as I said, it's ugly.

I would be interested to know what happened, why it worked before?

-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED]
Sent: July 8, 2003 3:18 PM
To: [EMAIL PROTECTED]
Subject: RE: using getInputForward vs new ActionForward(mapping.getInput())
Correct. isEmpty() returns false (there are items present). and yes,
html:errors shows nothing.
And, the getInput() does return what I expect.  It returns the phsyical url
of the form page that I want displayed in the address bar when there are
form problems (errors is not empty).
I'm returning an ActionForward.  The only difference is in whether or not
the redirect is set to true or false.  If it's set to true, the address bar
is right and html:errors shows nothing.  If it's set to false, the address
bar is "wrong" (shows the .jspa dynamic address rather than the physical),
but html:errors works.
So, what I want is the phsyical address inthe bar, and the errors to
display.
clearer (?) walk-through:
entry page:  /app/enterInfo.jsp
form post:  /app/validateInfo.jspa <- Action
on errors, it should display the page contents of /app/enterInfo.jsp (which
it does), and show /app/enterInfo.jsp in the address bar, and html:errors
should iterate.
with redirect set to false, I get  /app/validateInfo.jspa in the address
bar, the page contents, and an iteration of html:errors.
with redirect set to true, I get /app/enterInfo.jsp, the page contents, and
no html:errors.
Like I mentioned in my first post, this was working the way I wanted before
I moved to the newer libraries.
Any other ideas?

thanks!

-- adam

From: "Yansheng Lin" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: using getInputForward vs new ActionForward(mapping.getInput())
Date: Tue, 8 Jul 2003 14:55:45 -0600
So you are saying that error.isEmpty() returns false, but 
doesn't
display anything?
This is happening 'cause you use redirect instead of forward. Also You might
want to try System.out.println(mapping.getInput()) to see if you are going
back
to the right page. You might be surprised:).
-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED]
Sent: July 8, 2003 1:40 PM
To: [EMAIL PROTECTED]
Subject: using getInputForward vs new ActionForward(mapping.getInput())
My goal in handling "business problems" in validating a form submission from
an Action.execute() is 2-fold:
1:  Display the accumulated ActionErrors (ie, using [html:errors/] )

2: "Return" the user to the exact same URL in their browser address bar.

I was using an action-mapping forward in struts-config to send them to the
original .jsp they used to submit from.  The errors were showing up (good),
but the URL in the address bar was being shown as /dynamic/Path.jspa (bad)
So I changed the action-mapping, setting "redirect" to "true".  Now the
address bar was correct (good), but the error messages were gone (bad).
Then I did a lot of web searching, and discovered that I should be using the
getInput.
So, now my execute() was returning:  return new
ActionForward(mapping.getInput());
This worked!  The address bar was correct and the errors were still present.

Then I "upgraded" my struts library to 1.1b3.Now I'm back to the
original problem of the address bar being right, but my errors are gone.
I found   mapping.getInputForward(), and tried returning that, even going in
and setting the redirect field to "true".  I'm bouncing between the same 2
situations I had before.
Am I missing something?  Is it no longer possible to have "the best of both
worlds"?  For whatever it may be worth, I'm using the -el sets of libraries
(thank you for finally getting that!).. and jboss 3.07.. and xdoclet...
Thanks for any insight you can provide.

-- adam

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PR

RE: using getInputForward vs new ActionForward(mapping.getInput())

2003-07-08 Thread Yansheng Lin
Huh.  I am surprised that it worked for you before.  

And yes, if you want the URL to change in the address bar, you will need some
sort of redirect.  (Correct me if I am wrong here).  However, once you redirect
the page, you lose anything that's returned in the response, including the
errors collection.  

An ugly hack is to pass the errors in the URL.  But as I said, it's ugly.

I would be interested to know what happened, why it worked before?  


-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED] 
Sent: July 8, 2003 3:18 PM
To: [EMAIL PROTECTED]
Subject: RE: using getInputForward vs new ActionForward(mapping.getInput())


Correct. isEmpty() returns false (there are items present). and yes, 
html:errors shows nothing.

And, the getInput() does return what I expect.  It returns the phsyical url 
of the form page that I want displayed in the address bar when there are 
form problems (errors is not empty).

I'm returning an ActionForward.  The only difference is in whether or not 
the redirect is set to true or false.  If it's set to true, the address bar 
is right and html:errors shows nothing.  If it's set to false, the address 
bar is "wrong" (shows the .jspa dynamic address rather than the physical), 
but html:errors works.

So, what I want is the phsyical address inthe bar, and the errors to 
display.

clearer (?) walk-through:
entry page:  /app/enterInfo.jsp
form post:  /app/validateInfo.jspa <- Action

on errors, it should display the page contents of /app/enterInfo.jsp (which 
it does), and show /app/enterInfo.jsp in the address bar, and html:errors 
should iterate.

with redirect set to false, I get  /app/validateInfo.jspa in the address 
bar, the page contents, and an iteration of html:errors.

with redirect set to true, I get /app/enterInfo.jsp, the page contents, and 
no html:errors.


Like I mentioned in my first post, this was working the way I wanted before 
I moved to the newer libraries.

Any other ideas?

thanks!

-- adam

From: "Yansheng Lin" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: using getInputForward vs new ActionForward(mapping.getInput())
Date: Tue, 8 Jul 2003 14:55:45 -0600


So you are saying that error.isEmpty() returns false, but  
doesn't
display anything?

This is happening 'cause you use redirect instead of forward. Also You might
want to try System.out.println(mapping.getInput()) to see if you are going 
back
to the right page. You might be surprised:).

-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED]
Sent: July 8, 2003 1:40 PM
To: [EMAIL PROTECTED]
Subject: using getInputForward vs new ActionForward(mapping.getInput())

My goal in handling "business problems" in validating a form submission from
an Action.execute() is 2-fold:


1:  Display the accumulated ActionErrors (ie, using [html:errors/] )

2: "Return" the user to the exact same URL in their browser address bar.

I was using an action-mapping forward in struts-config to send them to the
original .jsp they used to submit from.  The errors were showing up (good),
but the URL in the address bar was being shown as /dynamic/Path.jspa (bad)

So I changed the action-mapping, setting "redirect" to "true".  Now the
address bar was correct (good), but the error messages were gone (bad).

Then I did a lot of web searching, and discovered that I should be using the
getInput.
So, now my execute() was returning:  return new
ActionForward(mapping.getInput());

This worked!  The address bar was correct and the errors were still present.

Then I "upgraded" my struts library to 1.1b3.Now I'm back to the
original problem of the address bar being right, but my errors are gone.

I found   mapping.getInputForward(), and tried returning that, even going in
and setting the redirect field to "true".  I'm bouncing between the same 2
situations I had before.

Am I missing something?  Is it no longer possible to have "the best of both
worlds"?  For whatever it may be worth, I'm using the -el sets of libraries
(thank you for finally getting that!).. and jboss 3.07.. and xdoclet...


Thanks for any insight you can provide.

-- adam

_
STOP MORE SPAM with the new MSN 8 and get 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]

_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus


-
To unsubscribe, e-mail: [EMAI

RE: Accessing database in java and jsp?

2003-07-08 Thread Terje Hopsø
Hi,

That works fine, thanks!

Now my next test is to get it into the sql-taglib. I tried to use the
data-source key="resDB" and use that but with no luck. I guess the
sql-taglib is looking at the web.xml. I only get "datasource invalid: null"
or "no suitable driver".



select Initialer
from Skytter


- Terje


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Yann Cébron
Sent: 8. juli 2003 21:44
To: [EMAIL PROTECTED]
Subject: Re: Accessing database in java and jsp?


This might be a good start to read:

http://jakarta.apache.org/struts/faqs/database.html

HTH,
Yann

At 01:31 PM 7/8/03 +0200, you wrote:
>Hello
>
>I have created a datasource in my struts-config.xml. But I cant find out
how
>to use it. Creating my datasource in my web.xml works fine. Any tips?
>
>- Terje
>
>struts-config.xml:
>...
>  
>   
>
>
>property="driverClass" />
>
>
>
>
>property="url" />
>   
>  
>...
>
>
>-
>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: (Newbie) html:link passing an object via the request object

2003-07-08 Thread Davidson, Glenn
Further research shows that the link is converted to html which does not
accept objects, only strings. So it looks like I need to pass in a string
that will be used to identify the data I need. I should have an Action to
take the string id from the request object and generate an object with the
data I want and then pass control to the jsp that will display it.

Is this the best way to do this? Is there an easier way?

I could use an object cache to eliminate the need to recreate the objects
each time they are created (the data is static).

Thanks

Glenn

-Original Message-
From: Davidson, Glenn 
Sent: Tuesday, July 08, 2003 3:40 PM
To: 'Struts Users Mailing List'
Subject: (Newbie) html:link passing an object via the request object


I need to assign an object to the request object via an html:link

I am iterating over a collection of objects as such:



I would like to assign the object represented by "doc" into the request
object as part of the html:link (shown below as it currently exists.


Edit


Can anyone give me some guidance?

Thanks

Glenn







Re: Session ID always being appended even with cookies enabled?

2003-07-08 Thread JavaXML Developer
What you are seeing is "jsesssionid". The jsessionid is a key maintained by the 
container to track the user session via HTTP. Including the session key in the 
hyperlink is called URL rewriting. The Servlet Specification encourages the use of 
cookies to maintain the session. When that is not possible, URL rewriting is used 
instead. The first time browser makes a request to the container, the container does 
not know whether the browser will accept a cookie. The container can offer the browser 
a cookie, but can't tell if it was accepted until the next time a request is made. 
(HTTP has no "handshaking".) In the meantime, the response for the current request 
must be written. So, the first page written for a browser will always need to use URL 
rewriting. If no subsequent requests the container finds that its cookie was accepted. 
It can skip rewriting the URLs.
 
Hope this answers your question.
 
-Vicky

David Erickson <[EMAIL PROTECTED]> wrote:
Well I've been setting up struts and for some reason struts is always
rewriting my urls with the session id in it, even though I know for sure
that cookies are enabled.. I know this is pretty vague but does anyone know
what would cause this?
thanks
-David


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


-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

RE: using getInputForward vs new ActionForward(mapping.getInput())

2003-07-08 Thread Adam Levine
Correct. isEmpty() returns false (there are items present). and yes, 
html:errors shows nothing.

And, the getInput() does return what I expect.  It returns the phsyical url 
of the form page that I want displayed in the address bar when there are 
form problems (errors is not empty).

I'm returning an ActionForward.  The only difference is in whether or not 
the redirect is set to true or false.  If it's set to true, the address bar 
is right and html:errors shows nothing.  If it's set to false, the address 
bar is "wrong" (shows the .jspa dynamic address rather than the physical), 
but html:errors works.

So, what I want is the phsyical address inthe bar, and the errors to 
display.

clearer (?) walk-through:
entry page:  /app/enterInfo.jsp
form post:  /app/validateInfo.jspa <- Action
on errors, it should display the page contents of /app/enterInfo.jsp (which 
it does), and show /app/enterInfo.jsp in the address bar, and html:errors 
should iterate.

with redirect set to false, I get  /app/validateInfo.jspa in the address 
bar, the page contents, and an iteration of html:errors.

with redirect set to true, I get /app/enterInfo.jsp, the page contents, and 
no html:errors.

Like I mentioned in my first post, this was working the way I wanted before 
I moved to the newer libraries.

Any other ideas?

thanks!

-- adam

From: "Yansheng Lin" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: using getInputForward vs new ActionForward(mapping.getInput())
Date: Tue, 8 Jul 2003 14:55:45 -0600
So you are saying that error.isEmpty() returns false, but  
doesn't
display anything?

This is happening 'cause you use redirect instead of forward. Also You might
want to try System.out.println(mapping.getInput()) to see if you are going 
back
to the right page. You might be surprised:).

-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED]
Sent: July 8, 2003 1:40 PM
To: [EMAIL PROTECTED]
Subject: using getInputForward vs new ActionForward(mapping.getInput())
My goal in handling "business problems" in validating a form submission from
an Action.execute() is 2-fold:
1:  Display the accumulated ActionErrors (ie, using [html:errors/] )

2: "Return" the user to the exact same URL in their browser address bar.

I was using an action-mapping forward in struts-config to send them to the
original .jsp they used to submit from.  The errors were showing up (good),
but the URL in the address bar was being shown as /dynamic/Path.jspa (bad)
So I changed the action-mapping, setting "redirect" to "true".  Now the
address bar was correct (good), but the error messages were gone (bad).
Then I did a lot of web searching, and discovered that I should be using the
getInput.
So, now my execute() was returning:  return new
ActionForward(mapping.getInput());
This worked!  The address bar was correct and the errors were still present.

Then I "upgraded" my struts library to 1.1b3.Now I'm back to the
original problem of the address bar being right, but my errors are gone.
I found   mapping.getInputForward(), and tried returning that, even going in
and setting the redirect field to "true".  I'm bouncing between the same 2
situations I had before.
Am I missing something?  Is it no longer possible to have "the best of both
worlds"?  For whatever it may be worth, I'm using the -el sets of libraries
(thank you for finally getting that!).. and jboss 3.07.. and xdoclet...
Thanks for any insight you can provide.

-- adam

_
STOP MORE SPAM with the new MSN 8 and get 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]
_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

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


chaining struts jsp tags

2003-07-08 Thread Kirby Vandivort
I have some custom JSP tags that I am using, and I want them to output
text that is this processed by the standard struts tags.  Is this possible?

For instance, I have a custom tag that will output something like:



this is the path   and the image is, etc



and then that would proceed to be parsed by html:rewrite to do the
right thing.

Can this be done?  Thanks!


-- 

Kirby Vandivort  Theoretical and Computational Biophysics 
Email: [EMAIL PROTECTED]  3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/University of Illinois
Phone: (217) 244-5711405 N. Mathews Ave
Fax  : (217) 244-6078Urbana, IL  61801, USA

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



Re: Cancel button not working?

2003-07-08 Thread Michael Ruppin
Odd, I can't reproduce that in 1.1-rc1.  Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.

m

--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> This is how I have my cancel tag.
> 
> 
> 
>   
> 
> >>> [EMAIL PROTECTED] 07/08/03 02:27PM >>>
> The complete content of your html:cancel tag is
> probably key to solving this problem.
> 
> m
> 
> --- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> > 
> >  isCancelled(request) is always returning false
> > (Even when cancel button
> > is clicked)
> > 
> > Need some help...
> > 
> > Thanks
> > 
> > 
> > >>> [EMAIL PROTECTED] 07/08/03 09:10AM >>>
> > I have a  in my jsp page. and in my
> > action I have
> > 
> > if(isCancelled(request)){
> >   return mapping.findForward("index"); 
> > }
> > 
> > 
> > But it is not working. What am I doing wrong here.
> I
> > am using Struts 1.1
> > final
> > 
> > Thanks
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: using getInputForward vs new ActionForward(mapping.getInput())

2003-07-08 Thread Yansheng Lin

So you are saying that error.isEmpty() returns false, but  doesn't
display anything?

This is happening 'cause you use redirect instead of forward. Also You might
want to try System.out.println(mapping.getInput()) to see if you are going back
to the right page. You might be surprised:).

-Original Message-
From: Adam Levine [mailto:[EMAIL PROTECTED] 
Sent: July 8, 2003 1:40 PM
To: [EMAIL PROTECTED]
Subject: using getInputForward vs new ActionForward(mapping.getInput())

My goal in handling "business problems" in validating a form submission from 
an Action.execute() is 2-fold:


1:  Display the accumulated ActionErrors (ie, using [html:errors/] )

2: "Return" the user to the exact same URL in their browser address bar.

I was using an action-mapping forward in struts-config to send them to the 
original .jsp they used to submit from.  The errors were showing up (good), 
but the URL in the address bar was being shown as /dynamic/Path.jspa (bad)

So I changed the action-mapping, setting "redirect" to "true".  Now the 
address bar was correct (good), but the error messages were gone (bad).

Then I did a lot of web searching, and discovered that I should be using the 
getInput.
So, now my execute() was returning:  return new 
ActionForward(mapping.getInput());

This worked!  The address bar was correct and the errors were still present.

Then I "upgraded" my struts library to 1.1b3.Now I'm back to the 
original problem of the address bar being right, but my errors are gone.

I found   mapping.getInputForward(), and tried returning that, even going in 
and setting the redirect field to "true".  I'm bouncing between the same 2 
situations I had before.

Am I missing something?  Is it no longer possible to have "the best of both 
worlds"?  For whatever it may be worth, I'm using the -el sets of libraries 
(thank you for finally getting that!).. and jboss 3.07.. and xdoclet...


Thanks for any insight you can provide.

-- adam

_
STOP MORE SPAM with the new MSN 8 and get 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]



RE: bean:write problem with struts 1.1

2003-07-08 Thread David Jiao
Anyone has the same problem and has a solution? Thanks. 


On Tue, 2003-07-08 at 10:21, Nicolas Seinlet wrote:
> I have the same problem. I solve it by deleting the data-sources section and some 
> Action in the struts config file.
> 
> It's the only way I can solve the problem, but it's not a solution, because I need 
> the data-sources and the actions.
> 
> After reading the net, the problem can also be due to xml parser, so I try to change 
> the XML parser, but the problem is still present.
> 
> So, I'm lost on the way to find to solve the problem.
> 
> I will try with another Server, like jboss and see...
> 
> -Message d'origine-
> De : David Jiao [mailto:[EMAIL PROTECTED]
> Envoyé : mardi 8 juillet 2003 17:09
> À : Struts Users Mailing List
> Objet : RE: bean:write problem with struts 1.1
> 
> 
> But I didn't specify any  from my struts-config file. Do I
> have to include it anyway? 
> 
> On Tue, 2003-07-08 at 09:59, Nicolas Seinlet wrote:
> > >It kept throwing a
> > message: "org.apache.jasper.JasperException: Cannot find message
> > resources under key org.apache.struts.action.MESSAGE".
> > 
> > It seems to be due to the the 
> > 
> > -
> > 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]



Re: Cancel button not working?

2003-07-08 Thread Sashi Ravipati
This is how I have my cancel tag.



  

>>> [EMAIL PROTECTED] 07/08/03 02:27PM >>>
The complete content of your html:cancel tag is
probably key to solving this problem.

m

--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> 
>  isCancelled(request) is always returning false
> (Even when cancel button
> is clicked)
> 
> Need some help...
> 
> Thanks
> 
> 
> >>> [EMAIL PROTECTED] 07/08/03 09:10AM >>>
> I have a  in my jsp page. and in my
> action I have
> 
> if(isCancelled(request)){
>   return mapping.findForward("index"); 
> }
> 
> 
> But it is not working. What am I doing wrong here. I
> am using Struts 1.1
> final
> 
> Thanks
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Re: Accessing database in java and jsp?

2003-07-08 Thread Yann Cébron
This might be a good start to read:

http://jakarta.apache.org/struts/faqs/database.html

HTH,
Yann

At 01:31 PM 7/8/03 +0200, you wrote:
>Hello
>
>I have created a datasource in my struts-config.xml. But I cant find out
how
>to use it. Creating my datasource in my web.xml works fine. Any tips?
>
>- Terje
>
>struts-config.xml:
>...
>  
>   
>
>
>property="driverClass" />
>
>
>
>
>property="url" />
>   
>  
>...
>
>
>-
>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]



(Newbie) html:link passing an object via the request object

2003-07-08 Thread Davidson, Glenn
I need to assign an object to the request object via an html:link

I am iterating over a collection of objects as such:



I would like to assign the object represented by "doc" into the request
object as part of the html:link (shown below as it currently exists.


Edit


Can anyone give me some guidance?

Thanks

Glenn







using getInputForward vs new ActionForward(mapping.getInput())

2003-07-08 Thread Adam Levine
My goal in handling "business problems" in validating a form submission from 
an Action.execute() is 2-fold:

1:  Display the accumulated ActionErrors (ie, using [html:errors/] )

2: "Return" the user to the exact same URL in their browser address bar.

I was using an action-mapping forward in struts-config to send them to the 
original .jsp they used to submit from.  The errors were showing up (good), 
but the URL in the address bar was being shown as /dynamic/Path.jspa (bad)

So I changed the action-mapping, setting "redirect" to "true".  Now the 
address bar was correct (good), but the error messages were gone (bad).

Then I did a lot of web searching, and discovered that I should be using the 
getInput.
So, now my execute() was returning:  return new 
ActionForward(mapping.getInput());

This worked!  The address bar was correct and the errors were still present.

Then I "upgraded" my struts library to 1.1b3.Now I'm back to the 
original problem of the address bar being right, but my errors are gone.

I found   mapping.getInputForward(), and tried returning that, even going in 
and setting the redirect field to "true".  I'm bouncing between the same 2 
situations I had before.

Am I missing something?  Is it no longer possible to have "the best of both 
worlds"?  For whatever it may be worth, I'm using the -el sets of libraries 
(thank you for finally getting that!).. and jboss 3.07.. and xdoclet...

Thanks for any insight you can provide.

-- adam

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: Best place for security checks in Struts?

2003-07-08 Thread Sloan Seaman
You could have a class that is an Action (say, named SecureAction) and then
have all of the actions in the struts file extend SecureAction and implement
a method called executeSecure() (not execute()!)

What then happens is your action in the Strust config (say, named ShowUser)
gets called by Struts but since it extends SecureAction, Struts calls
SecureAction's execute().  It then checks security and if it's good it calls
executeSecure() which is the method that ShowUser overwrote.

If the security doesn't pass, then SecureAction never calls executeSecure...
and there ya go.

You can then define the security on a per action basis by making your own
ActionMappping object and doing something like:


That is how I did it for a while and it worked great...

--
Sloan

- Original Message - 
From: "Sandeep Takhar" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 2:44 PM
Subject: Re: Best place for security checks in Struts?


> This is the requestProcessor.
>
> Sorry for that.  I am busy doing work and then I
> answer a question...
>
> The way I think of it is that there is a
> requestProcessor for each struts-config.  (You declare
> it here).  So if you have multiple modules, you could
> theoretically have a different processor for each one.
>
> sandeep
> --- David Erickson <[EMAIL PROTECTED]> wrote:
> > And which class is the procesRoles method in?
> >
> > - Original Message - 
> > From: "Sandeep Takhar" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > Sent: Tuesday, July 08, 2003 9:47 AM
> > Subject: Re: Best place for security checks in
> > Struts?
> >
> >
> > > There must be a diagram that shows all the calls
> > > before
> > > it actually hits execute() method.  There are
> > quite a
> > > few.
> > >
> > > If you have a base action you can override one of
> > them
> > >
> > > processRoles seems to be a logical place...
> > >
> > > sandeep
> > > --- David Erickson <[EMAIL PROTECTED]> wrote:
> > > > Hi I am setting up my webapp for security, had a
> > big
> > > > thread about it last
> > > > week, we've implemented filters to handle all
> > the
> > > > static filters sitting
> > > > around, but would also like to put some security
> > > > into the struts actions
> > > > themselves.  I'm trying to figure out where the
> > best
> > > > place to implement the
> > > > checks would be, if I need to extend the class
> > that
> > > > actually calls the
> > > > actions, or if I should extend the base action
> > and
> > > > insert checks, or what
> > > > the best thing to do would be.  Somehow each of
> > the
> > > > actions needs to have a
> > > > name assigned to it to check against as well,
> > and
> > > > the information will be
> > > > pulled from a user bean stored in the session
> > > > variable.
> > > >
> > > > Thanks in advance!
> > > > -David
> > > >
> > > >
> > > >
> > >
> >
> -
> > > > To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > __
> > > Do you Yahoo!?
> > > SBC Yahoo! DSL - Now only $29.95 per month!
> > > http://sbc.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!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com


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



RE: Accessing database in java and jsp?

2003-07-08 Thread Terje Hopsø
Hi,

As mentioned in the book "Jakarta Struts" from O'Reilly that some
configuration in web.xml has been moved to struts-config.xml I wanted to try
it out. I am testing out a lot of things in Struts since it is new to me and
this is something I am strugling with.

- Terje


-Original Message-
From: Micael [mailto:[EMAIL PROTECTED] 
Sent: 8. juli 2003 16:49
To: Struts Users Mailing List
Subject: Re: Accessing database in java and jsp? 


This is probably more of an additional question than a help, but why do you 
want to do something other than create the datasource in your web.xml?

At 01:31 PM 7/8/03 +0200, you wrote:
>Hello
>
>I have created a datasource in my struts-config.xml. But I cant find out
how
>to use it. Creating my datasource in my web.xml works fine. Any tips?
>
>- Terje
>
>struts-config.xml:
>...
>  
>   
>
>
>property="driverClass" />
>
>
>
>
>property="url" />
>   
>  
>...
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]



LEGAL NOTICE

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



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



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



Re: Workflow engine status

2003-07-08 Thread JavaXML Developer
Its a workflow extension NOT engine.

Sandeep Takhar <[EMAIL PROTECTED]> wrote:That is not a workflow engine per se.

sandeep
--- Matthias Bauer 
wrote:
> I don't think that there has been anybody working on
> this proposal for 
> several months. It is definitely not part of the
> latest Struts releases.
> 
> Depending on what your requirements are, you might
> want to have a look 
> at the Struts Workflow Extension at 
> http://www.livinglogic.de/Struts .
> 
> --- Matthias
> 
> 
> Kevin K wrote:
> 
> >I was looking at Jakarta for a workflow engine and
> I
> >found this URL -
>
>http://jakarta.apache.org/struts/proposal-workflow.html.
> >What I can't find is when this proposal was written
> >and if this workflow engine is included in the
> latest
> >release of Struts.
> >
> >Thanks for your help,
> >Kevin
> >
> >__
> >Do you Yahoo!?
> >SBC Yahoo! DSL - Now only $29.95 per month!
> >http://sbc.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!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: Best place for security checks in Struts?

2003-07-08 Thread Sandeep Takhar
This is the requestProcessor.

Sorry for that.  I am busy doing work and then I
answer a question...

The way I think of it is that there is a
requestProcessor for each struts-config.  (You declare
it here).  So if you have multiple modules, you could
theoretically have a different processor for each one.

sandeep
--- David Erickson <[EMAIL PROTECTED]> wrote:
> And which class is the procesRoles method in?
> 
> - Original Message - 
> From: "Sandeep Takhar" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, July 08, 2003 9:47 AM
> Subject: Re: Best place for security checks in
> Struts?
> 
> 
> > There must be a diagram that shows all the calls
> > before
> > it actually hits execute() method.  There are
> quite a
> > few.
> > 
> > If you have a base action you can override one of
> them
> > 
> > processRoles seems to be a logical place...
> > 
> > sandeep
> > --- David Erickson <[EMAIL PROTECTED]> wrote:
> > > Hi I am setting up my webapp for security, had a
> big
> > > thread about it last
> > > week, we've implemented filters to handle all
> the
> > > static filters sitting
> > > around, but would also like to put some security
> > > into the struts actions
> > > themselves.  I'm trying to figure out where the
> best
> > > place to implement the
> > > checks would be, if I need to extend the class
> that
> > > actually calls the
> > > actions, or if I should extend the base action
> and
> > > insert checks, or what
> > > the best thing to do would be.  Somehow each of
> the
> > > actions needs to have a
> > > name assigned to it to check against as well,
> and
> > > the information will be
> > > pulled from a user bean stored in the session
> > > variable.
> > > 
> > > Thanks in advance!
> > > -David
> > > 
> > > 
> > >
> >
>
-
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.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!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: Login Form

2003-07-08 Thread Erez Efrati
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.

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

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



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



Re: Populating select boxes dynamically

2003-07-08 Thread Erik Price


sriram wrote:
James,

As explained by you, I have done the following:

I need list of countries in a drop-down box in .jsp page.

I have an EJB that maps to country table in database.
In that I've a method getAllCountries() that returns a collection.
In that method, I've used LabelValueBean and storing labels and values in the 
collection.
I'm using a Session Façade, so this method is called by a session bean which obtains the collection of countries.

Now I would like to know the next step - creating a "pre" action which obtains this 
collection and stores it in 'request'.
I've an action form with getter and setter methods for 'countryID' (countryID is the name of my 
 in the jsp page). But how to create a "pre" action? Can you pl. explain
Create a Filter and map it to any resources that will need the countries 
collection.  (I think you need to map it to the resource that will be 
requested, not the JSP that is forwarded-to -- so, in other words, map 
it to the Actions that will need it.)

In this Filter you can make the call to the session facade that gets the 
list of countries, and then you can store it into the Request as an 
attribute.  Later, your Action or JSP can extract this information from 
the Request to build the drop-down.  If you run into performance 
problems, you might want to cache this action either in the Session 
Facade itself, or in an application-scoped attribute stored in the 
ServletContext.  But I'm not sure how often your country list might change.

Erik

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


Re: Cancel button not working?

2003-07-08 Thread Michael Ruppin
The complete content of your html:cancel tag is
probably key to solving this problem.

m

--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> 
>  isCancelled(request) is always returning false
> (Even when cancel button
> is clicked)
> 
> Need some help...
> 
> Thanks
> 
> 
> >>> [EMAIL PROTECTED] 07/08/03 09:10AM >>>
> I have a  in my jsp page. and in my
> action I have
> 
> if(isCancelled(request)){
>   return mapping.findForward("index"); 
> }
> 
> 
> But it is not working. What am I doing wrong here. I
> am using Struts 1.1
> final
> 
> Thanks
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
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
> FORM 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: Cancel button not working?

2003-07-08 Thread Sashi Ravipati

 isCancelled(request) is always returning false (Even when cancel button
is clicked)

Need some help...

Thanks


>>> [EMAIL PROTECTED] 07/08/03 09:10AM >>>
I have a  in my jsp page. and in my action I have

if(isCancelled(request)){
  return mapping.findForward("index"); 
}


But it is not working. What am I doing wrong here. I am using Struts 1.1
final

Thanks


RE: Problems with logic:iterate (indexId has no effect) - doesn't anyone know the solution?

2003-07-08 Thread Bård Arve Evjen
Matt,

No, I'm still stuck with the iterate:logic stuff :-)

Thanks a bunch for providing an example.

The lack of examples seems to be common in the struts-world :-)  The books I've seen 
isn't much better, either.

Cheers,
Bard

- Original Message -
From: "Matthew J. Vincent" <[EMAIL PROTECTED]>
Date: Tue, 8 Jul 2003 13:42:27 -0400
To: <[EMAIL PROTECTED]>
Subject: RE: Problems with logic:iterate (indexId has no effect) - doesn'tanyone 
know the solution?

> Bard,
> 
> I'm not sure if you have figured this out or not, but to all who haven't -
> here is a link to a Struts  tag example.
> 
> http://moosejaw.org/java/struts-iterate/
> 
> Enjoy.
> 
> Matt
> 
> 
> 
> 
> Thanks for your reply, Sandeep. From what I have understood from reading the
> java doc, a vector has an index on it like an array does. Is it really true
> that noone else has had any problems with this? If it is working for you,
> how do you implement it?
> 
> Thanks a bunch!
> 
> Bard
> 
> - Original Message -
> From: Sandeep Takhar <[EMAIL PROTECTED]>
> Date: Mon, 7 Jul 2003 10:13:33 -0700 (PDT)
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: Problems with logic:iterate (indexId has no effect) - doesn't
> anyone know the solution?
> 
> > I wouldn't use a vector, but maybe you can?
> >
> > My understanding is that iterate works on anything
> > that returns an iterator.
> >
> > logic:iterate name="someName"
> >
> > should be used when the bean someName is in some scope
> > and is the collection that you want.
> >
> > logic:iterate name="someName" property="someProperty"
> > should not be used if the above case is true.
> >
> > sandeep
> > --- Bård Arve Evjen <[EMAIL PROTECTED]> wrote:
> > > I didn't think this was a big problem for you
> > > Struts-gurus, but maybe I'm wrong :-)
> > >
> > > I have a vector called variationmargins and in it I
> > > have a property called loadProfile that is either 1
> > > or 2 for all postings. I have tried to use the
> > > logic:iterate tag to output the result using the
> > > loadProfile as an index, but it has not effect. It
> > > just outputs everything, no matter the indexId.
> > >
> > > Does anyone have a clue what I am doing wrong?
> > >
> > >  > > property="variationMargins" indexId="loadProfile">
> > >  > > property="loadProfileName"/>
> > > 
> > >  > > property="variationMargins"
> > > scope="session" width="100%" pagesize="100"
> > > requestURI="result.jsp"
> > >
> > decorator="org.apache.taglibs.display.test.ColumnsWrapper">
> > >
> > >  > > property="deliveryPeriod" sort="true" width="10%"/>
> > >  > > align="right" sort="true" width="10%"/>
> > > 
> > > 
> > >
> > > I would really appreciate the help.
> > >
> > > Cheers,
> > > Bard A. Evjen
> > >
> > >
> > >
> > -
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> >
> >
> > __
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.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]
> 
> 
> -
> 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: ApplicationResources.properties from Database

2003-07-08 Thread James Mitchell
On Tuesday 08 July 2003 14:09, you wrote:
> James,
>
> Thank You very Much

Sure, no problem.  I'm actually working on an upgrade for this as I type.  It 
will use the latest and greatest from OJB instead of an older version.

Let me know if you need help with it.

>
>
> From: James Mitchell <[EMAIL PROTECTED]>
>
> >To: "Tonny Moon" <[EMAIL PROTECTED]>
> >Subject: Re: ApplicationResources.properties from Database
> >Date: Mon, 7 Jul 2003 13:44:06 -0400
> >
> >On Tuesday 01 July 2003 17:09, you wrote:
> > > Hi,
> > >
> > > I saw the News of Struts dated 2002 Sep 10 taking about
> > > DBMessageResourcesand I want to know how can I get a copy of this
> >
> >class
> >
> > > ??
> > >
> > > I working with struts-1.0 and very interesting on get message from
> >
> >DB
> >
> > > table..
> >
> >The MessageResources implementation that I wrote only works with Struts
> >1.1.
> >You can find it at http://sourceforge.net/projects/struts/
> >
> > > Thanks a Lot. !!
> > >
> > > _
> > > Protect your PC - get McAfee.com VirusScan Online
> > > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> >
> >--
> >James Mitchell
> >Software Developer/Struts Evangelist
> >http://www.struts-atlanta.org
> >770-822-3359
> >AIM:jmitchtx
>
> _
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx



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



Re: Multiple Dynamic Parameter Alternatives

2003-07-08 Thread Kris Schneider
Speaking of examples, the thread you recently posted to, " - add
parameters", would be a fine place to start:

http://marc.theaimsgroup.com/?t=10565290004&r=1&w=2

It includes pointers to info on JSTL...

Quoting Kris Schneider <[EMAIL PROTECTED]>:

> Two non-scriptlet alternatives are to use JSTL or to set up the map (or maps)
> in
> an action before forwarding to the JSP. There should be *plenty* of JSTL
> and
>  examples in the archives.
> 
> Quoting "Kamholz, Keith   (corp-staff) USX" <[EMAIL PROTECTED]>:
> 
> > Hey everyone,
> > I need to use multiple dynamic parameters for some of my links, and I
> have
> > this working nicely using a map.  Unfortunately, my boss doesn't like
> > scriptlets in the JSP pages, and wants me to find out about any
> > alternatives.  It's alright if there aren't, but I have to at least try
> to
> > find some!  So does anybody know of any alternate ways of generating
> > multiple dynamic parameters other than using a scriptlet to fill a map? 
> I
> > belive There are JSTL tags that can fill a map, but we don't even know
> what
> > JSTL is... I just saw the example in a previous post.
> > Thanks in advance!
> > 
> > - Keith
> 
> -- 
> Kris Schneider 
> D.O.Tech   

-- 
Kris Schneider 
D.O.Tech   

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



RE: Dynamically changing forward in ActionForm

2003-07-08 Thread Fedor Smirnoff
Hey,

I think that global forward is the best solution for
it as Neil mentioned. However, I havent tried this yet
but would it be possible to include login check into
lets say GeneralAction that extends Action, and than
every other action will extend GeneralAction. So
basically this action being in the middle can do all
the general processing that will be required by an
application. I read something about it in one fo the
books, and it does sound doable and useful, is it?

Thanks,
Fedor



--- Neil Carusetta <[EMAIL PROTECTED]>
wrote:
> After the ActionServlet initializes the modules from
> the struts-config file,
> a freeze() is placed on the ModuleConfig which
> includes the ActionForwards
> elements. As a result any subsequent change to the
> actionForward's path is
> not possible.  
> 
> For the scenario you describe I usually define one
> forward element in the
> struts-config mapping for the fail validate case
> (probably just a URI back
> to the Logon JSP itself, and another forward for the
> success case (probably
> an action call which display the next page and any
> prepopulated form-bean
> info).
> 
> Hope that helps.
> 
> Neil Carusetta
> CGC
> Scottsdale, AZ
> 
> -Original Message-
> From: Sandeep Takhar
> [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 08, 2003 5:40 AM
> To: Struts Users Mailing List
> Subject: Re: Dynamically changing forward in
> ActionForm
> 
> This has been asked many times before.
> 
> You have to store something.  Sometimes it is nice
> to
> have a user object that stores bookmarks etc.
> 
> try searching the archive...
> 
> sandeep
> --- "Michael C. Clark" <[EMAIL PROTECTED]> wrote:
> > I have a small ActionForm which I would like to
> > include on all pages
> > of my webapp (it does a login, with user name and
> > password).  When
> > the validate() method returns an ActionErrors
> > object, I would like
> > control to return to the page that the login
> > ActionForm was called
> > from.
> > 
> > Is there a way to do this without storing a
> > reference to an
> > ActionForward in the session context, then
> > dynamically changing the
> > Input of the ActionMapping in the ActionForm? 
> That
> > seems far too
> > complicated.
> > 
> > Any insight appreciated.
> > 
> > -Mike
> > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



sslext

2003-07-08 Thread Dhruva B. Reddy
I am using Struts 1.0 and Tomcat.  I am trying to use sslext to submit
a form securely.  I just tried it with cookies disabled, and the URL
does not get encoded.

Here is a snippet...


  


When I turn off security (i.e., set the "secure" property for the
corresponding action to "false"), it encodes the URL as I would expect.

To those of you who have used this, am I missing something?

Thanks,
Dhruva

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Multiple Dynamic Parameter Alternatives

2003-07-08 Thread Kris Schneider
Two non-scriptlet alternatives are to use JSTL or to set up the map (or maps) in
an action before forwarding to the JSP. There should be *plenty* of JSTL and
 examples in the archives.

Quoting "Kamholz, Keith   (corp-staff) USX" <[EMAIL PROTECTED]>:

> Hey everyone,
> I need to use multiple dynamic parameters for some of my links, and I have
> this working nicely using a map.  Unfortunately, my boss doesn't like
> scriptlets in the JSP pages, and wants me to find out about any
> alternatives.  It's alright if there aren't, but I have to at least try to
> find some!  So does anybody know of any alternate ways of generating
> multiple dynamic parameters other than using a scriptlet to fill a map?  I
> belive There are JSTL tags that can fill a map, but we don't even know what
> JSTL is... I just saw the example in a previous post.
> Thanks in advance!
> 
> - Keith

-- 
Kris Schneider 
D.O.Tech   

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



Multiple Dynamic Parameter Alternatives

2003-07-08 Thread Kamholz, Keith (corp-staff) USX
Hey everyone,
I need to use multiple dynamic parameters for some of my links, and I have
this working nicely using a map.  Unfortunately, my boss doesn't like
scriptlets in the JSP pages, and wants me to find out about any
alternatives.  It's alright if there aren't, but I have to at least try to
find some!  So does anybody know of any alternate ways of generating
multiple dynamic parameters other than using a scriptlet to fill a map?  I
belive There are JSTL tags that can fill a map, but we don't even know what
JSTL is... I just saw the example in a previous post.
Thanks in advance!

- Keith



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



Re: ModuleSwitching

2003-07-08 Thread James Mitchell
On Tuesday 08 July 2003 01:36, Madala, Srinivasa wrote:
> I've followed the same way what struts 1.1 says about module switching.But
> the thing is I couldn't succede in implementing that.I'm not able to move
> to other module using the SwitchAction.I've been using
> <%=request.getContextPath()%> to get the root context path.is there any
> alternate way to resolve the module switching in struts?

There is an example application that demonstrates how to switch between 
modules 3 different ways.

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

Look under "simple" for "Module Switching Examples"


>
> Srinivas
>
>
> WARNING: The information in this message is confidential and may be legally
> privileged. It is intended solely for the addressee.  Access to this
> message by anyone else is unauthorised.  If you are not the intended
> recipient, any disclosure, copying, or distribution of the message, or any
> action or omission taken by you in reliance on it, is prohibited and may be
> unlawful. Please immediately contact the sender if you have received this
> message in error. Thank you.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx



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



RE: Problems with logic:iterate (indexId has no effect) - doesn't anyone know the solution?

2003-07-08 Thread Matthew J. Vincent
Bard,

I'm not sure if you have figured this out or not, but to all who haven't -
here is a link to a Struts  tag example.

http://moosejaw.org/java/struts-iterate/

Enjoy.

Matt




Thanks for your reply, Sandeep. From what I have understood from reading the
java doc, a vector has an index on it like an array does. Is it really true
that noone else has had any problems with this? If it is working for you,
how do you implement it?

Thanks a bunch!

Bard

- Original Message -
From: Sandeep Takhar <[EMAIL PROTECTED]>
Date: Mon, 7 Jul 2003 10:13:33 -0700 (PDT)
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Problems with logic:iterate (indexId has no effect) - doesn't
anyone know the solution?

> I wouldn't use a vector, but maybe you can?
>
> My understanding is that iterate works on anything
> that returns an iterator.
>
> logic:iterate name="someName"
>
> should be used when the bean someName is in some scope
> and is the collection that you want.
>
> logic:iterate name="someName" property="someProperty"
> should not be used if the above case is true.
>
> sandeep
> --- Bård Arve Evjen <[EMAIL PROTECTED]> wrote:
> > I didn't think this was a big problem for you
> > Struts-gurus, but maybe I'm wrong :-)
> >
> > I have a vector called variationmargins and in it I
> > have a property called loadProfile that is either 1
> > or 2 for all postings. I have tried to use the
> > logic:iterate tag to output the result using the
> > loadProfile as an index, but it has not effect. It
> > just outputs everything, no matter the indexId.
> >
> > Does anyone have a clue what I am doing wrong?
> >
> >  > property="variationMargins" indexId="loadProfile">
> >  > property="loadProfileName"/>
> > 
> >  > property="variationMargins"
> > scope="session" width="100%" pagesize="100"
> > requestURI="result.jsp"
> >
> decorator="org.apache.taglibs.display.test.ColumnsWrapper">
> >
> >  > property="deliveryPeriod" sort="true" width="10%"/>
> >  > align="right" sort="true" width="10%"/>
> > 
> > 
> >
> > I would really appreciate the help.
> >
> > Cheers,
> > Bard A. Evjen
> >
> >
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.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]


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



Re: PAC pattern (Presentation-Abstraction-Controller)

2003-07-08 Thread Dos Santos
Are you sure? I've read papers published by the author
of PAC and she states that they are different.

PAC has a controller between the abstraction and the
interface (presentation). MVC has 2 interfaces (View
and Controller) both of which interact with the
abstraction (Model). I think that conceptually they
are different.

What do you think?

--- Carlos Duque <[EMAIL PROTECTED]> wrote:
> Aren't these synonymous?  Back in the day when MVC
> was intended to model a 
> GUI there might have been a real distinction, but
> the two have morphed into 
> one pattern usually under the MVC label.  But they
> are one and the same today.
> 
> Carlos
> 
> At 10:17 AM 7/8/2003, you wrote:
> >Hi! I was wondering if anybody has info regarding
> the
> >PAC pattern being implemented using Struts.
> >
> >I know Struts is oriented towards the MVC pattern
> but
> >I would like to know what you think about using it
> for
> >PAC purposes.
> >
> >I truly appreciate your help.
> >
> >Regards.
> >
> >__
> >Do you Yahoo!?
> >SBC Yahoo! DSL - Now only $29.95 per month!
> >http://sbc.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!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: Login Form

2003-07-08 Thread Craig R. McClanahan


On Tue, 8 Jul 2003, Erez Efrati wrote:

> Date: Tue, 08 Jul 2003 19:03:17 +0200
> From: Erez Efrati <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Login Form
>
> Yansheng Lin, I didn't understand, sorry.
>
> All I want to do is enable the users to login into my site from the
> starting page of the web site.
>
> Is it possible to post the a form action='j_security_check'?

No.

If you really need programmatic login, you will want to look at "roll
your own" security mechanisms instead of container managed security.

> I mean before accessing a protected page which the Tomcat protects and
> sends me the my login page.

One approach would be to provide a login button (instead of a login form)
that goes to a protected resource (triggering the login), and then have
the protected resource forward or redirect back to your main menu.

> I want to note here that I am using the
> JAAS.
>

If you're using Tomcat's JAASRealm (or something like it) for this, this
fact won't make any difference.

> Thanks,
> Erez

Craig

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



Re: IE 6 SP-1 won't session

2003-07-08 Thread Lukas Bradley
Are cookies turned on?

Lukas




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



Re: PAC pattern (Presentation-Abstraction-Controller)

2003-07-08 Thread Carlos Duque
Aren't these synonymous?  Back in the day when MVC was intended to model a 
GUI there might have been a real distinction, but the two have morphed into 
one pattern usually under the MVC label.  But they are one and the same today.

Carlos

At 10:17 AM 7/8/2003, you wrote:
Hi! I was wondering if anybody has info regarding the
PAC pattern being implemented using Struts.
I know Struts is oriented towards the MVC pattern but
I would like to know what you think about using it for
PAC purposes.
I truly appreciate your help.

Regards.

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.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]


Re: characterEncoding for resource bundle

2003-07-08 Thread Craig R. McClanahan


On Tue, 8 Jul 2003, Firat TIRYAKI wrote:

> Date: Tue, 8 Jul 2003 16:57:02 +0300
> From: Firat TIRYAKI <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: characterEncoding for resource bundle
>
> Hi,
>
> Is there a way to set the characterEncoding for the
> ApplicationResources.properties file? Simply I can not get the special
> characters in the 8859_9 chartype.
>

You need to use the native2ascii utility to encode the special characters.

> Thanks
>
> F.

Craig

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



RE: Best Practice Mapped/Indexed Properties on an ActionForm

2003-07-08 Thread Nate Bowler

Yours and Michael's suggestion are similar and will likely be the approach I
will take. I'll probably just use the ListUtils.lazyList(List, Factory)
decorator to create the autovivifyingList.

What's surprising to me is that this seems like an extremely common use
case, but it isn't clearly mapped out in the Husted book or in the online
docs. I'm sure many developers want to retain an object structure for forms
that contain dynamic lists of data, and using commons-collections lazyList()
would seem like a good documentation example to provide (assuming this
works, of course, as I have not yet implemented it).

At any rate, thanks for the reply.

Nate

-Original Message-
From: Justin Hickman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 10:23 AM
To: Struts Users Mailing List
Subject: Re: Best Practice Mapped/Indexed Properties on an ActionForm



Nate,

I ran into that same problem a couple of weeks ago.  The
solution that we came up with was to create an AutovivifyingList
object.

Basically, with the AutovivifyingList object, we have extended
java.util.ArrayList and added functionality to allow for
autovivifying objects.

When struts tries to populate indexed objects from a form, it
will do something like: form.getList(1).setFooBar("value"); It
has a problem when it does "form.getList(1)" because the list
does not exist with any objects in that index.  To avoid this,
we have the overridden method "public Object get(int)" and
instantiated the appropriate object if it didn't exist and would
return it instead of null.

Of course, you would have to have constructors to the
AutovivifyingList object that takes in a class object of the
class you want instantiated on a get, and you would also need to
tell it if you should instantiate intervening objects (for
example, if you do a getList(5) and 1-4 doesn't exist, you can
tell it to create all intervening or leave them null)

That's the basic idea behind it.  Of course there are many ways
to implement it.  This, however, is how we handled the issue of
request scoped indexed forms.

I hope this helps. If you need a more concrete example, let me
know.

Thanks,

--
Justin Hickman
Software Engineer
Network Support Systems, Information Technology
Mpower Communications Corporation




At 2003-07-08T15:14:19Z, "Nate Bowler" <[EMAIL PROTECTED]> writes:

> I put out another similar post, but let me ask this question another way
in
> hopes of generating more feedback.
>
> I have an application with many forms that contain dynamic lists of
> elements. For example, rows of elements that contain a checkbox, select
> list, and 2 text boxes for each element.
>
> In traditional JSP design, normally I would create a loop and name these
> elements "rowbox1", "rowselect1", "rowtext1", "rowtext21", ...
> "rowbox(n)"...etc. At any rate, you get the idea; we've all done this.
>
> With struts, you have the mapped and indexed property syntax that works
> great for pre-populated forms. For example, I can have an "open" action
that
> pre-populates an ActionForm with all the nested data and forward to a JSP
> that allows editing. Everything looks great.
>
> The PROBLEM is submitting this form. I haven't found a way to make Struts
> auto-allocate space in a collection (or a Map, for that matter) in an
> ActionForm for the submit action. Almost every example on this I've seen
> deals with a fixed number of elements, and most of these still focus on
the
> pre-populate action. These examples completely avoid this issue.
>
> So, when the number of elements on the form VARIES, what is the "best
> practice" in design for this? I'm talking about an indexed or mapped
> collection that contains other Java Beans. How can you get these to submit
> properly into an ActionForm? If there are options, can you weigh the
> pros/cons of each?
>
> For example, I'm sure a session-scope bean would accomplish this, but I
stay
> away from session-scope beans because of clustered deployment issues. I
> would imagine a hidden value giving the length might be useful, but I'm
not
> sure where in the ActionForm's initialization sequence it could be used.
> Perhaps I need to do something different in the reset() method? Are there
> other options?
>
> Nate
>
>
> -
> 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]



PAC pattern (Presentation-Abstraction-Controller)

2003-07-08 Thread Dos Santos
Hi! I was wondering if anybody has info regarding the
PAC pattern being implemented using Struts.

I know Struts is oriented towards the MVC pattern but
I would like to know what you think about using it for
PAC purposes.

I truly appreciate your help.

Regards.

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Workflow engine status

2003-07-08 Thread Craig R. McClanahan


On Tue, 8 Jul 2003, Kevin K wrote:

> Date: Tue, 8 Jul 2003 06:15:03 -0700 (PDT)
> From: Kevin K <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Workflow engine status
>
> I was looking at Jakarta for a workflow engine and I
> found this URL -
> http://jakarta.apache.org/struts/proposal-workflow.html.
> What I can't find is when this proposal was written
> and if this workflow engine is included in the latest
> release of Struts.
>

An initial crack at code to implement this proposal is in the
"jakarta-commons-sandbox" CVS repository, under package "workflow".  It
hasn't been worked on for a long time, and in truth it would be better to
start over again based on something like Jetty than continue to invent yet
another scripting language written in XML.

> Thanks for your help,
> Kevin

Craig

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



Re: Reloading mappings

2003-07-08 Thread Craig R. McClanahan


On Tue, 8 Jul 2003, Rajesh Khater wrote:

> Date: Tue, 8 Jul 2003 18:23:15 +0530
> From: Rajesh Khater <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Reloading mappings
>
>
> Hi,
>
> I need to get hold of the default struts-config.xml which contains the
> mapping for ActionServlet to reload the struts-config.xml dynamically on
> change.
>
> Where can I get that ??
> Alternatively, can somebody send me what should I put in
> struts-config.xml to enable dynamic reloading of mappings ?
>

Struts 1.1 does not support dynamic reloading of mappings (or any other
config information) for two basic reasons:

* The in-memory data structures are frozen, so they don't need
  to be synchronized when they are read (which happens a LOT).

* Reloading the configuration information is only half the battle --
  you're also going to want to reload recompiled Action and form
  bean classes, and there is absolutely nothing Struts can do to
  help you with that.

You should really be using the application reload facilities of your
servlet container to do this sort of thing.  I typically develop against
Tomcat, and use the custom Ant tasks to dynamically install, reload, and
remove an app while Tomcat is running.

  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html

> Thanks,
> Rajesh.

Craig


>
> **Disclaimer
>
> Information contained in this E-MAIL being proprietary to Wipro Limited is
> 'privileged' and 'confidential' and intended for use only by the individual
>  or entity to which it is addressed. You are notified that any use, copying
> or dissemination of the information contained in the E-MAIL in any manner
> whatsoever is strictly prohibited.
>
> ***
>
> -
> 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]



Session vs GET parameters best practice

2003-07-08 Thread José Moreira
Hello, i humbly confess that since my ASP/PHP times, not long ago,i've
been having problems understanding the 'best-practice' of 
Session vs GET parameters in CRUD's...

In my current application the practice i use is the following, for
editing a single PGSQL table:

 * a page displaying an result list with the records ( no paginator for
the time being), where a link like :

 http://localhost:8081/editEvent.do?eventId=2

in each row points to a form where the user can instally manipulate the
data. In this page also there's a link like 

 http://localhost:8081/deleteEvent.do?action=confirmDelete

pointing to an actions that redirects to an 'deleteConfirm.jsp'.

Because of the 'eventId' is being saved in the HTTPSession when the user
enters deleteEvent.do, the delete link doesnt have an &eventId=X ...

In the confirmPage i have 2 links refering to :

Really delete event? 

 http://localhost:8081/deleteEvent.do

 http://localhost:8081/editEvent.do

But because of editEvent.do 'needing' an ?eventId=2 for displaying the 

right record, the page throws an error, that means that 

deleteEvent.do?action=confirmDelete also needs ?eventId=2...

Resuming, it's a big mess, like this e-mail and my confused mind :)

Has anyone has thoughts for me?

thanks in advance ...


Ps.: I've read the manuals :)






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



Best Practice Packaging Reusable Components

2003-07-08 Thread Frédéric Dreier
Hi,

I try to develop reusable components like login form, locale chooser,
explorer tree, ... and I am looking for a 'nice' way to package such
components (jsp,java,gifs,..) in JAR file.

Or perhaps there is another way to accomplish this?

Any help is welcome :-)


Frederic





PS: Yes i am a newbie..


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



RE: Login Form

2003-07-08 Thread Yansheng Lin

Here is the link:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg14215.html

-
Oh I thought you had trouble accessing a protected login page from a non-secure
page.

Is this what you want to do in your main page?


User ID:  
Password:  
 



And your problem is that you don't have control over 'my_security_check' does in
JAAS.  

I found an archive mail on this newsgroup, maybe what you want.  Sorry I don't
know much about the api in JAAS.



-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: July 8, 2003 11:03 AM
To: 'Struts Users Mailing List'
Subject: RE: Login Form


Yansheng Lin, I didn't understand, sorry.

All I want to do is enable the users to login into my site from the
starting page of the web site. 

Is it possible to post the a form action='j_security_check'? I mean
before accessing a protected page which the Tomcat protects and sends me
the my login page. I want to note here that I am using the JAAS.

Thanks,
Erez

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 08, 2003 5:47 PM
To: 'Struts Users Mailing List'
Subject: RE: Login Form

Not sure if I understand it entirely.  But you can use an iframe for the
login
form(protected page) on the site home page.  Something like:



Hope this helps.



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



-
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: Login Form

2003-07-08 Thread Yansheng Lin
Oh I thought you had trouble accessing a protected login page from a non-secure
page.



Is this what you want to do in your main page?


User ID:  
Password:  
 



And your problem is that you don't have control over 'my_security_check' does in
JAAS.  

I found an archive mail on this newsgroup, maybe what you want.  Sorry I don't
know much about the api in JAAS.



-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: July 8, 2003 11:03 AM
To: 'Struts Users Mailing List'
Subject: RE: Login Form


Yansheng Lin, I didn't understand, sorry.

All I want to do is enable the users to login into my site from the
starting page of the web site. 

Is it possible to post the a form action='j_security_check'? I mean
before accessing a protected page which the Tomcat protects and sends me
the my login page. I want to note here that I am using the JAAS.

Thanks,
Erez

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 08, 2003 5:47 PM
To: 'Struts Users Mailing List'
Subject: RE: Login Form

Not sure if I understand it entirely.  But you can use an iframe for the
login
form(protected page) on the site home page.  Something like:



Hope this helps.



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



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



Single error message for multiple fields using Validator?

2003-07-08 Thread Poon, Johnny
Hi,

I'm using Validator.  Can anyone tell me if there's a way to only show one
general error message when there are errors on several fields on the page?
Further, how to change the font on the title and move focus to of all the
error field?

What I want to do when validation comes back false are these:
1) Show a general message for a type of invalidity, e.g. for required
fields: "Please fill out all of the required fields."
2) Change all the font of the title of the invalid fields.
3) Put the cursor focus on the first error field and have the input
highlighted(selected).

Any help and pointers would be greatly appreciated.

Thanks!

JP



**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


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



Re: Best Practice Mapped/Indexed Properties on an ActionForm

2003-07-08 Thread Justin Hickman

Nate,

I ran into that same problem a couple of weeks ago.  The
solution that we came up with was to create an AutovivifyingList
object.

Basically, with the AutovivifyingList object, we have extended
java.util.ArrayList and added functionality to allow for
autovivifying objects.

When struts tries to populate indexed objects from a form, it
will do something like: form.getList(1).setFooBar("value"); It
has a problem when it does "form.getList(1)" because the list
does not exist with any objects in that index.  To avoid this,
we have the overridden method "public Object get(int)" and
instantiated the appropriate object if it didn't exist and would
return it instead of null.

Of course, you would have to have constructors to the
AutovivifyingList object that takes in a class object of the
class you want instantiated on a get, and you would also need to
tell it if you should instantiate intervening objects (for
example, if you do a getList(5) and 1-4 doesn't exist, you can
tell it to create all intervening or leave them null)

That's the basic idea behind it.  Of course there are many ways
to implement it.  This, however, is how we handled the issue of
request scoped indexed forms.

I hope this helps. If you need a more concrete example, let me
know.

Thanks,

--
Justin Hickman
Software Engineer
Network Support Systems, Information Technology
Mpower Communications Corporation




At 2003-07-08T15:14:19Z, "Nate Bowler" <[EMAIL PROTECTED]> writes:

> I put out another similar post, but let me ask this question another way in
> hopes of generating more feedback.
> 
> I have an application with many forms that contain dynamic lists of
> elements. For example, rows of elements that contain a checkbox, select
> list, and 2 text boxes for each element.
> 
> In traditional JSP design, normally I would create a loop and name these
> elements "rowbox1", "rowselect1", "rowtext1", "rowtext21", ...
> "rowbox(n)"...etc. At any rate, you get the idea; we've all done this.
> 
> With struts, you have the mapped and indexed property syntax that works
> great for pre-populated forms. For example, I can have an "open" action that
> pre-populates an ActionForm with all the nested data and forward to a JSP
> that allows editing. Everything looks great.
> 
> The PROBLEM is submitting this form. I haven't found a way to make Struts
> auto-allocate space in a collection (or a Map, for that matter) in an
> ActionForm for the submit action. Almost every example on this I've seen
> deals with a fixed number of elements, and most of these still focus on the
> pre-populate action. These examples completely avoid this issue.
> 
> So, when the number of elements on the form VARIES, what is the "best
> practice" in design for this? I'm talking about an indexed or mapped
> collection that contains other Java Beans. How can you get these to submit
> properly into an ActionForm? If there are options, can you weigh the
> pros/cons of each?
> 
> For example, I'm sure a session-scope bean would accomplish this, but I stay
> away from session-scope beans because of clustered deployment issues. I
> would imagine a hidden value giving the length might be useful, but I'm not
> sure where in the ActionForm's initialization sequence it could be used.
> Perhaps I need to do something different in the reset() method? Are there
> other options?
> 
> Nate
> 
> 
> -
> 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: Best place for security checks in Struts?

2003-07-08 Thread Jing Zhou

- Original Message - 
From: "Sandeep Takhar" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 10:47 AM
Subject: Re: Best place for security checks in Struts?


> There must be a diagram that shows all the calls
> before
> it actually hits execute() method.  There are quite a
> few.
> 
> If you have a base action you can override one of them
> 
> processRoles seems to be a logical place...

Overriding the request processor is my favored place.
You could extend action mapping to have additional
security parameters and in your extended request
processor you check if users are allowed to execute
the corresponding action when the roles are not sufficient.

> 
> sandeep
> --- David Erickson <[EMAIL PROTECTED]> wrote:
> > Hi I am setting up my webapp for security, had a big
> > thread about it last
> > week, we've implemented filters to handle all the
> > static filters sitting
> > around, but would also like to put some security
> > into the struts actions
> > themselves.  I'm trying to figure out where the best
> > place to implement the
> > checks would be, if I need to extend the class that
> > actually calls the
> > actions, or if I should extend the base action and
> > insert checks, or what
> > the best thing to do would be.  Somehow each of the
> > actions needs to have a
> > name assigned to it to check against as well, and
> > the information will be
> > pulled from a user bean stored in the session
> > variable.
> > 
> > Thanks in advance!
> > -David
> > 
> >

Jing
 
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.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]



Re: ClassCastException using the DynaValidatorForm

2003-07-08 Thread Michael Muller
i don't know what's in 'instance', i'm just guessing it's not a DynaBean 
because of the exception i'm getting.

i have discovered that if, instead of renaming the forms, i change the 
name of the form in the action mapping, validation works.

so now i have a form named "foo".  :(

not very elegant.  my php-centric coworkers will mock me.  i'll be the 
laughingstock of the company.

  -- mike

Adam Hardy wrote:

I missed your second post. My mailer didn't thread it. So what is struts 
putting in 'instance' if it's not a dynabean?

I don't suppose it would be so simple as the wrong form specified in the 
action mapping?

Michael Muller wrote:

Here's the struts source that's throwing the exception:

// Can we recycle the existing form bean instance (if there is one)?
if (instance != null) {
if (config.getDynamic()) {
String className = ((DynaBean) 
instance).getDynaClass().getName();
if (className.equals(config.getName())) {

Apparently, "instance" is not a DynaBean.  It would appear that 
something other than a DynaBean is being stored where struts expects 
to find a DynaBean.

Does this help anyone figure out what I'm doing wrong?

  -- Mike

Adam Hardy wrote:

I got ClassCast exceptions, but not necessarily this one, because I 
was using field class types other than Strings in my DynaActionForm. 
DynaValidator will only validate strings, btw.

Adam

Michael Muller wrote:

I've got the validation framework working for me using my own form 
bean which is derived from ValidatorForm.  I changed the form bean 
to be a DynaValidatorForm, and now I get a ClassCastException, the 
guts of which is appended below.

What gives?  Am I using the wrong validator form class?  Did I 
neglect to make some other configuration change?

I'm using Tomcat 4.1, Struts 1.1 final, and jdk 1.4.1.

  -- Mike



java.lang.ClassCastException
at 
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:783) 

at 
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364) 

at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253) 

at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) 

at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) 

at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) 

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.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 

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.catalina.core.StandardContext.invoke(StandardContext.java:2415) 

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:432) 

at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386) 

at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoin

RE: Login Form

2003-07-08 Thread Erez Efrati
Yansheng Lin, I didn't understand, sorry.

All I want to do is enable the users to login into my site from the
starting page of the web site. 

Is it possible to post the a form action='j_security_check'? I mean
before accessing a protected page which the Tomcat protects and sends me
the my login page. I want to note here that I am using the JAAS.

Thanks,
Erez

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 08, 2003 5:47 PM
To: 'Struts Users Mailing List'
Subject: RE: Login Form

Not sure if I understand it entirely.  But you can use an iframe for the
login
form(protected page) on the site home page.  Something like:



Hope this helps.



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



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



Re: Best Practice, Variable Number Of Form Elements

2003-07-08 Thread Michael Thompson
If you have indexed props with lists of java objects
on your form:
public Person getPerson(int index);
public void setPerson(int index, Person person);
public Collection getPersons();
and you have a  or whatever

then struts(beanutils really?) will do something like

yourFormInstance.getPerson(4).setName(theValue);

What I've done in the past is lazily create person objects in the 
getPerson method

private ArrayList _persons = new ArrayList();

public Person getPerson(int index)
{
   while (index < _people.size())
   _people.add(new Person());
   return _people.get(index);
}
There are other methods for doing this lazy loading.  I'm pretty sure 
I've seen a LazyLoadingList or something in the jakarta commons projects.

   --m

James Childers wrote:

The PROBLEM is submitting this form. I haven't found a way to 
make Struts
auto-allocate space in a collection (or a Map, for that matter) in an
ActionForm for the submit action. Almost every example on 
this I've seen
deals with a fixed number of elements, and most of these 
still focus on the
pre-populate action. These examples completely avoid this issue.

So, when the number of elements on the form VARIES, what is the "best
practice" in design for this? I'm talking about an indexed or mapped
collection that contains other Java Beans. How can you get these to 
submit properly into an ActionForm? If there are options, can you weigh 
the pros/cons of each?

For example, I'm sure a session-scope bean would accomplish 
this, but I stay away from session-scope beans because of clustered 
deployment issues.
   

Make your Form elements String[] objects. These will automatically be populated (and sized) when the form is submitted. Since the ServletRequest interface works with attributes using Strings, this is just about the only way to do things. You can't pass Java objects across HTTP, at least not using GET or POST. You're forced to deal with strings by the protocol.

If you need to use something other than array, another solution is needed. Once your Form is passed to your Action, you can get the number of elements you will need using request.getParameterValues(String). This method returns a String[]; you could get the length of this array and use it to size your collection object as needed.

As an aside, I think you may be worrying about storing things in session more than is warranted. Modern containers are very good at tracking session information across clusters. We have a cluster of over a dozen systems for our site, and we have never encountered any problems with storing data in session. We try to minimize the use of sessions for the sake of efficiency and design, not because of problems with data being replicated across different systems.

-= J

-
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: How can I set the defualt selection?

2003-07-08 Thread Caroline Jen
Leon:

 I am working on the same thing.  Could you show
me your example of setting default selection?  

CJen
--- leonZ <[EMAIL PROTECTED]> wrote:
> Thank you very much! I have made it.
> 
> "Adam Hardy" <[EMAIL PROTECTED]>
> wrote in message
> news:[EMAIL PROTECTED]
> > You don't need to submit a form (HTTP PUT) to get
> a request object. You
> > can do an HTTP GET, with no form submit in HTML
> client-side, by clicking
> > on the URL, but to the servlet container and
> struts this is irrelevant.
> > The request object will be created for a GET just
> as for a PUT.
> >
> > And struts will also create a form bean for you
> depending entirely on
> > your action mapping in struts-config, regardless
> of whether you did a
> > GET or a PUT.
> >
> > GET and PUT are just HTTP internet transfer
> protocol formats. I believe
> > a GET has only got a HTTP header, whereas PUT has
> a body too, which
> > means you can send more bytes in your parameters.
> (GET parameters are on
> > the query string, PUT params are the form fields).
> >
> > Adam
> >
> > leonZ wrote:
> > > But how do you set the defualt option without
> submit the form?
> > > action.execute() need the HttpServletRequest
> object, and this object is
> got
> > > from a submitting of a form in jsp.
> > > Maybe I am wrong, could give me a valid code
> segment example?
> > >
> > > "Adam Hardy" <[EMAIL PROTECTED]>
> wrote in message
> > > news:[EMAIL PROTECTED]
> > >
> > >>Struts will automatically mark the selected
> option when the value of the
> > >>select box field/property in the actionform is
> set.
> > >>
> > >>So if you want to set one option as default in a
> blank form, set the
> > >>actionform property to the value of the option
> you want. Preferably in
> > >>the action.execute() so you don't muddle your
> jsp unnecessarily.
> > >>
> > >>Adam
> > >>
> > >>Caroline Jen wrote:
> > >>
> > >>>I have similar questions.  What is the syntax
> of the
> > >>> tag?
> > >>>
> > >>>Just take the example given by you, are the
> codes
> > >>>shown below correct?  Will the default
> selection
> > >>>shown?
> > >>>
> > >>>
> > >>>  labelProperty="first">
> > >>>  labelProperty="second">
> > >>>  labelProperty="third">
> > >>>
> > >>>
> > >>>JPJ
> > >>>
> > >>>--- leonZ <[EMAIL PROTECTED]> wrote:
> > >>>
> > >>>
> > I make it more clear here:
> > 
> > A normal html:
> > 
> >  first
> >   SELECTED>second
> >  third
> > 
> > 
> > how can I use the 'SELECTED' to set a defualt
> option
> > with struts tags.
> > 
> >    
> >    ...
> > 
> > 
> > "leon" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > 
> > 
> > >I am a beginner of struts. I can't use the
> > 
> > 'selected' property of the
> > select
> > 
> > 
> > >tag in struts to set the default selection
> like I
> > 
> > used it in a normal
> > html.
> > 
> > 
> > >It's happened in 'checked' property of struts
> > 
> > radio tag. Could you tell me
> > 
> > 
> > >how to set a defualt selection.
> > 
> > 
> > 
> > 
> > 
> >
>
>>>-
> > >>>
> > >>>
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > >>>
> > >>>
> > >>>
> > >>>__
> > >>>Do you Yahoo!?
> > >>>SBC Yahoo! DSL - Now only $29.95 per month!
> > >>>http://sbc.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]
> > >
> > >
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Best place for security checks in Struts?

2003-07-08 Thread David Erickson
And which class is the procesRoles method in?

- Original Message - 
From: "Sandeep Takhar" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 9:47 AM
Subject: Re: Best place for security checks in Struts?


> There must be a diagram that shows all the calls
> before
> it actually hits execute() method.  There are quite a
> few.
> 
> If you have a base action you can override one of them
> 
> processRoles seems to be a logical place...
> 
> sandeep
> --- David Erickson <[EMAIL PROTECTED]> wrote:
> > Hi I am setting up my webapp for security, had a big
> > thread about it last
> > week, we've implemented filters to handle all the
> > static filters sitting
> > around, but would also like to put some security
> > into the struts actions
> > themselves.  I'm trying to figure out where the best
> > place to implement the
> > checks would be, if I need to extend the class that
> > actually calls the
> > actions, or if I should extend the base action and
> > insert checks, or what
> > the best thing to do would be.  Somehow each of the
> > actions needs to have a
> > name assigned to it to check against as well, and
> > the information will be
> > pulled from a user bean stored in the session
> > variable.
> > 
> > Thanks in advance!
> > -David
> > 
> > 
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.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]



RE: Best place for security checks in Struts?

2003-07-08 Thread James Childers
> -Original Message-
> From: David Erickson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 10:52 AM
> To: Struts Users Mailing List
> Subject: Re: Best place for security checks in Struts?
> 
> 
> Where can I find this diagram of the flow through struts?  
> I'd love to check
> it out =)

http://rollerjm.free.fr/pro/Struts11.html

-= J

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



Re: Best place for security checks in Struts?

2003-07-08 Thread David Erickson
Where can I find this diagram of the flow through struts?  I'd love to check
it out =)

- Original Message - 
From: "Sandeep Takhar" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 9:47 AM
Subject: Re: Best place for security checks in Struts?


> There must be a diagram that shows all the calls
> before
> it actually hits execute() method.  There are quite a
> few.
>
> If you have a base action you can override one of them
>
> processRoles seems to be a logical place...
>
> sandeep
> --- David Erickson <[EMAIL PROTECTED]> wrote:
> > Hi I am setting up my webapp for security, had a big
> > thread about it last
> > week, we've implemented filters to handle all the
> > static filters sitting
> > around, but would also like to put some security
> > into the struts actions
> > themselves.  I'm trying to figure out where the best
> > place to implement the
> > checks would be, if I need to extend the class that
> > actually calls the
> > actions, or if I should extend the base action and
> > insert checks, or what
> > the best thing to do would be.  Somehow each of the
> > actions needs to have a
> > name assigned to it to check against as well, and
> > the information will be
> > pulled from a user bean stored in the session
> > variable.
> >
> > Thanks in advance!
> > -David
> >
> >
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.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]



RE: Best Practice, Variable Number Of Form Elements

2003-07-08 Thread James Childers

> The PROBLEM is submitting this form. I haven't found a way to 
> make Struts
> auto-allocate space in a collection (or a Map, for that matter) in an
> ActionForm for the submit action. Almost every example on 
> this I've seen
> deals with a fixed number of elements, and most of these 
> still focus on the
> pre-populate action. These examples completely avoid this issue.
> 
> So, when the number of elements on the form VARIES, what is the "best
> practice" in design for this? I'm talking about an indexed or mapped
> collection that contains other Java Beans. How can you get these to 
> submit properly into an ActionForm? If there are options, can you weigh 
> the pros/cons of each?
>
> For example, I'm sure a session-scope bean would accomplish 
> this, but I stay away from session-scope beans because of clustered 
> deployment issues.

Make your Form elements String[] objects. These will automatically be populated (and 
sized) when the form is submitted. Since the ServletRequest interface works with 
attributes using Strings, this is just about the only way to do things. You can't pass 
Java objects across HTTP, at least not using GET or POST. You're forced to deal with 
strings by the protocol.

If you need to use something other than array, another solution is needed. Once your 
Form is passed to your Action, you can get the number of elements you will need using 
request.getParameterValues(String). This method returns a String[]; you could get the 
length of this array and use it to size your collection object as needed.

As an aside, I think you may be worrying about storing things in session more than is 
warranted. Modern containers are very good at tracking session information across 
clusters. We have a cluster of over a dozen systems for our site, and we have never 
encountered any problems with storing data in session. We try to minimize the use of 
sessions for the sake of efficiency and design, not because of problems with data 
being replicated across different systems.


-= J

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



Re: Best place for security checks in Struts?

2003-07-08 Thread Sandeep Takhar
There must be a diagram that shows all the calls
before
it actually hits execute() method.  There are quite a
few.

If you have a base action you can override one of them

processRoles seems to be a logical place...

sandeep
--- David Erickson <[EMAIL PROTECTED]> wrote:
> Hi I am setting up my webapp for security, had a big
> thread about it last
> week, we've implemented filters to handle all the
> static filters sitting
> around, but would also like to put some security
> into the struts actions
> themselves.  I'm trying to figure out where the best
> place to implement the
> checks would be, if I need to extend the class that
> actually calls the
> actions, or if I should extend the base action and
> insert checks, or what
> the best thing to do would be.  Somehow each of the
> actions needs to have a
> name assigned to it to check against as well, and
> the information will be
> pulled from a user bean stored in the session
> variable.
> 
> Thanks in advance!
> -David
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: Login Form

2003-07-08 Thread Yansheng Lin
Not sure if I understand it entirely.  But you can use an iframe for the login
form(protected page) on the site home page.  Something like:



Hope this helps.



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



Best place for security checks in Struts?

2003-07-08 Thread David Erickson
Hi I am setting up my webapp for security, had a big thread about it last
week, we've implemented filters to handle all the static filters sitting
around, but would also like to put some security into the struts actions
themselves.  I'm trying to figure out where the best place to implement the
checks would be, if I need to extend the class that actually calls the
actions, or if I should extend the base action and insert checks, or what
the best thing to do would be.  Somehow each of the actions needs to have a
name assigned to it to check against as well, and the information will be
pulled from a user bean stored in the session variable.

Thanks in advance!
-David


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



Re: Workflow engine status

2003-07-08 Thread Matthias Bauer
It depends how you define workflow. This extension takes care of web 
workflow, i. e. it lets the developer define which paths a user can take 
when traversing a web application. This is something, Struts does not 
address.

--- Matthias

Sandeep Takhar wrote:

That is not a workflow engine per se.

sandeep
--- Matthias Bauer <[EMAIL PROTECTED]>
wrote:
 

I don't think that there has been anybody working on
this proposal for 
several months. It is definitely not part of the
latest Struts releases.

Depending on what your requirements are, you might
want to have a look 
at the Struts Workflow Extension at 
http://www.livinglogic.de/Struts .

--- Matthias

Kevin K wrote:

   

I was looking at Jakarta for a workflow engine and
 

I
   

found this URL -
 

http://jakarta.apache.org/struts/proposal-workflow.html.
   

What I can't find is when this proposal was written
and if this workflow engine is included in the
 

latest
   

release of Struts.

Thanks for your help,
Kevin
__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.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!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
 



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


RE: bean:write problem with struts 1.1

2003-07-08 Thread Nicolas Seinlet
I have the same problem. I solve it by deleting the data-sources section and some 
Action in the struts config file.

It's the only way I can solve the problem, but it's not a solution, because I need the 
data-sources and the actions.

After reading the net, the problem can also be due to xml parser, so I try to change 
the XML parser, but the problem is still present.

So, I'm lost on the way to find to solve the problem.

I will try with another Server, like jboss and see...

-Message d'origine-
De : David Jiao [mailto:[EMAIL PROTECTED]
Envoyé : mardi 8 juillet 2003 17:09
À : Struts Users Mailing List
Objet : RE: bean:write problem with struts 1.1


But I didn't specify any  from my struts-config file. Do I
have to include it anyway? 

On Tue, 2003-07-08 at 09:59, Nicolas Seinlet wrote:
> >It kept throwing a
> message: "org.apache.jasper.JasperException: Cannot find message
> resources under key org.apache.struts.action.MESSAGE".
> 
> It seems to be due to the the 
> 
> -
> 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: Dynamically changing forward in ActionForm

2003-07-08 Thread Neil Carusetta
After the ActionServlet initializes the modules from the struts-config file,
a freeze() is placed on the ModuleConfig which includes the ActionForwards
elements. As a result any subsequent change to the actionForward's path is
not possible.  

For the scenario you describe I usually define one forward element in the
struts-config mapping for the fail validate case (probably just a URI back
to the Logon JSP itself, and another forward for the success case (probably
an action call which display the next page and any prepopulated form-bean
info).

Hope that helps.

Neil Carusetta
CGC
Scottsdale, AZ

-Original Message-
From: Sandeep Takhar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 08, 2003 5:40 AM
To: Struts Users Mailing List
Subject: Re: Dynamically changing forward in ActionForm

This has been asked many times before.

You have to store something.  Sometimes it is nice to
have a user object that stores bookmarks etc.

try searching the archive...

sandeep
--- "Michael C. Clark" <[EMAIL PROTECTED]> wrote:
> I have a small ActionForm which I would like to
> include on all pages
> of my webapp (it does a login, with user name and
> password).  When
> the validate() method returns an ActionErrors
> object, I would like
> control to return to the page that the login
> ActionForm was called
> from.
> 
> Is there a way to do this without storing a
> reference to an
> ActionForward in the session context, then
> dynamically changing the
> Input of the ActionMapping in the ActionForm?  That
> seems far too
> complicated.
> 
> Any insight appreciated.
> 
> -Mike
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Best Practice Mapped/Indexed Properties on an ActionForm

2003-07-08 Thread Nate Bowler
I put out another similar post, but let me ask this question another way in
hopes of generating more feedback.

I have an application with many forms that contain dynamic lists of
elements. For example, rows of elements that contain a checkbox, select
list, and 2 text boxes for each element.

In traditional JSP design, normally I would create a loop and name these
elements "rowbox1", "rowselect1", "rowtext1", "rowtext21", ...
"rowbox(n)"...etc. At any rate, you get the idea; we've all done this.

With struts, you have the mapped and indexed property syntax that works
great for pre-populated forms. For example, I can have an "open" action that
pre-populates an ActionForm with all the nested data and forward to a JSP
that allows editing. Everything looks great.

The PROBLEM is submitting this form. I haven't found a way to make Struts
auto-allocate space in a collection (or a Map, for that matter) in an
ActionForm for the submit action. Almost every example on this I've seen
deals with a fixed number of elements, and most of these still focus on the
pre-populate action. These examples completely avoid this issue.

So, when the number of elements on the form VARIES, what is the "best
practice" in design for this? I'm talking about an indexed or mapped
collection that contains other Java Beans. How can you get these to submit
properly into an ActionForm? If there are options, can you weigh the
pros/cons of each?

For example, I'm sure a session-scope bean would accomplish this, but I stay
away from session-scope beans because of clustered deployment issues. I
would imagine a hidden value giving the length might be useful, but I'm not
sure where in the ActionForm's initialization sequence it could be used.
Perhaps I need to do something different in the reset() method? Are there
other options?

Nate


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



Login Form

2003-07-08 Thread Erez Efrati
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
FORM 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]



  1   2   >