Wael Abdeen Blog
ActFax 5.01 (Build 0232) is out !!
For more details, please  check here ..
thanks ?

ActFax 5.01 (Build 0232) is out !!

For more details, please  check here ..

thanks ?

Oracle JDeveloper 11g Release 11.1.2.4.0 is out !!

I am Happy to announce for the New Release of Jdeveloper / ADF 11.1.2.4.0.
For More Details, please check here ..
thanks ?

Oracle JDeveloper 11g Release 11.1.2.4.0 is out !!

I am Happy to announce for the New Release of Jdeveloper / ADF 11.1.2.4.0.

For More Details, please check here ..

thanks ?

Dialogic Fax Solution / ActFax || Oracle ADF
Hi
today i write my Article about amazing solution for Full Integration Cycle between Dialogic Fax Solution, ActFax & Oracle ADF.
Fax Solutions considered one of the effective tools to manage documents between systems or between organizations.
Contents
Brooktrout Fax Card.
ActFax Solution.
Oracle Database
Oracle ADF Application
Advantages
Integration Not Only with ADF Applications, but also with any type of applications.
Oracle Database Integration.
Save files with tif,bmp,jpg or pdf formats.
Saving in Servers or IBM - FileNet Projects.
Easy For Followup and Maintenance
Multi Interface from ActFax & Application itself.
Archiving System.
Amazing Enhanced System to unify and save time in sending and receiving.
Resolution Facilities.
with powerful advantages from Actfax Product
to know more about this amazing solution, please contact oracle_itself@hotmail.com
thanks ?


Dialogic Fax Solution / ActFax || Oracle ADF

Hi

today i write my Article about amazing solution for Full Integration Cycle between Dialogic Fax Solution, ActFax & Oracle ADF.

Fax Solutions considered one of the effective tools to manage documents between systems or between organizations.

Contents

Advantages

  1. Integration Not Only with ADF Applications, but also with any type of applications.
  2. Oracle Database Integration.
  3. Save files with tif,bmp,jpg or pdf formats.
  4. Saving in Servers or IBM - FileNet Projects.
  5. Easy For Followup and Maintenance
  6. Multi Interface from ActFax & Application itself.
  7. Archiving System.
  8. Amazing Enhanced System to unify and save time in sending and receiving.
  9. Resolution Facilities.
  10. with powerful advantages from Actfax Product

to know more about this amazing solution, please contact oracle_itself@hotmail.com

thanks ?

Servlet Read Database Blob Images || Oracle ADF

Today,

i let Script speak about itself !!, simple Servlet to get Image Files from Database based on parameters specified and using weblogic datasource created before and blob data types, to be used in Oracle ADF Applications and configured in Web.xml file.

  • Calling the Servlet

<af:activeImage shortDesc=”#{bindings.CompanyLogo.hints.tooltip}”

id=”it4”

inlineStyle=”height:190px; width:180px;”

source=”/imageservlet?id=#{bindings.CompanyId.inputValue}&amp;type=company”

binding=”#{ImageBean.companyLogo}”

partialTriggers=”ctb7 ctb8 ctb9 ctb6”/>

  • Configured in Web.xml file

<servlet>
        <servlet-name>ImageServlet</servlet-name>
        <servlet-class>Beans.ImageServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>ImageServlet</servlet-name>
        <url-pattern>/imageservlet</url-pattern>
    </servlet-mapping>

  • Finally Servlet Script

package Beans;

import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.OutputStream;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

public class ImageServlet extends HttpServlet {
    private static final String CONTENT_TYPE = “text/html; charset=UTF-8”;

    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    }

    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType(CONTENT_TYPE);
        String imageId = request.getParameter(“id”);
        String type = request.getParameter(“type”);
        OutputStream os = response.getOutputStream();
        Connection conn = null;
        try {
            Context ctx = new InitialContext();
            //Datasource as defined in <res-ref-name> element of weblogic.xml
            DataSource ds = (DataSource)ctx.lookup(“cwc”);
            conn = ds.getConnection();

            String sql = null;
            String dec = null;
            if (type.equals(“company”) || type.contains(“company”)) {

                sql = “SELECT company_id, company_logo ” + “FROM company ” + “WHERE company_id = ?”;
                dec = “company_logo”;

            } else {

                sql = “SELECT user_id, logo ” + “FROM users ” + “WHERE user_id = ?”;
                dec = “logo”;
            }

            PreparedStatement statement = conn.prepareStatement(sql);

            statement.setString(1, imageId);
            ResultSet rs = statement.executeQuery();
            if (rs.next()) {
                Blob blob = rs.getBlob(dec);
                BufferedInputStream in = new BufferedInputStream(blob.getBinaryStream());
                int b;
                byte[] buffer = new byte[10240];
                while ((b = in.read(buffer, 0, 10240)) != -1) {
                    os.write(buffer, 0, b);
                }
                os.close();
            } else {

                ServletContext sc = getServletContext();
                String filename = “”;
                if (type.equals(“company”) || type.contains(“company”)) {

                    filename = sc.getRealPath(“/images/unknown.jpg”);

                } else {
                    filename = sc.getRealPath(“/images/user.png”);
                }
                String mimeType = sc.getMimeType(filename);
                response.setContentType(mimeType);
                File file = new File(filename);
                response.setContentLength((int)file.length());
                FileInputStream in = new FileInputStream(file);
                OutputStream out = response.getOutputStream();
                byte[] buf = new byte[1024];
                int count = 0;
                while ((count = in.read(buf)) >= 0) {
                    out.write(buf, 0, count);
                }
                in.close();
                out.close();
            }

        } catch (Exception e) {
           
            ServletContext sc = getServletContext();
            String filename = “”;
            if (type.equals(“company”) || type.contains(“company”)) {

                filename = sc.getRealPath(“/images/unknown.jpg”);

            } else {
                filename = sc.getRealPath(“/images/user.png”);
            }
            String mimeType = sc.getMimeType(filename);
            response.setContentType(mimeType);
            File file = new File(filename);
            response.setContentLength((int)file.length());
            FileInputStream in = new FileInputStream(file);
            OutputStream out = response.getOutputStream();
            byte[] buf = new byte[1024];
            int count = 0;
            while ((count = in.read(buf)) >= 0) {
                out.write(buf, 0, count);
            }
            in.close();
            out.close();
           
        } finally {
            try {
                if (conn != null) {
                    conn.close();
                }
            } catch (SQLException sqle) {
                System.out.println(“SQLException error”);
            }
        }
    }
   
    // Wael Abdeen
}

thanks ?

Hi
i am planning to attend Oracle Cloud Forum Seminar in Riyadh - March 25, 2013.
i hope to meet all my friends and enjoy our time.

Hi

i am planning to attend Oracle Cloud Forum Seminar in Riyadh -
March 25, 2013.

i hope to meet all my friends and enjoy our time.

Oracle ADF / Excel Files Integration || Oracle ADF

Today,

i write this Article after many requests about “How to Integrate with Microsoft Excel Files” with read / write operations to manage Data transfer in Oracle ADF world.

Many Organizations contains many Integrations ways, and most of them still using such way to use Excel Files to Integrate between different projects.

in our case, we will handle only the Read Operation and we have to get help out of box !!, we have to cooperate with Apache project is named “Apache POI” , to integrate 

and now, let me give a complete solution for our challenge

  • First of all, try to understand the mechanism used in poi jars and how to use to take control of Data Cells.
  • include poi jars (poi-3.9-20121203,poi-examples-3.9-20121203,poi-excelant-3.9-20121203,poi-ooxml-3.9-20121203,poi-ooxml-schemas-3.9-20121203,poi-scratchpad-3.9-20121203) in your ADF, Interface project.
  • Build Back Bean Method to Make the operation of Data Transfer.

image

  • Finally, Build a Method to Make Insertion Process.

image

Download Text of Image Scripts ..

Good Luck.?

jasper reports & Oracle ADF, Different Ways || Oracle ADF

Hi

Many days ago, i received many questions about Jasper Reports and how to make it more efficient tool in Oracle ADF world as reporting and Integration purpose ..

from my point of view, we have different goals to use Jasper Reports in Oracle ADF

Examples ..

  • Reporting Tool
  • Generate Reports for integration purpose with other systems specially Faxing Solutions.
  • Generate pdf, xls or any other format with direct / indirect output in front of end user.

so, today i give a complete Back Bean Method with high flexibility to manage different ways of Jasper in ADF.

package Servlets;

import cwcbean.CWCBEAN;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import java.sql.Connection;
import java.sql.SQLException;

import java.util.HashMap;
import java.util.Map;

import javax.naming.InitialContext;
import javax.naming.NamingException;

import javax.sql.DataSource;

import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;

public class PrintReport {

    CWCBEAN cwc = new CWCBEAN();

    public String printReport(String RepPathNamewithoutextension, String WriteFilePathWithouExtension,
                              Boolean tprint) throws FileNotFoundException, JRException, NamingException, SQLException,
                                                     IOException {

        if (RepPathNamewithoutextension != null && WriteFilePathWithouExtension != null && tprint != null) {

            InputStream input = new FileInputStream(new File(RepPathNamewithoutextension + “.jrxml”));
            JasperDesign design = JRXmlLoader.load(input);
            JasperReport report = JasperCompileManager.compileReport(design);
            Map parameters = new HashMap();

            // parameters.put(“jasperParamenterName”, “ParameterValue”);

            InitialContext initialContext = new InitialContext();
            DataSource ds = (DataSource)initialContext.lookup(“PM-Data-Source”);
            Connection conn = ds.getConnection();
            JasperPrint print = JasperFillManager.fillReport(report, parameters, conn);

            if (WriteFilePathWithouExtension == null) {
                WriteFilePathWithouExtension = RepPathNamewithoutextension;
            }

            OutputStream ouputStream = new FileOutputStream(new File(WriteFilePathWithouExtension + “.pdf”)); // my pdf
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
            JasperExportManager.exportReportToPdfStream(print, byteArrayOutputStream);

            ouputStream.write(byteArrayOutputStream.toByteArray()); // Copy pdf to directory u decided in second parameter — Wael Abdeen
            ouputStream.flush(); // Release
            ouputStream.close(); // Close Output

            if (tprint.equals(true)) {
                Runtime.getRuntime().exec(“rundll32 url.dll,FileProtocolHandler ” + WriteFilePathWithouExtension +
                                          “.pdf”); // Only if u want to print the report ..
            }

        } else {

            cwc.Validate(cwc.getFacesContext(),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageHeader13”),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageFooter13”), 3);
        }
        return null;

        // Wael Abdeen ..
    }
}


and now, we can call the report like this

    public String test() {
        String x;
        try {
            x = print.printReport(“d:/report1”, “d:/report1”, Boolean.TRUE);
        } catch (FileNotFoundException e) {
            cwc.Validate(cwc.getFacesContext(),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageHeader4”),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageFooter4”), 2);
        } catch (JRException e) {
            cwc.Validate(cwc.getFacesContext(),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageHeader4”),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageFooter4”), 2);
        } catch (NamingException e) {
            cwc.Validate(cwc.getFacesContext(),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageHeader4”),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageFooter4”), 2);
        } catch (SQLException e) {
            cwc.Validate(cwc.getFacesContext(),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageHeader4”),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageFooter4”), 2);
        } catch (IOException e) {
            cwc.Validate(cwc.getFacesContext(),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageHeader4”),
                         cwc.AccessBundleItemValue(“CS.view.CS-InterfaceBundle”, “ValidatorMessageFooter4”), 2);
        }
        return null;
    }

Note : we need to include all jars required from jasper source to our project based on version you are using from jasper.

thanks ?

Hi,
at last and after long time, i am happy to announce for a complete solution for scan system, with full compatibility and integration with java, ADF, Forms Applications based on Java &amp; JTawin Solutions.
Solution provides a complete solution to make all java products specially ADF / Oracle Forms products full integrated with all types of scanners and cams and full integration with DB and Easy to work with IBM - FileNet Projects.
Advantages
Java Based.
Easy to Customize.
Full Integration with all types of scanners and cams.
Easy to Build and Deploy.
Web &amp; Client Ways.
Multi Processing.
Note&#160;: Solution Excluding License
For More Details about it, contact&#160;: oracle_itself@hotmail.com
thanks&#160;?

Hi,

at last and after long time, i am happy to announce for a complete solution for scan system, with full compatibility and integration with java, ADF, Forms Applications based on Java & JTawin Solutions.

Solution provides a complete solution to make all java products specially ADF / Oracle Forms products full integrated with all types of scanners and cams and full integration with DB and Easy to work with IBM - FileNet Projects.

Advantages

  • Java Based.
  • Easy to Customize.
  • Full Integration with all types of scanners and cams.
  • Easy to Build and Deploy.
  • Web & Client Ways.
  • Multi Processing.

Note : Solution Excluding License

For More Details about it, contact : oracle_itself@hotmail.com

thanks ?

Finally I decided to return back to sunny Riyadh / Saudi Arabia in 27-02-2013 Inshaa Allah ..  and I am planing to attend Technical Dinner Meeting in PMP, PMI (Project Management Institute) - (PMI-AGC) which is planned in Four Seasons Hotel / Riyadh ..
More Details ..

Finally I decided to return back to sunny Riyadh / Saudi Arabia in 27-02-2013 Inshaa Allah ..  and I am planing to attend Technical Dinner Meeting in PMP, PMI (Project Management Institute) - (PMI-AGC) which is planned in Four Seasons Hotel / Riyadh ..

More Details ..

I am planning to visit Egypt, and the visit may take more than one month starting from 23-01-2013 ..
thanks

I am planning to visit Egypt, and the visit may take more than one month starting from 23-01-2013 ..

thanks