Working with attachments using JSP

Hi,
I am a newbie to Oracle BPM and using OBPM 10.3.1.
I am trying to run an example of uploading and downloading an attachment from a jsp.
I also followed Studio57.pdf file but could not able to do it.
I am using new version so it does not contain the sample FileChooserTest also.
Please help.
Thanks in advance
Regards,
Gaurav

Hi,
Daniel Atwood have posted this:
Re: How to Use FileChooser on for Client files
Take a look, it will help you a lot.
Thanks
Marcos

Similar Messages

  • Sending mails with attachments using oracle 8i

    Hi,
    Could anybody please send a sample code for sending mails
    with attachments using oracle 8i.
    Thanks in advance

    For oracle8i there is an example package from OTN:
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    You have to re-write the package a bit to work it with BLOBs instead of RAW attachments, but that should be no problem
    Hop this helps,
    Michiel

  • Error when working with TableView using JCA

    Hi sdns,
    I am getting an iview rutnime error when working with Tableview using JCA. Here i am putting all my code, go thorugh it and tell me if any error is there.One more thing is Usermappping and all properties are set to system object.
    Now you can throught he code which is followed by error also.
    <u>Java file.</u>
    public class DisplayComponent extends PageProcessorComponent {
         public DynPage getPage() {
              return new DisplayComponentDynPage();
         public static class DisplayComponentDynPage extends JSPDynPage {
              private JCATviewBean bean;
              public void doInitialization() {
                   IPortalComponentProfile profile =
                        ((IPortalComponentRequest) getRequest())
                             .getComponentContext()
                             .getProfile();
                   Object o = profile.getValue("myBean");
                   if (o == null || !(o instanceof JCATviewBean)) {
                        bean = new JCATviewBean();
                        profile.putValue("myBean", bean);
                   } else {
                        bean = (JCATviewBean) o;
                   // fill your bean with data here...
                   IPortalComponentRequest request =
                        (IPortalComponentRequest) this.getRequest();
                   doJca(request);
              public void doProcessAfterInput() throws PageException {
              public void doProcessBeforeOutput() throws PageException {
                   this.setJspName("Report.jsp");
              private IConnection getConnection(
                   IPortalComponentRequest request,
                   String alias)
                   throws Exception {
                   IConnectorGatewayService cgService =
                        (IConnectorGatewayService) PortalRuntime
                             .getRuntimeResources()
                             .getService(
                             IConnectorService.KEY);
                   ConnectionProperties prop =
                        new ConnectionProperties(
                             request.getLocale(),
                             request.getUser());
                   return cgService.getConnection(alias, prop);
              public void doJca(IPortalComponentRequest request) {
                   IConnectionFactory connectionFactory = null;
                   IConnection client = null;
                   String rfm_name = "BAPI_COMPANYCODE_GETLIST";
                   try {
                        try {
                             //       pass the request & system alias
                             //       Change the alias to whatever the alias is for your R/3 system
                             client = getConnection(request, "MyIDES");
                        } catch (Exception e) {
                             System.out.println(
                                  "Couldn't establish a connection with a target system.");
                             return;
    Start Interaction
                        IInteraction interaction = client.createInteractionEx();
                        IInteractionSpec interactionSpec =
                             interaction.getInteractionSpec();
                        interactionSpec.setPropertyValue("Name", rfm_name);
    CCI api only has one datatype: Record
                        RecordFactory recordFactory = interaction.getRecordFactory();
                        MappedRecord importParams =
                             recordFactory.createMappedRecord(
                                  "CONTAINER_OF_IMPORT_PARAMS");
                        IFunctionsMetaData functionsMetaData =
                             client.getFunctionsMetaData();
                        IFunction function = functionsMetaData.getFunction(rfm_name);
                        if (function == null) {
                             System.out.println(
                                  "Couldn't find " + rfm_name + " in a target system.");
                             return;
    How to invoke Function modules
                        System.out.println("Invoking... " + function.getName());
                        MappedRecord exportParams =
                             (MappedRecord) interaction.execute(
                                  interactionSpec,
                                  importParams);
    How to get structure values
                        IRecord exportStructure = (IRecord) exportParams.get("RETURN");
                        String columnOne = exportStructure.getString("TYPE");
                        String columnTwo = exportStructure.getString("CODE");
                        String columnThree = exportStructure.getString("MESSAGE");
                        System.out.println("  RETURN-TYPE    = " + columnOne);
                        System.out.println("  RETURN-CODE    = " + columnTwo);
                        System.out.println("  RETURN-MESSAGE =" + columnThree);
    How to get table values
                        IRecordSet exportTable =
                             (IRecordSet) exportParams.get("COMPANYCODE_LIST");
                        exportTable.beforeFirst();
                        // Moves the cursor before the first row.
                        while (exportTable.next()) {
                             String column_1 = exportTable.getString("COMP_CODE");
                             String column_2 = exportTable.getString("COMP_NAME");
                             System.out.println(
                                  "  COMPANYCODE_LIST-COMP_CODE = " + column_1);
                             System.out.println(
                                  "  COMPANYCODE_LIST-COMP_NAME = " + column_2);
                        //       create the tableview mode in the bean
                        bean.createData(exportTable);
    Closing the connection
                        client.close();
                   } catch (ConnectorException e) {
                        //       app.putValue("error", e);
                        System.out.println("Caught an exception: \n" + e);
                   } catch (Exception e) {
                        System.out.println("Caught an exception: \n" + e);
    <u>Bena file</u>
    package com.sap.JCA.bean;
    import java.util.Vector;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import com.sapportals.htmlb.table.TableViewModel;
    public class JCATviewBean {
         public DefaultTableViewModel model;
         public TableViewModel getModel() {
         return this.model;
         public void setModel(DefaultTableViewModel model) {
         this.model = model;
         public void createData(IRecordSet table) {
    //       this is your column names
         Vector column = new Vector();
         column.addElement("Company Code");
         column.addElement("Company Name");
    //       all this logic is for the data part.
         Vector rVector = new Vector();
         try {
         table.beforeFirst();
         while (table.next()) {
         Vector data = new Vector();
         data.addElement(table.getString("COMP_CODE"));
         data.addElement(table.getString("COMP_NAME"));
         rVector.addElement(data);
         } catch (Exception e) {
         e.printStackTrace();
    //       this is where you create the model
         this.setModel(new DefaultTableViewModel(rVector, column));
    <b>JSP File:</b>
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean id="myBean" scope="application" class="com.sap.JCA.bean.JCATviewBean" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
       <br>
       <hbj:textView id = "tv1" text = "<b>TableView Example Using JCA</b> <br>"/>
    <hbj:tableView
        id="myTableView1"
        model="myBean.model"
        design="ALTERNATING"
        headerVisible="true"
        footerVisible="true"
        fillUpEmptyRows="true"
        navigationMode="BYLINE"
        selectionMode="MULTISELECT"
        headerText="TableView example1"
        visibleFirstRow="1"
        visibleRowCount="30"
        width="500 px"
        />
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <b>Error when Executing this component:</b><u></u>
      Portal Runtime Error
    <b>An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    com/sapportals/portal/htmlb/page/PageProcessorComponent.
    Exception id: 12:21_28/10/05_0173_94105150
    See the details for the exception ID in the log file</b>  
    If anybody find the error please reply to this post.
    Regards,
    sireesha.

    Thanks for your response Martin,
    I have already seen the log file but im couldn't findout anything from that since it is so long here im putting some part of please see this.if u able to find it clarify me,
    <b>Here the log file:</b>
    1.5#001321FD6213005D0000907100001CB000040419258FBF4E#1130405957843#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907200001CB00004041925916735#1130405957953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907300001CB0000404192591688D#1130405957953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
    #1.5#001321FD621300650000120E00001CB00004041925C953D7#1130405961625#com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory##com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory.XIManagedConnectionFactoryController.run()######04d7f690469311da8d52001321fd6213#Thread[Thread-114,5,SAPEngine_System_Thread[impl:5]_Group]##0#0#Debug#1#/Applications/ExchangeInfrastructure/AdapterFramework/ThirdPartyRoot/comsap/Server/Adapter Framework#Java###MCF with GUID is running. (,)#3#964bfca0444711dabb51001321fd6213#com.sap.engine.services.deploy.server.ApplicationLoader@1586c77#964bfca0444711dabb51001321fd6213#
    #1.5#001321FD6213005D0000907400001CB000040419275B24FC#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
    #1.5#001321FD6213005D0000907500001CB000040419275B25D9#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907600001CB000040419275B2E27#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907700001CB000040419275B2EFA#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
    #1.5#001321FD6213005D0000907800001CB0000404192924ED59#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
    #1.5#001321FD6213005D0000907900001CB0000404192924EE36#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907A00001CB0000404192924F652#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907B00001CB0000404192924F710#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
    #1.5#001321FD621300650000120F00001CB000040419295CCD8B#1130406021625#com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory##com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory.XIManagedConnectionFactoryController.run()######04d7f690469311da8d52001321fd6213#Thread[Thread-114,5,SAPEngine_System_Thread[impl:5]_Group]##0#0#Debug#1#/Applications/ExchangeInfrastructure/AdapterFramework/ThirdPartyRoot/comsap/Server/Adapter Framework#Java###MCF with GUID is running. (,)#3#964bfca0444711dabb51001321fd6213#com.sap.engine.services.deploy.server.ApplicationLoader@1586c77#964bfca0444711dabb51001321fd6213#
    #1.5#001321FD6213005D0000907C00001CB0000404192AEEB1E2#1130406047953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
    #1.5#001321FD6213005D0000907D00001CB0000404192AEEB2C0#1130406047953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907E00001CB0000404192AEEBAD8#1130406047968#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907F00001CB0000404192AEEBB9E#1130406047968#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#

  • Issues working with Attachments in Outlook 2010

    I have 2, possibly related, problems with Outlook 2010 and email attachments.
    1/ When opening a mail with attachments I cannot drag multiple attachments out to save in a folder at once.  the first attachment selected will be saved, but not subsequent ones.  Nor can I do a multiple-select and Save As via the right-click menu.
    The only way around this I have found is to drag or save each document individually
    2/ When opening Excel sheets (Excel 2010) directly from email, the first sheet will open normally.  But if I try to open a second sheet, whether from the same email or a different one, the second sheet doesn't open.
    The only work-around i have found is to close the first sheet I opened and/or to save the second sheet to disk and then open it explicitly in a new copy of Excel
    Can you give me any help in resolving these annoying behaviours?
    Many thanks
    Tim
    TimWB

    Hi Tim,
    R1. If we open the email with attachments, on the Message tab, in the
    Actions group, click Other Actions, and then select
    Save All Attachments, will all the attachment been saved?
    R2. Did you get any error message when the second sheet failed to open? Please open one Excel file, click File > Options > Advanced and then scroll down to
    General section. Clear the option “Ignore other applications that use Dynamic Data Exchange (DDE)” and then check the issue again.
    In addition, we can try to run Outlook in safe mode to check the result. Press Windows key + R, type
    outlook.exe /safe in the Run dialog and press Enter.
    Also try to clear Outlook Secure Temp folder to check the result. See:
    http://www.howto-outlook.com/faq/securetemp.htm
    Please let me know the result.
    Regards,
    Steve Fan
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • How can i secure email with attachments using coldfusion

    Hi,
    I need to send emails with attachments containg word, excel or PDF documents using cfmail. However this email needs to be really secure. How is the best way to secure the entire email with its attachments.
    Any ideas appreciated
    Thanks
    Zubair

    Hi ,
    I hope the following will help you..., using the UTL_SMTP db package.
    DECLARE
    c UTL_SMTP.CONNECTION;
    PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
    BEGIN
    UTL_SMTP.WRITE_DATA(c, name || ': ' || header || UTL_TCP.CRLF);
    END;
    BEGIN
    -- Open connection to SMTP gateway
    c := UTL_SMTP.OPEN_CONNECTION('smtp.server.acme.com');
    UTL_SMTP.HELO(c, 'acme.com');
    UTL_SMTP.MAIL(c, '[email protected]');
    UTL_SMTP.RCPT(c, '[email protected]');
    UTL_SMTP.OPEN_DATA(c);
    send_header('From', '"Oracle Admin" ');
    send_header('To', '"Bob Smith" ');
    send_header('Subject', 'Automated Database Email');
    UTL_SMTP.WRITE_DATA(c, utl_tcp.CRLF || 'This is an automated email from the Oracle database.');
    UTL_SMTP.WRITE_DATA(c, utl_tcp.CRLF || 'The database is working for you!');
    UTL_SMTP.CLOSE_DATA(c);
    UTL_SMTP.QUIT(c);
    END;
    Simon

  • Encoding problem when forwarding mails with attachments using exchange account

    Hi,
    I'm facing a special misbehaviour of mail. Scenario: With Apple Mail 7.2 I would like to forward an exchange mail with attachments. The mail is wirtten in german and uses german special characters like äüöÄÖÜ. During editing the mail everything is ok which means all characters are shown in thte correct way. When I send the mail, something magic must happen in the background.
    When I look in the sent mail folder and open the mail, all special characters are show as "?". Must be an encoding problem, I gues but I don't know how to fix it.
    When I send exactly the same mail with another Apple mail account (non exchange), there is no problem. So I assume it has something to do with handling exchange accounts under Apple mail.
    Any idea to solve this issue? Thanks in advance.
    Br,
    Jakob

    This is a know issue with Yahoo! Email on the iPhone. When sending email, sometimes it will say it has been sent, while it really has not (and it will not show up in the sent folder).
    It has been discussed quite a bit in the forums, so a search will turn up a lot of discussion, but no solid solution. Some say Yahoo is working on a fix, other that Apple is.
    The most common solution (which is usually temporary), is to either reboot your phone, and/or delete and reinstall your Yahoo! Mail account on your phone.

  • SSO doesn't work with Xcelsius using QAAWS, outside Infoview

    Hi,
    We have some xcelsius dashboards using QAAWS to retrieve data from database
    I would like to know whether SSO works with xcelsius dashboards using QAAWS outside infoview.Currently we get login screen to enter username/password.we are using Windows AD as the authentication type in the environment.

    You got it right. Within the InfoView, your Xcelsius-swf gets the CELogonToken as a parameter field to authenticate against the data for example. If you access another Xcelsius-Dashboard from within a swf you can even pass the LogonToken on.
    Using dashboard and QaaWS outside of InfoView, the user will have to enter username and password before the data is fetched. At least that is the way it works here.
    Regards,
    Peter

  • How to work with BI using Visual Composer....?

    Hi
    I want to work with BI report and BEx analyzer etc using  Visual Composer.
    I am using Visual Composer 7.1. I  have configured BI system connection using the following link
    http://help.sap.com/saphelp_nwce10/helpdata/en/7e/6dbcea3700452195e3bddaa47c5906/frameset.htm.
    In the above document i didnt understand the following para....
    Creating BI Users in the Portal
    Ensure that the BI back-end users also exist in the J2EE Engine. You can use the BI back end as the user store for the J2EE Engine or you can create the users manually. If you create the users manually, you should ensure that they have the same names as in the BI back-end; this avoids the need to configure user assignment.
    How to check BI back end user also exist in J2EE engine ?
    How to use BI kit in Visual composer. From where can i download BI kit for Visual Composer.
    What is the difference between developing application in VC using the above method and using BI kit.
    Please help me....
    Regards
    Sowmya....

    Hi,
    Without the BI kit you cannot do a lot of things in VC 7.1.
    This kit is not available with 7.1.
    The part that you did not understand meant that if you opening VC using a certain id in portal for eg "user" then the same id should be present in your backend system in this case BW system.
    Without this it wont be able to connect to the system.
    Hope this helps
    Regards
    Nikhil.
    Reward points if you find the answer helpful

  • Problem with database using JSP

    Hi
    i am developing one application which uses JSP ..to connect to the database..at present i am using MS-access for the data storage...
    I have two pages in one page there is a form where user fills all the details and once submit the information based on the form has to fetch the data from the backend...i have a problem ..if i hard code the corresponding column name in the JSP page it is getting all the data but if i get it from request.getParameter("")( which i am supposed to be from the form) i am getting no records..
    take a look at the code below and let me know...
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    java.sql.Connection conn= java.sql.DriverManager.getConnection("jdbc:odbc:asiafinity");
    java.sql.Statement stmt=conn.createStatement();
    /* If i print a value from the previous pages its showing but its not going to the database with query statement..
    // String str1=request.getParameter("religion");
    // System.out.println(str1);
    /* If i hardcode the corresponding columun data its querrying the data
    String str1="hindu";
    String sqlquery="select * from userprofile where religion='"+str1+"'";
    System.out.println(str1);
    java.sql.ResultSet cols=stmt.executeQuery(sqlquery);
         while(cols.next()){
    String gen=cols.getString("gender");
    String age=cols.getString("age");
    String rel=cols.getString("religion");
    String cul=cols.getString("culture");
    String loc=cols.getString("location");
    String pro=cols.getString("profession");
    String uname=cols.getString("username"); %>
    <tr><td><a href="<%=uname%>"><%=uname%></td>
    <td><%= gen %></td>
    <td><%= age %> </td>
    <td><%= rel %> </td>
    <td><%= cul %> </td>
    <td><%= loc %></td>
    <td><%= pro %></td>
    </tr>
              <% } %>
    Please help me out..i know this is an simple problem
    Thanks & Regards
    Gnanesh
    </a>

    String str1=request.getParameter("religion");
    String sqlquery="select * from userprofile where religion='"+str1+"'";
    System.out.println(sqlquery);
    try it and tell me what happens

  • Work with attachments

    All,
    Within the file adapter, it is possible to upload a message (e.g. XML) with attachment (e.g. binary PDF).
    But how to work with these attachments in SAP XI?
    1. Can the Receiver file adapter convert a message with attachment into 2 files?
    2. How to send the main part to 1 destination and the other part to another destination?
    3. How to access the main part (xml) and additional parts (pdf) within a business process?
    4. Can I remove an attachment from a message in a mapping step?
    5. Can I replace the main part (XML) with the attachment (binary PDF) in a mapping step (or elsewhere)?
    Kind regards, Guy Crets

    Hi
    I am sending you links of two blogs which cover your requirements to some extent
    <b>https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1685</b [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]> [original link is broken]
    <b>/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    I had also completed my scenario with the help of these blogs.If you still have problem do post i will try to solve.
    Hope it help.
    Regards
    Arpit Seth

  • Flash player not working with Facebook using IE 11

    I got a new computer windows 8.1 but flash player wont work with facebook; it keeps telling me to install flashplayer.  It is installed.  I verified that it is enable in add-ons and also Active x is turned off.  still wont play videos from facebook.  version 15 of flash player. using internet explorer version 11

    You'll probably need to add Facebook to compatibility mode:
    Fix site display problems with Compatibility View - Windows Help

  • Working with attachments

    Hi,
    I have a requirement where content needs to be checked in along with attachments. I have followed Re: using ZipRenditionManagement and successfully checked in content along with attachment. Now the requirement is to display content along with information about its attachment and provide the end user option to download the attachments separately.
    I tried docinfo operation but was not able to figure out how to retrieve attachment information from that (not even the name and number of attachments). Can some one please help with ridc code to get attachment information and to download them?
    Regards,
    Gobinath

    I will copy for you the relevant part from readme.txt from ZipRenditionComponent:
    1. The component adds a new action to the doc info page that allows a user to add or edit their current zipped attachments. It also displays the current attachments on the doc info page and lets them perform a download.
    Inside the zip file there is a manifest file with the name "manifest.hda". Inside the manifest file there is a result set with the name 'manifest'.
    It has the following columns:
    extRenditionName -- The name of the attachment (or rendition if doing image conversions). This is the principal identifer used to identify the rendition in API calls.
    extRenditionDescription -- A description of the attachment (or rendition).
    extRenditionPath -- The path inside the zip file. The value of this is somewhat arbitrary except for the file extension      which is used by the content server to determine the format.
    extRenditionOriginalName -- Only used if there is an original separate source file for the attachment. This is the original name of that file (see dOriginalName in normal content server usage).
    extRenditionParams -- Comma separated name=value pairs of additional properties (width, height, resolution, etc.).
    extRenditionType -- Used to describe functional aspects of the attachment. If the value is "thumbnail", then the attachment is a copy of the content item's thumbnail. If it has the value "web" then it
         says that the attachment (or rendition) is NOT in the zip file but instead is the content item's webviewable.
    Also, when this result set is loaded into the content server, the resource include ziprendition_parse_out_properties is used to promote some properties in the extRenditionParams entry into additional result set columns:
    extRenditionFileSize -- The size of the attachment file (See property 'filesize').
    extRenditionFileType -- The file type (ex: JPEG) (See property 'type').
    extRenditionWidth -- Width in pixels (see property 'width'). Only applies to images.
    extRenditionHeight -- Height in pixels (see property 'height'). Only applies to images.
    extRenditionColours -- Number of colours in image (see property 'colours'). Only applies to images.
    extRenditionPixelsPerInchVertical -- The number of pixels per inch vertically (see property 'dpiy'). Only applies for certain types of images value is blank or 0 otherwise (test with &lt;$if toInteger(extRenditionPixelsPerInchVertical)$&gt;)
    extRenditionPixelsPerInchHorizontal -- The number of pixels per inch horizontally (see property 'dpix'). Only applies for certain types images, see note for extRenditionPixelsPerInchVertical. Also, note that      extRenditionPixelsPerInchHorizontal tends to have the same value as extRenditionPixelsPerInchVertical so you may want to test to see if the same values are nonzero and equal and decide to present a single
         pixels per inch value.
    If the associated property from extRenditionParams is unavailable, the column is still added but is filled with a blank value.
    The internal content server script action function "getDocFormats" has been extended to automatically load this manifest result set into the active data binder and add the new columns as described above.
    There are some configuration variables that are useful for this component.
    NumAdditionalRenditions -- This is a general content server configuratioin variable. The value of this should be at least two. As of 7.5, it is possible with a component to increase the number of distinct different file webviewables beyond two. It should be noted that all the attachments of this component are stored in a single webviewable file so it is possible to use this component with NumAdditionalRenditions set to one, but then you
    will lose the ability to have separate web thumbnail images (for quick web server delivery).
    ShowEditRenditionPropertiesField -- Turn this on if you want the default user interface to show the value of the extRenditionParams column and allow it to be edited.

  • Working with JSSE using multi-purpose keystore

    Hello,
    I am currently working on an application which employs the JCA for providing signatures, authenticating users etc., but also working with JSSE.
    More specifically: The application must be able to verify signatures on code packages created by known users and loaded at runtime; but for communication with other parts of the application, it shall use SSL connections.
    Now I worked through the JSSE manuals and I was able to set up a simple SSL application with client and server, using all the getDefaults() I could get a hold on.
    In the final application that I am working on, I will have a keystore with quite a lot of keys from users, public and possibly private ones, and also a key for the SSL communication. I have the strong feeling that I will not see many getDefault()s anymore.
    My problem is that by looking at the API, I don't have any clue how to tell the JSSE which key to use for the SSL connection from the keystore holding possibly many keys of users.
    Moreover, how do I pass the passphrase for unlocking the private key to the JSSE if it is not equal to the keystore password? (Which, by the way, seems to me to require passing via the command line - argh!)
    Help would be greatly appreciated.
    Michael

    I've got it.
    The secret is to create an own X509KeyManager. This key manager gets its keys from the keystore, so I have the chance to provide an alias which is intended to be used for SSL and to provide the key password.
    public class SpecialX509KeyManager implements X509KeyManager {
    public SpecialX509KeyManager(KeyStore keys, String sSSLAlias, String sPassword) {
    // browse the keystore,
    // get the key which has the given alias - and only this one -
    // and use the password to decrypt it
    // keep the key and its certificate chain
    The keystore must be loaded before, using the keystore password:
    KeyStore keys = KeyStore.getInstance("JKS");
    keys.load(new FileInputStream("server.ks"), "keystorepw".toCharArray());
    KeyManager[] akm = new KeyManager[1];
    akm[0] = new SpecialX509KeyManager(keys, "ssl", "ssl012");
    SSLContext sc = SSLContext.getInstance("TLS");
    sc.init(akm, null, null);
    SSLServerSocketFactory sslSrvFact = sc.getServerSocketFactory();
    That is, I have a keystore, using the password "keystorepw", containing keys with one using the alias "ssl" and the password "ssl012".
    Michael

  • Working with Guides using ActionScript in Photoshop

    I am facing some troubles when working with Guides in Photoshop (AS/Flash extension)
    Let's create guides showinglayer bounds:
                    var bounds:Array = activeDocument.activeLayer.bounds;
                    var guide_a:Guide = activeDocument.guides.add(Direction.VERTICAL, bounds[0]);
                    var guide_b:Guide = activeDocument.guides.add(Direction.HORIZONTAL, bounds[1]);
                    var guide_c:Guide = activeDocument.guides.add(Direction.VERTICAL, bounds[2]);
                    var guide_d:Guide = activeDocument.guides.add(Direction.HORIZONTAL, bounds[3]);
    This works fine. Layer bounds are marked correctly.
    If I try to remove individual guides, I am facing an issue:
                    guide_a.remove();
                    guide_b.remove();
                    guide_c.remove();
                    guide_d.remove();
    PS starts throwing strange errors:
    Error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
    - The object "guide 8 of document 35" is not currently available.
    It is not clear, what document 35 really means (it is not name of actual document .. internal name?). Also interesting that remove() is not availabel in JavaScript API's.
    Also if I try to bind on "coordinate" property of Bound, no changes seems to be propagated.
    Any idea?
    Thanks,
    --Petr

    Yes it definitely looks like there is a problem with the reference returned by add(). Looks like you can work around it though by getting the guide by reference immediately after adding it using the known index.
    For your question about events. The easiest way to see if there is some event you can listen for is to use the ScriptListener in Photoshop. With that, you can quickly see whether or not an event fires when you expect (there may not be one available to scripting). Once you know the event fires, you can add the handler, using this as a reference: http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/app_notes/photoshop.htm.
    I don't see a clear way to check the visibility of guides. Although there may be some magic you can do using descriptors. Maybe we'll get some help from a real Photoshop scripting expert
    Zak

  • Can the Cisco 7942 phones work with Broadsoft using SIP

    We have a few 7960 phones working with Broadsoft but we are having issues getting the 7942 phones to work. Is anyone using the 7942 with Broadsoft?       

    You can try and use the following guidelines but they natively are not supposed to support third party call control systems.
    http://www.asterisk-peru.com/node/2227
    http://www.888voip.com/configuring-cisco-7975-ip-phones-for-sip/

Maybe you are looking for

  • Lightroom "folders" section, eveything disappeared, how do I get the files back?

    Technically I believe the files are still within lightroom, and still on my hard drive. Under Catalog "All Photographs" it has all the ones I've ever imported to Lightroom. I was doing something and right clicked under the folders tab, thinking I was

  • Current Security Vulnerabilities In AnyConnect 3.0?

    http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20120620-ac We have 3.05080 and it is included in the unsafe versions according to that link, but people in control do not want to upgrade again because the upgrade process

  • What is the best  media for long-term video storage?

    I will be loading several MiniDV tapes into my Mac and want to store the video long-term (in a safe-deposit box). These are going to be home movies with some digital photos or scans as well. I am curious what folks believe is the best medium for this

  • WCM_PLACEHOLDER returns blank page while WCM_BEGIN_EDIT_SESSION works fine

    Hello there, I have created a website in SiteStudio (via JDeveloper) with the site assets as in the following link: http://download.oracle.com/docs/cd/E14571_01/doc.1111/e10613/img/region_definitions.gif Note that all the elements in the above link a

  • Logic behind dynamic Text Elements in BEX

    We are trying to find out how BEx gets the "Last Cube Refresh Date."   This can be added as a Text Element in BEx reports. What we are trying to do is determine which date is pulled when a BEx query is running agains a MultiProvider. We have one Mult