You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Betty Koon <bk...@adobe.com> on 2004/02/27 03:08:54 UTC
Problem with loss form (session scope)
Anyone has experience lost of form that are scoped in session? Thanks
-Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Betty Koon <bk...@adobe.com>.
I don't think it's a timeout issue. I lost the form right after I posted a
page.
-Betty
-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, February 26, 2004 8:34 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)
Thats the problem with sessions, now if you'd done it in request you'd never
really have it to loose. If it has to be sessions though either increase the
timeout or shorten your lunch break.
Niall
----- Original Message -----
From: "Andrew Hill" <an...@gridnode.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, February 27, 2004 3:30 AM
Subject: RE: Problem with loss form (session scope)
> <friday>
> Yeh. I like had one, and like I went out to lunch, and it was like a
> long lunch, and like when I came back my form was like you know
> totally like gone. In fact like, I couldnt even like you know find my
> whole session,
and
> I was like "whoa! dude - wheres my session?".
> </friday>
>
> ;->
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Problem with loss form (session scope)
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Thats the problem with sessions, now if you'd done it in request you'd never
really have it to loose. If it has to be sessions though either increase the
timeout or shorten your lunch break.
Niall
----- Original Message -----
From: "Andrew Hill" <an...@gridnode.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, February 27, 2004 3:30 AM
Subject: RE: Problem with loss form (session scope)
> <friday>
> Yeh. I like had one, and like I went out to lunch, and it was like a long
> lunch, and like when I came back my form was like you know totally like
> gone. In fact like, I couldnt even like you know find my whole session,
and
> I was like "whoa! dude - wheres my session?".
> </friday>
>
> ;->
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
???
Posted by "Mauricio T. Ferraz" <ma...@cilix.com.br>.
Anybody knows how can I define a script variable with bean define tag or
another, for the first element of a collection???
for example:
<%
ArrayList users = (ArrayList)pageContext.getAttribute("users");
User user = users.get(0);
%>
How I do it with tags???
Because I want to get the firt element of a collection, e define it!
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Andrew Hill <an...@gridnode.com>.
Ah! So the form is there! Just not the values?
hehe , ok I better explain about reset().
The reset() method is always called (by the request processor) before it
populates the form from the request. (As you noticed this occurs regardless
of validation results).
The reason for this is due to the (primary) purpose of the reset() method,
which is not so much to reset the form to default values, but rather to act
as a workaround for the issue that browsers do not submit values for certain
types of fields when they are empty - for example multiple select fields,
and unticked checkboxes. With a request scoped form you get a fresh form
everytime anyway so this issue isnt often an issue, but with a session
scoped form it can be.
Now if a user were to untick a checkbox on a form or deselect all items in a
multiple select box, or clear out all the text from a textarea, _nothing_
(not even an empty string) is submitted in the request for that field.
(Remember at its heart the submitted request is just a bunch of name=value
lines, and this is converted to a map by the servlet api, struts (or rather
beanutils) iterates the parameter names in said map and calls the
appropriate setters in the actionform with the value)
As a result the setter is not going to be invoked as there is _no_ parameter
in the request for that field. Thus the value in the actionform will not be
cleared, and the unticking of the checkbox will not be seen on the server
side.
By clearing the value for the field in reset() before populate is called the
value is cleared. If the value submitted was not empty, then the setter will
be called and the correct value replaced, if not then the cleared value
remains in the form as the setter is not called so either way the form
reflects what the user entered in the UI.
This is all well and good if all the fields are present in the UI, but if
not - such as in the case of a multiple page wizard - then we are going to
be clearing values in the actionform that should not be cleared. The answer
to this is to keep track of which page the user was submitting from and only
clear values in reset() for fields that are on that page - leaving the
others untouched. (You can submit the page id in a hidden field and check
its value with request.getParameter() if needs be).
hth
Andrew
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Saturday, 28 February 2004 06:03
To: 'Struts Users Mailing List'; andrew.david.hill@gridnode.com
Subject: RE: Problem with loss form (session scope)
One thing I found out that the reset method was getting called everytime if
there is no error return from validation. This could cause the form to be
reset to the original state.
-betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Friday, February 27, 2004 12:07 AM
To: Struts
Subject: RE: Problem with loss form (session scope)
Hmm. That does sound rather odd! Like you say, should not be like that. :-(
Only thing I can thing of here is: Is it the same session? (grasping at
straws now!) Try println/logging the sessionId from the action and see if
its still the same as first time through.
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 15:39
To: 'Struts Users Mailing List'; andrew.david.hill@gridnode.com
Subject: RE: Problem with loss form (session scope)
I am sorry. I only have 1 action map to this form. So, I guess the name
doesn't matter in this case. Basically, what I am saying is the first time
I hit this action, the form constrctor will get called but the 2nd time the
action get called, this shouldn't happen, but it does. Yes, that's what I am
planning to do next, download the source code and stepped through it.
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 11:18 PM
To: Struts
Subject: RE: Problem with loss form (session scope)
Ah, but you didnt actually answer my question.
Is it the same name for the form in both actions mappings, and do both these
action mappings specify the scope to be session?
My suspicion is that the problem is that struts is trying to find the form
under a different key in the second action - but is this second action
actually the same action as the first or different as I am assuming?
btw: have you gone and looked at the struts source code for the request
processor and request utils class to see what it is actually doing? (Tracing
through with a debugger can be quite enlightening). One of the common
attitudes in open source is that the source is the best reference and I
certainly found this the case when I was first learning struts :-)
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 15:10
To: 'Struts Users Mailing List'; andrew.david.hill@gridnode.com
Subject: RE: Problem with loss form (session scope)
I specify my own name in the struts config. In my action, I just grabbed
the action form from the execute method. And I am assumming struts fw get
that from session for me in this case, rather than creating a new one for
this request since my form is in session scope. Is this right assumption?
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 10:59 PM
To: Struts Users Mailing List
Subject: RE: Problem with loss form (session scope)
What attribute did you set the form to be stored under?
If none will default to form name. You are storing under same attribute key
yes? Both actions mapping also defined the scope to be session?
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 14:51
To: 'Struts Users Mailing List'
Subject: RE: Problem with loss form (session scope)
In struts config's action definition, I set up the action to use a form in
session scope. What I found out was, somehow the form constructor get
called the 2nd time the action get called. To my understanding, if you set
up the form in session, the form will only get created once. Any idea?
-Betty
-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, February 26, 2004 9:06 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)
Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.
I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in request scope (even if you already have one under the
same name in session).
If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.
Niall
----- Original Message -----
From: "Betty Koon" <bk...@adobe.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
<an...@gridnode.com>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)
> Well, sorry for being vague. It's a very vague problem, that's why
> it's very difficult to explain the details. This only happen to one
> of my action. I had a list inside a form. And one of the column
> render a link
to
> the detail page. But I need to do some processing before I redirect
> to
the
> detail. So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up
> this form bean as session scope. But everytime the post happened, it
> seems
like
> the form content got wiped out.
>
> -Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Betty Koon <bk...@adobe.com>.
One thing I found out that the reset method was getting called everytime if
there is no error return from validation. This could cause the form to be
reset to the original state.
-betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Friday, February 27, 2004 12:07 AM
To: Struts
Subject: RE: Problem with loss form (session scope)
Hmm. That does sound rather odd! Like you say, should not be like that. :-(
Only thing I can thing of here is: Is it the same session? (grasping at
straws now!) Try println/logging the sessionId from the action and see if
its still the same as first time through.
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 15:39
To: 'Struts Users Mailing List'; andrew.david.hill@gridnode.com
Subject: RE: Problem with loss form (session scope)
I am sorry. I only have 1 action map to this form. So, I guess the name
doesn't matter in this case. Basically, what I am saying is the first time
I hit this action, the form constrctor will get called but the 2nd time the
action get called, this shouldn't happen, but it does. Yes, that's what I am
planning to do next, download the source code and stepped through it.
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 11:18 PM
To: Struts
Subject: RE: Problem with loss form (session scope)
Ah, but you didnt actually answer my question.
Is it the same name for the form in both actions mappings, and do both these
action mappings specify the scope to be session?
My suspicion is that the problem is that struts is trying to find the form
under a different key in the second action - but is this second action
actually the same action as the first or different as I am assuming?
btw: have you gone and looked at the struts source code for the request
processor and request utils class to see what it is actually doing? (Tracing
through with a debugger can be quite enlightening). One of the common
attitudes in open source is that the source is the best reference and I
certainly found this the case when I was first learning struts :-)
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 15:10
To: 'Struts Users Mailing List'; andrew.david.hill@gridnode.com
Subject: RE: Problem with loss form (session scope)
I specify my own name in the struts config. In my action, I just grabbed
the action form from the execute method. And I am assumming struts fw get
that from session for me in this case, rather than creating a new one for
this request since my form is in session scope. Is this right assumption?
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 10:59 PM
To: Struts Users Mailing List
Subject: RE: Problem with loss form (session scope)
What attribute did you set the form to be stored under?
If none will default to form name. You are storing under same attribute key
yes? Both actions mapping also defined the scope to be session?
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 14:51
To: 'Struts Users Mailing List'
Subject: RE: Problem with loss form (session scope)
In struts config's action definition, I set up the action to use a form in
session scope. What I found out was, somehow the form constructor get
called the 2nd time the action get called. To my understanding, if you set
up the form in session, the form will only get created once. Any idea?
-Betty
-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, February 26, 2004 9:06 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)
Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.
I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in request scope (even if you already have one under the
same name in session).
If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.
Niall
----- Original Message -----
From: "Betty Koon" <bk...@adobe.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
<an...@gridnode.com>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)
> Well, sorry for being vague. It's a very vague problem, that's why
> it's very difficult to explain the details. This only happen to one
> of my action. I had a list inside a form. And one of the column
> render a link
to
> the detail page. But I need to do some processing before I redirect
> to
the
> detail. So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up
> this form bean as session scope. But everytime the post happened, it
> seems
like
> the form content got wiped out.
>
> -Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Exception while deploying
Posted by Parag <mp...@mahindrabt.com>.
Experts,
I am getting following exception while deploying Struts application on
Weblogic8.1 SP2
Caused by: java.lang.NoClassDefFoundError:
org/apache/struts/validator/ValidatorForm
Can any one help...
Regards,
Parag
Listing Exception:
Feb 27, 2004 12:55:29 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=tru
e
Feb 27, 2004 12:55:29 PM org.apache.struts.util.PropertyMessageResources
<init>
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNul
l=true
Feb 27, 2004 12:55:30 PM org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Property
Utils.java:1789)
at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(Property
Utils.java:1684)
at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.
java:1713)
at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:101
9)
at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at
org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule
java:259)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at
weblogic.apache.xerces.parsers.AbstractSAXParser.startElement(Abstrac
tSAXParser.java:459)
at
weblogic.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement
(AbstractXMLDocumentParser.java:221)
at
weblogic.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(XMLSch
emaValidator.java:618)
at
weblogic.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XML
NamespaceBinder.java:874)
at
weblogic.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamesp
aceBinder.java:591)
at
weblogic.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDVa
lidator.java:748)
at
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartE
lement(XMLDocumentFragmentScannerImpl.java:747)
at
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentCo
ntentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocume
nt(XMLDocumentFragmentScannerImpl.java:329)
at
weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguratio
n.java:525)
at
weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguratio
n.java:581)
at
weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXPar
ser.java:1175)
at
weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
at
weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:138)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
rvlet.java:1006)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
java:955)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(Servl
etStubImpl.java:1070)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:893)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java:842)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:782)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
ervletContext.java:3236)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
ServletContext.java:3181)
at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
pServletContext.java:3154)
at
weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServl
etContext.java:5637)
at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:866)
at
weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer
java:2017)
at
weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContai
ner.java:2058)
at
weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.
activateContainer(SlaveDeployer.java:2624)
at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(
SlaveDeployer.java:2547)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeplo
yer.java:2349)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(S
laveDeployer.java:2431)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDepl
oyer.java:2343)
at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(S
laveDeployer.java:2511)
at
weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
veDeployer.java:833)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDepl
oyer.java:542)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
loyer.java:500)
at
weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
dler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Caused by: java.lang.NoClassDefFoundError:
org/apache/struts/validator/Validator
Form
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
ClassLoader.java:476)
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
Loader.java:181)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
Loader.java:223)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAw
areClassLoader.java:41)
at
org.apache.struts.config.FormBeanConfig.formBeanClass(FormBeanConfig.
java:320)
at
org.apache.struts.config.FormBeanConfig.setType(FormBeanConfig.java:1
91)
... 57 more
Feb 27, 2004 12:55:30 PM org.apache.struts.action.ActionServlet
handleConfigExce
ption
SEVERE: Parsing error processing resource path
java.lang.reflect.InvocationTargetException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2540)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2566)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at
weblogic.apache.xerces.parsers.AbstractSAXParser.startElement(Abstrac
tSAXParser.java:459)
at
weblogic.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement
(AbstractXMLDocumentParser.java:221)
at
weblogic.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(XMLSch
emaValidator.java:618)
at
weblogic.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XML
NamespaceBinder.java:874)
at
weblogic.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamesp
aceBinder.java:591)
at
weblogic.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDVa
lidator.java:748)
at
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartE
lement(XMLDocumentFragmentScannerImpl.java:747)
at
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentCo
ntentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocume
nt(XMLDocumentFragmentScannerImpl.java:329)
at
weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguratio
n.java:525)
at
weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguratio
n.java:581)
at
weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXPar
ser.java:1175)
at
weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
at
weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:138)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
rvlet.java:1006)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
java:955)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(Servl
etStubImpl.java:1070)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:893)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java:842)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:782)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
ervletContext.java:3236)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
ServletContext.java:3181)
at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
pServletContext.java:3154)
at
weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServl
etContext.java:5637)
at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:866)
at
weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer
java:2017)
at
weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContai
ner.java:2058)
at
weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.
activateContainer(SlaveDeployer.java:2624)
at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(
SlaveDeployer.java:2547)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeplo
yer.java:2349)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(S
laveDeployer.java:2431)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDepl
oyer.java:2343)
at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(S
laveDeployer.java:2511)
at
weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
veDeployer.java:833)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDepl
oyer.java:542)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
loyer.java:500)
at
weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
dler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
<Feb 27, 2004 12:55:30 PM GMT+05:30> <Error> <HTTP> <BEA-101216> <Servlet:
"acti
on" failed to preload on startup in Web application: "StrutsApp".
javax.servlet.UnavailableException: Parsing error processing resource path
at
org.apache.struts.action.ActionServlet.handleConfigException(ActionSe
rvlet.java:1035)
at
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
rvlet.java:1014)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
java:955)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(Servl
etStubImpl.java:1070)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:893)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java:842)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:782)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
ervletContext.java:3236)
at
weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
ServletContext.java:3181)
at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
pServletContext.java:3154)
at
weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServl
etContext.java:5637)
at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:866)
at
weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer
java:2017)
at
weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContai
ner.java:2058)
at
weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.
activateContainer(SlaveDeployer.java:2624)
at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(
SlaveDeployer.java:2547)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeplo
yer.java:2349)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(S
laveDeployer.java:2431)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDepl
oyer.java:2343)
at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(S
laveDeployer.java:2511)
at
weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
veDeployer.java:833)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDepl
oyer.java:542)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
loyer.java:500)
at
weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
dler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
*********************************************************
Disclaimer
This message (including any attachments) contains
confidential information intended for a specific
individual and purpose, and is protected by law.
If you are not the intended recipient, you should
delete this message and are hereby notified that
any disclosure, copying, or distribution of this
message, or the taking of any action based on it,
is strictly prohibited.
*********************************************************
Visit us at http://www.mahindrabt.com
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Andrew Hill <an...@gridnode.com>.
Hmm. That does sound rather odd! Like you say, should not be like that. :-(
Only thing I can thing of here is: Is it the same session? (grasping at
straws now!)
Try println/logging the sessionId from the action and see if its still the
same as first time through.
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 15:39
To: 'Struts Users Mailing List'; andrew.david.hill@gridnode.com
Subject: RE: Problem with loss form (session scope)
I am sorry. I only have 1 action map to this form. So, I guess the name
doesn't matter in this case. Basically, what I am saying is the first time
I hit this action, the form constrctor will get called but the 2nd time the
action get called, this shouldn't happen, but it does.
Yes, that's what I am planning to do next, download the source code and
stepped through it.
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 11:18 PM
To: Struts
Subject: RE: Problem with loss form (session scope)
Ah, but you didnt actually answer my question.
Is it the same name for the form in both actions mappings, and do both these
action mappings specify the scope to be session?
My suspicion is that the problem is that struts is trying to find the form
under a different key in the second action - but is this second action
actually the same action as the first or different as I am assuming?
btw: have you gone and looked at the struts source code for the request
processor and request utils class to see what it is actually doing? (Tracing
through with a debugger can be quite enlightening). One of the common
attitudes in open source is that the source is the best reference and I
certainly found this the case when I was first learning struts :-)
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 15:10
To: 'Struts Users Mailing List'; andrew.david.hill@gridnode.com
Subject: RE: Problem with loss form (session scope)
I specify my own name in the struts config. In my action, I just grabbed
the action form from the execute method. And I am assumming struts fw get
that from session for me in this case, rather than creating a new one for
this request since my form is in session scope. Is this right assumption?
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 10:59 PM
To: Struts Users Mailing List
Subject: RE: Problem with loss form (session scope)
What attribute did you set the form to be stored under?
If none will default to form name. You are storing under same attribute key
yes? Both actions mapping also defined the scope to be session?
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 14:51
To: 'Struts Users Mailing List'
Subject: RE: Problem with loss form (session scope)
In struts config's action definition, I set up the action to use a form in
session scope. What I found out was, somehow the form constructor get
called the 2nd time the action get called. To my understanding, if you set
up the form in session, the form will only get created once. Any idea?
-Betty
-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, February 26, 2004 9:06 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)
Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.
I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in request scope (even if you already have one under the
same name in session).
If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.
Niall
----- Original Message -----
From: "Betty Koon" <bk...@adobe.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
<an...@gridnode.com>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)
> Well, sorry for being vague. It's a very vague problem, that's why
> it's very difficult to explain the details. This only happen to one
> of my action. I had a list inside a form. And one of the column
> render a link
to
> the detail page. But I need to do some processing before I redirect
> to
the
> detail. So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up
> this form bean as session scope. But everytime the post happened, it
> seems
like
> the form content got wiped out.
>
> -Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Betty Koon <bk...@adobe.com>.
I am sorry. I only have 1 action map to this form. So, I guess the name
doesn't matter in this case. Basically, what I am saying is the first time
I hit this action, the form constrctor will get called but the 2nd time the
action get called, this shouldn't happen, but it does.
Yes, that's what I am planning to do next, download the source code and
stepped through it.
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 11:18 PM
To: Struts
Subject: RE: Problem with loss form (session scope)
Ah, but you didnt actually answer my question.
Is it the same name for the form in both actions mappings, and do both these
action mappings specify the scope to be session?
My suspicion is that the problem is that struts is trying to find the form
under a different key in the second action - but is this second action
actually the same action as the first or different as I am assuming?
btw: have you gone and looked at the struts source code for the request
processor and request utils class to see what it is actually doing? (Tracing
through with a debugger can be quite enlightening). One of the common
attitudes in open source is that the source is the best reference and I
certainly found this the case when I was first learning struts :-)
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 15:10
To: 'Struts Users Mailing List'; andrew.david.hill@gridnode.com
Subject: RE: Problem with loss form (session scope)
I specify my own name in the struts config. In my action, I just grabbed
the action form from the execute method. And I am assumming struts fw get
that from session for me in this case, rather than creating a new one for
this request since my form is in session scope. Is this right assumption?
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 10:59 PM
To: Struts Users Mailing List
Subject: RE: Problem with loss form (session scope)
What attribute did you set the form to be stored under?
If none will default to form name. You are storing under same attribute key
yes? Both actions mapping also defined the scope to be session?
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 14:51
To: 'Struts Users Mailing List'
Subject: RE: Problem with loss form (session scope)
In struts config's action definition, I set up the action to use a form in
session scope. What I found out was, somehow the form constructor get
called the 2nd time the action get called. To my understanding, if you set
up the form in session, the form will only get created once. Any idea?
-Betty
-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, February 26, 2004 9:06 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)
Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.
I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in request scope (even if you already have one under the
same name in session).
If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.
Niall
----- Original Message -----
From: "Betty Koon" <bk...@adobe.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
<an...@gridnode.com>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)
> Well, sorry for being vague. It's a very vague problem, that's why
> it's very difficult to explain the details. This only happen to one
> of my action. I had a list inside a form. And one of the column
> render a link
to
> the detail page. But I need to do some processing before I redirect
> to
the
> detail. So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up
> this form bean as session scope. But everytime the post happened, it
> seems
like
> the form content got wiped out.
>
> -Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Andrew Hill <an...@gridnode.com>.
Ah, but you didnt actually answer my question.
Is it the same name for the form in both actions mappings, and do both these
action mappings specify the scope to be session?
My suspicion is that the problem is that struts is trying to find the form
under a different key in the second action - but is this second action
actually the same action as the first or different as I am assuming?
btw: have you gone and looked at the struts source code for the request
processor and request utils class to see what it is actually doing? (Tracing
through with a debugger can be quite enlightening). One of the common
attitudes in open source is that the source is the best reference and I
certainly found this the case when I was first learning struts :-)
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 15:10
To: 'Struts Users Mailing List'; andrew.david.hill@gridnode.com
Subject: RE: Problem with loss form (session scope)
I specify my own name in the struts config. In my action, I just grabbed
the action form from the execute method. And I am assumming struts fw get
that from session for me in this case, rather than creating a new one for
this request since my form is in session scope. Is this right assumption?
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 10:59 PM
To: Struts Users Mailing List
Subject: RE: Problem with loss form (session scope)
What attribute did you set the form to be stored under?
If none will default to form name. You are storing under same attribute key
yes? Both actions mapping also defined the scope to be session?
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 14:51
To: 'Struts Users Mailing List'
Subject: RE: Problem with loss form (session scope)
In struts config's action definition, I set up the action to use a form in
session scope. What I found out was, somehow the form constructor get
called the 2nd time the action get called. To my understanding, if you set
up the form in session, the form will only get created once. Any idea?
-Betty
-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, February 26, 2004 9:06 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)
Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.
I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in request scope (even if you already have one under the
same name in session).
If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.
Niall
----- Original Message -----
From: "Betty Koon" <bk...@adobe.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
<an...@gridnode.com>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)
> Well, sorry for being vague. It's a very vague problem, that's why
> it's very difficult to explain the details. This only happen to one
> of my action. I had a list inside a form. And one of the column
> render a link
to
> the detail page. But I need to do some processing before I redirect
> to
the
> detail. So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up
> this form bean as session scope. But everytime the post happened, it
> seems
like
> the form content got wiped out.
>
> -Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Betty Koon <bk...@adobe.com>.
I specify my own name in the struts config. In my action, I just grabbed
the action form from the execute method. And I am assumming struts fw get
that from session for me in this case, rather than creating a new one for
this request since my form is in session scope. Is this right assumption?
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 10:59 PM
To: Struts Users Mailing List
Subject: RE: Problem with loss form (session scope)
What attribute did you set the form to be stored under?
If none will default to form name. You are storing under same attribute key
yes? Both actions mapping also defined the scope to be session?
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 14:51
To: 'Struts Users Mailing List'
Subject: RE: Problem with loss form (session scope)
In struts config's action definition, I set up the action to use a form in
session scope. What I found out was, somehow the form constructor get
called the 2nd time the action get called. To my understanding, if you set
up the form in session, the form will only get created once. Any idea?
-Betty
-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, February 26, 2004 9:06 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)
Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.
I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in request scope (even if you already have one under the
same name in session).
If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.
Niall
----- Original Message -----
From: "Betty Koon" <bk...@adobe.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
<an...@gridnode.com>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)
> Well, sorry for being vague. It's a very vague problem, that's why
> it's very difficult to explain the details. This only happen to one
> of my action. I had a list inside a form. And one of the column
> render a link
to
> the detail page. But I need to do some processing before I redirect
> to
the
> detail. So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up
> this form bean as session scope. But everytime the post happened, it
> seems
like
> the form content got wiped out.
>
> -Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Andrew Hill <an...@gridnode.com>.
What attribute did you set the form to be stored under?
If none will default to form name. You are storing under same attribute key
yes?
Both actions mapping also defined the scope to be session?
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 14:51
To: 'Struts Users Mailing List'
Subject: RE: Problem with loss form (session scope)
In struts config's action definition, I set up the action to use a form in
session scope. What I found out was, somehow the form constructor get
called the 2nd time the action get called. To my understanding, if you set
up the form in session, the form will only get created once. Any idea?
-Betty
-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, February 26, 2004 9:06 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)
Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.
I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in request scope (even if you already have one under the
same name in session).
If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.
Niall
----- Original Message -----
From: "Betty Koon" <bk...@adobe.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
<an...@gridnode.com>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)
> Well, sorry for being vague. It's a very vague problem, that's why
> it's very difficult to explain the details. This only happen to one
> of my action. I had a list inside a form. And one of the column
> render a link
to
> the detail page. But I need to do some processing before I redirect
> to
the
> detail. So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up
> this form bean as session scope. But everytime the post happened, it
> seems
like
> the form content got wiped out.
>
> -Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Betty Koon <bk...@adobe.com>.
In struts config's action definition, I set up the action to use a form in
session scope. What I found out was, somehow the form constructor get
called the 2nd time the action get called. To my understanding, if you set
up the form in session, the form will only get created once. Any idea?
-Betty
-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk]
Sent: Thursday, February 26, 2004 9:06 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)
Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.
I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in request scope (even if you already have one under the
same name in session).
If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.
Niall
----- Original Message -----
From: "Betty Koon" <bk...@adobe.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
<an...@gridnode.com>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)
> Well, sorry for being vague. It's a very vague problem, that's why
> it's very difficult to explain the details. This only happen to one
> of my action. I had a list inside a form. And one of the column
> render a link
to
> the detail page. But I need to do some processing before I redirect
> to
the
> detail. So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up
> this form bean as session scope. But everytime the post happened, it
> seems
like
> the form content got wiped out.
>
> -Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Problem with loss form (session scope)
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.
I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in request scope (even if you already have one under the
same name in session).
If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.
Niall
----- Original Message -----
From: "Betty Koon" <bk...@adobe.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>;
<an...@gridnode.com>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)
> Well, sorry for being vague. It's a very vague problem, that's why it's
> very difficult to explain the details. This only happen to one of my
> action. I had a list inside a form. And one of the column render a link
to
> the detail page. But I need to do some processing before I redirect to
the
> detail. So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up this
> form bean as session scope. But everytime the post happened, it seems
like
> the form content got wiped out.
>
> -Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Betty Koon <bk...@adobe.com>.
Well, sorry for being vague. It's a very vague problem, that's why it's
very difficult to explain the details. This only happen to one of my
action. I had a list inside a form. And one of the column render a link to
the detail page. But I need to do some processing before I redirect to the
detail. So I wrote the link to do a form post it back to the caller action.
In that case, I can collect some information, at this point, I set up this
form bean as session scope. But everytime the post happened, it seems like
the form content got wiped out.
-Betty
-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, February 26, 2004 7:31 PM
To: Struts Users Mailing List
Subject: RE: Problem with loss form (session scope)
<friday>
Yeh. I like had one, and like I went out to lunch, and it was like a long
lunch, and like when I came back my form was like you know totally like
gone. In fact like, I couldnt even like you know find my whole session, and
I was like "whoa! dude - wheres my session?". </friday>
;->
Perhaps you could be a bit more specific about the problem you encountered?
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 10:09
To: 'Struts Users Mailing List'
Subject: Problem with loss form (session scope)
Anyone has experience lost of form that are scoped in session? Thanks
-Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem with loss form (session scope)
Posted by Andrew Hill <an...@gridnode.com>.
<friday>
Yeh. I like had one, and like I went out to lunch, and it was like a long
lunch, and like when I came back my form was like you know totally like
gone. In fact like, I couldnt even like you know find my whole session, and
I was like "whoa! dude - wheres my session?".
</friday>
;->
Perhaps you could be a bit more specific about the problem you encountered?
-----Original Message-----
From: Betty Koon [mailto:bkoon@adobe.com]
Sent: Friday, 27 February 2004 10:09
To: 'Struts Users Mailing List'
Subject: Problem with loss form (session scope)
Anyone has experience lost of form that are scoped in session? Thanks
-Betty
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org