JSP/struts (update database)

I am getting values form database .
Pupolating the same in the jsp page, Using Iterate.
Page structure (of jsp)
==>[check box] [text box] [combo]
I want to enable the text & combo enabled only when i click checked the box & vice versa.
because all the check boxes have same name.
should i use index and in action class hit the page number of time the iteratior is.
or
any other possiblity.
Thanks
gag

gag. wrote:
but how can i find which text box to enable .....
i have same name for all tex boxex on page... because i am iterating...U R each textbox and combo box will appear in different <td> tag like this
<% for (int i=0;i<2;i++){%>
   <table width="2%" align="left" cellspacing="0"  border="1">
    <tr>
     <td  id="plus<%=i%>" style="display:none"><input type="text" name="plus" value="")"></td>
    </tr>
     </table>
<%}%>This way u will have unique id for each <td> tag and which will be applied for that text box also
Edited by: AmitChalwade123456 on Nov 20, 2007 11:14 AM

Similar Messages

  • Upload file in JSP with Oracle Database 10gR2

    How to upload file with oracle database 10gR2??
    i can't find how to upload..
    i've tried to create a procedure in oracle and execute in netbeans but the file save in directory and then from directory save to database.
    it means the file save in 2 location, in directory and database..
    does anybody know how to save file direct from the JSP file into database without save in directory?
    this is the procedure..
    create or replace PROCEDURE load_file (
    p_id number,
    p_photo_name in varchar2) IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := bfilename('DIR_TEMP', p_photo_name);
    -- insert a NULL record to lock
    INSERT INTO temp_photo
    *(id, photo_name, photo)*
    VALUES
    *(p_id , p_photo_name ,EMPTY_BLOB())*
    RETURNING photo INTO dst_file;
    -- lock record
    SELECT photo
    INTO dst_file
    FROM temp_photo
    WHERE id = p_id
    AND photo_name = p_photo_name
    FOR UPDATE;
    -- open the file
    dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
    -- determine length
    lgh_file := dbms_lob.getlength(src_file);
    -- read the file
    dbms_lob.loadfromfile(dst_file, src_file, lgh_file);
    -- update the blob field
    UPDATE temp_photo
    SET photo = dst_file
    WHERE id = p_id
    AND photo_name = p_photo_name;
    -- close file
    dbms_lob.fileclose(src_file);
    END load_file;

    Well your Oracle procedure is designed to load a file, so that's what it does. If you want it to load from a data stream such as an upload, you need to rewrite it accordingly.
    So far this is not a Java question at all.

  • On closing browser window i want to update database

    I an doing it by onUnload of javascript i poping up jsp and doing database transaction there . But probelm I encountered is when page is refreshed then also this script is poping up window and doing transactions which i don't want .
    Please help out this , Very Urget
    Mohan

    thanks for U reply
    But my application it is like this a person is given with login screen after login is valid i am enter in to window having 3 frames . I am updating database on login . if user closed the window by windows cross button then database status should be updated .
    Please solve this .
    And onUnload is not working in Nescape 4.7
    Mohan

  • How to update database

    First, i retrieve 'PartID' from Temp tbl,
    then i need to retrieve 'WIP' from Trak_Wip tbl with that particular 'PartID',
    then update "WIP' in Temp tbl
    this is Temp tbl,
    Temp tbl (PartID, Qty, WIP)
    Below is my code,
    {code}
    <sql:query var="rs" dataSource="${connection}">
    SELECT * FROM Temp
    </sql:query>
    <c:forEach var="row" items="${rs.rows}">
    <c:set var="partId" value="${row.PartID}"/>
    <sql:query var="rsWip" dataSource="${lperf}">
    SELECT SUM(Trak_Wip.Curr_Oper_Qty) as sum
    FROM Trak_Wip
    WHERE (Trak_Wip.Wip_Bank='DDBV' or Trak_Wip.Wip_Bank='SDBV' or Trak_Wip.Wip_Bank='S200') andTrak_Wip.Target_Item=?
    <sql:param value="${partId}"/>
    </sql:query>
    <c:forEach items="${rsWip.rows}" var="row">
    <c:set var="Wip" value="${row.sum}"/>
    <sql:update dataSource="${connection}" var="rsUpdateWip">
    UPDATE Temp SET WIP=? WHERE PartID=?
    <sql:param value="${Wip}" />
    <sql:param value="${partId}" />
    </sql:update>
    </c:forEach>
    </c:forEach>
    {code}
    {noformat}this is the error,
    org.apache.jasper.JasperException: javax.servlet.jsp.JspException:
                   UPDATE Temp SET WIP=? WHERE PartID=?
              : [Microsoft][ODBC Microsoft Access Driver]Invalid SQL data type
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    {color:#ff0000}Can anyone solve my problem?
    {color}
    {noformat}

    Start with not using the JSTL SQL taglibrary. Write a DAO class which does the database access tasks and then come back if you still stucks.

  • Error: 1013231 Unable to update database while in readonly mode for backup

    Hi all,
    Wen im deleting the members for dimendsion , its giving error (hyperion 11.1 aso)
    Error: 1013231 Unable to update database while in readonly mode for backup , how can i solve this problem ,plz can any one help on this
    Thanks

    Has somebody set the database ready for archiving, maybe some maxl has been run and the db has not been returned from read only mode.
    Try running the following Maxl (change app.db to match your app/db)
    alter database app.db end archive;
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Unable to Update Database.

    Hi All,
    I was trying to load data thru load files and got the following message.
    Unable to update database while in readonly mode for backup
    Unexpected Essbase error 1013231I tried looking at Information Help Menu.
    I could not find the error number.
    Could anyone help.
    Thanks in advance.
    Bal.

    Hi Atul,
    Thanks for the help.
    The Readonly error got resolved.
    But still the following error is displayed when I am loading data thru load rule.
    To Brief you up, I had done a database corrupt check using validate command because of the following error. The information map asks you to do the same since the other parameters are in the affirmative ie sufficient disk space, not using addsin, File is present.
    *Unable to Read Information From [C:\Hyperion\essbase\app\SMC\PL\PL-BS-LD.rul]*
    Unexpected Essbase error 1019003
    I used the VALIDATE <error.txt> command and found that the database is not corrupt.
    I also used the export command to see if everything goes well. That also works well.
    Note: I do not have any data in the Cube. I had cleared all data.
    Can you please help ?
    Regards
    Bal.
    Edited by: user11091956 on Apr 12, 2010 11:26 PM

  • Update database table

    I have 1 million records in application server and I want to update database table from that.
    Is UPDATE statement the best technique to do it.
    Just wanted to know if there is any other better tehcniques.
    Also i want to write the errors to job log. How can we do that?
    Regards,
    DNP

    If they are all new records or all changes, it would be best to use INSERT or UPDATE. You will also want to do mass inserts/changes using an internal table. Since you have so many records, you will probably have to do this in chunks in order to avoid dumping on the rollback area.
    Rob

  • Resolution to error - Unable to update Database Statistics

    OK, If there's one thing i hate most about SAP, its the dreaded installation, I am always so paranoid, as to something will definitely go wrong,
    Lately i realized that it aint my mind , but the damn installation itself is pretty damn stupid. Why cant SAP leave the installation packaging to professionals like installshield...
    Unfortunately SAP doesnt think of it as a better idea, so until then lets try to resolve as many errors as possible thru these forums..
    Here's one error resolution ,i am pretty sure, many are checking for..
    Use the following procedure to resolve error
    <b>Warning - "loading of sql client library oci.dll failed"
    Error - Unable to update Database Statistics, Check BRCONNECT.log</b>
    The problem seems to be with the SAP Patch Collection InstallMaster disc Material No.(<b>51032143_13</b>).
    To resolve the problem, here's what needs to be done,
    1)Install DB Instance as usual.Then after the installation errors out due to loading of sql
    client library oci.dll ..
    2)I unsar the downloaded DBATOOLS.sar (Thanks for the Link Andreaz!!!)
    log into sapnet (eg. service.sap.com) with your user-id/pwd:
    -> downloads -> support packages and patches -> entry by application group -> additional
    components -> sap kernel -> now chose either 32 or 64 bit; either unicode or non-unicode ->
    sap kernel 6.40 -> windows server -> oracle -> download the package DBATOOLS Package for
    Oracle 9.2.x ... brconnect is part of that package...
    3)Copy the files in the Unsar'd package, as follows
         overwrite br*.exe to S:\usr\sap\R31\SYS\exe\run
         overwrite initSID.sap to S:\usr\sap\R31\SYS\exe\run & 
    S:\usr\sap\R31\SYS\exe\nuc\NTI386
         overwrite libsbt.dll to S:\usr\sap\R31\SYS\exe\run &
    S:\usr\sap\R31\SYS\exe\nuc\NTI386
         overwrite sapdba_role.sql to S:\usr\sap\R31\SYS\exe\run &
    S:\usr\sap\R31\SYS\exe\nuc\NTI386
    4) Retry the installation again & Guess what!! it works....
    Warning-: I initially tried a shortcut by replacing DBATOOLS.sar on the installmaster disc, rather than following above steps, but that doesnt seem to work, the installation fails as as soon as Tablespace creation starts. So the shortcut aint a good one..

    Well, it looks like you resolved your problem yourself.
    you can send feedback to SAP directly instead of posting this here in a forum.

  • Potential Windows Update database error detected 0x80070490

    This is the response I get when I run the Windows update troubleshooter from the Windows 8.1 Action Center.  If I click next it reports the errors have been fixed.  However if I run it again it reports exactly the same errors.
    After searching the Internet I have found that several users have reported having this issue.  As result of the aforementioned search I have tried the following:
    1) Run the Fixit tool for Windows 8.1 located at:
    http://support.microsoft.com/kb/971058/en-us.
    2) Run the System Update Readiness commands: DISM.exe /Online /Cleanup-image /Scanhealth and DISM.exe /Online /Cleanup-image /Restorehealth located at:
    http://support.microsoft.com/kb/947821/en-us.
    3) Saved contents of C:\Windows\System32\catroot2 to a temp folder and then deleted contents of C:\Windows\System32\catroot2.
    4)Renamed C:\Windows\SoftwareDistribution to C:\Windows\SoftwareDistribution.old
    5) Restarted Windows 8.1.
    6) Verified that C:\Windows\System32\catroot2 and that C:Windows\SoftwareDistribution folders had been rebuilt.
    7) I then ran the Windows update troubleshooter from the Window 8.1 Action Center again and got the same response as listed above. The errors still exist and are not fixed.
    8) Finally, I downloaded Windows 8.1 Enterprise Evaluation and I did a completely new clean install of Windows 8.1 and without installing anything else (no updates, no software, no antivirus) the above errors appeared within minutes after connecting
    to the internet.  I checked using the Windows update troubleshooter several times before connecting to the Internet and each time no problems were found, but shortly after I connected the above errors are shown to exists.
    Any suggestions that will help fix this issue will be of great help.

    Did anyone ever find an actual fix for this problem?  I have a very similar problem.  I have gone through the same steps for fixing my issues with getting a message of problems found every time I run the Windows Update troubleshooter.  It
    continually finds what it says are Potential Windows Update Database error detected 0x800700D and says they are fixed, along with another message saying Windows Update components must be repaired and it says they are fixed as well.  However, each time
    I run the troubleshooter it finds the same issues.  I have no problems running Windows Update under Windows 8.1 and them all installing without issue, yet I can't download or update ANY apps within the MS store and like the problem above, when it looks
    for my apps it says it's having problems finding them and to try later.  If I try to download even a free app, I get an error message that something happened and your purchase can't be completed. Error code: 0x80096004.
    I have dug through everything I can find on this error message and tried changing my sign in on my laptop to a local account, created a new MS account to access the store and continue to get the same error message.  I have tried it with my Kaspersky
    Internet Security 2015 turned completely off.  I've also ran SFC scannow and there are no errors and have ran DISM which found a problem but says it was fixed.  After running it again, there were no errors.  I have no other problems with anything
    else (that I know of on my machine).  It is an Asus Q400A and came with Windows 8.0.  I ran all the updates and then upgraded to 8.1 through the MS store without issue.  I have installed all updates since upgrading to 8.1 and have absolutely
    no problem running ANY updates, but can't seem to access the store no matter what I try.
    If anyone has found a solution to this I'd appreciate your input.  Hard to believe MS would put out a product that has such a basic problem that has affected so many users and can't seem to come up with some resolution that doesn't require registry
    editing, running commands from elevated command prompts, and a CS degree to resolve--there are soooo many issues online regarding this kind of error and others related to running SFC and DISM...most ending up in their ultimate default answer....renew or reinstall
    Windows and all the updates....which still doesn't resolve the problem for many!  I've always been a PC guy, but I'm starting to like the MacBook Pro I picked for work related reasons with great hesitation.  I've wasted more time chasing this issue
    down than I all the time I've spent actually using the Mac without even a hitch!
    Thx in advance for any feedback....please no MAC blasting....at this point, it would be not well received!!

  • Error when update Database

    I want to install PeopleSoft HRCS database and the database type is system. The version of peopletools is 8.49 and the HRCS is 9.0. After I create the database and import the data, I do the task of Updating Database to Latest PeopleTools Release. I do it step by step, when I do task7B-4-8, I can’t open data mover by PS. The error is the user PS has no create session privilege. So I grant the privilege to PS, it can open data mover. However before I do the task of update database, I can open the data mover by PS, I don’t know which step makes the mistake. When I do task7B-4-9, the error is :
    D:\pt\bin\client\winx86>psae.exe -CD PSDB -CT ORACLE -CO PS -CP PS -R INSTALL -A
    I VERSION
    LoadLibraryA() in pscompat.dll failed for 'PSORA.dll': reason=126
    Message Set Number: 200
    Message Number: 0
    Message Reason: Missing or invalid version of SQL library PSORA (200,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: Invalid User ID and password for signon. (0,0)
    Error in sign on
    How can I resolve it? Does anybody have the more detail document about this task? I have installed PeopleSoft HRCS demo database before install PeopleSoft HRCS system database. I didn’t get these errors.
    Edited by: hzg on Jun 28, 2009 9:12 AM

    hzg wrote:
    ...I can’t open data mover by PS. The error is the user PS has no create session privilege. So I grant the privilege to PS...PS, as a database user should not have any right to open a session, is is designed like that. In no case you should modify it.
    The task 7B-4-8 requires a bootstrap mode connection, you should connect to DataMover with the database owner of the Peoplesoft objects (i.e. SYSADM) :
    To update PeopleTools system data:
    +1. Invoke Data Mover by running <PS_HOME>\bin\client\winx86\psdmt.exe.+
    The PeopleSoft Logon window appears.
    +2. Log on using the access ID you specified when you created your Data Mover scripts with the Database Setup program.+
    +This will start Data Mover in bootstrap mode.+
    Furthermore, before launching psae, you should be sure the user people has all the necessary grant by running grant.sql script, and check the Configuration Manager settings.
    Nicolas.

  • Function in SQL: PRAGMA used, but '..does not guarantee not to update database'- WHY?

    I use function in SQL statement. It is a dynamicaly build SQL, therefore I need overload functions. These funcs defined in package. The package has PRAGMA Restrict_References (.., WNDS). So all functions should be restricted to update database.
    But Oracle returns an error:
    Function NVL_ does not guarantee not to update database
    This is my build SQL:
    ----- the execution string is: ---------------
    Begin
    INSERT INTO TEST_TBL_BS (MILL_ORDER, CLM1, CLM2, CLM3, NOTES, INIT_DATE )
    VALUES (NV.NVL_(Arc_Utl.TEST_TBL_dltd.MILL_ORDER),
    NV.NVL_(Arc_Utl.TEST_TBL_dltd.CLM1),
    NV.NVL_(Arc_Utl.TEST_TBL_dltd.CLM2),
    NV.NVL_(Arc_Utl.TEST_TBL_dltd.CLM3),
    NV.NVL_(Arc_Utl.TEST_TBL_dltd.NOTES),
    Arch.Init_Time );
    End;
    This is NV package:
    PACKAGE NV IS
    PRAGMA Restrict_References ( NV, WNDS );
    NULL_date DATE := TO_DATE ('01/01/1001', 'mm/dd/yyyy');
    NULL_numb NUMBER := 0;
    NULL_str VARCHAR2 (10)
    := '?';
    -- overloaded NULL_Val function returns NULL_<type> value (defined early)
    -- depend on received variable type
    FUNCTION NULL_Val ( val_in IN DATE )
    RETURN DATE ;
    FUNCTION NULL_Val ( val_in IN NUMBER )
    RETURN NUMBER ;
    FUNCTION NULL_Val ( val_in IN VARCHAR2 )
    RETURN VARCHAR2 ;
    -- PRAGMA Restrict_References ( NULL_Val, WNDS ); -- can be used in SQLs
    -- these pretends to cover hole of the SYS.NVL that do not have posibility
    -- to return default NULL value for every given type
    FUNCTION NVL_ ( val_in IN DATE )
    RETURN DATE ;
    FUNCTION NVL_ ( val_in IN NUMBER )
    RETURN NUMBER ;
    FUNCTION NVL_ ( val_in IN VARCHAR2 )
    RETURN VARCHAR2 ;
    -- PRAGMA Restrict_References ( NVL_, WNDS ); -- can be used in SQLs
    END NV;
    CREATE OR REPLACE PACKAGE BODY NV AS
    -- NULL_Val set of overloaded functions - returns appropriate NULL value
    FUNCTION NULL_Val ( val_in IN DATE )
    RETURN DATE IS
    BEGIN RETURN NULL_date;
    END NULL_Val; -- for date
    FUNCTION NULL_Val ( val_in IN NUMBER )
    RETURN NUMBER IS
    BEGIN RETURN NULL_numb;
    END NULL_Val; -- for NUMBER
    FUNCTION NULL_Val ( val_in IN VARCHAR2 )
    RETURN VARCHAR2 IS
    BEGIN RETURN NULL_str;
    END NULL_Val; -- for VARCHAR2
    -- set NVL_ function to return default NULL value if received variable
    -- is NULL or the received variable if it is not NULL
    FUNCTION NVL_ ( val_in IN DATE )
    RETURN DATE IS
    BEGIN RETURN NVL( val_in, NULL_Val ( val_in )); END NVL_;
    FUNCTION NVL_ ( val_in IN NUMBER )
    RETURN NUMBER IS
    BEGIN RETURN NVL( val_in, NULL_Val ( val_in )); END NVL_;
    FUNCTION NVL_ ( val_in IN VARCHAR2 )
    RETURN VARCHAR2 IS
    BEGIN RETURN NVL( val_in, NULL_Val ( val_in )); END NVL_;
    END NV;
    Can anybody help : where is a problem and what I can do in my case?
    I work in Oracle 7.3
    Thank you,
    Alex

    Hi Alex,
    I've found that on the RDBS docs:
    If you specify DEFAULT instead of a function name, the pragma applies to all functions in the package spec or object type spec (including, in the latter case, the
    system-defined constructor). You can still declare the pragma for individual functions. Such pragmas override the default pragma.
    Try using that and let me know.
    The docs says also that the declaration of the pragma for an overloaded function applies to the nearest one. You may also try to insert several declaration, one after every function declaration.
    Bye Max

  • Frame issue in jsp/struts application

    I have a problem with jsp struts application .
    i have a jsp page which is inside a frame .
    The action class which receives the request from this page redirects the request to another jsp page.
    I want this new jsp page to be displayed without any frame , but it is getting displayed from inside the frame .
    can anybody help me out ...
    regards,               
    slam

    Possibly:
    1. Browser could be caching the page.
    2. If you use a proxy, the proxy may be caching the page.
    3. The page is not getting recompiled.

  • Installation error at Update database statistics

    Hi,
    During DB installation at Update database statistics Installation error.
    Error shows that
    MTU- 03010 Execution of the command "/sapmnt/QMS/exe/brconnect   '-u' '/' '-c' '-f' 'crsyn -o 'SAPQMS' finished with status TST_ERROR
    brconnect.log error
    /usr/lib/hpux/dld.so: Unable to to find library 'libclntsh.so.10.1
    Any help.
    - Kristene

    Hello kristene Jyo,
    Did you get any breakthrough in this issue. Because i am also facing the same issue while installling the NW04 with oracle 9.0.2.0 but during "Update Statistice" step of Database instance installation it is giving me below error.
    "Unable to find library 'libclntsh.so.10.1"
    I already have 3 instance running fine on the same server of ECC 5.0 which i installed with oracle 9 same database.
    Please help me if you have any clue about the same my OS is HPUX-11.23.
    Thanks and Regards
    Dheeraj Thareja

  • Non-ascii, jsp-struts, not reciveing the correct value in the server

    Hi,
    I am developing JSP-Struts based application using tomcat server. In JSP struts form, when I put nonascii charater in the text field or text area, on the server side I recived twice of that non-ascii character..
    for example, in the text field I entered following string:
    ------> This is text in tex field �&#131;
    On the server side, I get the following:
    ------> This is text in tex field �&#131;�&#131;
    Please notice, twice non ascii character.. :(
    I don't know how to resolve this.. Any help will be greatly appricated..
    Thanks,
    Ajay

    I changed the <form> in the jsp to div and its working fine. I do not need to have comments in JavaScript funcion() anymore. I don't know why that made the difference though? According to:
    http://www.w3schools.com/tags/tag_form.asp
    The <form> tag is used to create an HTML form for user input.
    The <form> element can contain one or more of the following form elements:
    <input>
    <textarea>
    <button>
    <select>
    <option>
    <optgroup>
    <fieldset>
    <label>
    An HTML form is used to pass data to a server.
    I do have <button> and also send the data - the value of checkboxes - to server. So I think it should also work with <form>.
    Please let me know if you have any idea. Thanks.

  • Problem install EHP2 NW (DB2) "update database registry"

    Hi, I have problem install EHP2 NW Solaris and db2. in the phase "update database registry".
    the log is:
    Unable to access application /db2/db2epd/sqllib/adm/db2set. No such file or directory
    Failed action:  with parameters
    Error number 0 error type SPECIFIC_CODE
    S.O:
    In the directory /db2/db2epd
    server: ls
    db2_software
    only found this file. not such file sqllib.
    what happend??
    help please.

    Hi,
    What is your Operating system ?
    Please make sure that file system should not be created with cio option but with rw option.
    Thanks
    Sunny

Maybe you are looking for

  • Business system does not exist in the SLD

    hi, I am trying to export the ID objects into QA, when i get the error saying that "Business system D01 does not exist in the SLD". I have created the Transport target for the D01 business system in the SLD to point to the QA system T01. When i try t

  • How to sync from a external datasource on a timed interval ?

    Every 30 minutes, I want to pull data from an external data source. I want to avoid letting the user see partial data. The only thing I can think of is to truncate / load table A. Then do a t-sql 'merge to Table B' <-- table B is permanent data that

  • File can not be created

    I'm having a little trouble with safari. I want to download some apps from the internet, so I click on the link to start the download, it starts the download, but then it says a file can't be created. I try another app, it still doesn't work, so that

  • Missing Data Target in Infopackage for Update ODS Data in Data Target Cube

    Hello & Best Wishes for the New Year to all of you, I have 3 ODS (1 on Full Update and 2 with Delta Updates). All these 3 ODS update data to a single CUBE. In my development system this works correctly. Data load from PSA to ODS to Cube. Now I transp

  • Storing audio files in tables

    i need some information about storing audio files. is it possible to store audio files in blob column. in a tbale column data type is blob.in that column is there any possiblity to store audio file.