Problem while setting new value to entity object attribute in doDML meathod

Hi all,
I am overriding the entity objects doDML method for generating the value of Sequence Number just before insert .
For this puropose i am using doDML method. I am fetching the maximum value for the sequence number feild from the table by a prepared statement
and then incrementing that value by one.
    protected void doDML(int operation, TransactionEvent e) {
        if (operation == DML_INSERT) {
            // code for getting the max+1 of sequence number before insert
            //command executes.
            try {
                System.out.println("Inside doDML Method");
                String sql =
                    "select nvl(max(seq_no),0)+1  from WF_LEAVE_HDR where org_unit_code = " +
                    this.getOrgUnitCode();
                PreparedStatement pstmt =
                    getDBTransaction().createPreparedStatement(sql, 0);
                ResultSet rs = pstmt.executeQuery();
                rs.next();
                Integer newSeqNo =rs.getInt(1); //(Number)rs.getString(0);
                //this.setSeqNo(new Number(newSeqNo));
                setAttributeInternal("SeqNo",new Number(newSeqNo));
                System.out.println("Value of new seq no is -->>"+getSeqNo());
            } catch (Exception excpt) {
                System.out.println("Inside catch block ");
                excpt.printStackTrace();
        super.doDML(operation, e);
    }i am getting the value correct by using the sql statement but while i am using setAttributeInternal("SeqNo",new Number(newSeqNo));
it is giving an error and value for new sequence no is not passed to the seq no feild of the entity object. I have tried this.setSeqNo(new Number(newSeqNo))
but it is also not wotrking .
Any one please help , I am using Jdeveloper 10.1.3
Thanks all in advance.

iloveoracle,
Sigh... in addition to doing this in doDML (which Dimitar points out is the wrong place to do this)... you are making a huge huge mistake.
select nvl(max(seq_no),0)+1  from WF_LEAVE_HDRWhat happens when two people do this at around the same time? You don't do any locking, so you will get two rows with the same SeqNo. This is absolutely the wrong way of doing sequence numbers. The best way of doing this would be to use real sequence numbers (an Oracle sequence) and ignore the fact that there will be gaps. If you insist on using your approach, you MUST LOCK THE ENTIRE TABLE before you try to do your little max() + 1 trick, otherwise you run the very real risk of getting duplicate SeqNos. OK, I see that you are trying to do sequences by org_unit_code, so you don't have to lock the whole table, but you do have to have some way of holding a lock. You must also write some code to be able to handle an "unable to get the lock because someone else already holds it" type of situation.
<rant>
I have seen so many people try to do this little max() + 1 trick. It DOES NOT, WILL NOT work until you handle locking properly. One question that I often ask when I interview database developers is about generating "gapless" sequences; unless the job is for a brand-new-with-absolutely-no-experience trainee, answering "select max() + 1" without any mention of concurrency issues would be grounds for an immediate rejection of the candidate. Seriously. Have a run over to http://asktom.oracle.com and search for "gapless" if you'd like to see a more strongly worded rant.
</rant>
Bottom line, just use an Oracle sequence if it's at all possible; otherwise, be prepared to write some bunches of code to deal with locking.
John

Similar Messages

  • Setting dynamic values to entity object

    Is there any way to set bean values (dynamic values) to Entity Object while commit the record, and how can i set these values using Groovy language
    Thanks in advance

    You need to give more information about the version of Jdev you use and your use case. read more -
    https://forums.oracle.com/forums/ann.jspa?annID=56

  • Settinc control hints values in entity object attributes generically

    Hi, how are you? I work for a project , that uses JDeveloper 10.1.3.3 version and I am assigned to solve some problems in the part that is associated with ADF Business Components—Model—of the application. The question is how could I implement generic functionality in CustomEntityImpl and there I am to assign some control hint values to some attributes and then the entities that will extend this class will acquire this functionality in their attributes.
    I send you some code I have in my mind in order to find out how to write something relevant to set control hints. I have searched in relevant api’s for AttributeHints and EntityDef but I did not find a solution to my problem. I’ve tried this code:
    private final String desc = "Description";
    protected boolean findAttribute(String name) {
    String[] list = this.getAttributeNames();
    for (int i = 0; i < list.length; i++) {                       
    if (name.equals(list))
    return true;
    return false;
    public void beforeCommit(TransactionEvent transactionEvent) {             
    if (findAttribute(desc)){                                                                   
    * AttributeDefImpl adi=null;
    adi.setProperty(AttributeHints.ATTRIBUTE_DISPLAY_HINT_HIDE,"Hide");
    AttributeDef desc=(AttributeDef)adi.getProperty(AttributeHints.ATTRIBUTE_DISPLAY_HINT_HIDE);
    super.beforeCommit(transactionEvent);
    but it does not work. How could I set this value – to hide one attribute whenever it exists in my entities , setting it once in my CustomEntityImpl class?
    I’ve read the whole tutorial ADF Business Components For Forms 4GL Developers but I did not find a solution to my problem. Your help would be a gift to me. Thank you very much!
    * I think that the error is here because this object can not be null. In an api I found the following :
    Advanced users can provide their own implementation of EntityDefImpl (by subclassing EntityDefImpl). Within it, they can create their own AttributeDefImpls by using: new AttributeDefImpl(...);
    How should I subclass EntityDefImpl to create an AttributeDefImpl object?

    Hi
    why don't you create a mehod on the ApplicationModule and call it from the managed bean (using ADF bindings) to pass ths values in ? Note that a managed bean that has a scope of session doesn't mean that it sits in the session to be shared with ADF BC
    Frank

  • Trying to set control hints in entity object attributes in generic classes

    Hi, how are you? I work for a project , that uses JDeveloper 10.1.3.3 version and I am assigned to solve some problems in the part that is associated with ADF Business Components—Model—of the application. The question is how could I implement generic functionality in CustomEntityImpl and there I am to assign some control hint values to some attributes and then the entities that will extend this class will acquire this functionality in their attributes.
    I send you some code I have in my mind in order to find out how to write something relevant to set control hints. I have searched in relevant api’s for AttributeHints and EntityDef but I did not find a solution to my problem. I’ve tried this code:
    AttributeHints ah=new AttributeHints(new AttributeDef(RIBUTE_DISPLAY_HINT_HIDE ) );
    but it does not work. How could I set this value – to hide one attribute whenever it exists in my entities , setting it once in my CustomEntityImpl class?
    I’ve read the whole tutorial ADF Business Components For Forms 4GL Developers but I did not find a solution to my problem. Your help would be a gift to me. Thank you very much!
    private String primary_key = "Id";
    private final String dte_insert = "Dteinsert";
    private final String dte_update = "Dteupdate";
    private final String user_insert = "Usrinsert";
    private final String user_update = "Usrupdate";
    private final String afm = "Afm";
    protected boolean findAttribute(String name) {
    String[] list = this.getAttributeNames();
    for (int i = 0; i < list.length; i++) {                       
    if (name.equals(list))
    return true;
    return false;
    protected void doDML(int operation, TransactionEvent transactionEvent) {
    //Insert Operation
    if (operation == DML_INSERT) {
    //Add history column
    if (findAttribute(dte_insert)) {
    Date date = new Date((new Date()).getCurrentDate());
    this.setAttribute(dte_insert, date);
    //Update Operation
    else if (operation == DML_UPDATE) {
    //Add history column
    if (findAttribute(dte_update)) {
    Date date = new Date((new Date()).getCurrentDate());
    this.setAttribute(dte_update, date);
    //Delete Operation
    else if (operation == DML_DELETE) {
    //To DO
    super.doDML(operation, transactionEvent);

    I Suggest you set its Attribute on EOImpl, override doDML, and before call super.doDML set your Attribute. There is a special reason to set Attribute on beforeCommit?
    Best Regards

  • Problem to give default value in entity object using query

    hi,
    i have one entity object and i want to set default value of attribute like division which is based on employee code.
    entity object based on table leavedetail and using refrence table employee_hdr(empcode ,division).
    so how can i set default value of division attribute which is based on empcode attribute using SQL

    well,
    yes user, fetish nailed correctly.
    make some viewlink.
    something like says as example.
    department vo
    employee vo
    make viewlinks between those vo's
    important thing: exposed then source and destination accesor.
    use groovy :
    go to employee vo - create Department name field ( as transiest)
    use this statement default value expersion type.
    DepartmentView1.DepartmentName
    it will get the value. check over.
    so this example well suits to your scenario.
    i hope this will helps you.
    well create is an video. to get the value using groovy.
    http://www.youtube.com/watch?v=mpHV4x89a_A
    Edited by: ADF7 on Apr 14, 2012 5:46 AM

  • Unable to set new values in Entity

    Hi Experts,
    I am trying to change an entity from readonly to changeable and set property of an attribute. But, i am not successful. In the below "If ME->IS_CHAN......" condition, the second condition is not successful and it doesnot let the entity to change. I am not sure, from where the data is getting filled for "ME->CONTAINER_PROXY->DATA_REF->ATTRIBUTE_REF". Can someone please point me the solution ?
    Thanks in advance.
    method IF_BOL_BO_PROPERTY_ACCESS~SET_PROPERTY .
      data: LV_IDX       type CRMT_IDX,
            LV_PROPS_OBJ type ref to IF_GENIL_OBJ_ATTR_PROPERTIES.
      field-symbols: <DATA>  type any,
                     <VALUE> type any.
      MAKE_VALID_STATE( ).
      assign ME->CONTAINER_PROXY->DATA_REF->ATTRIBUTE_REF->* to <DATA>.
      assign component IV_ATTR_NAME of structure <DATA> to <VALUE>.
      if SY-SUBRC = 0.
    *   check changeability of property
        LV_PROPS_OBJ = ME->CONTAINER_PROXY->GET_ATTR_PROPS_OBJ( ).
        try.
            LV_IDX = OBJECT_MODEL->GET_ATTR_IDX_BY_NAME(
                                 IV_OBJECT_NAME = ME->MY_INSTANCE_KEY->OBJECT_NAME
                                 IV_ATTR_NAME   = IV_ATTR_NAME ).
            if ME->IS_CHANGEABLE( ) = ABAP_TRUE and
               LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY.
              if <VALUE> ne IV_VALUE.
                if ME->MY_MANAGER_ENTRY->DELTA_FLAG is initial.
    *             first 'change' -> proof that entity is locked
                  if ME->MY_MANAGER_ENTRY->LOCKED = FALSE.
                    if ME->LOCK( ) = FALSE.
                      return.
                    endif.
                  endif.
    Edited by: Gaurav Subramaniam on Jun 2, 2011 5:30 PM
    Edited by: Gaurav Subramaniam on Jun 2, 2011 5:31 PM

    Hi Gaurav,
    As already mentioned your entity is set to READ-ONLY mode at GenIL level. Hence, the following line returns READ-ONLY :-
    LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY.
    This is set at GenIL level in the GenIL class. Hence, you'll have to find the GenIL class and look for method - SET_ATTR_PROPERTIES. Here you will find code that sets mode (changeable / readonly) each attribute.
    Follow below steps :-
    - Create a Zclass and inherit it from the above class.
    - Redefine the above method.
    - Set attributes to changeable mode.
    Here is a sample code :-
      DATA: lv_attr_props       TYPE REF TO if_genil_obj_attr_properties.
    * First get the property object
      lv_attr_props = iv_object->get_attr_props_obj( ).
      lv_attr_props->set_property_by_name( iv_name  = 'Field1'
                                           iv_value = if_genil_obj_attr_properties=>changeable ).
      lv_attr_props->set_property_by_name( iv_name  = 'Field2'
                                           iv_value = if_genil_obj_attr_properties=>changeable ).
    Alternatively you can set attribute properties for all fields at once :-
    * set property 'changeable' for all attributes
      lv_attr_props->set_all_properties( if_genil_obj_attr_properties=>changeable ).
    Thanks,
    Ashish

  • New problem while setting ADS password

    Hi,
    Im trying to change password in ADS. Ultimately it has to be done via web interface but i was trying it out on my local machine, which has windows 2000. I got the following exception as a result. Any ideas?
    This is my code section ...
    Hashtable env = new Hashtable();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
    env.put(Context.PROVIDER_URL, "ldap://10.2.0.22:636/");
    env.put(Context.SECURITY_AUTHENTICATION,"simple");
    env.put(Context.SECURITY_PROTOCOL, "ssl");
    env.put(Context.REFERRAL,"ignore");
    env.put(Context.SECURITY_PRINCIPAL,"[email protected]");
    env.put(Context.SECURITY_CREDENTIALS,"Password1");
    DirContext dctx = null;
    try
    dctx = new InitialDirContext( env );
    The following is the exception i got ...
    javax.naming.CommunicationException: simple bind failed: 10.2.0.22:636 [Root exception is javax.net.ssl.SSLProtocolExcep
    tion: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus size.]
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:198)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:80 )
    at updtpass.main(updtpass.java:34)
    Caused by: javax.net.ssl.SSLProtocolException: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus s
    ize.
    at com.sun.net.ssl.internal.ssl.HandshakeMessage$CertificateMsg.<init>(Dasho A12275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
    at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:390)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:334)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:193)
    ... 12 more
    Caused by: java.security.cert.CertificateParsingException: java.io.IOException: subject key, Unknown key spec: Invalid R
    SA modulus size.
    at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:155)
    at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1679)
    at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:173)
    at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:90 )
    at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.ja va:389)
    ... 24 more
    Caused by: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus size.
    at sun.security.x509.X509Key.parse(X509Key.java:155)
    at sun.security.x509.CertificateX509Key.<init>(CertificateX509Key.java:58)
    at sun.security.x509.X509CertInfo.parse(X509CertInfo.java:706)
    at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:153)
    ... 28 more
    Exception in thread "main" java.lang.NullPointerException
    at updtpass.main(updtpass.java:61)

    I am also facing a peculiar type of problem while setting the password
    the type of error I am while running the code below
    String adminName = "CN=xyz,CN=Users,DC=TESTING, DC=AMG, DC=COM";
    String adminPassword = "xxxxxxx";
    String ldapURL = "ldap://testing.amg.com:636";
    String keystore = "/Program Files/Java/jre1.5.0_03/lib/security/cacerts";
    System.setProperty("javax.net.ssl.trustStore",keystore);
         env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.SECURITY_AUTHENTICATION,"simple");
    env.put(Context.SECURITY_PRINCIPAL,adminName);
    env.put(Context.SECURITY_CREDENTIALS,adminPassword);
    ERROR :
    Problem searching directory: javax.naming.CommunicationException: simple bind failed: testing.amg.com:636 [Root exception is java.net.SocketException: connection is closed]
    Can any body please help me out how to overcome it.
    waiting
    Bye
    Irshad

  • Default value in Entity Object for SYSDATE   ??

    hi ,
    I have a database table which has a DATE column and default value for this column is SYSDATE.
    I want to set default value for this attribute in my EO as I am doing for all other attributes .
    What will be the value of Default Property of entity Object for SYSDATE ??
    Thanx,
    Prasoon

    Hi,
    I succesfully implemented a default systimestamp value.
    I suppose that the same implies for a default sysdate.
    In the DB:
    t_created TIMESTAMP default systimestamp NOT NULL
    In the Entity Object:
    Attribute: TCreated
    Type: Timestamp => in your case Date
    Persistent: yes
    Updateable: never
    Refresh: after insert
    Database column: T_CREATED type TIMESTAMP => in your case DATE
    You could have problems if you leave access to the attribute (updateable flag != never), in this case I suppose the framework adds the Field in the sql insert statement and that would overwrite the default value definition.
    Regards
    Fred
    PS I'm not from Oracle

  • IPhone - Problems while setting Delegate to UISearchBar using IB

    Hi,
    I'm having a problem while setting the delegate to the UISearchBar.
    SearchViewController.h
    #import <UIKit/UIKit.h>
    @interface SearchViewController : UIViewController {
    IBOutlet UISearchBar *mSearchBar;
    @property (nonatomic, retain) UISearchBar *mSearchBar;
    @end
    FirstViewController.m
    #import "SearchViewController.h"
    @implementation SearchViewController
    @synthesize mSearchBar;
    // The designated initializer. Override to perform setup that is required before the view is loaded.
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    return self;
    @end
    I think I have setup the connection properly in IB, the view connected to the File's Owner, the File's Owner referencing the SearchViewController class. Now if I run it like this it all works great but when I set the UISearchBar delegate to File's Owner I get.
    Application Specific Information:
    iPhone Simulator 2.2 (77.4.9), iPhone OS 2.2 (5G77)
    * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x524790> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mSearchBar.

    Found the solution:
    Reference:
    http://discussions.apple.com/thread.jspa?messageID=8550459

  • Set new value for VO attribut

    I have function in package on database which is param is String and return value is also String(VARCHAR2).
    That function calculate some field on db and return a result.That is OK
    I made VO in my AM.
    "SELECT package_name.func_name("string") from dual" and that is OK also.
    When I start that module I recive valid result from database based on string which I passed to function.
    And that works fine.
    Question :
    How can I change value or how can I set new value for the package_name.func_name(variable) in VO
    during runtime in my application ? ^^^^^^^^
    JDeveloper 9.0.3.988

    I have function in package on database which is param is String and return value is also String(VARCHAR2).
    That function calculate some field on db and return a result.That is OK
    I made VO in my AM.
    "SELECT package_name.func_name("string") from dual" and that is OK also.
    When I start that module I recive valid result from database based on string which I passed to function.
    And that works fine.
    Question :
    How can I change value or how can I set new value for the package_name.func_name(variable) in VO
    during runtime in my application ? ^^^^^^^^
    JDeveloper 9.0.3.988 1. When using stored procedures it would be better to use it in following way:
    Connection conn = //get it some how
    CallableStatement cs = conn.prepareCall("{call myPackage.do_something(?)}");
    cs.registerOutParameter(1, java.sql.Types.VARCHAR);
    cs.execute();
    2. You could parameterize it like this:
    CallableStatement cs = conn.prepareCall("{call " + packageName "." + funcName + "(?)}");
    cs.registerOutParameter(1, java.sql.Types.VARCHAR);
    cs.setString(1,"someString");
    cs.execute();
    String result = cs.getString(1);
    where packageName and funcName are defined elsewhere
    --hery

  • Problem while inserting new Column in JTable

    Hi,
    I am facing Problem while inserting new Column in JTable.
    I have a JTable with one inherited ColumnModel class.
    When I am adding the column and moving towards the corresponding location, it moves successfully.
    but if I am adding another column or making any changes to table column structure the table retains the defualtcolumn structure.
    please help me to solve this..
    Regards
    Ranjith.........

    Maybe this example will help:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=579527

  • HT201210 Facing a problem while setting MAC 6.1. My version is 5.1. The activation does not complete.

    Facing a problem while setting MAC 6.1. My version is 5.1. The activation does not complete.

    Hacked or jailbroken iPhone will have this problem.
    BTW, it's IOS 6.0.1 not MAC.

  • Entity object attribute with a list of objects

    Does anyone know how one sets up an entity object that has an attribute with a list of objects as the type? (assuming that's supported)
    as in:
    CREATE TYPE phones AS VARRAY(10) OF varchar2(10);
    Create table suppliers (supcode number(5),
    Company varchar2(20),
    ph phones);
    The SOA Suite in jDeveloper (new Entity Object/attributes etc) has an ARRAY that can point to REF or OBJECT. Neither work. When I try to Create DB Object later from the Entity Object I've created I get an invalid type.

    What you suggested about "validation codes on the VO" is not written on the ADF Documentation.
    I try to blindly/strictly follow best practices (particularly on Validations, using Declartive and/or built in validators) on most ADF documentation and blogs but there are many scenarios on coding some large ADF projects that I think must veer away from the best practices stated on the documentation or maybe add new rules on the documentation depending on how complex an ADF project would be.
    I religiously followed best practices stated on the documentation to use Entity and Attribute Validators when performing validations. What I did was i had created lots of Custom Validators (by implementing JboVAlidatorInterface interface) for each of the attributes on an Entity Object that need validated. So those validator is valid only for one attribute, its not reusable. And those validation codes either have reference to a ViewObject or call some PL/SQL procedure. So at some point are codes became messy.
    Ultimately the whole project became harder to manage when the codes became large. Now I am trying to refactor the whole application by separating it into project/package and I am hoping to do it with little Re-coding as possible.
    Hope to get your opinion on this one.
    regards,
    Anton

  • Is there any way we can set default value for a Date Attribute to current date in Master Data Services

    Is there any way we can set default value for a Date Attribute to current date in Master Data Services.
    I as well wants to know that is there any posibility to show Calendar control while input data into respective date attributes.
    Thanks.

    Hi Anagha,
    So far i havent found any way to set todays date by default from MMI, but i guess this flow should work as workaroud
    1. Add buisness rule which can set a default value when Date = NULL/Blank
    2.get the entity table ,use -select EntityTable from mdm.tblEntity where Name = '<enter entity name>'
    3.Go to that table and add a after update trigger like
    if uda_<entityid>_<attributeid(Date attribute)> = default value
    update uda_<entityid>_<attributeid(Date attribute)> =getdate() where id = <LastUpdatedRow>
    I will check on this too from my side.
    By the way AFAIK i dont think so calendar control integration is possible .

  • How to set multiple values in one context-attribute

    Hi all,
    Anybody knows a possibility to set multiple Values to a context-attribute?
    I know it how to get it with the following code:
    String break[]= request.getParameterValues("break");
    Now I want to do something like:
    request.setParameterValues(break[no]);
    where no is a counter in a loop.
    With the Method setAttribute(), I overwrite the previous inserted value.
    Thanx
    Robert

    I have not explizit declared break as an array.
    It is the Context- Attribute I want to send. I thaught that I can use it as an array in the same way I can do it when I send Data from an HTML- Form (with multiple values) to an servlet.
    I don't know how to declare the Attribute explizit as an array.
    that it is you wanted to know?
    I think my main problem is to get an array from the servlet to the jsp. Is there an other possibility (other than via Context-Attributes) to do that?
    thanx
    robert

Maybe you are looking for

  • New Mac Mini and iMovie6, & iDVD

    Hi I was wondering if someone can answer these questions for me. I have a 12" powerbook and iMac 800mhz power pc G4 (lampshade kind), and I have been editing movies in iMovie and creating DVD with iDVD. But it's getting a bit slow. I was thinking abo

  • Here's my story sad but true!

    Firstly my spec 27-inch, Mid 2011 Processor  3.1 GHz Intel Core i5 Memory  4 GB 1333 MHz DDR3 Graphics  AMD Radeon HD 6970M 1024 MB Software  OS X 10.8.3 (12D78) I bought my imac in Nov 2011, not quite a year later I got the pink screen of death (I f

  • Creating specialised Borders, HOW?

    Hi Everyone, I am currently creating a number of borders for components on a GUI. I have had no trouble using the standard borders (raisedbevel, line, etc) and I have had no trouble creating a few basic custom borders such as double raisedbeveling. H

  • Post & Commit

    Hi Experts, I have a multi-block form, which issues POST and COMMIT on different situations. But the operations fire the same triggers and I'm generating some sequences in Commit operation which are getting generated even in POST operation. I need to

  • Fix a plan of the query

    Hi, I want to set execution plan of a query. This query is dynamically created by the application according to IN parameters. Actually the query is not using proper index. Can we use outline. If yes then please give me the syntax for the same. Please