Struts ActionForm bean retuning null values

Hello friends,
I am new to struts framework, I am trying a simple application which gets form details from user store it in ActionForm and showing in a jsp. Now the problem is when i try to get the bean values form the Action form it is returning only null values. but the values i entered in <html:form> is getting stored in the ActionForm.
I am very much confused with this problem.Your help is greatly appreciated
regards,
Muthu

r035198x wrote:
I'm not too sure about this but I think struts questions are not all that welcome in this forum.
Better try the dedicated struts forum at Apache.They're not per definition forbidden here, but it's just merely that you will have more chance to meet real Apache Struts experts at a Apache Struts forum instead of a general Sun Servlet forum, let alone Sun JSP/JSTL or Sun JSF forum.

Similar Messages

  • Struts (ActionForm beans)

    Does anyone have any information on the
    public void reset(ActionMapping, HttpServletRequest)
    method that ActionForm classes have.
    To be more specific at what points will the Struts framework call this method and why?
    Basically I have set the ActionForm with a scope of session and implemented the reset method to reset all my form variables.
    Yet every time the associated Action class is called the data is reset.
    I assumed this would only happen if I had set the scope as request.
    Should this be happening or should I not be implementing the reset method in the ActionForm bean?

    I checked out the source code and the main ActionServlet calls the ActionForm reset method on each request. I'm not sure what you mean by "set the ActionForm with a scope of session", but ActionServlet does not check anything, it just calls reset() as part of processPopulate().
    I think the idea is that the ActionForm reflects whatever is coming in from the request and a bean would perform persistence. If you are using the ActionForm to save across requests, you may need special logic in reset() to determine which elements to reset and when.
    Hope this helps. By the way, if you are doing a lot of Struts work, I recommend downloading the source code for research purposes and for customizing.

  • Struts ActionForm variable values in JSP

    I've tried to get variable values from a Struts ActionForm. I know that I can use Struts's bean tags, but can't figure out correct syntax or may there's some thing else to discover.
    I'm trying something like:
    <bean:define id="atr" name="MyActionForm" property="attribute"/></address>
    <p><%=atr%></p>
    And my struts-config look like:
    <form-bean name="MyActionForm" type="sth.MyActionForm"/>
    And the ActionForm is like:
    private String attribute;
    public String getAttribute() { ... }
    public void setAttribute(String attribute) {...}
    What may be wrong?
    Edited by: aproppon on Sep 26, 2007 9:46 AM

    I've tried with <bean:write... but since I catch exception saying MyActionForm can't be found in any scope. As far as I'm aware I've set request scope like:
    <action input="/jsp/something.jsp" name="MyActionForm" path="/jsp/myAction" scope="request" type="sth.MyAction">
    <forward name="success" path="/jsp/index.jsp"/>
    <forward name="failure" path="/jsp/something.jsp"/>
    </action>
    Edited by: D.A.R. on Sep 26, 2007 12:09 PM

  • FindByPrimaryKey compiled OK but retuns null for a pre-existing value, WHY?

    Hi My name is KV Moorthy.
    I have this requirement that one of column shoud have unique value. I had a unique constraint on the table , this ends with ugly error that it comes with NULL pointer error, on the detail it display the CONSTAINT violated. I do not like it.
    So i decide to use the FindByPrimaryKey method. ( suppose to check cache and Database).
    It did not work logically. When debugged the following code the FindByPrimaryKey method retuns a null value but the value is in cache and DB.
    I had define this Entity Attribute as Primary Key. ( i am using the seeded message, when works i was going to define the custom one)
    Hello Experts , Please help me ( i am on 11i RUP7) LevelValue is the attribute on my entity object.
    public void setLevelValue(String value)
    if (getLevelValue() != null)
    throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
    getEntityDef().getFullName(), // EO name
    getPrimaryKey(), // EO PK
    "LevelValue", // Attribute Name
    value, // Attribute value
    "AK", // Message product short name
    "FWK_TBX_T_EMP_ID_NO_UPDATE"); // Message name
    if (value != null)
    OADBTransaction transaction = getOADBTransaction();
    Object[] itemKey = {value};
    EntityDefImpl itemDefinition = ItemSubsEOImpl.getDefinitionObject();
    ItemSubsEOImpl item =
    (ItemSubsEOImpl)itemDefinition.findByPrimaryKey(transaction, new Key(itemKey));
    if (item != null)
    throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
    getEntityDef().getFullName(), // EO name
    getPrimaryKey(), // EO PK
    "LevelValue", // Attribute Name
    value, // Attribute value
    "AK", // Message product short name
    "FWK_TBX_T_EMP_ID_UNIQUE"); // Message name
    setAttributeInternal(LEVELVALUE, value);
    }

    KV Moorth,
    I have this requirement that one of column shoud have unique value. I had a unique constraint on the table ,
    this ends with ugly error that it comes with NULL pointer error, on the detail it display the CONSTAINT
    violated. Hope u must have mapped the Unique Attribute of the VO to a Field in Page.
    Share the exact error stack.
    Regards,
    Gyan

  • Null value in OA shuttle bean

    Hi,
    Can a shuttle have a null value.
    ie the VO query attached to the shuttle returns null value.
    and whenever we attach that particular shuttle to the page,on clicking on any LOV it gives the error
    You are trying to access a page that is no longer active.The referring page may have come from a previous session. Please select Home to proceed.
    when I put a where clause to restrict the query (in this case it does not return any null value) I am not getting any error.
    Any thought as what could be the issue.Issue is resolved...but would like to know the reason.
    Thanks

    Thanks Reetesh.
    Actually, on page 1 itself the parameter value is null. After issueing a commit, the parameter has a correct value but without a commit, the parameter has a null value.
    We are on 11.5.10 / RUP7.
    Thanks,
    Naga

  • XML Paser retuns The null Values

    Hi Im using Dom parser to parse a file .
    The parser work fine & it retrevies the elements but when im trying to retreive the Node Value its returning null value
    What could be wrong ???
    Thanks in advance
    Balaji

    Can someone please help me with this problem
    Thanks.

  • Is it possible to filter a table for NULL values in a column? (11g)

    I am using the out-of-the box table filtering provided by ADF Faces RC, but cannot figure out how to filter on Null value that are in the table.
    I have tried "IS NULL" and "= NULL", but nothing works.
    I have a backing bean that intercepts the filtered values before the filter is applied, and I can't set it there either.
    Does anyone know how this is accomplished?

    No, it is not. Worse, many people will view this in any old PDF viewer, most of which won't have overprint preview at all.
    You need to send very clear instructions about this, with specific screen shots - or better, avoid tools and constructions that require it. Probably some wording about "need to view with suitable professional tools" will make the message more palatable.

  • How to post null values from h:inputText?

    Hello,
    I have a form made of h:inputText fields that map to an entity class as the backing bean. Whenever I post the form from a web page, all the fields that I did not fill out and that are mapped to String fields in the entity class are set to "" (empty string) instead of null.
    However, I would like to post null values to my entity, because that would indicate that the user did not fill out the field. In other contexts (outside of the web app) it is possible to set the fields to empty strings, but from the web app it should always be null. How can I get JSF to do this correctly?
    Also, when reading entitys with null values from the database, these are converted to empty h:inputText fields, so this direction works as expected.
    Ulrich

    I haven't seen a solution for this as far.
    This is how I do it:
    public void action() {
        if (isEmpty(inputValue)) {
            // do your thing
        } else {
            // do your thing
    public static boolean isEmpty(Object value) {
        if (value == null) {
            return true;
        if (value instanceof String && ((String) value).trim().length() == 0) {
            return true;
        if (value instanceof Collection && ((Collection) value).size() == 0) {
            return true;
        // And go so on .. make it an utility method.
        return false;
    }

  • HELP NEEDED !! Null values in Database

    Hi there !!
    I need help with EJB 3.0 passing null values to database. The situation looks like that :
    I have created EJB entity class called "Osoba.java", it is in relation
    with "Rola.java" (one to many). Each Object of class Osoba can have
    many Roles. Then I created "OsobaServiceBean.java " I included it with
    metod "CreateUnregisteredOsoba(Osoba , Boolean)". From "flex" level I
    call this bean - call is accepted, and as a result new object of class Osoba is added to database. Problem is that only one column is filled in table,
    dispite that in service bean I enforce it to fill all columns (see
    source code - file OsobaServiceBean.java , method
    createUnregisteredOsoba() )
    I provided source code here :
    FILE Rola.java
    package test.granite.ejb3.entity ;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Entity;
    import javax.persistence.ManyToOne;
    @Entity
    public class Rola extends AbstractEntity {
    private static final long serialVersionUID = 1L;
    @Basic
    private String login = new String("");
    @Basic
    private String rola = new String("");
    @Basic
    private String roleGroup = new String("");
    @Basic
    private Boolean zatwierdzony = new Boolean(false);
    @ManyToOne(optional=false)
    private Osoba osoba;
    public Boolean getZatwierdzony() {
    return zatwierdzony;
    public void setZatwierdzony(Boolean zatwierdzony) {
    this.zatwierdzony = zatwierdzony;
    public String getLogin() {
    return login;
    public void setLogin(String login) {
    this.login = login;
    public String getRola() {
    return rola;
    public void setRola(String rola) {
    this.rola = rola;
    public Osoba getOsoba() {
    return osoba;
    public void setOsoba(Osoba osoba) {
    this.osoba = osoba;
    public String getRoleGroup() {
    return roleGroup;
    public void setRoleGroup(String roleGroup) {
    this.roleGroup = roleGroup;
    FILE Osoba.java
    package test.granite.ejb3.entity ;
    import java.util.HashSet;
    import java.util.Set;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Entity;
    import javax.persistence.FetchType;
    import javax.persistence.OneToMany;
    @Entity
    public class Osoba extends AbstractEntity {
    private static final long serialVersionUID = 1L;
    @Basic
    private String imie;
    @Basic
    private String nazwisko;
    @Basic
    private String login;
    @Basic
    private String haslo;
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER,
    mappedBy="osoba")
    private Set<Rola> role = new HashSet<Rola>();
    @Basic
    private String email;
    @Basic
    private String nrTelefonu;
    @Basic
    private int rokStudiow;
    public String getPelneImie() {
    StringBuilder sb = new StringBuilder();
    if (imie != null && imie.length() > 0)
    sb.append(imie);
    if (nazwisko != null && nazwisko.length() > 0) {
    if (sb.length() > 0)
    sb.append(' ');
    sb.append(nazwisko);
    return sb.toString();
    public String getImie() {
    return imie;
    public void setImie(String imie) {
    this.imie = imie;
    public String getNazwisko() {
    return nazwisko;
    public void setNazwisko(String nazwisko) {
    this.nazwisko = nazwisko;
    public String getLogin() {
    return login;
    public void setLogin(String login) {
    this.login = login;
    public String getHaslo() {
    return haslo;
    public void setHaslo(String haslo) {
    this.haslo = haslo;
    public Set<Rola> getRole() {
    return role;
    public void setRole(Set<Rola> role) {
    this.role = role;
    public String getEmail() {
    return email;
    public void setEmail(String email) {
    this.email = email;
    public String getNrTelefonu() {
    return nrTelefonu;
    public void setNrTelefonu(String nrTelefonu) {
    this.nrTelefonu = nrTelefonu;
    public int getRokStudiow() {
    return rokStudiow;
    public void setRokStudiow(int rokStudiow) {
    this.rokStudiow = rokStudiow;
    FILE OsobaServiceBean.java
    package test.granite.ejb3.service;
    import java.util.HashSet;
    import java.util.List;
    import java.util.Set;
    import javax.annotation.security.RolesAllowed;
    import javax.ejb.Local;
    import javax.ejb.Stateless;
    import javax.persistence.Query;
    import org.jboss.annotation.security.SecurityDomain ;
    import test.granite.ejb3.entity.Osoba;
    import test.granite.ejb3.entity.Rola;
    @Stateless
    @Local(OsobaService.class)
    @SecurityDomain("other")
    public class OsobaServiceBean extends AbstractEntityService implements
    OsobaService{
    private static final long serialVersionUID = 1L;
    public OsobaServiceBean() {
    super();
    public List<Osoba> findAllOsoba() {
    return findAll(Osoba.class);
    @SuppressWarnings("unchecked")
    public List<Osoba> findAllOsoba(String name) {
    Query query = manager.createQuery (
    "select distinct p from Osoba p " +
    "where upper(p.imie) like upper('%" + name + "%')
    or upper(p.nazwisko) like upper('%" + name + "%')"
    return query.getResultList();
    public Osoba createOsoba(Osoba person) { // pozwalamy
    tworzyc zeby niezalogowany
    return manager.merge (person); //
    uzytkownik utworzyl osobe
    } // ale
    osoba ta i tak nie bedzie jeszcze
    // zatwierdzona
    @RolesAllowed({"unregistered"})
    public Osoba createUnregisteredOsoba(Osoba person, boolean
    zatwierdzony) {
    Rola niezarejestrowany = new Rola();
    niezarejestrowany.setRola("user");
    niezarejestrowany.setOsoba(person);
    niezarejestrowany.setRoleGroup("Roles");
    niezarejestrowany.setLogin(person.getLogin());
    niezarejestrowany.setZatwierdzony(zatwierdzony);
    Set<Rola> role = new HashSet<Rola>();
    role.add(niezarejestrowany);
    // Arrays;
    Object a[] = role.toArray();
    Rola temp;
    temp = (Rola)a[0];
    System.out.println("Login = " + temp.getLogin() + //
    added only for check !!
    "Rola = " + temp.getLogin() +
    "Zatwierdzony = " +
    temp.getZatwierdzony() +
    "Rolegroup = " + temp.getRoleGroup());
    person.setRole (role);
    return manager.merge(person); //
    uzytkownik utworzyl osobe
    } // ale
    osoba ta i tak nie bedzie jeszcze
    public Osoba modifyOsoba(Osoba person) {
    return manager.merge(person);
    @RolesAllowed({"admin"})
    public void deleteOsoba(Osoba person) {
    person = manager.find(Osoba.class, person.getId());
    manager.remove(person);
    public void deleteRola(Rola rola) {
    rola = manager.find(Rola.class, rola.getId());
    rola.getOsoba().getRole().remove(rola);
    manager.remove(rola);
    DATABASE LISTING :
    -----------------------------------------------------------------+----------\
    --------------------------------------------------------+
    | id | ENTITY_UID | version | rola |
    zatwierdzony | osoba_id | login | RoleGroup |
    -----------------------------------------------------------------+----------\
    --------------------------------------------------------+
    | 1 | | NULL | unregistered |
    | 0 | unregistered | Roles | NULL |
    | 33 | eee91bd9-8c5f-4154-8260-3cac9a18eb97 | 0 | user |
    | 34 | NULL | NULL |
    | 32 | a7ed4e8d-a1ba-473a-921c-73c8f8f89efb | 0 | user |
    | 33 | NULL | NULL |
    -----------------------------------------------------------------+----------\
    --------------------------------------------------------+
    The row numer 1 is added by hand and it works. row number 33 and 32
    are added to database by method CreateUnregisteredOsoba. As you can
    see fields login as well as Roles and RoleGroup are empty (NULL). What
    Im doing wrong ?
    Thanks for your help -
    Roman Kli&#347;
    PS. Table Osoba works fine - everything is added as I want.

    I solved problem.
    The reason why EJB had not added anything to database NULL was becouse wrong names of class. Ive refactored whole class Rola.java to RolaClass.java and suddenly it worked.
    True reason is still unknown but most importent is that it works.
    Thanx for reading topic - hope next time someone will answer my questions.
    By !!

  • 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 version

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

  • Setting null values to view.attributes

    Hi all, I am getting following NPE posting form to server. Below I m writing snippet of code which causes the issue:
    SEVERE: value is null for a not available property: test
    java.lang.NullPointerException: value is null for a not available property: test
         at javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.java:303)
         at javax.el.MapELResolver.setValue(MapELResolver.java:90)
         at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:69)
         at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:180)
         at org.apache.el.parser.AstValue.setValue(AstValue.java:158)
         at org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
         at org.apache.jasper.el.JspValueExpression.setValue(JspValueExpression.java:85)
         at javax.faces.component.UIInput.updateModel(UIInput.java:287)
         at javax.faces.component.UIInput.processUpdates(UIInput.java:214)
         at javax.faces.component.UIForm.processUpdates(UIForm.java:99)
         at org.ajax4jsf.component.AjaxViewRoot$2.invokeContextCallback(AjaxViewRoot.java:424)
         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:240)
         at org.ajax4jsf.component.AjaxViewRoot.processUpdates(AjaxViewRoot.java:440)
         at org.apache.myfaces.lifecycle.UpdateModelValuesExecutor.execute(UpdateModelValuesExecutor.java:33)
         at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:151)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         at java.lang.Thread.run(Unknown Source)My Jsp Page code snippet:
    <t:selectOneMenu value="#{view.attributes['test']}">
         <f:selectItems value="#{myController.listValues}"/>
    </t:selectOneMenu>MyController.java bean property:
    public List<SelectItem> getListValues() {
              listValues.clear();
              SelectItem si = new SelectItem("", "-Select-");
              SelectItem si2 = new SelectItem("1", "1");
              SelectItem si3 = new SelectItem("2", "2");
              listValues.add(si);
              listValues.add(si2);
              listValues.add(si3);
              return listValues;
         }When user selects nothing, I need to set NULL value for this drop down. Kindly suggest if there is any other way or best practice to do the same.I am using Myfaces 1.2.5 for JSF 1.2. This thing was working fine in Myfaces 1.1.5 for JSF 1.1.Any suggestions?

    Give this a try:
    <t:selectOneMenu value="#{view.attributes['test']}">
            <f:selectItem itemLabel="-Select-" />
         <f:selectItems value="#{myController.listValues}"/>
    </t:selectOneMenu>
    public List<SelectItem> getListValues() {
              listValues.clear();
              listValues.add(new SelectItem("1", "1");
              listValues.add(new SelectItem("2", "2");
              return listValues;
         }Note: I cleaned up your getListValue() a bit - most of the changes are cosmetic except for removing you '-Select-' selectItem. Also, why do you use a class level variable if you are generating it on each call? Either generate the list on constructor call (or when needed) and just return it from getListValues(), or simply use a local variable.

  • Component binding return null value

    I'm migrating a JSF 1.2 application to JSF 2.1, specificly I'm currently using mojorra 2.1.24.
    The application consists of request scoped beans, and in order to pass data between requests, it embeds the data inside UI components.
    The following behaviour works well with JSF 1.2, but not with JSF 2.1.
    The application has the following configuration:
    <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>client</param-value>
    </context-param>
    The page contains the following snippet:
    <h:form prependId="false">
         <h:inputHidden binding="#{bean.inputHidden}" />
         <h:panelGroup rendered="#{bean.rendered}">
          <h:commandLink value="onAction" action="#{bean.onAction}" />
         </h:panelGroup>
    </h:form>
    The bean is the following:
    @ManagedBean
    @RequestScoped
    public class Bean {
      private UIInput inputHidden;
      private AItem item;
      public setInputHidden(UIInput inputHidden){
        this.inputHidden = inputHidden;
        if(item != null){ this.inputHidden.setValue(item); }
      public AItem getItem(){
        return (AItem) getInputHidden().getValue();
      // other getter/setter
      public String onNavToPage(AItem item){ this.item = item; return "page"; }
      public String onAction(){ //... do something return ""; }
      public boolean isRendered(){ return getProcessItem() != null; }
    The steps are the following:
    to navigate to page page the method bean.onNavToPage is invoked from within another page;
    upon page rendering the bean.item is set as bean.inputHidden value;
    after the page is diplayed, the command link is pressed.
    At this point no command link is invoked, because the bean.inputHidden.getValue() returns null, and the command link is not processed.
    I noticed that the inputHidden parameter passed to the setInputHidden method during restore view phase has, inputHidden.getValue() == null, no value has been saved previously in the view.
    I would guess that something has changed in the component state management, but debugging the JSF code I didn't find what.
    Debugging JSF code I found that the component state has been masked before the state has been saved in the view, so the ComponentStateHelper.saveState saves the deltaMap and not the defaultMap, where all the state has been put.
    public Object saveState(FacesContext context) {
            if (context == null) {
                throw new NullPointerException();
            if(component.initialStateMarked()) {
                return saveMap(context, deltaMap);
            else {
                return saveMap(context, defaultMap);
    is this a bug?
    If not, how can I restore JSF 1.2 behaviuor and save the defaultMap?
    Thanks in advance for the help.

    0.10: Saved session state: 6385226710016200 "P327_OU_NAME" changedValue="test"
    0.10: ...P327_FK_ORGUNIT session state saving same value: "%null%"
    0.15: Saved session state: 6388922235040486 "P327_OU_DESC" changedValue=""
    0.15: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.15: Branch point: BEFORE_COMPUTATION
    0.15: Computation point: AFTER_SUBMIT
    0.15: Perform Branching for Tab Requests
    0.15: Branch point: BEFORE_VALIDATION
    0.15: Perform validations:
    0.16: Branch point: BEFORE_PROCESSING
    0.16: Processing point: AFTER_SUBMIT
    0.16: ...PLSQL (AFTER_SUBMIT) INSERT INTO INDIT_PS_ORGUNIT ( OU_ID, FK_ORGUNIT, OU_NAME, OU_DESC ) VALUES ( INDIT_PASS_SEQ_GENERIC_ID.NEXTVAL, :P327_FK_ORGUNIT, :P327_OU_NAME, :P327_OU_DESC )
    0.16: Show ERROR page...
    0.17: Processing point: AFTER_ERROR_HEADER
    0.18: Processing point: BEFORE_ERROR_FOOTER
    ORA-01722: invalid number
    the table was created with:
    CREATE TABLE INDIT_PS_ORGUNIT (
    OU_ID NUMBER(15) PRIMARY KEY,
    FK_ORGUNIT NUMBER(15) NULL,
    OU_NAME VARCHAR2(30) NOT NULL,
    OU_DESC VARCHAR2(30) NULL,
    OU_DELETED DATE NULL
    what i see is that the status is "%null%" and not really "" (NULL, nothing, ...).
    so what can i do to insert a null value from a select list?
    i gave up RTFM. because i found nothing (NULL) ?!?!

  • Struts ActionForm wizard

    In jdev 9.0.3 you used to be able to select File..New..Struts..ActionForm which would then create a skeleton class extending struts.action.actionform.
    Any way of doing this jdev 10g ???
    I know I can do new..Java class then extend it myself but the previous way was a lot easier.
    Thanks
    Conrad

    Using the Struts Diagram:
    --If you already have the Action element in the Struts diagram, Rt click on the Action element to invoke the context menu and select "Go to Form Bean".
    --A dialog ("Create Struts Form Bean") opens, enter Action Form details and click OK
    --You should see the skeleton class for your action form.
    HTH,
    Prashanth

  • Geting null values from request

    hi!
    i m producing this code through out.println() method in my page and then using java script
    i am submiting this page to another page
    <td width="56%"><textarea name="question_no_1"></textarea></td>
    <input name="question_no_1_radio1" type="radio" value="radio"></td>
    <td width="59%"> <textarea name="question_no_1_ans1"></textarea></td>
    <input type="radio" name="question_no_1_radio2" value="radio"></td>
    <td><textarea name="question_no_1_ans2"></textarea></td>
    <input type="radio" name="question_no_1_radio3" value="radio"></td>
    <td><textarea name="question_no_1_ans3"></textarea></td>
    <input name="question_no_1_radio4" type="radio" value="radio"></td>
    <td><textarea name="question_no_1_ans4"></textarea></td>
    but when i submit it to the other page and try to retrieve value of parameter "question_no_1"
    through the bellow statement it shows a null value but i have given a value previously by
    typing a question in it
    System.out.println("the Body Of The First Question Is "+request.getParameter("question_no_1"));
    can anybody help me what is going on here.
    also if i try to normaly submit first page (ie <form="form1" method="post" action="other_jsp_page.jsp"> ) then the statement in the next page gives me the correct value but
    i have to submit the first paper through java script.
    if u want to see full detail of my code then go to the following link
    http://forum.java.sun.com/thread.jsp?thread=309254&forum=45&message=1237097
    thanx in advance

    OK, your problem is that you are not submmiting the values to the other page. When you do the
    --> document.forms[0].submit();
    in JavaScript, the form has to action defined
    --> <form name="form1" method="" action="">
    So, the page does nothing. The line following the submit just changes the location of the page, IT DOES NOT POST the values.
    One solutions is the following:
    1.- define an action for your form:
    <form name="form1" method="POST" action="'save_paper.jsp">
    2.- Then create a JavaScript function that validates the fields and simply return "true" if the form is correct, and false if there is a problem (just a little modification of the one you have).
    3.- Then modify your submit button:
    Instead of:
    <input type="button" name="Save" value="Save" onClick="validateField()">
    Try:
    <input type="SUBMIT" value="Save" onclick="validateField();">

  • Not to display the null values from data base

    Hiiii.
    In a jsp file i have ten check boxes.The jsp file is mapped to a servlet file for parameter requesting and to
    store it in DB.
    The unchecked box values has null values.All the values are store in a Mysql DB table.
    Again i have to display it in a jsp page from table.
    The problem am facing was,how can i display only the values in a row.it must not display the null values and the crresponding column name.
    Or any other way is their like below
    How i can retrieve only the selected check boxes from tht jsp file.and store in backend.
    Thanks in Advance
    regards,
    satheesh kannan

    Here is a rough example that may give you some ideas:
    On the JSP page:
    <%if(myData.getFirstName()!=null){%>
    Your First Name'
    <input type="text" name="firstName" value="<%=myData.getFirstName()%>">
    <%}%>
    In the servlet:
    String firstName= request.getParameter("firstName");
    if(firstName!=null){
    //write it to the database
    }

Maybe you are looking for