Form beans
hi all,
i am using struts in my web application.
i am using form beans.in my jsp,there are input fields for name,sex,age and salary of Person and his partners which are upto 5.
i think you can imagine that table (6 columns(1+5) and 4 rows for name,sex,age and salary )
i am b=very confused about my form bean.how should i create it?
there will be different property names for different partners.
can i achieve this by using the single form bean of person(instatiating each time)
i am bit confused in this regard and more over i heard about Dynaform.
does it comes into picture here.
any ideas on this issue
regards and thanks in advance
Rakesh,
re 1 - If you are using WLW 8.1 SP2 you can use the optional "form"
attribute to reuse the same instance of FormData. You need to create a
FormData member variable in your page flow to do this. The documentation for
jpf:action has sample code. Alternatively you can use the hidden field
approach you suggest.
re 2 - I can't think of a clean way of doing the validation in stages. You
could set a flag in a hidden field, or in some other manner, and then check
this flag in your validation code to determine the fields to validate.
- john
"Rakesh Sony" <[email protected]> wrote in message
news:3ff2044e$[email protected]..
>
1. Can my formbean be used on multiple JSPs? For example - JSP 1 displays4 fields
from the form bean, and JSP 2 displays another 4. Can I reuse the sameform bean?
On JSP 2, do I have to use hidden variables for the first 4 fields?
2. How do I do validation in this case? On JSP 2 I don't want to validatethe
first 4 fields again.
Happy New Year!
Rakesh
Similar Messages
-
STRUTS - Cannot retrieve definition for form bean null -aaaarrrrgh
Hi Folks,
my head hurts and i become crazy... i know that a lot of people asked this question before, but i did not found any suitable solution.
I have simple a jsp page, containing a form which should be handled by struts. I tried everything, but i did not found my mistake.
Can anyone help me please?
JSP:
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ page contentType="text/html;charset=windows-1252"%>
<html:html locale="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Anmeldung f?r GOLEM Quickplayout</title>
</head>
<body>
<html:errors/>
<html:form action="checkLogin.do">
<table cellspacing="3" cellpadding="2" border="0" width="100%" align="left">
<tr>
<td>
<bean:message key="prompt.username"/>
</td>
<td>
<html:text property="username"/>
</td>
</tr>
<tr>
<td>
<bean:message key="prompt.password"/>
</td>
<td>
<html:text property="password"/>
</td>
</tr>
</table>
</html:form>i tryed a lot for the FORM -Tag, for instance:
<html:form action="checkLogin.do"> or
<html:form action="/checkLogin.do"> or
<html:form action="/checkLogin"> but all throws the same exception. :(
struts-config.xml
<form-beans>
<form-bean name="loginForm" type="de.orb.quick.view.LoginForm"/>
</form-beans>
<action-mappings>
<action path="/login" type="de.orb.quick.view.LoginAction" name="loginForm" input="/login.jsp" scope="session" unknown="true">
<forward name="success" path="/showData.jsp"/>
</action>
<action path="/checkLogin" type="de.orb.quick.view.CheckLogonAction" unknown="false" input="/login.jsp">
<forward name="success" path="/storeRequestData.do"/>
<forward name="failure" path="/login.do"/>
</action>
Exception:
javax.servlet.jsp.JspException: Cannot retrieve definition for form bean null
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:831)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
at _login._jspService(login.jsp:11) [/login.jsp]
LoginAction:
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
return mapping.findForward("success");
LoginForm:
public class LoginForm extends ActionForm {
private String password = "";
private String username = "";
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
return super.validate(mapping, request);
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;
public String getUsername() {
return username;
public void setUsername(String username) {
this.username = username;
}Sorry for this stupid question, but how can i avoid this exception while using struts TagLibs?
I tried to face the jsp with another action, but this does not change anything.
Thank you in advance
Mirkojavax.servlet.jsp.JspException: Cannot retrieve definition for form bean myfrom
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:831)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
at jsp_servlet.__index._jspService(__index.java:155)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6291)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3575)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2573)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151) -
Cannot retrieve definition for form bean null on action /submitCustomerForm
Can someone plz check my code...
while I try to run the code I got Stuck getting the above error report.
here is my code..
this is wat i wrote in JSP page
<html:form action="/submitCustomerForm">
and in my struts-config I ve..
<form-beans>
<form-bean name="CustomerForm" type="app1.CustomerForm" />
</form-beans>
<!-- ========== Global Forward Definitions ========= -->
<global-forwards><forward name="mainpage" path="index.jsp"></forward>
</global-forwards>
<!-- ========== Action Mapping Definitions ======== -->
<action-mappings>
<action
path="/submitCustomerForm"
type="app1.CustomerAction"
name="CustomerForm"
scope="request"
validate="true"
input="CustomerDetails.jsp" >
<forward name="success" path="/Success.jsp" />
<forward name="failure" path="/Failure.jsp" />
</action>
</action-mappings><html:form action="submitCustomerForm.do">the above is the way how you call your ActionServlet
if your ActionServlet mapping is
<servlet-mapping>
<servlet-name>ActionServlet</servlet>
<url-pattern>*.do<url-pattern>
</servlet-mapping> -
Cannot retrieve definition for form bean null
Hi,
I have a page jsp which contains a form. This form contains an action
towards (page.do ).
I configured struts-config.xml file in whom I put a configuration of
action ( type=xxx.pageAction ) but not form because I have not need of
it.
During the execution it show that it tries to instantiate a bean of form
corresponding to a configuration of action and post this error message
" Root causes of ServletException javax.servlet.jsp. JspException:
Cannot retrieve definition for form bean null "
Could you indicate to me where is the problem ?
Here is my configuration :
< html:form action = " page.do " method = " post " >
</html:form >
<action path="/page"
type="xxx.pageAction">
<forward name="show" path="/page.jsp"/>
</action>
Thanks in advance
Rachid.
There's little reason to use Struts infrastructure to set this up since you have no model, and the controller aspect is well-defined (just go to "NewProject"!). You're basically providing a link from one page to another, akin to doing an <a href>, and you wouldn't use Struts to do a simple link :).
I would just just use standard HTML.
If you're okay with using Javascript, this is the simplest:
<input type="button" onClick="document.location='NewProject'">
Or you can use a standard HTML form, as you've basically done already:
<form action="NewProject" method="get">
<input type="submit" value="Create">
</form> -
How to reset values in a Data Form Bean?
I have created an ADF application that has a search facility in it. The architecture is as follows:
DataPage (search.jsp) --> DataAction (validateSearch) -->DataAction (refreshCollection) --> DataPage (results.jsp)
I have successfully created a data form bean to hold the data that is submitted in the search and bind it to the refresh method of the collection. I have also successfully overridden the validate method, which catches and throws and displays appropriate ActionErrors on the search.jsp page.
I have added a link back to the search.jsp page from the results.jsp page (as a user may wish to perform another search), the ActionErrors are resetting ok but I have not managed to work out how to reset the values of the actual data form bean.
I have tried several different ways of overriding the reset method within the data form bean but so far have been unsuccessful - I would appreciate any assistance with this matter.
Shown here is a basic example of a form bean that I have been trying different things out with - I can not get the reset method to even be called - please help!
package uk.dmf.eg02;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
public class searchForm extends ActionForm
String search;
public setupForm()
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
ActionErrors errors = new ActionErrors();
if (search.trim().length()==0)
errors.add("search", new ActionError("error.search"));
return errors;
public void reset(ActionMapping mapping, HttpServletRequest request)
System.err.println("EXECUTING RESET METHOD");
this.search = "";
public void setSearch(String search)
this.search = search;
public String getSearch()
return search;If you run in request scope the reset method is called, however in session scope is't only called once (or never?). See documentation of method reset():
public void reset(ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Reset bean properties to their default state, as needed. This method is called before the properties are repopulated by the controller.
The default implementation does nothing. In practice, the only properties that need to be reset are those which represent checkboxes on a session-scoped form. Otherwise, properties can be given initial values where the field is declared.
If the form is stored in session-scope so that values can be collected over multiple requests (a "wizard"), you must be very careful of which properties, if any, are reset. As mentioned, session-scope checkboxes must be reset to false for any page where this property is set. This is because the client does not submit a checkbox value when it is clear (false). If a session-scoped checkbox is not proactively reset, it can never be set to false.
This method is not the appropriate place to initialize form value for an "update" type page (this should be done in a setup Action). You mainly need to worry about setting checkbox values to false; most of the time you can leave this method unimplemented. -
How to populate the form bean object for multiselect box in struts
hi, i am using two multi select boxes,one to populate the data by getting from the data base and another to fill the items selected from the first select box to store the values in the database..i need the information (how to declare the select boxes and how to write the form bean getters and setters for this one.) regarding this..
http://forum.java.sun.com/thread.jspa?threadID=5147813&messageID=9553925#9553925
-
Cannot create a Struts Form bean using jdeveloper 10g
Hello I'm new to jdeveloper and struts and triying to create a sample login page following this tutorial :http://www.oracle.com/technology/products/jdev/htdocs/handson/struts/strutshandson.html
But I have a little problem in the 3rd excercice (Building Struts Form Beans and Actions)
when I follow the instructions "Select File | New > Choose Web-Tier in the Categories, and select Struts > Select ActionForm from the Items > Click OK. "
there is no ActionForm Item ! the only available item is "Struts Controller page Flow" and I allready used this one to create the struts' project template !
(same thing : Struts Action in the next tutorial section is not available)
BTW : I have to use jdeveloper 9.0.5.2 and not a latest version1. Take a look at the class diagram for query model http://docs.oracle.com/cd/E17904_01/web.1111/b31973/af_query.htm#BABDGCHI
2. Also see if this helps you understand http://jobinesh.blogspot.in/2011/03/retrieving-viewcriteria-from-custom.html -
Hi,
I have the following urgent problem.
I created a pageflow which uses a form bean (created with a db control) to insert
values in a table. I overcame the disability to insert date values in the table
by converting this columns to string values in the table. But now I have to insert
a sysdate in a column that holds the row sampled date. How is it possible? I used
javascript without an success.
Code in jsp:
document[getNetuiTagName("myForm",this)][getNetuiTagName("date",this)].value=new
Date();(have used string values too)
<netui:hidden dataSource="{actionForm.sampled}" tagId="date"/>
Code in .jcx file
<xsd:element name="SAMPLED" type="xsd:dateTime" wld:JDBCType="DATE" minOccurs="0"
wld:TableName="theTable" nillable="true">
* </xsd:element>
Code in .jpf file
* <pageflow-object id="formbeanprop:portlets.Career.Submit_CV.Submit_CVController.DatabaseForm#sampled#java.sql.Timestamp"/>
public static class DatabaseForm extends RowSetForm
public java.sql.Timestamp getSampled()
return sampled;
public void setSampled(java.sql.Timestamp newOne)
registerChange("sampled");
this.sampled = newOne;
I have tried to use java.sql.Date too...
Any help would be very appreciated.
Thx,
VincentHi,
Hope You're using the template.fmb.
If your Custom Form is in INV module, use 'FND_ORG.CHOOSE_ORG;' in the pre-form.
Else Set the org id dynamically,
begin
MO_GLOBAL.SET_POLICY_CONTEXT(ACCESS_MODE,ORG_ID);
end;
Example:
begin
MO_GLOBAL.SET_POLICY_CONTEXT('S',101);
end;
S - Denotes that the current session will work for Single Org_id (101)
M - Denotes that the current session will work for Multiple Org_id
Thanks -
How to call the form bean value on jsp withthe help of jstl tag
hi
all friends
i am working in struts & i use jstl tag in jsp. i have one problem rise is how to call the form bean value in jsp page by using jstl tag.
i now how to retrive the value through jsp:logic
eg. <logic:empty name="userListForm" property="users">
NO USER FOUND
</logic:empty>
see * userListForm mean formbaen name.
* users means collection object.
so how can i write above e.g in jstlYou use the jstl core:if or core:choose combined with the EL:
<c:if test="${empty users.userListForm}">
NO USERS FOUND
</c:if>I suggest you lookup the jsp expression language (EL) using google, it's very powerful. -
Retaining List Box Value in Form Bean
Hi All,
I want to retain the List Box populated using the Form bean.
Right now when i display the List Box in a page and submit the Form and come back
to same page again I do not get List Box populated.
In the JPF I do not get the all values of the List Box. I only get the selected
value of the ListBox.
Thx
HiteshHi sudha,
1. We can also use the FM
F4IF_INT_TABLE_VALUE_REQUEST
(here u will be able to capture the value)
2.
DATA : BEGIN OF itab OCCURS 0,
bukrs LIKE t001-bukrs,
butxt LIKE t001-butxt,
END OF itab.
SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
value_org = 'S'
dynprofield = 'MYLISTTAB'
dynpprog = sy-repid
dynpnr = sy-dynnr
TABLES
value_tab = itab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
3. In pai module,
use the code :
PROCESS ON VALUE-REQUEST.
field mylistab module abc.
where field = your field name
abc = module name (which contains the above coding in step 2)
regards,
amit m.
Message was edited by: Amit Mittal -
Passing a form bean with a link
Hii Javaties
I am passing some parameters from a jsp page to the action class in the following manner
�2=<bean write name="formbean" property="prop2" />Link
Can anyone tell me is this the right approach to pass paramters from a link .
Can i pass the whole form bean with a link ?From what I understand you are using Struts, and as much as I know you have to configure struts so that when you click for example on a link with the url set as hello.do, it will actually get the hello form bean and handle it. However as much as I know you have to do this from the xml configuration!
I am not expert in struts however, but that is my feeling.
regards,
sim085 -
How to use coherence-web with a struts form bean
We are trying to switch to Glassfish 3.1 but when we switch the persistence-type from "replicated" to "coherence-web" our struts applications start failing. The first time we try the application the page loads. But all calls from then on end in error. The form bean is called FbCustomer. Any help is greatly appreciated!! Here is the error....
WARNING: StandardWrapperValve[action]: PWC1406: Servlet.service() for servlet action threw exception(Wrapped) java.io.IOException: readObject failed: java.lang.ClassNotFoundException: rav.einvoice.web.forms.FbCustomer
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
at com.tangosol.io.ResolvingObjectInputStream.resolveClass(ResolvingObjectInputStream.java:66)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2217)
at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2348)
at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2746)
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:262)
at com.tangosol.coherence.servlet.OptimizedHolder.deserializeValue(OptimizedHolder.java:233)
at com.tangosol.coherence.servlet.OptimizedHolder.getValue(OptimizedHolder.java:64)
at com.tangosol.coherence.servlet.SplittableHolder.getValue(SplittableHolder.java:56)
at com.tangosol.coherence.servlet.AbstractHttpSessionModel.getAttribute(AbstractHttpSessionModel.java:130)
at com.tangosol.coherence.servlet.api23.HttpSessionImpl.getAttribute(HttpSessionImpl.java:81)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSession.getAttribute(CoherenceWebSession.java:461)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSessionFacade.getAttribute(CoherenceWebSessionFacade.java:87)
at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:777)
at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:280)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:864)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:761)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1050)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:231)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:724)ClassLoader: java.net.URLClassLoader@695f18fe
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
at com.tangosol.coherence.servlet.OptimizedHolder.deserializeValue(OptimizedHolder.java:233)
at com.tangosol.coherence.servlet.OptimizedHolder.getValue(OptimizedHolder.java:64)
at com.tangosol.coherence.servlet.SplittableHolder.getValue(SplittableHolder.java:56)
at com.tangosol.coherence.servlet.AbstractHttpSessionModel.getAttribute(AbstractHttpSessionModel.java:130)
at com.tangosol.coherence.servlet.api23.HttpSessionImpl.getAttribute(HttpSessionImpl.java:81)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSession.getAttribute(CoherenceWebSession.java:461)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSessionFacade.getAttribute(CoherenceWebSessionFacade.java:87)
at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:777)
at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:280)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:864)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:761)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1050)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:231)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:724)Caused by: java.io.IOException: readObject failed: java.lang.ClassNotFoundException: rav.einvoice.web.forms.FbCustomer
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
at com.tangosol.io.ResolvingObjectInputStream.resolveClass(ResolvingObjectInputStream.java:66)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2217)
at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2348)
at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2746)
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:262)
at com.tangosol.coherence.servlet.OptimizedHolder.deserializeValue(OptimizedHolder.java:233)
at com.tangosol.coherence.servlet.OptimizedHolder.getValue(OptimizedHolder.java:64)
at com.tangosol.coherence.servlet.SplittableHolder.getValue(SplittableHolder.java:56)
at com.tangosol.coherence.servlet.AbstractHttpSessionModel.getAttribute(AbstractHttpSessionModel.java:130)
at com.tangosol.coherence.servlet.api23.HttpSessionImpl.getAttribute(HttpSessionImpl.java:81)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSession.getAttribute(CoherenceWebSession.java:461)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSessionFacade.getAttribute(CoherenceWebSessionFacade.java:87)
at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:777)
at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:280)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:864)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:761)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1050)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:231)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:724)ClassLoader: java.net.URLClassLoader@695f18fe
at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2225)
at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2348)
at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2746)
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:262) ... 38 moreCould you share with is the entire stacktrace?
It seems that your domain classes are not being founded by the classloader, and this could be a consequence of a lot of things, but in general, it is a classloader issue. Your classloader is broken by some reason. Check if dependencies are well solved, and check if there are some NoClassDefFoundErrors in the stacktrace. Sometimes when the classpath is wrong, the entire classloader brokes generating strange behaviors like this.
Also review the steps necessary to deploy Coherence*Web on GlassFish: http://docs.oracle.com/middleware/1212/coherence/COHCW/glassfish.htm#COHCW357
Remember for example that, different from WebLogic 12.1.2, you need to deploy coherence.jar and coherence-web.jar at your package deployment.
Cheers,
Ricardo Ferreira -
Passing values to form bean string array from dynamic added textboxes
Hi,
I am unable to pass values to form bean string array from a jsp in which I have incorporated dynamically adding of textboxes in javascript.
I have given add/delete row option in the jsp. If there is single row, this is working fine. But after adding a row, I am not able to either do any validations on added textboxes or pass the values to the String array form bean variable.
code snippet:
var cell6 = row.insertCell(4);
var element5 = document.createElement("input");
element5.type = "text";
element5.className = "formtext1";
element5.size = "5";
element5.value = "00.00";
element5.name= "qty"; // this is a string array of the form bean.
element5.onchange=function() {checkNumeric(this);};
cell6.appendChild(element5);
<html:text styleClass="formtext1" property="qty" value="" size="5" styleId="qty" onchange="checkNumeric(this)"/></td>
form bean declaration
private String[] qty; Please help.
Edited by: j2eefresher on Jan 12, 2010 11:23 PMShivanand,
There's no need to post that much code when you could create a very short test case that demonstrates only the problem you are having.
You're using &NAME. notation on something that isn't a page or application item. You can't reference PL/SQL variables that way (or any other way) outside the PL/SQL scope. For your situation, you could create a page item named P55_DOCID and assign it a value in the PL/SQL process (:P55_DOCID := DOCID;), then reference &P55_DOCID. in HTML areas like the success message.
Scott -
HELP - why is form bean tag not parsing?
In my struts-config.xml file, I have the tag:
<form-beans>
<form-bean name="poolListForm"
type="com.test.xm.forms.PoolListForm"/>
</form-beans>
I have a form, called PoolListForm.
However, when I start weblogic, I get an error with the form bean (error goes away if I delete the form bean tag from struts-config.xml file. (error log is below).
Does anyone know what's generating the error below???
THANKS.
2004-06-28 13:44:26,320 ERROR: 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:993)
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:869)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java:848)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:787)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
ervletContext.java:3252)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
ServletContext.java:3197)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
pServletContext.java:3174)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java
:688)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java
:483)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitServic
e.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
Caused by: java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
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)
... 48 more
2004-06-28 13:44:26,360 ERROR: 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(DTDConfiguratioCaused by: java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
Stupid question, but are the struts jar files in your web-inf/lib directory? -
Can i Create a Form Bean ouitside a page controller and use it
In Pageflows all the form beans are created in the JPF file. Is it possible to create the FormBean outside the JPF file and use it in the JPF File..
Regards
KrishnaWhen you create a bean in a jpf it creates it as an inner class.
If you don't want to use this method all you have to do is to write your bean and import it into your jpf file(s) that use it.
Maybe you are looking for
-
Wireless Printing from MacBook Pro and Windows 7 laptop through iMac
I have looked everywhere I can think and have not found a solution to this problem: I just bought a 21.5" iMac and a Windows 7 laptop. I already had a 15" Macbook Pro. I have an HP C5280 printer that is now connected via USB to the iMac. All computer
-
Creating multiple views in SQL Server 2008 database through sqlcmd
I've written a script that generates a ddl file. The ddl file contains all the table creation, view creation and stored proc creation SQL statements for refreshing my database. The ddl file gets run by sqlcmd. From reading other forum posts, it seems
-
In CS3 acrobat pro 9 i could make multi-page pdf into a booklet by printing to a pdf and it gave me that option to print to a booklet. Now in Pro X i wont let me print to a pdf and I can not find out how to save a multi-page pdf into a booklet.
-
Exception in declare part..?
hi, how we can catch exception in declare part.. declare num1 number(2):=303; begin dbms_output.putline('num1 value-'||num1); exception when others then dbms_output.putline('error occured'); end; rgds, pc Edited by: PC on Sep 9, 2010 2:20 AM
-
Help with Joining two SharePoint lists using LINQ
Hi Guys, I have found many threads with this question. Although I had one doubt. I wanted to know that while performing a Join operation on two SharePoint Lists using LINQ does the column on which we are performing the join operation need to be a Loo