This method cannot throw an Exception or specifically not even a
ServletException. (Why?)
I want exceptions thrown here to propagate to my standard error handling &
jsp page.
How can I do that?
Do I use processException()? If so how does this work?
--
Mike W
-
> I find this odd! Not all requests go through a
RequestProcessor.
Doh!
Just found processPreprocess() that does seem to get called for EVERY
struts-config entry.
So I shall do my authentication there.
Oh well, might help another archive browser.
--
Mike W
--
Browsing the archives, I read alot about authentication and the best place
to do it being the RequestProcessor.
I find this odd! Not all requests go through a
RequestProcessor.
ie:
Is this true? - certainly seems that way, MyJSP.jsp needs authenticating!
The only logical places I can
>Some people (me
>included) have proposed the possibility of having a class at startup use
>reflection to load the static variables of a class into a map
>that's stored in
>one of the accesible scopes.
>
Absolutely, you could have a class that you register other classes with,
these classes could t
>
>> I've been trying to compile my BLB (Business Logic Bean) and have been
>> getting errors during compilation. I haven't a clue as to how I could
>> debug this. Any assistance would be appreciated.
>>
>
ResultSet rs =
stmt.executeQuery("SELECT FACIL_ID, FACIL_NAME, FACIL_NAME_SHORT, ORG_ID
F
I have a List of subclasses that need to be iterated over and rendered in
jsp.
I notice that 'instanceof' is a reserved word in jstl, but has not been
implemented yet. So I now feel the need to write a tag.
On 1st glance I thought custom tag would be limited to Strings, but I see
that I can get a
>I want to be able to add a literal parameter to a link
>
>but I already successfully use
>this adds a Map of parameters, but I'd like to be able to add further
>parameters literally (ie not from a bean).
>
>Is there any way I can achieve this, by struts or jstl or anything!?
>
Okay I can do thi
I want to be able to add a literal parameter to a link
but I already successfully use
this adds a Map of parameters, but I'd like to be able to add further
parameters literally (ie not from a bean).
Is there any way I can achieve this, by struts or jstl or anything!?
--
Mike W
---
Seems to me there is a need for a further scope.
application
session
subsequent_request
request
Like session but attributes are removed when the response has been committed
in the request following the one they are added in.
Has anyone come up with a neat way of implementing this?
Suppose you
>I'm not 100% not what your doing so i could be talking nonsense..
>
>If the formBean is available to the page i cant see why you cant access
>its properties.
>
>A simple way of doing this would be to do it in the referring action.
>
>
>Map myFormMap = myForm.getMap();
>
>request.setAttribute("myM
>>sorry mike i meant mapped to the action
>>
>>On Sunday, August 17, 2003, at 03:57 PM, Mark Lowe wrote:
>>
>>> Is myForm scoped to the page?
>>>
>
In fact I'm pretty sure it is impossible to get at getMap()
due to the under the covers cleverness that allows a DynaBean to be used in
a typical Jav
>sorry mike i meant mapped to the action
>
>On Sunday, August 17, 2003, at 03:57 PM, Mark Lowe wrote:
>
>> Is myForm scoped to the page?
>>
Well myForm is in that action mappings name attribute
and indeed the error:
No getter method for property map of bean myForm
given for:
TEST
indicate
>
>
>This might work
>
>
Cannot find bean myForm.map in any scope
>
>or
>
>
I want the java.util.Map for property attribute of html:link
infact, I'll probably want a different method of subclassed DAF that gives a
modification of the Map.
I just want to render a link similar to the previous re
Okay I've RTFM.
seems it should do the job with its populating from a map
abilities.
TEST
However, I give it my DynaActionForm (with its getMap() method) and the
property 'map' and I get:
javax.servlet.ServletException: No getter method for property map of bean
myForm
which is really wierd,
Say we have a request parameter that tracks the requested size & offset of a
ResultSet (eg search engine results & the next or page number links).
Before struts I used to just do a simple regex replace of this parameter in
the search string.
Obviously I don't want any url logic in the business t
http://jakarta.apache.org/mail/struts-user/
--
Mike W
>-Original Message-
>From: Filip Polsakiewicz [mailto:[EMAIL PROTECTED]
>Sent: 05 August 2003 16:01
>To: Struts Users Mailinglist
>Subject: [OT] Retrieve all messages ever sent to this list
>
>
>Hi,
>is there a way to retrieve all mess
3) Only populate your value objects with the required columns in the first
place.
A simple custom tag can be used to ignore it's body if an attribute is null.
--
Mike W
>
>
>You have two choices.
>
>1) Use a simple Collection and test the values with many if statements.
> This is the option you
>I've just recently began hacking out my own RequestProcessor extension
>and I have
>found that my extended versions are not needed very much. Most of the
>time I would
>like to use the default struts provided RequestProcessor and for
>individual action
>mappings be able to specify an extended Re
u wouldn't even need the import statement.
>>
>> - Original Message -
>> From: "Alex Shneyderman" <[EMAIL PROTECTED]>
>> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>> Sent: Friday, August 01, 2003 6:34 A
>
><%= Const.MY_CONST %>
>
Good grief is this the only way?
a/ isn't the aim to do without scriptlets/expressions?
b/ all the data exists, server side in the app, why do I have to jump
through hoops, copying CONSTANTS over to another variable???
:-(
--
Mike W
---
How do you get Constants (or anything none scoped ie app/sess/req) into a
jsp for use in EL
I can do
<%@ page import="com.blah.Const" %>
<%= Const.MY_CONST %>
but not
This probably demonstrates a fundamental none understanding!
TIA
--
Mike W
--
Is there any way to control it? It seems a little excessive
I'd like to retain it in the JSP, and remove as much as possible in the html
--
Mike W
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
BarChart_discrete is a session attribute of type BarChart
getHtmlMap is a method of this class that returns an int[][]
//^this line returns as expected
How can I iterate over int[x]? This just gives one iteration and 'item' is
null for that iteration
& int[][] has size [4][15]!
W
est a less overkill flag?
--
Mike W.
>
>It is not clear to me that why you need to reset only when
>CondResetFormPropertyConfig.getReset() returns true.
>What's the reason behind this?
>
>Jing
>
>----- Original Message -
>From: "Mike Whittaker" <[EMA
>Has anyone had this combination to work?
>I either lose session persistence or (classically) can't clear all
>checkboxes.
>I've tried overiding reset() in numerous ways.
>
I think I have found a solution.
I hope this will be of interest. Any comments appreciated.
We are told to overide reset()
>-Original Message-
>From: Daniel Joshua [mailto:[EMAIL PROTECTED]
>Sent: 25 July 2003 10:48
>To: 'Struts Users Mailing List'
>Subject: newbie question: how to get context path?
>
>
>Sorry for the newbie question... my brain not responding...
>
>Using mapping.findForward(xxx).getPath(), I a
Has anyone had this combination to work?
I either lose session persistence or (classically) can't clear all
checkboxes.
I've tried overiding reset() in numerous ways.
Help!
TIA
--
Mike W
-
To unsubscribe, e-mail: [EMAIL PROTECT
This is about the classic Inability to uncheck checkboxes with DAF.
I know I must overide reset() but I can't get anything to both keep session
state AND allow all boxes unchecked.
I tried the code below, obviously this isn't allowing session persistence
because the request param is being checke
Must reset checkbox properties to zero length in reset method as stated in
the docs.
If I have a session scoped DAF, then I can't just call initialize().
So I need to access this FormPropertyConfig object in my reset method to set
the array to zero length for specific cases and only when zero bo
Must reset checkbox properties to zero length in reset method as stated in
the docs.
If I have a session scoped DAF, then I can't just call initialize().
So I need to access this FormPropertyConfig object in my reset method to set
the array to zero length for specific cases and only when zero bo
Okay. We have to overide reset() and call initialize() to prevent the
empty/null collection problem when having no checkboxes selected with DAF's
However this is having the adverse effect of making my session scoped form
behave like a request scoped one. I remove the call to initialize() and the
What with jstl 1.1's function abilities I find myself tied between, using
them or providing the same via a bean.
eg
or
My inclination is to go with the latter, I don't think the view should be
overly complex, especially when I'm trying to provide many tiers.
--
Mike W
Is the only struts/jstl tag that can access a standard java
collections elements?
I want to get the 1st element which is a bean, but I have no getter or
setter methods to extract this bean, so I guess the bean[x] syntax falls
flat there. however doesn't need this syntax and works fine
on a stan
This concerns the development of a session mechanism that achieves the same
goal as the pattern where an ActionForm implements an interface that
abstracts the Struts layer for the Model layer to use.
I'd like to be able to use session data in the model layer in the same way I
use form bean data.
Are any of the suggestions on this thread free? If not are there any?
At present I'm just using JCreator & Tomcat, but it seems I may be making my
life hard.
--
Mike W
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additiona
> if( test.equals( " " )) { return false; }
for( int i = 0; i < months.length; i++ ) {
if( test.equals( months[ i ] )){
I see no 'string.length'
If you are refering to the months.length, then this is a language
convenience for determining the length of an array, which 'months' surely is
>Anybody know why the length of a String is a property of the String when
>used as a logical qualifier in a for{} block but a function of the
>String in
>a conditional if{} statement?
>
>for( int i = 0; i < string.length; i++ ) {}
>
>if( string.length() != 4 ) {}
>
>
>Mark
for( int i = 0; i < st
Could someone please offer me a bit of code to illustrate an iterated
checkbox & multibox
with the appropriate DynaActionForm attribute type and a bit of Action class
code that could set the values?
TIA
And know I can't find it in the archives
--
Mike W
---
How do I specify the FormBean in the name property?
I have DynaActionForm, with a List property (myList),
I populate it in my Action with a bunch of beans that have a get & setTag()
method.
This is in my
How do I specify the FormBean in the iterate name property?
Or why else do I get
>By the way, is there any other way to put a bean property in a "value"
>attribute of an input of a HTML form?
>I mean, supposing that I have a "orgview" bean, is there a better way to do
>this (which of course doesn't work):
>
>property="id"/>"/>
>
>in order to put the orgview's "id" property val
I guess you've all been here, so can you answer this?
you have do a 'finally' to ensure you close the connection/release it back
to the pool.
In the controller tier this is easy, get the connection in the
Filter/RequestProcessor/Action when whatever returns you can finally close
it.
However this
As I thought but:
'No getter method for property myProperty of bean myList'
The ArrayList is a raw ArrayList, It isn't a wrapper.
>
>
>myList
>
>
>
>
>What goes in name="" to access a bean in the collection as specified below
>collection is an ArrayList of beans, each bean has a getMyProperty()
What goes in name="" to access a bean in the collection as specified below
collection is an ArrayList of beans, each bean has a getMyProperty() method
">
Thankyou
--
Mike W
-
To unsubscribe, e-mail: [EMAIL PROTECT
>
>Read the docs on DispatchAction/LookupDispatchAction. But, basically, give
>your buttons both the same name. Then whichever one is clicked will be the
>value. Then you can determine what needs to be done server side.
>
>Brandon Goodin
>
And should I use one of these if I want to reset a form, w
>we should enjoy the synergy of using these things
>together instead of hoping for a "mother of all frameworks" solution that
>satisfies every single need in one package.
>
>Craig
"mother of all frameworks"
Sure as hell feels like it from this point on the learning curve!
--
Mike W
---
>There must be a struts way to do it surely.
>The RequestProcessor is a global controller for all Actions, its
>methods are
>accessed in a sequence, some before the action some launching the action,
>some after. Surely this can be used to time the Action.
>
>Anyone?
Okay a global way, using the
>
>Maybe I'm wrong, but this is how I understand the way filters work.
You are probably right, my brain hurts, it's Friday.
>
>> I want the Struts way, I'm learning struts.
>
>I didn't realize there was a Struts way. Filters are filters, aren't they?
>
There must be a struts way to do it surel
>
>Mike Jasnowski wrote:
>> What about a servlet request/response filter? You might not get
>as granular
>> as you want, but you could get that info relatively easily from
>their, and
>> in the response record the elapsed time.
>
>Filter == very easy way to do it. In fact there is an already-writ
In order to aid understanding what would be the simplest way to record the
time taken to carry out a request, and then make this available to a JSP?
To make this global I've been playing with RequestProcessor with little
success.
--
Mike W
--
>What possible reason could there be for a request parameter that is set in
>the Action, then forwarded via mapping.getInputForward() to a jsp, to be
>null in that jsp?
>forward element is set to redirect="false". A session attribute is
>retrieved okay.
Okay it works now...
BUT if I subclass Re
What possible reason could there be for a request parameter that is set in
the Action, then forwarded via mapping.getInputForward() to a jsp, to be
null in that jsp?
forward element is set to redirect="false". A session attribute is
retrieved okay.
Thankyou.
--
Mike W
-
>
>A struts forward can be redirecting or non-redirecting. Check if you are
>using a redirecting one (look at whats in your struts config for that
>forward) - redirecting ones cause a client side redirection so you start a
>new request.
>
No Andrew, that didn't work, redirect attribute is false by
>Terribly numpty problem!
>
>I have subclassed the RequestProcessor and set a request attribute
>there, in
>the Action I've checked to see if it is still there, it is. When I forward
>to a jsp page it is null.
>
>Where may I be going wrong please?
>
>Also is there a struts way to do:
>
><%= (Strin
Terribly numpty problem!
I have subclassed the RequestProcessor and set a request attribute there, in
the Action I've checked to see if it is still there, it is.
When I forward to a jsp page it is null.
Where may I be going wrong please?
Also is there a struts way to do:
<%= (String)request.ge
I understand I can subclass DynaActionForm and register this in the
struts-config.
I can then populate my class with dynamic methods for any properties I like
& with type conversion, again in the struts-config.
I assume behind the scenes it is creating a new DynaClass sub class of my
subclass and
What is meant by 'display tag' please?
--
Mike W
>-Original Message-
>From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
>Sent: 29 May 2003 11:58
>To: Struts Users Mailing List
>Subject: RE: which is better, use a display for paginating or ...
>
>
>If you have to always fetch latest data
Okay, no one seems to have any suggestions so having thought about this for
about a week now here is what I propose to do.
I'm just trying to implement very simple forms the struts way, prepopulation
& validation are not major concerns at the moment but I'd like to keep the
option open.
My main r
Sorry to be a pain
~~
Say for instance you want to filter for all the ' " \ characters in request
parameters
either removing them, or escaping them.
Either way if you do it before the action form gets them, then on
prepopulation of form fields the user will see these alterations (n
Say for instance you want to filter for all the ' " \ characters in request
parameters
either removing them, or escaping them.
Either way if you do it before the action form gets them, then on
prepopulation of form fields the user will see these alterations (not
desirable).
If you do it after you
an't see why I can't use those.
So the only tags that rely on a Form Bean are those that accept user input?
>If you were going to use
>DynaActionForms, you'll
>lose some typecasting like with type="java.lang.Integer[]" />.
>
>Mike Whittaker wrote:
>
&
I know I've been here before, but it is my main sticking point.
Does anyone JUST use the Form Beans as a html form backend,
whether that is for pre population or validation or both.
BUT
Then decide that is easier to use the request parameters as a java.util.Map
in the business layer.
I know I
61 matches
Mail list logo