File and FileInputStream problem

Hi all
I have downloaded from developpez.com a sample code to zip files. I modified it a bit to suit with my needs, and when I launched it, there was an exception. So I commented all the lines except for the first executable one; and when it succeeds then I uncomment the next executable line; and so on. When I arrived at the FileInputStream line , the exception raised. When I looked at the code, it seemed normal. So I want help how to solve it. Here is the code with the last executable line uncommented, and the exception stack :
// Copyright (c) 2001
package pack_zip;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import oracle.jdeveloper.layout.*;
import java.io.*;
import java.util.*;
import java.util.zip.*;
import java.text.*;
* A Swing-based top level window class.
* <P>
* @author a
public class fzip extends JFrame implements ActionListener{
JPanel jPanel1 = new JPanel();
XYLayout xYLayout1 = new XYLayout();
JTextField szdir = new JTextField();
JButton btn = new JButton();
JButton bzip = new JButton();
     * Taille générique du tampon en lecture et écriture
static final int BUFFER = 2048;
* Constructs a new instance.
public fzip() {
super("Test zip");
try {
jbInit();
catch (Exception e) {
e.printStackTrace();
* Initializes the state of this instance.
private void jbInit() throws Exception {
this.getContentPane().setLayout(xYLayout1);
     this.setSize(new Dimension(400, 300));
btn.setText("btn");
btn.setActionCommand("browse");
btn.setLabel("Browse ...");
btn.setFont(new Font("Dialog", 0, 14));
bzip.setText("bzip");
bzip.setActionCommand("zipper");
bzip.setLabel("Zipper");
bzip.setFont(new Font("Dialog", 0, 14));
btn.addActionListener(this);
bzip.addActionListener(this);
bzip.setEnabled(false);
     this.getContentPane().add(jPanel1, new XYConstraints(0, 0, -1, -1));
this.getContentPane().add(szdir, new XYConstraints(23, 28, 252, 35));
this.getContentPane().add(btn, new XYConstraints(279, 28, 103, 38));
this.getContentPane().add(bzip, new XYConstraints(128, 71, 103, 38));
public void actionPerformed(ActionEvent e)
if(e.getActionCommand() == "browse")
FileDialog fd = new FileDialog(this);
fd.setVisible(true);
szdir.setText(fd.getDirectory());
bzip.setEnabled(true);
else
          * Compression
     try {
          // création d'un flux d'écriture sur fichier
     FileOutputStream dest = new FileOutputStream("Test_archive.zip");
          // calcul du checksum : Adler32 (plus rapide) ou CRC32
     CheckedOutputStream checksum = new CheckedOutputStream(dest, new Adler32());
          // création d'un buffer d'écriture
     BufferedOutputStream buff = new BufferedOutputStream(checksum);
          // création d'un flux d'écriture Zip
     ZipOutputStream out = new ZipOutputStream(buff);
     // spécification de la méthode de compression
     out.setMethod(ZipOutputStream.DEFLATED);
          // spécifier la qualité de la compression 0..9
     out.setLevel(Deflater.BEST_COMPRESSION);
     // buffer temporaire des données à écriture dans le flux de sortie
     byte data[] = new byte[BUFFER];
          // extraction de la liste des fichiers du répertoire courant
     File f = new File(szdir.getText());
     String files[] = f.list();
          // pour chacun des fichiers de la liste
     for (int i=0; i<files.length; i++) {
               // en afficher le nom
          System.out.println("Adding: "+files);
// création d'un flux de lecture
FileInputStream fi = new FileInputStream(files[i]);
/* // création d'un tampon de lecture sur ce flux
BufferedInputStream buffi = new BufferedInputStream(fi, BUFFER);
// création d'en entrée Zip pour ce fichier
ZipEntry entry = new ZipEntry(files[i]);
// ajout de cette entrée dans le flux d'écriture de l'archive Zip
out.putNextEntry(entry);
// écriture du fichier par paquet de BUFFER octets
// dans le flux d'écriture
int count;
while((count = buffi.read(data, 0, BUFFER)) != -1) {
          out.write(data, 0, count);
               // Close the current entry
out.closeEntry();
// fermeture du flux de lecture
          buffi.close();*/
/*     // fermeture du flux d'écriture
     out.close();
     buff.close();
     checksum.close();
     dest.close();
     System.out.println("checksum: " + checksum.getChecksum().getValue());*/
     // traitement de toute exception
catch(Exception ex) {
          ex.printStackTrace();
And here is the error stack :
"D:\jdev32\java1.2\jre\bin\javaw.exe" -mx50m -classpath "D:\jdev32\myclasses;D:\jdev32\lib\jdev-rt.zip;D:\jdev32\jdbc\lib\oracle8.1.7\classes12.zip;D:\jdev32\lib\connectionmanager.zip;D:\jdev32\lib\jbcl2.0.zip;D:\jdev32\lib\jgl3.1.0.jar;D:\jdev32\java1.2\jre\lib\rt.jar" pack_zip.czip
Adding: accueil188.cfm
java.io.FileNotFoundException: accueil188.cfm (Le fichier spécifié est introuvable.
     void java.io.FileInputStream.open(java.lang.String)
     void java.io.FileInputStream.<init>(java.lang.String)
     void pack_zip.fzip.actionPerformed(java.awt.event.ActionEvent)
     void javax.swing.AbstractButton.fireActionPerformed(java.awt.event.ActionEvent)
     void javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(java.awt.event.ActionEvent)
     void javax.swing.DefaultButtonModel.fireActionPerformed(java.awt.event.ActionEvent)
     void javax.swing.DefaultButtonModel.setPressed(boolean)
     void javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent)
     void java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)
     void java.awt.Component.processEvent(java.awt.AWTEvent)
     void java.awt.Container.processEvent(java.awt.AWTEvent)
     void java.awt.Component.dispatchEventImpl(java.awt.AWTEvent)
     void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
     void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
     void java.awt.LightweightDispatcher.retargetMouseEvent(java.awt.Component, int, java.awt.event.MouseEvent)
     boolean java.awt.LightweightDispatcher.processMouseEvent(java.awt.event.MouseEvent)
     boolean java.awt.LightweightDispatcher.dispatchEvent(java.awt.AWTEvent)
     void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
     void java.awt.Window.dispatchEventImpl(java.awt.AWTEvent)
     void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
     void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
     boolean java.awt.EventDispatchThread.pumpOneEvent()
     void java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
     void java.awt.EventDispatchThread.run()
Thank you very much

One easy way to send a file through RMI is to read all bytes of a file to a byte array and send this array as a parameter of a remote method. But of course you may have problems with memory when you send large files. The receive is simillary.
Other way is to split the file and getting slices of the file, sending slices and re-assemble at destination. This assume that the file isn't changed through the full transfering is concluded.
I hope these could help you.

Similar Messages

  • Hi, since i put some mp4 video or DVD files on my external hard drives final cut prox won't recognize my hard drives, i move all the video files and the problem still exist. somebody have the solution

    Hi, since i put some mp4 video or DVD files on my external hard drives final cut prox won't recognize my hard drives, i move all the video files and the problem still exist. somebody have the solution

    Did the back and forth between PC and Mac file systems screw up my files somehow?
    Yes. Unfortunately the move has almost certainly caused the loss of the resource data that would have been (invisibly) attached to those files.
    By adding a specific .mov extension after the fact you will have helped the Mac correctly identify the file type / asscoiations but also significantly you will have physically changed the filename eg from "clip" to "clip.mov". This means that when you come to reconnect the media in FCP , then FCP will be looking for files that no longer exist at the given path eg when specifically looking for our example clip called "clip" of course it won't find it.
    Try this as a test... first remove the ".mov" extension from one or more of the clips, select those clips and press Cmd-Opt-I to open an Info window for the selection. You'll see an "Open with:" popup and in that popup you should choose QuickTime Player (if its a Unix Executable then it will initially list Terminal as the appropriate app, you have to choose Other... then in the open dialog choose Enable > All Applications and then navigate to and select the Quicktime Player app as the appropriate app). After you've done that restart FCP and see if you can now reconnect to those clips.

  • Reading file and parseInt - PROBLEM

    Hi, I am trying read from .txt file but I have a problem when I use Integer.parseInt. Can you see what could be wrong in this source:
    public String loadPlayerFromTxt() {
    String result = "";
    try{
    FileInputStream fstream = new FileInputStream("Test.txt");
    DataInputStream in = new DataInputStream(fstream);
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    int position = 0;
    while ((br.readLine()) != null) {
    Gamer gamer = new Gamer();
    gamer.setName(br.readLine());
    gamer.setRace(br.readLine());
    gamer.setRole(br.readLine());
    gamer.setLevel(Integer.parseInt(br.readLine()));
    String [] array = new String [6];
    String abilities = br.readLine();
    String str = abilities.trim();
    //System.out.println(abilities);
    array = str.split(",");
    gamer.setStrength(Integer.parseInt(array[0]));
    gamer.setEndurance(Integer.parseInt(array[1]));
    gamer.setDexterity(Integer.parseInt(array[2]));
    gamer.setIntelligence(Integer.parseInt(array[3]));
    gamer.setWisdom(Integer.parseInt(array[4]));
    gamer.setCharisma(Integer.parseInt(array[5]));
    this.gcollection.addGamer(gamer,position);
    position++;
    result = "succesful";
    in.close();
    catch (Exception e){//Catch exception if any
    System.err.println("Error: " + e.getMessage());
    e.printStackTrace();
    e.getLocalizedMessage();
    return result;
    Error message is:
    Error: For input string: "12, 15, 19, 9, 14, 7"
    java.lang.NumberFormatException: For input string: "12, 15, 19, 9, 14, 7"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:456)
         at java.lang.Integer.parseInt(Integer.java:497)
         at ca5.GameControle.loadPlayerFromTxt(GameControle.java:56)
         at ca5.GameControle.main(GameControle.java:112)

    Pavel.Prochy wrote:
    Hi, I am trying read from .txt file but I have a problem when I use Integer.parseInt. Can you see what could be wrong in this source:
    Error: For input string: "12, 15, 19, 9, 14, 7"
    java.lang.NumberFormatException: For input string: "12, 15, 19, 9, 14, 7"The Integer.parseInt() method expects a String that contains only numbers. You are passing it the following string:
    12, 15, 19, 9, 14, 7Which contains punctuation and whitespace (i.e. not just numbers). When the string you pass to Integer.parseInt() contains anything but numbers you get the "NumberFormatException" thrown. What you need to do is to do some pre-processing on the string you read from the file or (ideally) change the format of the file so that you have each of the numbers on their own line rather than having multiple numbers on the same line. If you HAVE to keep all the numbers on the same line then you will need to do the following (or something very similar to it):
    public class Tester3 {
        public static void main(String[] args) {
           String input = "12, 15, 19, 9, 14, 7";
           String[] strings = input.split(",");
           for(String string : strings) {
                int parameter = Integer.parseInt(string.trim());
                System.out.println("parameter: "+parameter);
    }Program output from above code:
    parameter: 12
    parameter: 15
    parameter: 19
    parameter: 9
    parameter: 14
    parameter: 7When you use the Integer.parseInt() call you should consider the possibility that your input will cause the call to fail. You can pre-process the input to ensure it will not fail, catch the NumberFormatException by wrapping the call to Integer.parseInt() in a try-catch block or create a method in your class that throws a NumberFormatException to its caller and let the caller handle the error
    Edited by: amp88 on Nov 4, 2009 2:26 AM
    Edited by: amp88 on Nov 4, 2009 2:27 AM

  • Coping iso file and mounting problem

    Hi
    I am using Windows 8.1 Update Enterprise 64 bit and Windows ADK.
    I noticed that, if I select the "Environment of the deployment tools and creations images" and I click on the "Run as Administrator" item of his Pop-Up menu and I mount on a iso image of windows 8.1 Update, when I run the command
    robocopy <Drive_Letter>:\"<Windows_Files_Path>" /e
    to copy all its files in a directory and the command
    dism /Mount-Image /ImageFile:"<Windows_Files_Path>"\install.wim /Index:<Image_Index> /MountDir:"<Mount_Directory_Path>"
    to mount an image volume, this error appears:
    Error: 0xc1510111
    Not have permission to mount and modify this image.
    However, if I copy these files through the "file explorer" window, the mounting of this volume image is working properly. How come?
    Thanks
    Bye
    Balubeto

    I am unable to reproduce the issue above:
    E:\>dism /mount-image /imagefile:e:\release\Captures.001\Win2008R2Sp1.wim /index:1 /mountdir:c:\mount
    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031
    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    E:\>robocopy e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT e:\mount\test zti*.log /njh /ndl
    100% New File 226728 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIApplications.log
    100% New File 1228 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIApplyGPOPack.log
    100% New File 10283 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIAppVerify.log
    100% New File 29169 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIBackup.log
    100% New File 2101 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIBDE.log
    100% New File 36103 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIConfigure.log
    100% New File 34934 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIDiskpart.log
    100% New File 1027 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIDomainJoin.log
    100% New File 41428 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIDrivers.log
    100% New File 93591 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIGather.log
    100% New File 2619 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIGroups.log
    100% New File 2898 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTINextPhase.log
    100% New File 3875 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIOSRole.log
    100% New File 740 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIOSRolePS.log
    100% New File 2350 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIPatches.log
    100% New File 4180 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ztiRunCommandHidden.log
    100% New File 1215 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTITatoo.log
    100% New File 1855 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIValidate.log
    100% New File 190933 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIWindowsUpdate.log
    100% New File 1436 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIWinRE.log
    100% New File 40631 e:\release\Captures.001\Create\WIN2008R2SP1\MININT-E5LVCNT\ZTIYellowBang.log
    Total Copied Skipped Mismatch FAILED Extras
    Dirs : 1 0 0 0 0 0
    Files : 21 21 0 0 0 0
    Bytes : 712.2 k 712.2 k 0 0 0 0
    Times : 0:00:00 0:00:00 0:00:00 0:00:00
    Speed : 5209457 Bytes/sec.
    Speed : 298.087 MegaBytes/min.
    Ended : Tuesday, September 23, 2014 11:13:46 AM
    E:\>dism /unmount-wim /mountdir:c:\mount /commit
    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031
    Image File : e:\release\Captures.001\Win2008R2Sp1.wim
    Image Index : 1
    Saving image
    [==========================100.0%==========================]
    Unmounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    Additionally I can see that the original question asked was copied from this post 2 years ago:
    http://www.eightforums.com/installation-setup/54246-coping-iso-file-mounting-problem.html
    is this really your problem?
    Really, this is not a MDT related question. perhaps a general Windows Setup forum would be a better place to ask this question.
    Keith Garner - Principal Consultant [owner] -
    http://DeploymentLive.com

  • Coping iso file and monting problem

    Hi
    I am using Windows 8.1 Update Enterprise 64 bit and Windows ADK.
    I noticed that, if I select the "Environment of the deployment tools and creations images" and I click on the "Run as Administrator" item of his Pop-Up menu and I mount on a iso image of windows 8.1 Update, when I run the command
    robocopy <Drive_Letter>:\"<Windows_Files_Path>" /e
    to copy all its files in a directory and the command
    dism /Mount-Image /ImageFile:"<Windows_Files_Path>"\install.wim /Index:<Image_Index> /MountDir:"<Mount_Directory_Path>"
    to mount an image volume, this error appears:
    Error: 0xc1510111
    Not have permission to mount and modify this image.
    However, if I copy these files through the "file explorer" window, the mounting of this volume image is working properly. How come?
    Thanks
    Bye
    Balubeto

    Hi,
    Unlike normal copy commands, Robocopy is designed for reliable copy or mirroring while maintaining the permissions, attributes, owner information, timestamps and properties of the objects copied. In opinion, that's why you encounter this problem.
    To fix this problem, can try to add /nocopy parameter for test.
    Note:Copies no file information (useful with /purge).
    You can refer to the link below for more details with Robocopy:
    http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx
    Roger Lu
    TechNet Community Support

  • Jar file and classpath problem

    I0m writing a program that use the kunststoff.jar Look&Feel.
    Now I would like to put all I'm writing into a jar file but I always have a NoClassFoundException when I try to start my application.
    here is a MANIFEST:ME I'm using:
    Manifest-Version: 1.0
    Created-By: 1.4.2-beta (Sun Microsystems Inc.)
    Main-Class: JListaR.JListaR
    Class-Path: kunststoff.jar img\ .why this don't work?

    Unfortunately you can't embed jars within a jar and
    expect them to be referencable for the classpath from
    outside the main jar. The "Class-Path" attribute in
    the manifest is used to refer to other jar files
    outside of your jar file.
    The usual approach to solve this problem is to unpack
    the jar files you want to embed and then rejar
    everything together in one big jar file again. This
    isn't always a great approach though, I know I'm
    looking for an alternative. So far my only alternative
    is dynamic class loading using a classloader, however
    this isn't great if you need to refer to several
    hundreds or even thousands of classes.thank you very mach...now I understand because it dosen't work correctly!

  • Accessing a file and memory problem

    hi gurus;
    here's the thing:
    when i initializing a file like
    File a = new File(xxx);
    is the file save to memory yet? or it is just initializing only?
    or when i accessing using randomaccessfile its just save to memory?
    any good link that teach this kind of things..
    any input will much appreciate
    Thanks

    Here you are
    http://java.sun.com/docs/books/tutorial/java/javaOO/objectcreation.html
    This is a good basic tutorial.

  • What are Core files and can I delete them?

    I need to clean out duplicate and needless files.  What are Core.XXXX files and what happens if I delete them?

    Here's an update, in case anyone else has this problem: I trashed the files, and no problems whatsoever.

  • Problems with .ARW files and auto toning

    problems with .ARW files and auto toning
    let me try to explain this because this has happened in past and never found a way to resolve but i lived with it
    now that I have a Sony A7R the problem is more serious
    Firstly i take pride it making the picture happen all in camera, i use DRO lvl 5 to get enough light, like when i'm shooting at dusk. DRO its like doing HDR but in a single file, it lightens the darks. in my camera i'm happy with results
    but when I upload them to lightroom, they come out near black.
    allow me to explain
    lets say I import 100 images
    i double check my preferences and everything is UNCHECKED when it comes to importing options, there is no auto toning, nothing.
    as the images import i see a preview in the thumbnail which looks fine.
    i double click on one to enlarge it, hence leave grid view.
    for a brief 1 or 2 seconds, i see the full image in all its glory but than lightroom does something funny, it darkens the image
    one by one as it inspects each image, if it was a DRO image it makes it too dark.
    to make this clear, the image is perfect as it was in the beginning but after a few seconds lightroom for some reason thinks it needs to correct it.
    how to prevent lightroom from doing this, i want the image exactly as it is, why must lightroom apply a correction>?
    i think it has to do something with interpreting the raw file and lightroom applies its own algorithm.
    but here is what i dont get.....before lightroom makes the change i'm able to witness the picture exactly as it was taken and want it unchanged..
    now i have to tweak each file or find a profile for it which is added work.
    any ideas how to prevent lightroom from ruining my images and just leave them as they were when first detected...
    there are 2 phases...one is when it originally imports and they look fine
    second is scanning each image and applying some kind of toning which darkens it too much.
    thanks for the help

    sorry thats the auto reply message from yahoo email.
    i've disabled it now
    thing is, there is no DRO jpg to download from the camera
    its only ARW. so my understanding is when i use DRO setting, the camera makes changes to the ARW than lightroom somehow reads this from the ARW.
    but then sadly reverts it to no DRO settings.
    because i notice if i take normal picture in raw mode its dark but if i apply dro to it, it comes out brighter, yet when i d/l the image from camera to lightroom, which is an ARW - there are no jpgs. lightroom decides to mess it up
    so in reality there is no point in using DRO because when i upload it lightroom removes it.
    is there a way to tell lightroom to preserve the jpg preview as it first sees it.
    its just lame, picture appears perfect...than lightroom does something, than bam, its ruined,.
    what do i need to do to prevent lightroom from ruining the image? if it was good in the first place.

  • HT3986 I've had MS Office:mac 2011 on my imac for around 18 months now.  Outlook has just disappeared and when I find the file and open it it tells me that there is a problem and I may need to re-install it.  I've just done this using the installation dis

    I've had MS Office:mac 2011 on my imac for around 18 months now.  Outlook has just disappeared and when I find the file and open it it tells me that there is a problem and I may need to re-install it.  I've just done this using the installation disc which, then said the installation had been successful.
    Outlook is still not working.  Can anyone please advise me on what to do next.

    Remove MS Office 2011 completely (here are instructions) and reinstall it.
    It's not a simple or fast process but it is important to follow all of the steps in order to get all the files that Office scatters around. This will not affect your data files, only MS Office and its preferences.

  • I am deleting files through my trash in my macbook pro (2010) and then emptying the trash can, but my hard disk space is not increasing! i recently upgraded to lion and the problem is new, wasn't the same with snow leopard! HELP!!!!!

    i am deleting files through my trash in my macbook pro (2010) and then emptying the trash can, but my hard disk space is not increasing! i recently upgraded to lion and the problem is new, wasn't the same with snow leopard! HELP!!!!!
    When i press command+I (Get Info) i see that there is 140 GB "Available Space" on my hard disk but when i click on my hard disk icon on the desktop, and then press "space" i only see 102 GB free!! What the f*???
    Please HELP!!!!!! Getting second thoughts on Lion!!!!

    Hi b,
    Have you restarted yet?

  • I have problem with Itunes losing where podcasts and some purchased music is located. Don't know how Itunes losing the locations of the files and I can't find the files on my hard drive. What can I do to stop Itunes losing location and restore my files?

    I have problem with Itunes losing where podcasts and some purchased music is located. Don't know how Itunes losing the locations of the files and I can't find the files on my hard drive. What can I do to stop Itunes losing location and restore my files?

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • File not refreshing and error problem

    well i have 2 problems..
    first:
    i dont know why a jsp file does not reload to the edited version
    meaning lets say I have a jsp file doing something it loads up fine and does I edit the file and try reloading the old copy keeps on coming back..
    there are times when the new copy loads up but that is rare..
    second can anyone tell me what is wrong with this code.. I cant figure out what is wrong with it.. only in the <form></form> tags
    because rest of the code is fine
    i keep on getting nullpointerexception i dont understand why
    <%@ page import="java.io.*"%>
    <%@ taglib uri="taglibdb.tld" prefix="sql" %>
    <html>
    <head>Admin Property</head>
    <body>
         <form name="addproperty" method="post" action="../servlet/PropertyServlet">
         <% if (request.getParameter("action").equalsIgnoreCase("edit")){
         %>
              <input type="text" name="val" value="<%=request.getParameter("val")%>">
              <input type="text" name="property" value="<%=request.getParameter("property")%>">
              <input type="submit" name="editproperty">
         <% } else { %>
         <input type="text" name="property">
         <input type="submit" value="addprop">
         <% } %>
    </form>
    <sql:openConnection driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mydb" user="guest" password="guest" id="A" />
    <sql:ifError id="A">
    <br>Could not connect to database
    </sql:ifError>
    <sql:setQuery id="A" query="select * from PROPERTY" res="B"/>
    <table>
    <sql:forEachRow res="B">
    <tr>
         <td><sql:getColumn position="1" res="B"/></td>
         <td><sql:getColumn position="2" res="B"/></td>
         <td>">Delete...</a></td>
         <td><a href="../jsp/property.jsp?action=edit&val=<sql:getColumn position="1" res="B"/>&property=<sql:getColumn position="2" res="B"/>">Edit...</a></td>
    </tr>
    </sql:forEachRow>
    </table>
    <sql:closeConnection id="A"/>
    </body>
    </html>
    if i change the form part to:
    <form name="addproperty" method="post" action="../servlet/PropertyServlet">
         <input type="text" name="property">
         <input type="submit" value="addprop">
    </form>
    it works fine the way it is suppose to

    In case you are running Tomcat 4.1 the java file and class file of your jsp is located in Tomcat 4.1/work/standalone/.. and your file should be named something like MyJspPage_jsp.java (try search for it).
    About your nullpointer, you should check your spelling when requesting parameters,
    request.getParameter("action") is not the same as request.getParameter("Action") etc.
    Good luck.
    Johan

  • Problem with file and printer sharing

    I just installed a Linksys WRT54G to replace a D-Link wireless router and cannot reestablish my file and printer sharing since replacing the router.  I had file and printer sharing working fine before installing the WRT54G.   All of the computers are running either XP Pro or 2000 Pro.  I have two printers attached to one of my computers that I was previously sharing with all of the other computers on our home network.  One is attached via a parallel port, the other via a USB port.  
    Here's what I've tried so far without success.
    1.  The IP of the WRT54G is 192.168.1.1, and the IP's it assigns to my LAN computers begin 192.168.1.XXX.  The old IP of the D-Link was 192.168.0.1 and its LAN IPs were 192.168.0.XXX, so I've gone into my firewall and changed the settings for the range of trusted computers to correspond to the WRT54G's IP addresses.
    2.   I've tried uninstalling the printers and reinstalling them, including reinitializing printer sharing.
    3.  When I try to use the Windows  "Add printer" wizard to add a networked printer, it can see the computer that has the printers attached, but it does not see the printers.
    4.  I haven't fooled around with the file sharing settings, but they've all be lost too, so I suspect there is a common problem for both printer and file sharing.
    Any suggestions would be most welcome.  I don't know what would be different about the WRT54G that would cause this problem.

    Try this to Enable File and Printer Sharing...Turn Off the Router Firewall...Make sure the Windows Firewall is also Off...

  • File and Printer Sharing problem

    Message Edited by bartman_60042 on 11-13-2007 05:47 AM

    Oops...somehow submitted without any text.
    My set-up: Linksys Cable Modem with Linksys Wireless Router.  2 Desktop Computers (Black and Grey) and 1 Laptop.  Windows XP SP2 with all current upgrades on each.
    While setting up File and Printer Sharing, I have the following:
    1) The Black computer can file/printer share from both the Grey computer and Laptop.
    2) The Grey computer can only file/printer share from the Laptop; not from the Black computer.
    3) The Laptop can only file/printer share from the Grey computer; not from the Black computer.
    All 3 computers were configured the same as far as I can tell.  The only difference I notice is that the Black computer boots without the XP 'login' screen (no password required), could this be causing the problem?  If this is the issue, how would I change the settings to 'login' to the Black computer?  Any thing else which may be wrong?

Maybe you are looking for