الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

مشكله فى رفع الصورة

Featured Replies

بتاريخ:

السلام عليكم ورحمة الله وبركاته

انا كنت بعمل تصميم اليوم صفحة وبحاول انى اسيف الصورة 

لما اجى اختار الصورة من brows بختارها عادى ولما اجى اعملها ابلود عشان تتسيف فى الملف "D:\\images\\"

بيطلع error فى حين انى عامل الفولدر ومسامية بنفس الاسم الموجود وبتظهر الرسالة 

دى

post-144997-0-49533800-1458336756_thumb.jpgpost-144997-0-24200300-1458336752_thumb.jpg

بتاريخ:

الجزء المهم من رسالة الخطأ مخفي

يجب وضع الجزء على اليمين

بتاريخ:
  • كاتب الموضوع

الجزء المهم من رسالة الخطأ مخفي

يجب وضع الجزء على اليمين

انا جيبت الكود ده ووضعته pase كما هو بالخطوات المذكورة فى الفيديو 

 

// Get Employee id 
//-----------------  
/*
Notes:
========
1- Remark //import com.sun.rowset.internal.Row;
2- import oracle.jbo.Row;
 
*/
  // public Integer getCurrentRow() {       
    
    public Integer getCurrentEmployeeId() {       
         DCBindingContainer dcbc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
         Row row = (Row)dcbc.findIteratorBinding("EmployeesView1Iterator").getCurrentRow();  
         Number s=0;
               if (row != null) {                
                    s = (Number)row.getAttribute("EmployeeId");
                
               }        
        return s.intValue();
    
     }
===================================
===================================
 
private UploadedFile file;    
 
// make file variable accessors setter&getter 
 
   public void setFile(UploadedFile file) {
        this.file = file;
    }
 
    public UploadedFile getFile() {
        return file;
    }
 
 
public String uploadAction() {
        // Add event code here...
 
 
        String ImageFolder ="D:\\images\\";
        File myFiles = new File(ImageFolder);
 
    // if (myFiles.exists() == false){
    //        myFiles.mkdir();
    //    }       
 
 
        String newImagePath= ImageFolder+getCurrentEmployeeId()+".jpg";
        try {
            InputStream inputStream = getFile().getInputStream();
            FileOutputStream outStream = new FileOutputStream(newImagePath);
 
            byte[] buffer = new byte[8192];
 
            int butesRead = 0;
            while ((butesRead = inputStream.read(buffer)) != -1) {
                outStream.write(buffer,0,butesRead);
                
               // ;
            }
            outStream.flush();
            outStream.close();
            inputStream.close();
            getFile().dispose();
        } catch (Exception e) {
        }
        
        return null;
    }
 
 
 
=====================================
=====================================
// servlet code 
//showimage servlet
---------------
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
 
        String imageName = request.getParameter("EmployeeId");
 
        OutputStream output = response.getOutputStream();
        String Image = "D:\\images\\" + imageName + ".jpg";
        File ImageFile = new File(Image);
 
        BufferedImage input = ImageIO.read(ImageFile);
        ImageIO.write(input, "JPG", output);
        output.flush();
        output.close();
    }
=============
=============
// in image source property
---------------------------
// take backslash  ==> / with you in next line
 
   /showimage?EmployeeId=#{bindings.EmployeeId.inputValue}
بتاريخ:
  • كاتب الموضوع

هل فى طريقه افضل من هذة ؟؟؟؟؟؟؟؟؟؟؟؟

بتاريخ:

أنا أقصد رسالة الخطأ نفسها فيها جزء على اليمين لا يظهر في الصورة

هذا الجزء فيه رسالة الخطأ الحقيقية

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.