Re: Session-Problem

2005-05-23 Thread Jorge Chacón Souto


Hello,

I have the same problem some days ago. I found two solutions: using 
https(SSL) in the web server (if SSL really fits to your application 
security requirements), since SSL web pages are not cached, or telling 
the browser to don't cache the JSP page, so when the user clicks the 
back button the browser will have to send a request.


   response.setHeader("Cache-Control","no-cache"); //Forces 
caches to obtain a new copy of the page from the origin server
   response.setHeader("Cache-Control","no-store"); //Directs 
caches not to store the page under any circumstance
   response.setDateHeader("Expires", 0); //Causes the proxy 
cache to see the page as "stale"
   response.setHeader("Pragma","no-cache"); //HTTP 1.0 backward 
compatibility


More details on:

http://www.javaworld.com/javaworld/jw-09-2004/jw-0927-logout.html

Jorge.


Mohan escribió:


Hi All,


   I have problem in my application.In My application I have login and log
out functionality.When user clicks log-out I am removing the session and I
am redirectiong to Login page.So far it is working fine.But problem starts
here.If user clicks the back button of browser window.He is able to see the
last visited page .But I want to restrict him like ,once the user is logged
out .and if he clicks the back button I want him to redirect to the login
page or showing some message.

thanks and regards,
Mohan.


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



wildcard action mapping

2005-05-23 Thread Richard Reyes
Hello Guys,

I got this action mapping...


   
   
   
   


Is it possible to access the exact "*" wildcard value inside
LoadCustomPropertiesAction?

Regards and TIA!
Richard

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



Session-Problem

2005-05-23 Thread Mohan
Hi All,


I have problem in my application.In My application I have login and log
out functionality.When user clicks log-out I am removing the session and I
am redirectiong to Login page.So far it is working fine.But problem starts
here.If user clicks the back button of browser window.He is able to see the
last visited page .But I want to restrict him like ,once the user is logged
out .and if he clicks the back button I want him to redirect to the login
page or showing some message.

thanks and regards,
Mohan.


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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Dakota Jack
Okay, Michael.  If this is what you like, good luck.  I am stopping
the conversation from my side if it is staying at this level.

On 5/23/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > > JSPs "fetch" data indeed is putting application logic in the JSPs.
> > > This does not give you flexibility.  Quite the opposite, it ties your
> > > model and you view down by coupling them.  Rather than give you
> > > flexibility it hamstrings you.
> 
> So what? These two will always be related unless you use simple
> meaningless DTOs with no relation to business objects. I personally do
> not use this type of DTO, I prefer to use real business objects in the
> view. I don't care that it ties view to the model. But at least I get
> readable, understandable code and I get business rules. Oh, right, I
> use business objects for input too, in this example they are used
> solely for output... But Laurie said, that it is not a real business
> object, it is just a "view object", so view is actually not tied that
> tight to the model.
> 
> > Consider a comercial
> > product implemented on Struts and JSPs. You build the product and ship
> > it to customers. You don't ship the source code -- that's proprietary --
> > but you do ship the JSPs and you want the customers to be able to
> > locally customize the application.
> 
> You do realize, that JSP _is_ a part of app source code, do you? And
> the more you put into JSP, the more this supposedly dumb JSP page will
> look like "real code"? If you ship without source code, you'd rather
> precompile the JSPs.
> 
> Now, to your problem. I will try to think right while I am typing.
> First of all, I haven't actually used dynaforms, so no advices here.
> Now, you want your input to go to action form? Why? Apparently,
> because you want Struts to parse request data, and to perform
> automatic validation. OK. So you need to associate form bean with
> every incoming request, but you do not want to redefine form beans,
> hence dynaform.
> 
> Struts uses getters and setters to put values into the form (at least
> if it is not a dynamic form), so you can use getters and setters to
> direct where the data goes... I am not sure how do you do this with
> dynabean, but with regular bean you would have your getter pulling
> data from your view object, and the setter storing data in the form
> field. Then, after validation, you would type-convert and copy values
> from form fields to your view object.
> 
> Or... you can still pull data from your view object and display values
> using bean:write. But the tags themselves will have "property"
> pointing to the form bean. I am not sure how this will work, but if
> you were able to print values from view object, and submit them to the
> form bean, then you'd just copy them to view object, and _then_
> validate them. Then, if needed, you would redisplay data again from
> the view object, which contains updated data (possibly incorrect, but
> who cares, this view object is a _copy_ of a real object anyway,
> right?). In this case you do not need getters in the form bean.
> Because there are no getters, this "pull from view object, submit to
> action form" might work. I have not really tried it.
> 
> Michael.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Dakota Jack
I believe the point was nothing like this at all, Dave.  Don't know
why you thought it was.  Seems like you just thought this stuff up
separate to me.  However, certainly I don't think that the issue
whether or not you are writing a CMS is relevant to the issues
discussed.  I also have no idea why you went off on the XML stuff. 
This is simply an issue of where work on the model should be.  Your
discussion, so far as I can tell, is about something entirely
different and I have no idea where you got these issues.  If these are
the issues, then you must be speaking some language with Ms. Harper
that I don't know.

On 5/23/05, Dave Newton <[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> 
> >Just use some framework, like Struts.  Write your actions and your
> >model to take are of this business and feed the data to the
> >appropriate scopes and objects.
> >
> >
> I believe the point was that this isn't an option. 

-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Dakota Jack
Normally, Camilo, when you have a question you start your own thread.

On 5/23/05, Camilo Quevedo <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to create a struts application, but it seams that when i
> ask for a user input (html:form) it doesn't,t recognize the special
> characters. How can I configure my application so that it accepts
> special character??
> 
> So far I've done this:
> 
> i my jsp I put <%@ page contentType="text/html;charset=UTF-8"
> language="java" %>
> 
> and in my action I used,   request.setCharacterEncoding("UTF-8");
> and it still doesn't work.
> 
> What can I do??
> 
> Camilo
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Re: obtaining an action's ActionMapping

2005-05-23 Thread Hubert Rabago
Try ModuleUtils.getInstance().findActionConfig("actionB");

Hubert

On 5/23/05, Jorge Chacón Souto <[EMAIL PROTECTED]> wrote:
> Hi.
> 
> Anybodoy knows how can I access the action B's ActionMapping from the
> Action A (a preprocessing filter that is executed before every action) ?
> I have to do that because I need to read the properties of many actions
> in the filter, to check if the user can execute those actions.
> I've tried the method
> ConfigHelper.*getActionMapping*(java.lang.String path), but it returns
> null because it's not implemented yet.
> In Struts 1.0 there was a ActionServlet.findmapping method.
> 
> Thanks,
> Jorge.
> 
> 
> -
> 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: logic:iterate multiple collections

2005-05-23 Thread Wendy Smoak
From: "Titus Barik" <[EMAIL PROTECTED]>
>
> Let's say I have two collections, A, and B. Is there a way to iterate
> over multiple collections with something like logic:iterate?
>

If you know they're the same size and in the same order, (should be the case
with List,) how about iterating over one with 
and using ${status.count} to address the second List.

Can you change the design?  If the items in both collections really belong
together, try to store them together so you don't have to jump through hoops
like this.

-- 
Wendy Smoak


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



Re: Trouble get the size of an ArrayList

2005-05-23 Thread Wendy Smoak
From: "Brent Vaughn" <[EMAIL PROTECTED]>
> I am trying to print out the size of an ArrayList.
>
> Here is the code I am using.  BC is a bean container.  infusion is a bean.
> The variable prepopUserList is an ArrayList.
>
> 
>

There is no 'getSize' method on ArrayList, I don't see how this could work.
(ArrayList isn't a JavaBean, its methods don't conform to the naming
conventions for get/set methods for its properties.)

A quick Google search http://www.google.com/search?q=JSTL+List+size turns up
an article that deals with this issue:
http://www.phptr.com/articles/article.asp?p=30946&seqNum=8&rl=1

And another link pointed me towards
http://struts.apache.org/userGuide/struts-bean.html#size

I've never used it, but apparently   will put the size of  a
Collection into page scope for you.
Perhaps...
  ??
 

HTH,
-- 
Wendy Smoak


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



Re: sTRUTS 1.3 - chain flow / solved

2005-05-23 Thread Frank W. Zammetti

Sorry I didn't respond sooner Marco,

Fantastic work!  I haven't had a chance to look at what you sent me yet, 
but I definitely look forward to doing so.  Would you have any objection 
to me putting your code out on SF in CVS, maybe as a separate branch? 
That way others can benefit from your efforts.


Take care,
Frank

Marco Mistroni wrote:

Hello,
Looks like I found a way to make it work! :-)
I have submitted the code to Frank..surely he'll find way to optimize
it..
For now, I had to extend few commands (SelectAction, ValidateActionForm,
PopulateActionForm & SelectForward) and I had to rewrite struts
chain-config.xml to use my own commands...


Thanx to all of you who gave me precious hints!

Regards
Marco








--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



simple Validator question

2005-05-23 Thread Riyaz Mansoor


i saw a doc which had

wondering if multiple forms could be declared like this? sorry but am 
t tired to test right no :)


riyaz


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



Trouble get the size of an ArrayList

2005-05-23 Thread Brent Vaughn
I am trying to print out the size of an ArrayList.

 

Here is the code I am using.  BC is a bean container.  infusion is a bean.
The variable prepopUserList is an ArrayList.  

 



 

 

This is the error it gives me.

 

MonitorFilter::javax.servlet.ServletException: An error occurred while
evaluating custom action attribute "value" with value
"${BC.infusion.prepopUserList.size}": The "." operator was supplied with an
index value of type "java.lang.String" to be applied to a List or array, but
that value cannot be converted to an integer. (null)

 

 

Thanks,

 

Brent Vaughn

 



logic:iterate multiple collections

2005-05-23 Thread Titus Barik

Hi all,

Let's say I have two collections, A, and B. Is there a way to iterate 
over multiple collections with something like logic:iterate?


i.e


  ${rowA.name}
  ${rowB.value}


--
Titus Barik ([EMAIL PROTECTED])
http://www.barik.net

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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Michael Jouravlev
> > JSPs "fetch" data indeed is putting application logic in the JSPs.
> > This does not give you flexibility.  Quite the opposite, it ties your
> > model and you view down by coupling them.  Rather than give you
> > flexibility it hamstrings you.

So what? These two will always be related unless you use simple
meaningless DTOs with no relation to business objects. I personally do
not use this type of DTO, I prefer to use real business objects in the
view. I don't care that it ties view to the model. But at least I get
readable, understandable code and I get business rules. Oh, right, I
use business objects for input too, in this example they are used
solely for output... But Laurie said, that it is not a real business
object, it is just a "view object", so view is actually not tied that
tight to the model.

> Consider a comercial
> product implemented on Struts and JSPs. You build the product and ship
> it to customers. You don't ship the source code -- that's proprietary --
> but you do ship the JSPs and you want the customers to be able to
> locally customize the application.

You do realize, that JSP _is_ a part of app source code, do you? And
the more you put into JSP, the more this supposedly dumb JSP page will
look like "real code"? If you ship without source code, you'd rather
precompile the JSPs.

Now, to your problem. I will try to think right while I am typing.
First of all, I haven't actually used dynaforms, so no advices here.
Now, you want your input to go to action form? Why? Apparently,
because you want Struts to parse request data, and to perform
automatic validation. OK. So you need to associate form bean with
every incoming request, but you do not want to redefine form beans,
hence dynaform.

Struts uses getters and setters to put values into the form (at least
if it is not a dynamic form), so you can use getters and setters to
direct where the data goes... I am not sure how do you do this with
dynabean, but with regular bean you would have your getter pulling
data from your view object, and the setter storing data in the form
field. Then, after validation, you would type-convert and copy values
from form fields to your view object.

Or... you can still pull data from your view object and display values
using bean:write. But the tags themselves will have "property"
pointing to the form bean. I am not sure how this will work, but if
you were able to print values from view object, and submit them to the
form bean, then you'd just copy them to view object, and _then_
validate them. Then, if needed, you would redisplay data again from
the view object, which contains updated data (possibly incorrect, but
who cares, this view object is a _copy_ of a real object anyway,
right?). In this case you do not need getters in the form bean.
Because there are no getters, this "pull from view object, submit to
action form" might work. I have not really tried it.

Michael.

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



[Shale] Javascript validator

2005-05-23 Thread Mariano Petrakovsky

I have a JSP like this:

-










---

when JSF generate mi static HMTL using Commons Validators, (for instance,
i'm not fill the "currentconfig" field), mi mozilla Javascript Console
capture this: "Error: v is not defined"
Then... looking source of this static page... I'm Found the javascript
generate like this:

---
var bCancel = false;
function ValidateForm(form) { return bCancel || true
&& validateRequired.js,v(form)
;}
function required() {
this[0] = new Array("content:testForm:currentconfig", "currentconfig is
required.", new Function("x", "return {}[x];"));
}
---
Now... I'm asking... it's and bug of commons validator libraries or... it's
my error???


--
Mariano G. Petrakovsky
Programmer · Software Factory
AXG Tecnonexo -  www.tecnonexo.com

Development facilities:Av. Maipú 1252 8º (C1006ACT) · Buenos Aires ·
Argentina.
Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065.

Headquarters: 1604 Spring Hill Road, Suite 160 Vienna · VA 22182 · USA.
Tel.: (202) 986-7541 - Fax: (202) 787-3891.


· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · ·




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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Dave Newton

Dakota Jack wrote:


Just use some framework, like Struts.  Write your actions and your
model to take are of this business and feed the data to the
appropriate scopes and objects.
 

I believe the point was that this isn't an option. It seems to me, in 
this case, that the client wants more control over the application, but 
for various reasons won't be writing Actions, etc.


Therefore another way "in" to the system needs to be provided, whatever 
vernacular anybody wants to use.


To me it looks like a place where a different delivery mechanism, like 
XML, and subsequent transformation might be more appropriate: more 
service-oriented rather than page-oriented.


Dave



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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Dakota Jack
On 5/23/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> > You cannot talk about request objects and ignore the client.  The
> > requests come from the client.
> 
> Sure, but I'm not talking about request objects. A request to
> http://host/myapp/something.jsp (with no query parameters) contains no
> request data, but the JSP still has to display information. What I'm
> taling about is how that information is retrieved from the backend.

A string containing a protocol (http) a URL (host) and a number of
other identification matters (myapp, something.jsp) whether having
query parameters or not is not a request.  All sorts of data goes with
a request on all occasions which enable the communications in for
example, http to take place.

> Absolutely, which is why it's important when using pull to keep it
> simple and make sure data retrieval is as declarative as possible. I'm
> certainly not advocating that JSPs should be making JDBC calls or anything.

I repeat, again, you are not using the terms "pull", or "push", or
"request" the way they are used.  Your use is idiosyncratic.  There is
not hing declarative about your approach either.  This is not what
"declarative" means in this context.

> As I said in my previous post, you need to understand the design
> constraints. No approach solves every solution, no design rule is
> inviolate. I'm using a pull model to solve a very specific requirement:
> that the data displayed on a JSP page should be able to be changed /from
> the JSP page/, without access to the application source code.

This is not, again, a "pull/push" issue.  Pull and push are
relationships between client and server.  Your relationship is between
the view and the model.

This also is not related to "design constraints" or "design rules". 
This is just coding on the JSP page and is really not a good idea.  It
is such a bad idea that whole technologies are invented to avoid it. 
If you are running a "mom and pop" show, this is not important.  In
that case, not much would be important.  But, in the "craft" of
programming, which admittedly is not rocket science, it is important.


> 
> I can see why it looks, at first glance, like I'm doing something badly
> wrong but, in the light of that requirement, I'm not aware of another
> approach that's workable. Feel free to suggest alternatives if you have
> them :-)

Just use some framework, like Struts.  Write your actions and your
model to take are of this business and feed the data to the
appropriate scopes and objects.

-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Re: Stateless web apps

2005-05-23 Thread Laurie Harper

andy wix wrote:

I am working at a place that doesn't use session state for their web apps.
The reason given is that they have 2 physical servers and 2 Oracle 
Application Servers running on each of these machines for failover.  
 From the little I know about clustering, I thought that if everything 
in the session implements Serializable then session state is 
tranparently valid accross requests - even if you end up on another jvm.


Has anyone else ever heard of this restriction - I can see problems 
e.g., can't use Struts tokens to defeat the usual refresh problems.


Sharing sessions between containers ('session clustering') is not a 
standard feature -- i.e. the Servlet spec neither requires this 
capability nor specifies how it should be impelemnted. However, most 
modern contains do support session clustering, in their own proprietary 
way. For example, Tomcat supports session clustering via shared disk, 
JDBC datastore, etc.


I don't know what session clustering abilities Oracle Application Server 
has but it can probably be configured to do this. Bear in mind that 
there are performance tradeoffs to consider as well as opperational 
impact -- for example, if you cluster sessions via shared disk, you now 
need to make your shared disk array redundant as well.


If you can implement your application without relying on sessions at 
all, your life will be simpler ;-) If you do need to implement session 
clustering, consider using host affinity as an alternative. With host 
affinity, the load balancer is configured to share sessions between the 
servers equally, but allways route requests for a particular session to 
the same server. That saves you the overhead of session clustering, at 
the cost that if one of the application servers goes down all users 
whose sessions were housed there will loose their session and have to 
log in again on the other server.


L.



More immediately, I have a problem with a typical scenario.  My normal 
approach is:
I have a 'preload' action that gets an ArrayList of data from the db and 
sets this in the session.

Then forward to the jsp that displays this stuff.
This page has something like:



 
 
   
 
   
 
   
 
 

This gives me an index of the link that was clicked and in the next 
action I simply look this value up from the ArrayList in the session.


Does anyone know how this functionality could be achieved without using 
the session?


Assuming you can rebuild the list at any time, you can use request scope 
instead of session scope and rebuild the list at the start of each action.


L.


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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Frank W. Zammetti
Rather than pollute the view (if one chooses to perceive it that way...
I'm staying away from that debate!), why not introduce some sort of
scripting engine into the mix?  I'm not really sure precisely where
because I don't know your project, but I say this based on your comment:

"True, at development time. But it's a lot easier if you don't *have* the
source code to the model or rest of the system."

Think of something like Microsoft Excel... you don't have access to the
source code obviously, but it exposes are rather rich object model that
you can manipulate through scripting.  This lets you customize the app in
essence in just about any way you want without needing the source.  It
also is arguably better architecturally than allowing someone to alter the
dialog resources of the app (not a perfect analogy I realize, but
hopefully close enough to get the point across).

There is the scripted Actions project specifically for Struts, there's
Jelly that might be applicable, the BSF, etc.

Something along those lines is almost tailor-made for the "the client
needs to modify our product in some way" situation.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Mon, May 23, 2005 2:20 pm, Laurie Harper said:
> Dakota Jack wrote:
>
>> If you want to discuss this, I have a number of things to say.  If you
>
> So I see on your other reply ;-)
>
>> find that "argumentative", then I won't offer anything more.  Having
>
> No, I'm happy to discuss; it's always worth hearing another person's
> perspective.
>
>> JSPs "fetch" data indeed is putting application logic in the JSPs.
>> This does not give you flexibility.  Quite the opposite, it ties your
>> model and you view down by coupling them.  Rather than give you
>> flexibility it hamstrings you.
>
> That's somewhat true from a development perspective; there's a design
> constraint in effect here that you're missing, though (see below).
>
>> This also is no easier than writing the code where it should be, in the
>> model.
>
> True, at development time. But it's a lot easier if you don't *have* the
> source code to the model or rest of the system. Consider a comercial
> product implemented on Struts and JSPs. You build the product and ship
> it to customers. You don't ship the source code -- that's proprietary --
> but you do ship the JSPs and you want the customers to be able to
> locally customize the application.
>
> This is where the pull approach provides a great deal of flexibility.
> There are a lot of things you might want your customers to be able to do
> by way of customization that are simply not possible using a push
> methodology.
>
> L.
>
>>
>> On 5/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
>>
>>>There's no code in the JSPs, though you could make the argument that
>>>having the JSPs fetch the data they need, through whatever means, is
>>>putting application logic in the JSPs. And yes, this is generally not
>>>reommended. In this case it's minimal and the trade off is the
>>>flexibility it provides anyone writing or modifying the JSPs. It's the
>>>best way to provide an easily cusomizable solution without needing to
>>>provide Java source code.
>>>
>>>L.
>>>
>>>Dakota Jack wrote:
>>>
You are just coding on the JSP page, which for reasons that have been
discussed to death is a bad idea.  If you like it, have at it.   But,
generally speaking this is a very bad idea.

On 5/19/05, Laurie Harper <[EMAIL PROTECTED]> wrote:


>Adam Hardy wrote:
>
>
>>Laurie,
>>
>>my chosen option would be to use your view objects as form objects,
>>where you modify the view object by adding string-typed getters and
>>setters for every property.
>
>I'm not really keen to 'pollute' the view objects with String-type
>derived properties just for the HTML presentation; the view objects
> are
>how any client (web app, web service, Swing GUI, etc) would interact
>with the application. This also implies having String-to-model
>conversion code scattered through the view objects...
>
>
>
>>I don't really get what you mean in your (2).
>
>This is what I decided to try first. I threw together a prototype last
>night, and it seams to work well. Basically, the idea is:
>
>- extend the view API to include 'View.toMap(Map props)' and 'void
>View.fromMap(Map props)' on each view class
>
>- you can then do view.fromMap(form.getMap()) and
>view.toMap(form.getMap()) to translate between views and form beans
>
>- add a custom tag which takes a form bean and a view and loads the
>form's map from the view (I've implemented this so it can lookup the
>form bean from an enclosing  tag, so you only have to pass
>in the view)
>
>Now, my JSPs can do something like this:
>
>
>... setup view (e.g. populate from db) ...
>
>
>Now, the form bean associated with 

[Shale] Validation...

2005-05-23 Thread Mariano Petrakovsky
I'm installed Shale Framework, because I need use the Strut's validator
under JSF...
I having some troubbles with javascript generation... like "javascript
errors"...
Somebody know what happen?...

(I'm practicing my english... sorry :S)

--
Mariano G. Petrakovsky
Programmer · Software Factory
AXG Tecnonexo -  www.tecnonexo.com

Development facilities:Av. Maipú 1252 8º (C1006ACT) · Buenos Aires ·
Argentina.
Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065.

Headquarters: 1604 Spring Hill Road, Suite 160 Vienna · VA 22182 · USA.
Tel.: (202) 986-7541 - Fax: (202) 787-3891.


· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · ·




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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Camilo Quevedo
Hi, I'm trying to create a struts application, but it seams that when i 
ask for a user input (html:form) it doesn't,t recognize the special 
characters. How can I configure my application so that it accepts 
special character??


So far I've done this:

i my jsp I put <%@ page contentType="text/html;charset=UTF-8" 
language="java" %>


and in my action I used,   request.setCharacterEncoding("UTF-8"); 
and it still doesn't work.


What can I do??

Camilo

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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Laurie Harper

Dakota Jack wrote:


If you want to discuss this, I have a number of things to say.  If you


So I see on your other reply ;-)


find that "argumentative", then I won't offer anything more.  Having


No, I'm happy to discuss; it's always worth hearing another person's 
perspective.


JSPs "fetch" data indeed is putting application logic in the JSPs. 
This does not give you flexibility.  Quite the opposite, it ties your

model and you view down by coupling them.  Rather than give you
flexibility it hamstrings you.


That's somewhat true from a development perspective; there's a design 
constraint in effect here that you're missing, though (see below).



This also is no easier than writing the code where it should be, in the model.


True, at development time. But it's a lot easier if you don't *have* the 
source code to the model or rest of the system. Consider a comercial 
product implemented on Struts and JSPs. You build the product and ship 
it to customers. You don't ship the source code -- that's proprietary -- 
but you do ship the JSPs and you want the customers to be able to 
locally customize the application.


This is where the pull approach provides a great deal of flexibility. 
There are a lot of things you might want your customers to be able to do 
by way of customization that are simply not possible using a push 
methodology.


L.



On 5/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:


There's no code in the JSPs, though you could make the argument that
having the JSPs fetch the data they need, through whatever means, is
putting application logic in the JSPs. And yes, this is generally not
reommended. In this case it's minimal and the trade off is the
flexibility it provides anyone writing or modifying the JSPs. It's the
best way to provide an easily cusomizable solution without needing to
provide Java source code.

L.

Dakota Jack wrote:


You are just coding on the JSP page, which for reasons that have been
discussed to death is a bad idea.  If you like it, have at it.   But,
generally speaking this is a very bad idea.

On 5/19/05, Laurie Harper <[EMAIL PROTECTED]> wrote:



Adam Hardy wrote:



Laurie,

my chosen option would be to use your view objects as form objects,
where you modify the view object by adding string-typed getters and
setters for every property.


I'm not really keen to 'pollute' the view objects with String-type
derived properties just for the HTML presentation; the view objects are
how any client (web app, web service, Swing GUI, etc) would interact
with the application. This also implies having String-to-model
conversion code scattered through the view objects...




I don't really get what you mean in your (2).


This is what I decided to try first. I threw together a prototype last
night, and it seams to work well. Basically, the idea is:

- extend the view API to include 'View.toMap(Map props)' and 'void
View.fromMap(Map props)' on each view class

- you can then do view.fromMap(form.getMap()) and
view.toMap(form.getMap()) to translate between views and form beans

- add a custom tag which takes a form bean and a view and loads the
form's map from the view (I've implemented this so it can lookup the
form bean from an enclosing  tag, so you only have to pass
in the view)

Now, my JSPs can do something like this:


... setup view (e.g. populate from db) ...


Now, the form bean associated with the enclosing form is populated from
the view object. On subsequent page loads, I can skip the loadForm tag,
and the form bean has the data from the previous submission.

I still need to do some more testing, but this seems to be working nicely.




I think the parameter handling issue is hugely debatable. I've lost
count of the number of discussions I have had about it.


Yeah, lots of options here :-)




Alot depends on where you get your view objects from. Are they the data
transfer object pattern?


Roughly, yes. There's a 'service layer' that interacts with the domain
model (business objects). It returns view objects which are POJOs
containing the state from the business objects but not the behaviour.




Whatever, try to keep it as simple as possible.


Always good advice! The trick is remembering who to keep it simple for,
me or the end user ;-)

L.




Adam

On 18/05/05 20:45 Laurie Harper wrote:




[Appologies for the long post; hopefully it'll spark some interesting
discussion though.]

Does anybody develop with Struts using a 'pull' model (where JSPs 'pull'
in the data they need, rather than having it 'pushed' to them by a
calling action)? I've been doing this successfully for some time with
applications that only use forms for capturing new data, no editting of
existing data. Now that I come to add the ability to update existing
data to an application, I've hit a limitation in my design. I'm hoping
others have encountered the same issue, or have suggestions for dealing
with it.

Here's the problem: I generally have a JSP for capturing new data, which
will use a

obtaining an action's ActionMapping

2005-05-23 Thread Jorge Chacón Souto

Hi.

Anybodoy knows how can I access the action B's ActionMapping from the 
Action A (a preprocessing filter that is executed before every action) ?
I have to do that because I need to read the properties of many actions 
in the filter, to check if the user can execute those actions.
I've tried the method 
ConfigHelper.*getActionMapping*(java.lang.String path), but it returns 
null because it's not implemented yet.

In Struts 1.0 there was a ActionServlet.findmapping method.

Thanks,
Jorge.


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



Re: DynaActionForm and the 'pull' model

2005-05-23 Thread Laurie Harper

Dakota Jack wrote:

You cannot talk about request objects and ignore the client.  The
requests come from the client.


Sure, but I'm not talking about request objects. A request to 
http://host/myapp/something.jsp (with no query parameters) contains no 
request data, but the JSP still has to display information. What I'm 
taling about is how that information is retrieved from the backend.



Any data coming to a JSP comes in the same way.  This is not pull and
this is not push.  The data comes from some class existing in some
scope: page, request, session, application.  You are not doing
anything new.  You are just doing the old stuff badly, I believe.  I
only say that to be helpful as I can be and not to belittle you or
anything like that.

Your cases has the JSP more than requesting the data.  Your case has
the JSP in charge of getting the data.  That is very different.  Any
data coming to a JSP must be "requested", i.e. gotten from some call
from the JSP page.  Your pages does more, viz. instantiates the
objects, etc. which provide the data on the JSP page.

Again, your idea that way is flexible is not true.  You are less able
to "customize" with your approach because you have all sorts of
disparate code tied to each other.  If you have a variable on a JSP
page be a logical reference to data, then the physical source of that
data becomes irrelevant.  You, however, make direct references rather
than logical references and tie down your code completely.


JSPs access data through page/request/session scoped variables, just 
like yours do. With a push methodology, a JSP may assume that there will 
be a request scoped variable 'user' which references a bean of type 
UserView. It renders the page by making reference to the properties of 
this bean through the 'user' variable.


The only difference with a pull methodology is that, somewhere in the 
JSP, there is a . The rest of the JSP is 
written exactly as it would have been using a pull methodology. There's 
no 'disparate code' and the references to data are no more or less 
direct than when using push.



The coupling is the problem.  Coupling leads to fragile, rigid, code
which is expensive to maintain.


Absolutely, which is why it's important when using pull to keep it 
simple and make sure data retrieval is as declarative as possible. I'm 
certainly not advocating that JSPs should be making JDBC calls or anything.



I hope this is helpful, and realize that I am just stating my opinion.
 I don't think you are at all right, but certainly am willing to
listen to what you have to say.


As I said in my previous post, you need to understand the design 
constraints. No approach solves every solution, no design rule is 
inviolate. I'm using a pull model to solve a very specific requirement: 
that the data displayed on a JSP page should be able to be changed /from 
the JSP page/, without access to the application source code.


I can see why it looks, at first glance, like I'm doing something badly 
wrong but, in the light of that requirement, I'm not aware of another 
approach that's workable. Feel free to suggest alternatives if you have 
them :-)


L.



On 5/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote:


You're bluring the distinction between client-side behaviour and
server-side behaviour a little there. Ignore the client side for the
moment; I'm talking only about how the application works on the server.

The issue is about how the JSP gets access to the data it needs to
display. Normally, as you say, there would be an action or some other
server-side component which executes before the JSP and places data into
some scope which the JSP then retrieves. That's what I'm refering to as
a 'push' model, in that there is some component pushing data out to the JSP.

In my case, I want the JSP to get access to the data by explicitly
requesting it -- i.e. 'pulling in' the data it needs. As I noted in my
other reply to you, this could be seen as breaking the MVC paradigm by
putting application logic in the JSP. There's some truth in that.

The reason I do it is quite simple. By having the JSPs aquire the data
they need in this way, it is much easier to customize the application
after it is delivered. Page flow can be changed, additional information
can be shown on an existing page, and so, all without modifying Java
code. That means I can deliver a highly customizable product. It's a
trade-off: I bend MVC encapsulation, but gain a significant benefit.

So, 'pull', in the context of this discussion, just refers to how the
JSP gets acces to the data it needs. In my implementation, the JSPs
instantiate beans which represent a view of the data they need. The
beans then do the work of interacting with the backend (via a service
layer). So the data access is really still in the controller part of the
application, it's just being triggered by the JSPs rather than by a
Struts action. In a way, you can think of it as using the JSPs to
declaratively describe what data 

Re: Antwort: RE: howto redirect to login site after session expiration?

2005-05-23 Thread Rick Reumann

Frank Ratzlow wrote the following on 5/23/2005 6:54 AM:
 some of the actions) serve authorized and unauthorized users the same.
Afaik if a user sends his first request a session will be created for him 
(default behaviour). Additionally we invalidate a session when a user 
authorizes and store his credentials etc. in a newly created one.


I'm not exactly sure what you mean above about the default behavior 
creating a Sesion? I use a Filter to test for the Session and it works 
fine...


in my doFilter(..) method...

 HttpSession session = request.getSession(false);
 if (session == null) {
response.sendRedirect(contextPath+"/sessionTimeOut.jsp");
return;
 }

Why wouldn't something like the above work?

I also don't test certain paths with this filter so not all paths are 
checked for a valid session (ie if they go right to the login page 
obviously I don't want to test for a Session yet.)


--
Rick

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



Re: Collecting Dynamic Form Data

2005-05-23 Thread erikweber
If I'm not mistaken, Struts has some mechanisms for dynamic fields in 
ActionForms. Regardless, can't you use request.getParameterNames in your 
Action's execute method?

Erik


-Original Message-
From: Andrew Thorell <[EMAIL PROTECTED]>
Sent: May 23, 2005 11:07 AM
To: Struts Mailing List 
Subject: Collecting Dynamic Form Data

Greetings all,

I'm trying to write an application that will collect form data from a
webpage when it is directed at an Action. Is there any way to do this
without using an ActionForm (which is pretty useless because in some
cases I won't know what variable names will be pointed at me)?

Any thoughts would be greatly appreciated.

Andrew

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



Antwort: Re: Re: Antwort: RE: howto redirect to login site after session expiration?

2005-05-23 Thread Frank Ratzlow
okay, but handling sessions is nothing special for a certain framework. I 
tend to place it some where in the container area itself, how to react on 
this condition. All the feedback I got so far (thanx ;-)) leads to an own 
implementation of session tracking, whatever it looks like. I was 
convinced I could rely on some container capabilities.

Regards

Frank



Dakota Jack <[EMAIL PROTECTED]> 
23.05.2005 17:11
Bitte antworten an
"Struts Users Mailing List" 


An
Struts Users Mailing List 
Kopie

Thema
Re: Re: Antwort: RE: howto redirect to login site after session 
expiration?






I am of the opinion that this is too specific a situation for a
framework to take over.  I really get irritated when frameworks plug
in stuff that should be taken care of at the application level.  I do
think that making code available for people that want a prepackaged
solution in a "plugin" or "application" area relating to a framework
makes sense.  I have beaten this drum to death on this list, however,
with no positive response.  As things are with Struts, many
application specific matters are covered (Struts upload, the
"dispatch" Action subclssses, etc.) but most (shopping cart, etc) are
not.  I wish there were a set of policies and procedures on this, but
just get the usual rigamoroles when a discussion on this is attempted.
 I sure would not want the framework to put something in on this, like
with file uploads, that we would then have to work around.

On 5/23/05, Frank Ratzlow <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> okay, but this leads to a solution where I do have to ensure a manuell
> redirect to the appropriate site by tracking session attributes. I 
thought
> that the container is maintaining a list of expired sessions (or at 
least
> valid sessions to figure out invalid sessions), so that I can 
_configure_
> (web.xml sounds like a good place) what to do in the case of an expired
> session, means a session id stored in this list.
> The problem with the NPE is a general prob that applies to all use cases
> where the user leaves some input site open in the browser and tries to
> submit it after the session timed out. The Struts framework finds no 
bean
> with bean with the formname specified in  in the newly
> created session so it creates a new one. Afterwards it tries to populate
> the bean but the new ActionForm isn't initialized yet (object graph) so
> all access to nested properties will result in a failure.
> 
> However, checking and handling expired session is IMHO very low level
> stuff the container should do for me. Isn't it?
> 
> Regards
> 
> Frank
> 
> 
> 
> Andrew Thorell <[EMAIL PROTECTED]>
> 23.05.2005 16:03
> Bitte antworten an
> "Struts Users Mailing List" 
> 
> 
> An
> Struts Users Mailing List 
> Kopie
> 
> Thema
> Re: Antwort: RE: howto redirect to login site after session expiration?
> 
> 
> 
> 
> 
> 
> This is what I use...
> 
> 
> -- main body here --
> 
> 
> 
> 
> 
> Now if you're talking about the person filled out the form (or
> whatever) and then let the session expire..  The first thing I would
> check in the Validate Method would be to see if the session attribute
> I put there when logging in was actually there. As for the NPE, I
> debug based on trial and error sometimes and since I don't have your
> full logic flow I can't give you a for certain answer, just
> suggestions.
> 
> 
> if ( request.getAttribute(" ") == null) //not sure what getAttribute
> returns if nothing is there.
> {
> mapping.findForward("expired");
> }
> 
> 
> Hope this helps,
> 
> 
> Andrew
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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




Re: How can we send parameter's value to javascript function ??

2005-05-23 Thread Rick Reumann

minhnguyet wrote the following on 5/20/2005 11:47 PM:

Hi all,

I want to send  parameter 's value  to  javascript function  .  When
I use ,


You should use the html-el tags (if not using JSP2.0 container, 
otherwise the standard html tags will support this)...




(You won't need to cast to String by the way)

--
Rick

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



Re: Re: Antwort: RE: howto redirect to login site after session expiration?

2005-05-23 Thread Dakota Jack
I am of the opinion that this is too specific a situation for a
framework to take over.  I really get irritated when frameworks plug
in stuff that should be taken care of at the application level.  I do
think that making code available for people that want a prepackaged
solution in a "plugin" or "application" area relating to a framework
makes sense.  I have beaten this drum to death on this list, however,
with no positive response.  As things are with Struts, many
application specific matters are covered (Struts upload, the
"dispatch" Action subclssses, etc.) but most (shopping cart, etc) are
not.  I wish there were a set of policies and procedures on this, but
just get the usual rigamoroles when a discussion on this is attempted.
 I sure would not want the framework to put something in on this, like
with file uploads, that we would then have to work around.

On 5/23/05, Frank Ratzlow <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> okay, but this leads to a solution where I do have to ensure a manuell
> redirect to the appropriate site by tracking session attributes. I thought
> that the container is maintaining a list of expired sessions (or at least
> valid sessions to figure out invalid sessions), so that I can _configure_
> (web.xml sounds like a good place) what to do in the case of an expired
> session, means a session id stored in this list.
> The problem with the NPE is a general prob that applies to all use cases
> where the user leaves some input site open in the browser and tries to
> submit it after the session timed out. The Struts framework finds no bean
> with bean with the formname specified in  in the newly
> created session so it creates a new one. Afterwards it tries to populate
> the bean but the new ActionForm isn't initialized yet (object graph) so
> all access to nested properties will result in a failure.
> 
> However, checking and handling expired session is IMHO very low level
> stuff the container should do for me. Isn't it?
> 
> Regards
> 
> Frank
> 
> 
> 
> Andrew Thorell <[EMAIL PROTECTED]>
> 23.05.2005 16:03
> Bitte antworten an
> "Struts Users Mailing List" 
> 
> 
> An
> Struts Users Mailing List 
> Kopie
> 
> Thema
> Re: Antwort: RE: howto redirect to login site after session expiration?
> 
> 
> 
> 
> 
> 
> This is what I use...
> 
> 
> -- main body here --
> 
> 
> 
> 
> 
> Now if you're talking about the person filled out the form (or
> whatever) and then let the session expire..  The first thing I would
> check in the Validate Method would be to see if the session attribute
> I put there when logging in was actually there. As for the NPE, I
> debug based on trial and error sometimes and since I don't have your
> full logic flow I can't give you a for certain answer, just
> suggestions.
> 
> 
> if ( request.getAttribute(" ") == null) //not sure what getAttribute
> returns if nothing is there.
> {
> mapping.findForward("expired");
> }
> 
> 
> Hope this helps,
> 
> 
> Andrew
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Re: Re: Antwort: RE: howto redirect to login site after session expiration?

2005-05-23 Thread Andrew Thorell
In part you are correct. You can try doing this:

in web.xml


404 
   /pages/error.jsp


This goes after  and before any  declarations.

The 404 can be replaced with any html error code you wish (as far as I know). 

I'm getting an NPE error right now and the error code is 500. So you
can probably put that up. I don't use it (currently) because I like to
see the stack traces live instead of using log files to debug, but
when I release the site I put up real error pages and use web.xml.


I'm using Jboss 4.0.1sp1, so I'm making my comments on that premise,
so I can't guarentee any of my hasty generalizations will work on your
web container.

Hope this helps,

Andrew

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



Collecting Dynamic Form Data

2005-05-23 Thread Andrew Thorell
Greetings all,

I'm trying to write an application that will collect form data from a
webpage when it is directed at an Action. Is there any way to do this
without using an ActionForm (which is pretty useless because in some
cases I won't know what variable names will be pointed at me)?

Any thoughts would be greatly appreciated.

Andrew

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



RE: How can we send parameter's value to javascript function ??

2005-05-23 Thread Greg Pelly
You can't mix  <%= %> and struts form elements (eg, ).  Your
best bet is to change the javascript to "whichAuctionType(this)"--send
the input element--then inside your JS function, get the value by doing
a .value on the element passed in.
 

-Original Message-
From: minhnguyet [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 20, 2005 8:47 PM
To: user@struts.apache.org
Subject: How can we send parameter's value to javascript function ??

Hi all,

I want to send  parameter 's value  to  javascript function  .  When I
use , 

 the value is not send  and  this is a result in IE   



But when  use  

everything is work right   :  

. I don't see what is different in html  code .  So , how can we
directly send parameter value to javascript using  tag ?

Thanks in advance !



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



Antwort: Re: Antwort: RE: howto redirect to login site after session expiration?

2005-05-23 Thread Frank Ratzlow
Hi,

okay, but this leads to a solution where I do have to ensure a manuell 
redirect to the appropriate site by tracking session attributes. I thought 
that the container is maintaining a list of expired sessions (or at least 
valid sessions to figure out invalid sessions), so that I can _configure_ 
(web.xml sounds like a good place) what to do in the case of an expired 
session, means a session id stored in this list.
The problem with the NPE is a general prob that applies to all use cases 
where the user leaves some input site open in the browser and tries to 
submit it after the session timed out. The Struts framework finds no bean 
with bean with the formname specified in  in the newly 
created session so it creates a new one. Afterwards it tries to populate 
the bean but the new ActionForm isn't initialized yet (object graph) so 
all access to nested properties will result in a failure.

However, checking and handling expired session is IMHO very low level 
stuff the container should do for me. Isn't it?

Regards

Frank



Andrew Thorell <[EMAIL PROTECTED]> 
23.05.2005 16:03
Bitte antworten an
"Struts Users Mailing List" 


An
Struts Users Mailing List 
Kopie

Thema
Re: Antwort: RE: howto redirect to login site after session expiration?






This is what I use...


-- main body here --





Now if you're talking about the person filled out the form (or
whatever) and then let the session expire..  The first thing I would
check in the Validate Method would be to see if the session attribute
I put there when logging in was actually there. As for the NPE, I
debug based on trial and error sometimes and since I don't have your
full logic flow I can't give you a for certain answer, just
suggestions.


if ( request.getAttribute(" ") == null) //not sure what getAttribute
returns if nothing is there.
{
mapping.findForward("expired");
}


Hope this helps,


Andrew

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




Lista de Struts

2005-05-23 Thread Néstor Boscán
Para inscribirse en la lista de struts deben enviar un correo vacío a:
 
[EMAIL PROTECTED]
 
Para eliminar la subscripción:
 
[EMAIL PROTECTED]
 
Si quieren mandar un email a la lista lo mandan a:
 
user@struts.apache.org
 
Saludos


Re: howto redirect to login site after session expiration?

2005-05-23 Thread Dakota Jack
If you keep a user object in session, just check at the beginning of
the Action whether it is still with you.  If not, forward to a log on
page.  I assume that will work for you.  If you don't have a user
object in session, whether authorized or not, then you can put a
simple String iin session saying "live" to test the session.

On 5/23/05, Frank Ratzlow <[EMAIL PROTECTED]> wrote:
> Hallo folks,
> 
> I encountered a strange behaviour regarding the population mechanics of my
> forms.
> 
> Following situation: I have my app running, the browser stays open with a
> html form to be filled. The http-session expires and the user submits the
> form to the server. The result is a http 500 error resulting from a NPE
> caused while accessing the underlying struts form to populate.
> What makes me wonder is the fact that although the session expired the
> request is passed through the ActionServlet, a population of the
> ActionForm is attempted and of course not be completed since the session
> including it's objects are already removed.
> 
> I would like to see a redirect to an error site that I specify in the
> web.xml or struts-config.xml in that case. How do I ensure that
> unauthenticated users or users with an expired session are redirected to
> such a specified site?
> 
> TIA
> 
> Frank
> 
> JBoss 3.2.3
> Tomcat 4.1.29 (integrated)
> Struts 1.1
> JDK 1.4.2_06
> Windows XP
> 
> ===Stacktrace Start=
> 11:16:00,140 ERROR [Engine] StandardWrapperValve[action]:
> Servlet.service() for servlet action threw exception
> javax.servlet.ServletException: BeanUtils.populate
> at
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
> at
> org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
> at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> at
> com.hannoverre.mmf.presentation.general.MMFActionServlet.process(MMFActionServlet.java:126)
> 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:256)
> 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.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at
> org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
> 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:171)
> 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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641

Re: Populating growing List

2005-05-23 Thread Dakota Jack
Probably not a good idea to be populating session scope unnecessarily.

On 5/23/05, Nils Liebelt <[EMAIL PROTECTED]> wrote:
> What a bummer. I got the wrong scope!?! If I put the Form in session scope
> it works fine. Gonna borrow a tie from my boss so I can hang myself...
> 
> 
> Cheers,
> 
> Nils
> 
> -Original Message-
> From: Nils Liebelt [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 23, 2005 1:50 PM
> To: 'Struts Users Mailing List'
> Cc: [EMAIL PROTECTED]
> Subject: Populating growing List
> 
> Hi all,
> 
> I know that common issue with indexed properties as mentioned in the wiki
> http://wiki.apache.org/struts/StrutsCatalogLazyList.
> 
> So I wrote a little handcranked lazy list but I still get an
> indexoutofbounce exception. I really don't know whats going on here:
> 
> private ArrayList deleteSelection = new ArrayList();
> 
> public void setDeleteSelection(int i, String toDelete) {
> this.deleteSelection.set(i, toDelete);
> }
> 
> public String getDeleteSelection(int i) {
> while(i>=this.deleteSelection.size()) {
> this.deleteSelection.add(new String(""));
> }
> return (String) this.deleteSelection.get(i);
> 
> }
> 
> The nested exception looks like this:
> 
> Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> at java.util.ArrayList.RangeCheck(ArrayList.java:508)
> at java.util.ArrayList.set(ArrayList.java:336)
> at
> com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
> :74)
> 
> 
> 
> Regards,
> 
> Nils
> 
> 
> -
> 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]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Re: Antwort: RE: howto redirect to login site after session expiration?

2005-05-23 Thread Andrew Thorell
This is what I use...


-- main body here --





Now if you're talking about the person filled out the form (or
whatever) and then let the session expire..  The first thing I would
check in the Validate Method would be to see if the session attribute
I put there when logging in was actually there. As for the NPE, I
debug based on trial and error sometimes and since I don't have your
full logic flow I can't give you a for certain answer, just
suggestions.


if ( request.getAttribute(" ") == null) //not sure what getAttribute
returns if nothing is there.
{
mapping.findForward("expired");
}


Hope this helps,


Andrew

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



RE: Populating growing List

2005-05-23 Thread Nitish Kumar

The solution, we later adopted was have a class extending ArrayList, some
thing like this.. 


class MyList extends ArrayList{
  public Object set(int index, Object element)
{
if(index > size())
  {
add(new Object());  // Add objects of appropriate type
to avoid ClassCast exception
  }
return super.set(index, element);
}

   public Object get(int index)
{
if(index > size())
  {
add(new Object());  // Add objects of appropriate type
to avoid ClassCast exception
  }
return super.get(index);
}
}

obviously this is simplified form of that class.

Thanks and Regards,
Nitish Kumar



-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 7:27 PM
To: Struts Users Mailing List
Subject: Re: Populating growing List


The reason this isn't working lies in how Commons BeanUtils works. What you
read in the wiki works for setting the properties of nested "indexed beans"-
not straight forward indexed properties. In this circumstance it will just
call the indexed setter so for it to work you need your lazy code there,
rather than the indexed getter.

Niall

- Original Message - 
Sent: Monday, May 23, 2005 12:50 PM
Subject: Populating growing List


> Hi all,
>
> I know that common issue with indexed properties as mentioned in the wiki
> http://wiki.apache.org/struts/StrutsCatalogLazyList.
>
> So I wrote a little handcranked lazy list but I still get an
> indexoutofbounce exception. I really don't know whats going on here:
>
> private ArrayList deleteSelection = new ArrayList();
>
> public void setDeleteSelection(int i, String toDelete) {
> this.deleteSelection.set(i, toDelete);
> }
>
> public String getDeleteSelection(int i) {
> while(i>=this.deleteSelection.size()) {
> this.deleteSelection.add(new String(""));
> }
> return (String) this.deleteSelection.get(i);
>
> }
>
> The nested exception looks like this:
>
> Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> at java.util.ArrayList.RangeCheck(ArrayList.java:508)
> at java.util.ArrayList.set(ArrayList.java:336)
> at
>
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
> :74)



-
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 growing List

2005-05-23 Thread Niall Pemberton
The reason this isn't working lies in how Commons BeanUtils works. What you
read in the wiki works for setting the properties of nested "indexed beans"-
not straight forward indexed properties. In this circumstance it will just
call the indexed setter so for it to work you need your lazy code there,
rather than the indexed getter.

Niall

- Original Message - 
Sent: Monday, May 23, 2005 12:50 PM
Subject: Populating growing List


> Hi all,
>
> I know that common issue with indexed properties as mentioned in the wiki
> http://wiki.apache.org/struts/StrutsCatalogLazyList.
>
> So I wrote a little handcranked lazy list but I still get an
> indexoutofbounce exception. I really don't know whats going on here:
>
> private ArrayList deleteSelection = new ArrayList();
>
> public void setDeleteSelection(int i, String toDelete) {
> this.deleteSelection.set(i, toDelete);
> }
>
> public String getDeleteSelection(int i) {
> while(i>=this.deleteSelection.size()) {
> this.deleteSelection.add(new String(""));
> }
> return (String) this.deleteSelection.get(i);
>
> }
>
> The nested exception looks like this:
>
> Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> at java.util.ArrayList.RangeCheck(ArrayList.java:508)
> at java.util.ArrayList.set(ArrayList.java:336)
> at
>
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
> :74)



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



RE: Populating growing List

2005-05-23 Thread David Suarez
On the surface it looks like the code is wrong.  Index 0 represents a
size of 1 (zero-based array).  Once you account for that, your array
should grow as you desire.

Regards...djsuarez

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 6:50 AM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: Populating growing List

Hi all,

I know that common issue with indexed properties as mentioned in the
wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.
java
:74)



Regards,

Nils



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



Dealing with many forms

2005-05-23 Thread Janek Ziniewicz
Hi, I am writing my first Struts application, and have some problems with
it.
 
Some part of my app, gets data from database, fills appropriate form,
displays it and, if user changed the form, writes data back to database.
 
Another functionality is: get whole webpage (including form)from database,
fill it with data and if user changes it, write changed data back to
database. It was done with Jsp and JavaScript. Writing ActionForm for each
form would be senseless because part of functionality of the app is that
any user can submit new forms.
 
And now the problem: Some devices do not deal with JavaScript well (some
palmtops, cellphones etc). And my app must run properly on them. So, is
there any way to do the task above without JavaScript?
--
Pozdrawiam, Janek Ziniewicz
gg:902858
irc.freenode.net: #gore, #dub

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



RE: sTRUTS 1.3 - chain flow / complex app

2005-05-23 Thread Joe Germuska

Marco wrote:

Does Shale use chain? Could you integrate chain in Shale?


Shale does use chain, but to be honest, I don't know much more about 
it than that.



I am looking forward to add more complexity for 'testing' the chain..
If you have anything to suggest me, go ahead :-) ..


Just keep doing what you're doing!  More than the complexity, it's 
just valuable to have people using it period.  I've been developing a 
new app on it for a few months now and everything seems to be going 
smoothly, but I'm sure I don't use every feature of Struts, so having 
more people use it to make any kind of webapp gives us more chances 
to flush out any quirks.


Joe


--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex


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



RE: Populating growing List

2005-05-23 Thread Nils Liebelt
The only problem is that you have no choice. I don't like polluting the
session context. But if you have growing stuff mentioned before and you
don't want a LazyList.

-Original Message-
From: Nitish Kumar [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 2:14 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List


dont think its a great idea, If I start putting beans in session , every
time I have a collection in form bean, I am not sure how long my application
is going to run.



Thanks and Regards,
Nitish Kumar


-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 5:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List


What a bummer. I got the wrong scope!?! If I put the Form in session scope
it works fine. Gonna borrow a tie from my boss so I can hang myself... 


Cheers,

Nils

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 1:50 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: Populating growing List

Hi all,

I know that common issue with indexed properties as mentioned in the wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
:74)



Regards,

Nils


-
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: Populating growing List

2005-05-23 Thread Nils Liebelt
The only problem is that you have no choice. I don't like polluting the
session context. But if you have growing stuff mentioned before and you
don't want a LazyList.

-Original Message-
From: Nitish Kumar [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 2:14 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List


dont think its a great idea, If I start putting beans in session , every
time I have a collection in form bean, I am not sure how long my application
is going to run.



Thanks and Regards,
Nitish Kumar


-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 5:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List


What a bummer. I got the wrong scope!?! If I put the Form in session scope
it works fine. Gonna borrow a tie from my boss so I can hang myself... 


Cheers,

Nils

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 1:50 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: Populating growing List

Hi all,

I know that common issue with indexed properties as mentioned in the wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
:74)



Regards,

Nils


-
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: Populating growing List

2005-05-23 Thread Nitish Kumar

Even I had to do the same in quite a few of my application, personally I
would have loved to have a standard solution for this problem from apache
group in future releases of struts. 


Thanks and Regards,
Nitish Kumar

-Original Message-
From: Sachin Bhutada [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 5:45 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List



If your form bean is being used in multiple page, you can put the form in
session and clear the collection in reset method if required. That will
serve the purpose. In my application we are using the same apporach and our
application has not yet crashed at least bcoz of form bean :) 

sachin



-Original Message-
From: Nitish Kumar [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 5:44 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List



dont think its a great idea, If I start putting beans in session , every
time I have a collection in form bean, I am not sure how long my application
is going to run.



Thanks and Regards,
Nitish Kumar


-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 5:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List


What a bummer. I got the wrong scope!?! If I put the Form in session scope
it works fine. Gonna borrow a tie from my boss so I can hang myself... 


Cheers,

Nils

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 1:50 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: Populating growing List

Hi all,

I know that common issue with indexed properties as mentioned in the wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
:74)



Regards,

Nils


-
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: Populating growing List

2005-05-23 Thread Sachin Bhutada

If your form bean is being used in multiple page, you can put the form in
session and clear the collection in reset method if required. That will
serve the purpose. In my application we are using the same apporach and our
application has not yet crashed at least bcoz of form bean :) 

sachin



-Original Message-
From: Nitish Kumar [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 5:44 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List



dont think its a great idea, If I start putting beans in session , every
time I have a collection in form bean, I am not sure how long my application
is going to run.



Thanks and Regards,
Nitish Kumar


-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 5:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List


What a bummer. I got the wrong scope!?! If I put the Form in session scope
it works fine. Gonna borrow a tie from my boss so I can hang myself... 


Cheers,

Nils

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 1:50 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: Populating growing List

Hi all,

I know that common issue with indexed properties as mentioned in the wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
:74)



Regards,

Nils


-
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: Populating growing List

2005-05-23 Thread Nitish Kumar

dont think its a great idea, If I start putting beans in session , every
time I have a collection in form bean, I am not sure how long my application
is going to run.



Thanks and Regards,
Nitish Kumar


-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 5:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Populating growing List


What a bummer. I got the wrong scope!?! If I put the Form in session scope
it works fine. Gonna borrow a tie from my boss so I can hang myself... 


Cheers,

Nils

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 1:50 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: Populating growing List

Hi all,

I know that common issue with indexed properties as mentioned in the wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
:74)



Regards,

Nils


-
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: Populating growing List

2005-05-23 Thread Nils Liebelt
What a bummer. I got the wrong scope!?! If I put the Form in session scope
it works fine. Gonna borrow a tie from my boss so I can hang myself... 


Cheers,

Nils

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 1:50 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: Populating growing List

Hi all,

I know that common issue with indexed properties as mentioned in the wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
:74)



Regards,

Nils


-
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 growing List

2005-05-23 Thread Nils Liebelt
What a bummer. I got the wrong scope!?! If I put the Form in session scope
it works fine. Gonna borrow a tie from my boss so I can hang myself... 


Cheers,

Nils

-Original Message-
From: Nils Liebelt [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 23, 2005 1:50 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]
Subject: Populating growing List

Hi all,

I know that common issue with indexed properties as mentioned in the wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
:74)



Regards,

Nils


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



Populating growing List

2005-05-23 Thread Nils Liebelt
Hi all,

I know that common issue with indexed properties as mentioned in the wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
:74)



Regards,

Nils


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



Populating growing List

2005-05-23 Thread Nils Liebelt
Hi all,

I know that common issue with indexed properties as mentioned in the wiki
http://wiki.apache.org/struts/StrutsCatalogLazyList.

So I wrote a little handcranked lazy list but I still get an
indexoutofbounce exception. I really don't know whats going on here: 

private ArrayList deleteSelection = new ArrayList();

public void setDeleteSelection(int i, String toDelete) {
this.deleteSelection.set(i, toDelete);
}

public String getDeleteSelection(int i) {
while(i>=this.deleteSelection.size()) {
this.deleteSelection.add(new String(""));
}
return (String) this.deleteSelection.get(i);

}

The nested exception looks like this:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.set(ArrayList.java:336)
at
com.candor.hummingbird.forms.AccountForm.setDeleteSelection(AccountForm.java
:74)



Regards,

Nils


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



Stateless web apps

2005-05-23 Thread andy wix

Hi,

I am working at a place that doesn't use session state for their web apps.
The reason given is that they have 2 physical servers and 2 Oracle 
Application Servers running on each of these machines for failover.  From 
the little I know about clustering, I thought that if everything in the 
session implements Serializable then session state is tranparently valid 
accross requests - even if you end up on another jvm.


Has anyone else ever heard of this restriction - I can see problems e.g., 
can't use Struts tokens to defeat the usual refresh problems.


More immediately, I have a problem with a typical scenario.  My normal 
approach is:
I have a 'preload' action that gets an ArrayList of data from the db and 
sets this in the session.

Then forward to the jsp that displays this stuff.
This page has something like:



 
 
   
 
   
 
   
 
 

This gives me an index of the link that was clicked and in the next action I 
simply look this value up from the ArrayList in the session.


Does anyone know how this functionality could be achieved without using the 
session?


Thanks,
Andy

_
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! 
http://messenger.msn.co.uk



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



RE: Antwort: RE: howto redirect to login site after session expiration?

2005-05-23 Thread Marco Mistroni
Hello,

>container. I just want to say, if your session expired, go to page xyz.

>BTW: how can I determine via the API if a session expired? Is it
possible 
>at all?

I m not 100% sure, but will an HttpSessionListener help here? 



Regards

Frank




"Marco Mistroni" <[EMAIL PROTECTED]> 
23.05.2005 12:24
Bitte antworten an
"Struts Users Mailing List" 


An
"'Struts Users Mailing List'" 
Kopie

Thema
RE: howto redirect to login site after session expiration?






Hello,
 Can't you use a ServletFilter that checks if user is in

the
session?
If it is not you will redirect the request to your loginpage.

Regards
 marco

-Original Message-
From: Frank Ratzlow [mailto:[EMAIL PROTECTED] 
Sent: 23 May 2005 11:18
To: user@struts.apache.org
Subject: howto redirect to login site after session expiration?

Hallo folks,

I encountered a strange behaviour regarding the population mechanics of
my 
forms. 

Following situation: I have my app running, the browser stays open with
a 
html form to be filled. The http-session expires and the user submits
the 
form to the server. The result is a http 500 error resulting from a NPE 
caused while accessing the underlying struts form to populate. 
What makes me wonder is the fact that although the session expired the 
request is passed through the ActionServlet, a population of the 
ActionForm is attempted and of course not be completed since the session

including it's objects are already removed.

I would like to see a redirect to an error site that I specify in the 
web.xml or struts-config.xml in that case. How do I ensure that 
unauthenticated users or users with an expired session are redirected to

such a specified site?

TIA

Frank

JBoss 3.2.3
Tomcat 4.1.29 (integrated)
Struts 1.1
JDK 1.4.2_06
Windows XP

===Stacktrace Start=
11:16:00,140 ERROR [Engine] StandardWrapperValve[action]: 
Servlet.service() for servlet action threw exception
javax.servlet.ServletException: BeanUtils.populate
at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcess
or.java:821)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
254)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at 
com.hannoverre.mmf.presentation.general.MMFActionServlet.process(MMFActi
onServlet.java:126)
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(Applica
tionFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurity
MgrRealm.java:220)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(Container
StatsValve.java:76)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
   

Antwort: RE: howto redirect to login site after session expiration?

2005-05-23 Thread Frank Ratzlow
Hi,

unfortunately this is not an good option because the application (exactly 
some of the actions) serve authorized and unauthorized users the same. 
Afaik if a user sends his first request a session will be created for him 
(default behaviour). Additionally we invalidate a session when a user 
authorizes and store his credentials etc. in a newly created one.
I was quite sure that handling of an expired session could be done 
declaratively. I feel some pain doing such a basic thing in proprietary 
code. I rather think that this is something that should be handled by the 
container. I just want to say, if your session expired, go to page xyz. 
BTW: how can I determine via the API if a session expired? Is it possible 
at all?

Regards

Frank




"Marco Mistroni" <[EMAIL PROTECTED]> 
23.05.2005 12:24
Bitte antworten an
"Struts Users Mailing List" 


An
"'Struts Users Mailing List'" 
Kopie

Thema
RE: howto redirect to login site after session expiration?






Hello,
 Can't you use a ServletFilter that checks if user is in 
the
session?
If it is not you will redirect the request to your loginpage.

Regards
 marco

-Original Message-
From: Frank Ratzlow [mailto:[EMAIL PROTECTED] 
Sent: 23 May 2005 11:18
To: user@struts.apache.org
Subject: howto redirect to login site after session expiration?

Hallo folks,

I encountered a strange behaviour regarding the population mechanics of
my 
forms. 

Following situation: I have my app running, the browser stays open with
a 
html form to be filled. The http-session expires and the user submits
the 
form to the server. The result is a http 500 error resulting from a NPE 
caused while accessing the underlying struts form to populate. 
What makes me wonder is the fact that although the session expired the 
request is passed through the ActionServlet, a population of the 
ActionForm is attempted and of course not be completed since the session

including it's objects are already removed.

I would like to see a redirect to an error site that I specify in the 
web.xml or struts-config.xml in that case. How do I ensure that 
unauthenticated users or users with an expired session are redirected to

such a specified site?

TIA

Frank

JBoss 3.2.3
Tomcat 4.1.29 (integrated)
Struts 1.1
JDK 1.4.2_06
Windows XP

===Stacktrace Start=
11:16:00,140 ERROR [Engine] StandardWrapperValve[action]: 
Servlet.service() for servlet action threw exception
javax.servlet.ServletException: BeanUtils.populate
at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcess
or.java:821)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
254)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at 
com.hannoverre.mmf.presentation.general.MMFActionServlet.process(MMFActi
onServlet.java:126)
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(Applica
tionFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurity
MgrRealm.java:220)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(Container
StatsValve.java:76)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
at 
org.apache.catalina.c

RE: howto redirect to login site after session expiration?

2005-05-23 Thread Marco Mistroni
Hello,
Can't you use a ServletFilter that checks if user is in the
session?
If it is not you will redirect the request to your loginpage.

Regards
marco

-Original Message-
From: Frank Ratzlow [mailto:[EMAIL PROTECTED] 
Sent: 23 May 2005 11:18
To: user@struts.apache.org
Subject: howto redirect to login site after session expiration?

Hallo folks,

I encountered a strange behaviour regarding the population mechanics of
my 
forms. 

Following situation: I have my app running, the browser stays open with
a 
html form to be filled. The http-session expires and the user submits
the 
form to the server. The result is a http 500 error resulting from a NPE 
caused while accessing the underlying struts form to populate. 
What makes me wonder is the fact that although the session expired the 
request is passed through the ActionServlet, a population of the 
ActionForm is attempted and of course not be completed since the session

including it's objects are already removed.

I would like to see a redirect to an error site that I specify in the 
web.xml or struts-config.xml in that case. How do I ensure that 
unauthenticated users or users with an expired session are redirected to

such a specified site?

TIA

Frank

JBoss 3.2.3
Tomcat 4.1.29 (integrated)
Struts 1.1
JDK 1.4.2_06
Windows XP

===Stacktrace Start=
11:16:00,140 ERROR [Engine] StandardWrapperValve[action]: 
Servlet.service() for servlet action threw exception
javax.servlet.ServletException: BeanUtils.populate
at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcess
or.java:821)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
254)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at 
com.hannoverre.mmf.presentation.general.MMFActionServlet.process(MMFActi
onServlet.java:126)
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(Applica
tionFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurity
MgrRealm.java:220)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(Container
StatsValve.java:76)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:65)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577
)
at 
org.apache.catalina.core.StandardPipeline$Standa

howto redirect to login site after session expiration?

2005-05-23 Thread Frank Ratzlow
Hallo folks,

I encountered a strange behaviour regarding the population mechanics of my 
forms. 

Following situation: I have my app running, the browser stays open with a 
html form to be filled. The http-session expires and the user submits the 
form to the server. The result is a http 500 error resulting from a NPE 
caused while accessing the underlying struts form to populate. 
What makes me wonder is the fact that although the session expired the 
request is passed through the ActionServlet, a population of the 
ActionForm is attempted and of course not be completed since the session 
including it's objects are already removed.

I would like to see a redirect to an error site that I specify in the 
web.xml or struts-config.xml in that case. How do I ensure that 
unauthenticated users or users with an expired session are redirected to 
such a specified site?

TIA

Frank

JBoss 3.2.3
Tomcat 4.1.29 (integrated)
Struts 1.1
JDK 1.4.2_06
Windows XP

===Stacktrace Start=
11:16:00,140 ERROR [Engine] StandardWrapperValve[action]: 
Servlet.service() for servlet action threw exception
javax.servlet.ServletException: BeanUtils.populate
at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at 
com.hannoverre.mmf.presentation.general.MMFActionServlet.process(MMFActionServlet.java:126)
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:256)
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.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
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:171)
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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
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$Standard

Re: struts 1.2.4 examples error with NB4.1. help pls!

2005-05-23 Thread carmen lam

I should apologise to those ppl being helpful to me because I made a really 
stupid mistake. I choose the J2EE server instead of the Tomcat server. After I 
choose the Tomcat server to run this examples, it works flawlessly. Thanks 
everyone!!



-
想即時收到新 email 通知?
下載 Yahoo! Messenger
http://messenger.yahoo.com.hk

RE: struts 1.2.4 examples error with NB4.1. help pls!

2005-05-23 Thread carmen lam

I should apologise to those ppl being helpful to me because I made a really 
stupid mistake. I choose the J2EE server instead of the Tomcat server. After I 
choose the Tomcat server to run this examples, it works flawlessly. Thanks 
everyone!!



-
想即時收到新 email 通知?
下載 Yahoo! Messenger
http://messenger.yahoo.com.hk

RE: struts 1.2.4 examples error with NB4.1. help pls!

2005-05-23 Thread carmen lam

I should apologise to those ppl being helpful to me because I made a really 
stupid mistake. I choose the J2EE server instead of the Tomcat server. After I 
choose the Tomcat server to run this examples, it works flawlessly. Thanks 
everyone!!


-
想即時收到新 email 通知?
下載 Yahoo! Messenger
http://messenger.yahoo.com.hk

Re: VALIDATION FOR TWO FIELDSHELP

2005-05-23 Thread Muhammad Momin Rashid

Metal KoRn wrote:
Hey guys I need to validate two fields for password and confirmation but I 
can get the jakarta example work can anybody tell me how to do taht with 
struts?




Here is a snippit of validation rule from our live application



test
(passwordConfirm == password)







1. password is the name of the field for entering password
2. passwordConfrim is the name of the second field
3. passwordConfrim is required, and is only valid when:
a. passwordConfirm == password
4. msg "required" is displayed when user doesn't enter anything in 
passwordConfirm field

5. msg "validWhen" is displayed when password != passwordConfrim
6. arg are variables/arguments passed for formatting of message.

the msg "required" and "validWhen", along with arg "passwordConfirm" and 
"password" are defined in .properties files (used for localisation).



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



RE: struts 1.2.4 examples error with NB4.1. help pls!

2005-05-23 Thread Naslai, Shobha \(Cognizant\)

Is there any trace or reason given?
Also I have an observation about the Path pls see this clearly

/s truts-example//org/apache/jsp\welcome_jsp.java



-Original Message-
From: Nitin Mandolkar [mailto:[EMAIL PROTECTED]
Sent: Monday, May 23, 2005 2:13 PM
To: Struts Users Mailing List
Subject: RE: struts 1.2.4 examples error with NB4.1. help pls!

10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from 
fulfilling the request.

There is some thing wrong with Application server. Application server Is not 
able to compile that file. Please check application server configuration.

-ni3

-Original Message-
From: carmen lam [mailto:[EMAIL PROTECTED]
Sent: 22 May 2005 09:56
To: Struts Users Mailing List
Subject: Re: struts 1.2.4 examples error with NB4.1. help pls!



carmen lam <[EMAIL PROTECTED]> ?: I am running NetBeans 4.1 and want to try 
jakarta-struts-1.2.4 out.
I followed the instruction from this page

http://struts.apache.org/faqs/netbeans40.html

and ran the struts-examples. I got an error 500 page on the browser
with the following error on server.log. Basically it failed to compile 
welcome_jsp.java. Anyone can help!?



[#|2005-05-21T17:27:20.795+0800|SEVERE|sun-appserver-pe8.1_01|org.apache.jasper 
.compiler.Compiler|_ThreadID=13;|Env: Compile: javaFileName=/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/generated/jsp/j2ee-modules/s 
truts-example//org/apache/jsp\welcome_jsp.java
classpath=/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/classes/;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-beanutils.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-collections.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-digester.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-fileupload.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-logging.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-validator.jar;/C:/Program
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/jakarta-oro.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/struts.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/generated/ejb/j2ee-modules/s 
truts-example/;C:\Program 
Files\netbeans-4.1\SunAppServer8.1\domains\domain1\generated\jsp\j2ee-modules\s 
truts-example;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/classes/;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-beanutils.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-collections.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st
ruts-example/WEB-INF/lib/commons-digester.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-fileupload.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-logging.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-validator.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/jakarta-oro.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/struts.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/generated/ejb/j2ee-modules/s 
truts-example/;
cp=C:/Program Files/Java/jdk1.5.0_02/lib/tools.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib/appserv-rt.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\activation.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\admin-cli.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-admin.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-cmp.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-ext.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-jstl.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-upgrade.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\commons-launcher.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8

RE: struts 1.2.4 examples error with NB4.1. help pls!

2005-05-23 Thread Nitin Mandolkar
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from 
fulfilling the request. 

There is some thing wrong with Application server. Application server Is not 
able to compile that file. Please check application server configuration. 

-ni3

-Original Message-
From: carmen lam [mailto:[EMAIL PROTECTED] 
Sent: 22 May 2005 09:56
To: Struts Users Mailing List
Subject: Re: struts 1.2.4 examples error with NB4.1. help pls!



carmen lam <[EMAIL PROTECTED]> ?: I am running NetBeans 4.1 and want to try 
jakarta-struts-1.2.4 out.
I followed the instruction from this page

http://struts.apache.org/faqs/netbeans40.html

and ran the struts-examples. I got an error 500 page on the browser
with the following error on server.log. Basically it failed to compile 
welcome_jsp.java. Anyone can help!?



[#|2005-05-21T17:27:20.795+0800|SEVERE|sun-appserver-pe8.1_01|org.apache.jasper 
.compiler.Compiler|_ThreadID=13;|Env: Compile: javaFileName=/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/generated/jsp/j2ee-modules/s 
truts-example//org/apache/jsp\welcome_jsp.java
classpath=/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/classes/;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-beanutils.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-collections.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-digester.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-fileupload.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-logging.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-validator.jar;/C:/Program
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/jakarta-oro.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/struts.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/generated/ejb/j2ee-modules/s 
truts-example/;C:\Program 
Files\netbeans-4.1\SunAppServer8.1\domains\domain1\generated\jsp\j2ee-modules\s 
truts-example;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/classes/;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-beanutils.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-collections.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st
ruts-example/WEB-INF/lib/commons-digester.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-fileupload.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-logging.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/commons-validator.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/jakarta-oro.jar;/C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/applications/j2ee-modules/st 
ruts-example/WEB-INF/lib/struts.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/domains/domain1/generated/ejb/j2ee-modules/s 
truts-example/;
cp=C:/Program Files/Java/jdk1.5.0_02/lib/tools.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib/appserv-rt.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\activation.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\admin-cli.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-admin.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-cmp.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-ext.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-jstl.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\appserv-upgrade.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\commons-launcher.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\commons-logging.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\dom.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\j2ee-svc.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\j2ee.jar;C:/Program 
Files/netbeans-4.1/SunAppServer8.1/lib\jax-qname.jar;C:/Program
Files/netbeans-4.1/SunAppServer8.1/lib\jaxr-api.jar;C:/Program 
Files

RE: sTRUTS 1.3 - chain flow / complex app

2005-05-23 Thread Marco Mistroni
Hello all,

>It's interesting to have some more complex use cases to test the 
>chain model against...

I would offer my app as 'guinea pig' for complex cases :-)

Currently it's a small app that manage my own 'expenses' (I have a mysql
as backend and jboss 3.2.5/tomcat 5.5 as app server)to see
What do I spend an where (yeah, I m not that good with money :-)

I am updating my db almost automatically via quartz job, using struts as
user interface for manual insert of expenses and job scheduling..
I m using castor/hibernate as ORM frameworks, and spring & struts
I manage to port it from struts 1.1 to struts 1.3, and I was looking
into strutsws cos I want to have J2ME clients that communicates using
ksoap.

I am looking forward to add more complexity for 'testing' the chain.. 
If you have anything to suggest me, go ahead :-) ..

Does Shale use chain? Could you integrate chain in Shale?

Regards
marco



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



Re: JSP Buffer Size

2005-05-23 Thread Catalin Croitoru
Hi,

if you use Java Servlet specification version 2.3 (at least) you can
use a Filter. make your filter intercept the jsp and in that filter
you can change the buffer. for a more information about Filter take a
look at this:

http://java.sun.com/products/servlet/Filters.html

Catalin


On 5/22/05, tarek.nabil <[EMAIL PROTECTED]> wrote:
> Hi everyone,
> 
> Is there some way that I can set the buffer size for all JSPs to some
> value other than the default 8kb without having to do it in every JSP?
> 
> Thanks
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



RE: sTRUTS 1.3 - chain flow / solved

2005-05-23 Thread Marco Mistroni
Hello,
Looks like I found a way to make it work! :-)
I have submitted the code to Frank..surely he'll find way to optimize
it..
For now, I had to extend few commands (SelectAction, ValidateActionForm,
PopulateActionForm & SelectForward) and I had to rewrite struts
chain-config.xml to use my own commands...


Thanx to all of you who gave me precious hints!

Regards
Marco



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



Re: JSP Buffer Size

2005-05-23 Thread Jason Lea
If you are using Servlet 2.4, then you can use the  to 
specifiy a page that is included at the beginning of every jsp page.  
You can put page directives there.


http://java.sun.com/webservices/docs/1.3/tutorial/doc/JSPIntro13.html

eg

/template/prelude.jspf



tarek.nabil wrote:


Thanks Martin. But this is exactly what I'm trying to avoid. If I use
the page directive, then I would need to do that in EVERY page. My
question is, is there a way I can do this with Struts in some central
place only once?

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 22, 2005 4:13 PM

To: Struts Users Mailing List
Subject: Re: JSP Buffer Size

assuming you can handle the exception when buffer overflows <%@ page
buffer="9kb" autoFlush="false" %>
Martin-
- Original Message -
From: "tarek.nabil" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Sunday, May 22, 2005 4:25 AM
Subject: JSP Buffer Size


Hi everyone,

Is there some way that I can set the buffer size for all JSPs to some
value other than the default 8kb without having to do it in every JSP?

Thanks

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


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


 



--
Jason Lea



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