In IE, while saving a file it is taking the full path with the file name
Hi,I am using Tomcat5.5. In one page of my website, there is code responsible for saving an image from the server to the client machine. whenever i am doing this Mozila the file is getting saved with desired name. But in IE it takes full path of the file in the server directory along with its name while being saved in the client machine.Below is the code responsible for this. Plz Help.
DiskFileUpload fu = new DiskFileUpload();
List fileItems = fu.parseRequest(request);
Iterator itr = fileItems.iterator();
while(itr.hasNext())
FileItem fi = (FileItem)itr.next();
//Check if not form field so as to only handle the file inputs
//else condition handles the submit button input
if(!fi.isFormField())
if(fi.getFieldName().equals("FileImage"))
if(fi.getSize() < 300000)
if(fi.getSize()!=0)
java.util.Random rd = new java.util.Random();
int random = rd.nextInt(100000);
String img_code = random + "";
if(fi.getContentType().equals("image/jpeg") || fi.getContentType().equals("image/pjpeg") || fi.getContentType().equals("image/gif") || fi.getContentType().equals("image/png") || fi.getContentType().equals("image/x-png") || fi.getContentType().equals("image/bmp") || fi.getContentType().equals("image/wmp") || fi.getContentType().equals("application/octet-stream") || fi.getContentType().equals("audio/wav") || fi.getContentType().equals("audio/x-wav") || fi.getContentType().equals("audio/AMR") || fi.getContentType().equals("audio/amr") || fi.getContentType().equals("audio/mpeg") || fi.getContentType().equals("audio/mp4a-latm") || fi.getContentType().equals("audio/x-realaudio") || fi.getContentType().equals("audio/x-pn-realaudio") || fi.getContentType().equals("audio/x-pn-realaudio-plugin") || fi.getContentType().equals("audio/midi") || fi.getContentType().equals("audio/mid") || fi.getContentType().equals("audio/x-midi") || fi.getContentType().equals("audio/x-mid") || fi.getContentType().equals("audio/x-tone-seq") || fi.getContentType().equals("audio/imelody")
|| fi.getContentType().equals("video/mp4v-es") || fi.getContentType().equals("video/mp4") || fi.getContentType().equals("video/3gp") || fi.getContentType().equals("video/3gpp") || fi.getContentType().equals("video/mpeg") || fi.getContentType().equals("video-h263-2000"))
System.out.println("Content from FileItem : "+fi.getContentType());
File tempfile = new File(fi.getName());
String imageFile=tempfile.getName();
out.println("imageFile:" +imageFile);
imageFile= imageFile.replace(':','_');
imageFile=imageFile.replace('\\','_');
imageFile= imageFile.replace('/','_');
imageFile= imageFile.replace(' ','_');
System.out.println(imageFile);
out.println("imageFile:"+imageFile);
int extIndex=0;
String ext="";
extIndex = imageFile.lastIndexOf(".");
ext = imageFile.substring(extIndex+1);
if( ext.toLowerCase().equals("jpg") || ext.toLowerCase().equals("jpeg") || ext.toLowerCase().equals("jpe") || ext.toLowerCase().equals("bmp") || ext.toLowerCase().equals("gif")|| ext.toLowerCase().equals("png") || ext.toLowerCase().equals("wbmp")
|| ext.toLowerCase().equals("amr") || ext.toLowerCase().equals("mp3") || ext.toLowerCase().equals("mp2") || ext.toLowerCase().equals("mpga") || ext.toLowerCase().equals("wav") || ext.toLowerCase().equals("midi") || ext.toLowerCase().equals("mid") || ext.toLowerCase().equals("kar") || ext.toLowerCase().equals("ra") || ext.toLowerCase().equals("ram") || ext.toLowerCase().equals("rm") || ext.toLowerCase().equals("au")
|| ext.toLowerCase().equals("3gpp") || ext.toLowerCase().equals("3gp") || ext.toLowerCase().equals("mpeg") || ext.toLowerCase().equals("mpe") || ext.toLowerCase().equals("mpg") || ext.toLowerCase().equals("mp4") || ext.toLowerCase().equals("movie") || ext.toLowerCase().equals("avi") || ext.toLowerCase().equals("qt") || ext.toLowerCase().equals("mov") || ext.toLowerCase().equals("viv") || ext.toLowerCase().equals("vivo"))
File fNew = new File(application.getRealPath("/userImages/"),img_code+"_"+imageFile);
// ImagePath = imagepath+img_code+"_"+tempfile.getName();
ImagePath = imagepath+img_code+"_"+imageFile;
System.out.println("Image PAth : "+ImagePath);
// ImagePath = fNew.getAbsolutePath();
//out.println(fNew.toString());
ImageName = fNew.getName();
System.out.println("Image Name : "+ImageName);
out.println("ImageName:" +ImageName);
fi.write(fNew);
else
System.out.println("Invalid File Type : "+ext);
Error = "1: Invalid File Type/Extension : "+ext;
else
Error = "2: File uploaded is not valid.";
System.out.println("Content from FileItem : "+fi.getContentType());
System.out.println("invalid Content Type");
else
Error = "";
else
Error = "3: File uploaded is not valid. Make sure that the image size does not exceed 300KB";
System.out.println("File uploaded is not valid.");
else
session.setAttribute(fi.getFieldName(),fi.getString());
session.setAttribute("ImagePath",ImagePath);
session.setAttribute("ImageName",ImageName);
session.setAttribute("barcodepath",barcodepath);
//Added by Mutharasu on 30/08/2005
session.setAttribute("tagpath",tagpath);
Title = (String) session.getAttribute("txtTitle");
if(Title.length()==0)
Error = " Please Enter KoolTag Title : ";
Key = (String) session.getAttribute("txtKey");
URL = (String) session.getAttribute("txtURL");
System.out.println("Key: "+ Key +", URL:"+URL);
System.out.println("trace 5");
if (ImagePath.trim().length()==0 && ImageName.trim().length()==0) {
if (Key==null && URL==null)
throw new Exception("4: "+Error);
}
Hi Vigneshwara,
Please reopen a new thread in
ASP.NET Getting Started forum because I can't move it there.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
How to get the full path of a file
If the user selects a file through a browse button, Is there a way, I can get the full path of the file. The file can be from his local hard drive as well.. Can someone advise
To upload multiple files (example is for 3), try something like this.
== Form section ==
There would be three(3) file form fields for the selection of a file/document to upload, which
each being uniquely named.
<div style="clear: both;">
<cfinput type="file" name="upload_01" dir="ltr" lang="en" size="70" xml:lang="en">
</div>
<div style="clear: both;">
<cfinput type="file" name="upload_02" dir="ltr" lang="en" size="70" xml:lang="en">
</div>
<div style="clear: both;">
<cfinput type="file" name="upload_03" dir="ltr" lang="en" size="70" xml:lang="en">
</div>
== Processing section ==
Checks to see if any files / documents were selected for upload. If none were, then
displays an alert indicating as such. If at least one file/document was selected, then
the process would process the upload.
<cfif isdefined('form.upload_01') and trim(form.upload_01) eq "" and
isdefined('form.upload_02') and trim(form.upload_02) eq "" and
isdefined('form.upload_03') and trim(form.upload_03) eq ""
>
<p>Did not select any files to upload</p>
<cfelse>
<cfif isdefined('form.upload_01') and trim(form.upload_01) neq "">
<cffile
action="upload"
destination="C:\path\to\upload\files\to"
filefield="upload_01"
nameconflict="overwrite"
accept="
application/msword
, application/vnd.openxmlformats-officedocument.wordprocessingml.document
, application/vnd.ms-excel
, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
, application/pdf">
<cfcookie name="upload_01_doc" value="#cffile.serverfile#">
<cfcookie name="upload_01_doc_ext" value="#cffile.serverfileext#">
</cfif>
<cfif isdefined('form.upload_02') and trim(form.upload_02) neq "">
<cffile
action="upload"
destination="C:\path\to\upload\files\to"
filefield="upload_02"
nameconflict="overwrite"
accept="
application/msword
, application/vnd.openxmlformats-officedocument.wordprocessingml.document
, application/vnd.ms-excel
, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
, application/pdf">
<cfcookie name="upload_02_doc" value="#cffile.serverfile#">
<cfcookie name="upload_02_doc_ext" value="#cffile.serverfileext#">
</cfif>
<cfif isdefined('form.upload_03') and trim(form.upload_03) neq "">
<cffile
action="upload"
destination="C:\path\to\upload\files\to"
filefield="upload_03"
nameconflict="overwrite"
accept="
application/msword
, application/vnd.openxmlformats-officedocument.wordprocessingml.document
, application/vnd.ms-excel
, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
, application/pdf">
<cfcookie name="upload_03_doc" value="#cffile.serverfile#">
<cfcookie name="upload_03_doc_ext" value="#cffile.serverfileext#">
</cfif>
<cflocation url="completed.cfm" addtoken="no">
</cfif>
== Completed section ==
Can confirm to the person what files were actually uploaded, by displaying file name and file extension.
You can you use the file extension information to display a respective icon for the file type.
<cfoutput>
<cfif isdefined('cookie.upload_01_doc')>
01. #cookie.upload_01_doc# - #cookie.upload_01_doc_ext#<br /></cfif>
<cfif isdefined('cookie.upload_02_doc')>
02. #cookie.upload_02_doc# - #cookie.upload_02_doc_ext#<br /></cfif>
<cfif isdefined('cookie.upload_03_doc')>
03. #cookie.upload_03_doc# - #cookie.upload_03_doc_ext#<br /></cfif>
</cfoutput>
Leonard B -
Get only the filename not the full path of the file.
hi to all..
how can i get only the filename of the file not the full path and to be placed on a textinput.?
example:
when i'browse the file and select sample.txt
"C:\Users\user\Desktop\folders\sample.txt" this will be inputted on the textinput.
however, what i want to have is when i'browse and select a file..
textinput should only contain "sample".
does anyone knows how to do it?Hi cyrus@adobe,
How are you getting the full path of the file when you browse, I dont think for security reasons the Flash Player will aloow to do so. You can only get the file name not the full path of the file when you browse.
Are you using Flex4..?? I am not sure whether this is possible in Flex4..However if you are getting full path and if you wanted to show only the filename then you can just use theString class split function to acehive this..
var fullPath:String = "C:\Users\user\Desktop\folders\sample.txt";
var splitPath:Array = fullPath.split("\");
textInput.text = splitPath[splitPath.length-1];
Thanks,
Bhasker -
I need to have full path of file when file get uploaded (using EXTjs).
Due to security reason in firefox, it just show file name.
Is it possible to make it work setting any properties in about:config.See comments 49 and 50
* [https://bugzilla.mozilla.org/show_bug.cgi?id=143220 Bug 143220] - [FIX]Script can get the value of a file control, including the path -
Microsoft Word 2010 is saving filenames with the full path as the filename.
Good Afternoon,
When opening a file from a synology cloudstation, after I work on the file and select save, the file name changes to include the computer name. For example if the file was opened from "Favorites\Couldstation\My Documents" and was called "Consoto
version1", when I click save, the filename now shows as " Consoto Version 1_Mycomputer-PC_AUG-06-1203-2014_Conflict.docx" (Mycomputer is the generic name of the computer on the domain, Italics was
what was added)
Any way I can turn this off? I am thinking it is part of an Autosave feature.
Windows 7 Professional
Office 2010
Intel i3
4GB RAM.
Respectfully,
VincentHi,
Do you have the same issue when use Office 2010 on your local disk?
I think it's an issue/feature of Synology Cloud Station, not an Office issue. I have seen user reproted the same issue in Synology Cloud Station site, I'd suggest you to seek assistance from their official support site.
Regards,
Ethan Hua CHN
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
How to get full path of a file uploaded using file control on a jsp ?
Hi all...
I have a jsp on which i am using a file element (input type="file") to upload files present on the physical file system.. Thats working fine.. But i want to retrieve the full path of the file uploaded for further computation.
What are the possible ways which can give me the full path ?? (e.g. "D:\data\text\Output.txt" )
Thanks all for attending the question..
Regards
PrasadSome browsers send the full path. Some do not.
You can not affect this in any way shape or form.
All you can count on receiving is a filename - no path information.
So you will have to have some other way for the user to pass along this information.
If they are uploading to a "remote web site" they could specify a folder to put the uploaded file in.
You could classify it and put all image files in "images" and all script files in "scripts" etc etc by default, and let the user deal with it in their own HTML.
Hope this helps,
evnafets -
How to get a file in the same dir with the jar-executable
Hi,
I need to read/write a file that exists in the same directory with the jar-executable. How can i do that? I think that when i specify no path for the file, the file has to be in current path. (Is that right?)
Note: I do not know in which directory the jar and the file are.
Thanx in advanceHi,
I need to read/write a file that exists in the same
directory with the jar-executable. How can i do that?
I think that when i specify no path for the file, the
file has to be in current path. (Is that right?)
Note: I do not know in which directory the jar and
the file are.
Thanx in advance
When you specify no path for the file, the file has to be in the directory where the virtual machine was started. ( the directory the java command was invoked in .)
If you can't control the directory in which the vm is started, but you know the name of the .jar file you can do the following. This trick takes advantage of the fact that if you are using classes in a jar file, the name of the jar file must be in your classpath.
public static String getPathOfJar( String nameOfJar )
throws Exception
StringTokenizer st = new StringTokenizer(
System.getProperty( "java.class.path" ) ,
System.getProperty( "path.separator" ) );
String jarfile = "";
while ( st.hasMoreTokens() )
String token = st.nextToken();
if ( token.indexOf( nameOfJar ) > -1 )
jarfile = token;
break;
if ( jarfile.equals("") ) throw new Exception( "Jar not found in classpath" );
String path = jarfile.substring( 0 , jarfile.indexOf( nameOfJar ) );
return path;
//To open a file in the same directory as the sun archive tools.jar
File f = new File( getPathofJar( "tools.jar" ) + "someFile.txt" ); -
What is the exact problem with this file?
Hi all,
There is an old form , which was not in use from many days.
Now when we tried to run the form, i got the error saying "FRM-40734:Internal Error:Pl/SQL error occured.", in the login form.
When i tried to open the fmb file in Oracle Forms Builder 6i, i got the following error:
FRM-10102: Cannot attach PL/SQL library d2kwutil. This library attachment will be lost if the module is saved., but the fmb file got open.
The login button has the following code:
DECLARE
UNAME VARCHAR2(30);
--USER_ID PARAMLIST;
V_USER APUSERMA.USER_NAME%TYPE;
V_PASSWED APUSERMA.USER_PASSWD%TYPE;
BEGIN
select user_CD INTO :GLOBAL.USER_ID from apuserma
where user_CD = :TI_USER_NAME AND user_PASSWD = :IT_USER_PASSWD
AND SYSDATE BETWEEN USER_VALID_FRM AND USER_VALID_TO;
:global.user_id := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
:global.compname := :compname;
compnm(:compname);
--USER_ID := CREATE_PARAMETER_LIST('USER_id_NAME');
call_form('Forms\MAIN_SCREEN',hide,DO_REPLACE);
exception
when no_data_found then
MESSAGE('Incorrect Username or Password. Please Re-Enter');
message(' ');
RAISE FORM_TRIGGER_FAILURE;
END;
EXIT_FORM;
When i tried to compile, i got error saying ,
Error 201 at line 10, column 28
identifier 'WIN_API_ENVIRONMENT.READ_REGISTRY' must be declared.
I am not getting to know What is the exact problem with this file?
Help me with this please.
Thank You.
Oracle forms builder 6i.
Oracle 9i.Vijetha wrote:
I also want to know what is the use of win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername') ??
What does it do??
If i comment the following line , will it be a problem??
:global.user_id := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
Because i commented the above line & compiled, so it is not giving any error now.
So please tell me what win_api_environment.read_registry does??
it's read windows registry value. So, no problem if you comment it.
Thanks -
Finding the exact path of a file using a Java program
Can anyone tell me how to find the exact path of a file which is saved in a directory other than the one in which the main file is saved? I know there is a class called File which has many methods like isAbsolutePath() and isPath() but they return the path in which the main class is located
actually i m trying to write a program which will
take a name of a file or a directory from the console
and it should give the entire path of that file or
directory and this file need not be stored in the
path of the main class.....It can be stored in any
drives of my PC....Ok, then the console input needs to be an absolute path or a path relative to some given directory (usually the one from which the application is started). Java cannot magically guess absolute paths if you just provide a file name. E.g. if I'd use your program and would provide as input "build.xml", how should the program know which file by that name I mean (there are lots of build.xml files in different locations on my machine)? -
How to get the full path instead of just the file name, in �FileChooser� ?
In the FileChooserDemo example :
In the statement : log.append("Saving: " + file.getName() + "." + newline);
�file.getName()� returns the �file name�.
My question is : How to get the full path instead of just the file name,
e.g. C:/xdirectory/ydirectory/abc.gif instead of just abc.gif
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.filechooser.*;
public class FileChooserDemo extends JFrame {
static private final String newline = "\n";
public FileChooserDemo() {
super("FileChooserDemo");
//Create the log first, because the action listeners
//need to refer to it.
final JTextArea log = new JTextArea(5,20);
log.setMargin(new Insets(5,5,5,5));
log.setEditable(false);
JScrollPane logScrollPane = new JScrollPane(log);
//Create a file chooser
final JFileChooser fc = new JFileChooser();
//Create the open button
ImageIcon openIcon = new ImageIcon("images/open.gif");
JButton openButton = new JButton("Open a File...", openIcon);
openButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int returnVal = fc.showOpenDialog(FileChooserDemo.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
//this is where a real application would open the file.
log.append("Opening: " + file.getName() + "." + newline);
} else {
log.append("Open command cancelled by user." + newline);
//Create the save button
ImageIcon saveIcon = new ImageIcon("images/save.gif");
JButton saveButton = new JButton("Save a File...", saveIcon);
saveButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int returnVal = fc.showSaveDialog(FileChooserDemo.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
//this is where a real application would save the file.
log.append("Saving: " + file.getName() + "." + newline);
} else {
log.append("Save command cancelled by user." + newline);
//For layout purposes, put the buttons in a separate panel
JPanel buttonPanel = new JPanel();
buttonPanel.add(openButton);
buttonPanel.add(saveButton);
//Explicitly set the focus sequence.
openButton.setNextFocusableComponent(saveButton);
saveButton.setNextFocusableComponent(openButton);
//Add the buttons and the log to the frame
Container contentPane = getContentPane();
contentPane.add(buttonPanel, BorderLayout.NORTH);
contentPane.add(logScrollPane, BorderLayout.CENTER);
public static void main(String[] args) {
JFrame frame = new FileChooserDemo();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
frame.pack();
frame.setVisible(true);simply use file.getPath()
That should do it!Thank you !
It takes care of the problem !! -
In the process of reformatting my macbook pro, I saved everything but my keyword list. The keywords are with the images, but the total list I use under "Keywords" is not present. Is there a way to re-create all my keywords I've used over the last 6 years.
I accomplished what I needed last night. I remembered I had picked my favorite images from each year and put them in a "favorite" folder by year. These folders included 500 to 1200 images per year. I pulled up the folder for each year and highlighted all images and clicked on "Keywords" and all keywords used for all images were listed. I made those keywords persistent. It took me a while to realize I had to click on each keyword to make it persistent. After doing this for all years, I assume 95% of all keywords I have used over the many years were back in my list. I'm sure there is probably a more "technical" way to accomplish what I needed, but this seems to have worked. I also exported my list into a word document and is saved on my hard drive.
If I had not made folders with my favorite images for each year, I could not have used this method, so if you figure out a better way, I like to hear it. Thanks for your comments and willingness to help. -
LSMW: Error concerning the logical path in Specify Files step
Hi,
I am trying on an ECC 6.0 EHP6 system to upload (open) POs from an existing SAP ERP system. Since I faced some complications in batch input recording method, I decided to go with the standard batch/direct input method.
I selected object 0085 (Purchase Order) and method 0001 (Purchase Order). The program that is used is RM06EEI0. I followed all the usual steps, but in the "Specify Files" step I get the message:
'****.lsmw.conv' does not exist; edit the logical path using transaction FILE
Being aware of both the FILE and SF01 transactions, I created the logical path and file (through the FILE transaction). However, after the modification, I get the message:
Logical file '****' is not assigned to physical file '****.lsmw.conv'
There is also the related SAP Note 753511 (Logical and physical path and file name in transaction LSMW) that refers to this case.Hi,
Click on specify file radio button>Legacy data-on the PC Front end
where input file location like C:\mydocument\desktop\test.txt
and give input in Name field: mydocument
in delimiter section > select Tabular
File structure section> tick on Field order matches source structure definition
File type: Record end marker(Text file)
then press enter key and other steps as same.
Second thing you said that you have used Batch input recording
after creation and recording finish , scroll the page below on recording and put a cursor unwanted field and remove unwanted input field.
I hope your problem will resolve. you can find the steps pdf on Google search try now.
Thanks
Sanjeet Kumar -
On start up of my new iMac it locks on the grey screen with the apple logo and the progress wheel spins. Boot up in safe and this is where it stopped at "BootCacheControl: Unable to open /var/db/bootcache.playlist: 2 no such file or directory. "
Reinstalling MacOS does NOT fix the problem for me. I'm still searching a solution !
Bernard -
How do I get the sync of my 3GS on my computer to transfer everything (files, apps, etc.) to my new iphone4? And then how do I move the sync to a newer computer so I can sync the new phone with the new computer?
My 3GS is dying and it's synced to an older computer. I have tons of datafiles as well as apps, music, text messages, etc. that I need to get moved to the new iphone4 I'm getting. Then I need to move the sync to a newer computer so that I can sync the new phone and new computer.
I understand how to get my apps to transfer to a new pc. That's not the issue. It's getting ALL the data from the 3GS to the 4 and then to a new computer.
Thanks.Thanks much, that's very helpful for step one (getting old phone onto new phone). Very clear.
However, I still have the problem of moving to the new computer. How do I move the sync to the new computer after the new phone is set up? -
How to get the actual path of a file present in the Web content folder
I have a jasper file which is present inside the Web-Content folder of my project.
I need to pass this file as an argument to the FileInputStream object. How can i give the actual path of the jasper file, since this project can be deployed anywhere else also.You may be able to use the getRealPath or getResource methods in ServletContext
Maybe you are looking for
-
Can't get my itunes 10.1 library on my external hard drive
I want to put my iTunes 10.1 library on a WD Elements 2tb external harddrive but i am not having any success. It shows that it is on the external harddrive but when I plug the harddrive into another computer the content does not show up. Please help.
-
+/- buttons stopped working in Project 2010
I'm running Project Pro 2010 on a Windows 7 laptop, but not connected to a server. This morning when I came in an opened up my project I couldn't show subtasks in my project by clicking on the + sign in front of the summary task. The cursor was a out
-
IMovie 10: Minidv is transferring scenes in 1 sec intervals. Any Help?
Good Evening, I am a frustrated recent upgrader to iMovie 10. I used to be able to transfer my mini dvs by hitting transfer (rewind) and let it go. After the upgrade to 10 and Mavericks my transfers are not even tolerable. Each "scene" is not even on
-
Problem relating painting swing component
Hi All, I am making a swing application in which there is one central Panel on which i am showing some dynamic contents from database but the problem is that data is comming from database but it is not painted automatically on screen and when i move
-
I just opened and installed the computer. The bluetooth mouse is found but i can't pair the keyboard. Any help is really appreciated.