Problems accessing parameters, files - problems in general.

I've been posting my problems to comp.lang.java.programmer but Google Groups is exceedingly slow to update and I've been stuck on this for nearly two whole days:
I am developing what will be a series of web utilities for our company and our client's company. Unfortunately I am hampered by the fact that my Java is not that good having come from a C++ background.
My current setup is Windows XP, JDK 1.3.1.07 (which is what our client is running), Tomcat 4.1 for testing on my local box.
I've been middling around with small examples and decided to do something slightly more complex. What I am trying to do is access a file that is described in web.xml as a parameter. However when ever I run the program it is unable to find the file. All the documentation I have (web-based plus a Professional Java Server Programming J2EE Edition - way over my head) either skims across it/takes it as read it will be set up correctly/doesn't touch it at all.
I thought I was trying to access the wrong directory so I mapped the file to the root of C and still can't access it - it always comes back as null. Also between attempts I restart the Tomcat server so it always loads in the web.xml file.
This is my web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
  <display-name>Welcome to Tomcat</display-name>
  <description>
     Welcome to Tomcat
  </description>
  <servlet>
    <servlet-name>LogIn</servlet-name>
    <servlet-class>website.LogIn</servlet-class>
    <init-param>
      <param-name>passwordFile</param-name>
      <param-value>C:\\passwords.txt</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>LogIn</servlet-name>
    <url-pattern>/logged</url-pattern>
  </servlet-mapping>
</web-app>And the Java:
package website;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
*  Handles the login to the administrators section of the website
public class LogIn extends HttpServlet
    private String passwordFile;
    /** Read the password file from the location specified
     *  by the passwordFile initialization parameter.
    public void init(ServletConfig config) throws ServletException
        super.init(config);
        passwordFile = config.getInitParameter("passwordFile");
        System.out.println(passwordFile);
        if (passwordFile == null)
            System.out.println("The \"passwordFile\" property must be set to a file name");
        try
        catch (Exception e)
            System.out.println("Error: Unable to read passwordFile.");
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
}It was suggested on comp.lang.java.programmer to check the path that the system was thinking I was searching which I did by inserting this code fragment:
     // initialise the servlet and load password(s)
//     super.init(config);
//     passwordFile = config.getInitParameter("passwordFile");
     // added code
     passwordFile = "passwords.txt";
     File f = new File( passwordFile );
     System.out.println( f.getAbsolutePath() );
     // added code.
        ...This lead me to learn that the directory being returned was:
C:Program Files\Apache Group\Tomcat 4.1\passwordFile.txt
Which is strange since I would of thought that the lowest directory
that is visible to the class would of been ROOT (hence it's name).
Does this mean if I copy the passwordFile.txt to the above directory
it would work? Actually no. I still can't get the filename as a
parameter from web.xml which is frustrating. If you could give me any
pointers on what might be wrong then that would be cool.
I thought I could move forward by accessing the file directly. But no: An addition of f.exists() to check that the file exists returns false. I've now got a copy of passwords.txt in every single directory from the classes directory all the way down to C:\ and it still doesn't work.
I hope someone can help out here since this is very frustrating to be stuck on something so basic as file handling.
Graham Reeds,
http://omnieng.co.uk | [email protected]

I can see how this is frustrating but it should be fixable. The last example you posted won't work because you have "passwords.txt" instead of "c:/passwords.txt".
If you're still looking for a solution could you cut and paste the following code into your servlet code and then post the results?
// Check that init param is read correctly
String filename = config.getInitParameter("passwordfile");
System.out.println("config param = " + filename);
// try filenames
String[] filenames = new String[] {"c:/passwords.txt", "c:\\passwords.txt", "passwords.txt"};
for (int i=0; i < filenames.length; ++i) {           
   File file = new File(filenames);
System.out.println("File " + filenames[i] + " - exists = " + file.exists());
System.out.println("Abs path = " + file.getAbsolutePath());
This is based on the file c:\passwords.txt existing - if I have the wrong filename, please adjust. Also, you may need to change <i> to [[i]i] in a couple of places.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

Similar Messages

  • Problems Accessing Local Files

    Hi,
    I'm sure this has been discussed before, but I'm havign problems accessing a file on the target machine's local filesystem. I've signed all my jars and added the all-permissions tag to the jnlp file. However, my code:
    ClassLoader cl = getClass().getClassLoader();
    InputStream is = cl.getResourceAsStream("c:/resources/testsuite.xml");
    fails to find the file "testsuite.xml".
    Is this a classpath issue? I've tried to add c:/resources to the class path but with no luck.
    any help would be much appreciated
    Thanks

    Try "file://c:/resources/testsuite.xml" instead. I
    believe you are suppose to be passing in a valid URL
    and what you passed in wasn't.That's wrong. Resource name should be just a path. It could be a full path started from "/" or just a relative path from given class (here better to use this.class.getResourceAsStream() method).
    Better yet, since you are giving full security access
    to the user's local machine you don't really need to
    rely on the class loader at all. It's just a normal
    file, so you could create your File object and read it
    in the way you do normally. I would suggest to do not rely on File object at all because it can only be dealing with local file system and thats can't be changed in future.

  • Problems accessing Music Files in Slideshow module in LR 2.6 and Windows 7 64 bit

         Just got new computer 64 bit Windows 7.  Installed LR 2.6 and am having problem with slideshow and music.  Never had this problem before with my XP computer.  When I open up slideshow module and go to Playback window and check soundtrack and try to choose a music folder, I have a new problem.  It opens up "Browse for Files & Folders" dialog box as usual, but it only lets me browse on my desktop or my User name on the C drive.  My music is in my F drive where my data is stored.  I've never had a problem accessing my music in my F drive in my XP computer, but this setup limits where I can browse to.  Interesetingly, this works OK in LR 3 beta on this WIndows 7 PC where it opens up a dialog box "Choose a music file to play" which gives me access to all my drives.  In summary, I can't access music files stored on a drive other than my C drive using LR 2.6 on a Windows 7 64 bit computer.
         I have attached a screen shot to compare the new Windows 7 Browse for Files & Folders dialog box to that in my XP computer.
         Would appreciate any suggestions.
    Thanks,
    Matthew Kraus

    Thanks for the reply.  I went through the process you suggested to change Ownership  & grant permission to access files.  When I get to the owner tab in Advanced Security Settings....I am already the current owner of this folder.
    What do I do now?
    Thanks,
    Matthew Kraus

  • Problems accessing flash files

    i have a swf file on my website when i put a link to it and click
    it it tells me
    Flash6 Player required:
    http://www.macromedia.com/shockwave/download/in
    dex.cgi ?P1_Prod_Version=ShockwaveFlash
    i have 10 installed i dont see the problem i had this problem before and
    can not remember how to fix it.
    brent

    Hi, It appears the message you received has to do with Shockwave Player, not Flash Player. You may want to start a thread on the Flash forum. You could also search that forum to see if there are any threads similar to the problem you are having.
    Thanks,
    eidnolb

  • Problem:Accessing the file system with servlets ???

    Hi...
    I have a strange problem with my servlets that run on Win2000 with Apache and 2 Tomcat instances.
    I cannot open files through servlets whereas exactly the same code lines work in local standalone java programm.
    It seems to be somehting like a rights problem...but I dont know what to do.
    thanks for any help
    here are my configuration files for Apache and Tomcat:
    Apache: *******************************************************
    ### Section 1: Global Environment
    ServerRoot "D:/Webserver_and_Applications/Apache2"
    PidFile logs/httpd.pid
    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 15
    <IfModule mpm_winnt.c>
    ThreadsPerChild 250
    MaxRequestsPerChild 0
    </IfModule>
    Listen 80
    LoadModule jk_module modules/mod_jk.dll
    JkWorkersFile conf/workers.properties
    JkLogFile logs/mod_jk.log
    JkLogLevel info
    LoadModule access_module modules/mod_access.so
    LoadModule actions_module modules/mod_actions.so
    LoadModule alias_module modules/mod_alias.so
    LoadModule asis_module modules/mod_asis.so
    LoadModule auth_module modules/mod_auth.so
    LoadModule autoindex_module modules/mod_autoindex.so
    LoadModule cgi_module modules/mod_cgi.so
    LoadModule dir_module modules/mod_dir.so
    LoadModule env_module modules/mod_env.so
    LoadModule imap_module modules/mod_imap.so
    LoadModule include_module modules/mod_include.so
    LoadModule isapi_module modules/mod_isapi.so
    LoadModule log_config_module modules/mod_log_config.so
    LoadModule mime_module modules/mod_mime.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule userdir_module modules/mod_userdir.so
    ### Section 2: 'Main' server configuration
    ServerAdmin [email protected]
    ServerName www.testnet.com:80
    UseCanonicalName Off
    DocumentRoot "D:/Webserver_and_Applications/root"
    JkMount /*.jsp loadbalancer
    JkMount /servlet/* loadbalancer
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory "D:/Webserver_and_Applications/root">
    Order allow,deny
    Allow from all
    </Directory>
    UserDir "My Documents/My Website"
    DirectoryIndex index.html index.html.var
    AccessFileName .htaccess
    <Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    </Files>
    TypesConfig conf/mime.types
    DefaultType text/plain
    <IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
    </IfModule>
    HostnameLookups Off
    ErrorLog logs/error.log
    LogLevel warn
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
    CustomLog logs/access.log common
    ServerTokens Full
    ServerSignature On
    Alias /icons/ "D:/Webserver_and_Applications/Apache2/icons/"
    <Directory "D:/Webserver_and_Applications/Apache2/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    Alias /manual "D:/Webserver_and_Applications/Apache2/manual"
    <Directory "D:/Webserver_and_Applications/Apache2/manual">
    Options Indexes FollowSymLinks MultiViews IncludesNoExec
    AddOutputFilter Includes html
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    ScriptAlias /cgi-bin/ "d:/webserver_and_applications/root/cgi-bin/"
    <Directory "D:/Webserver_and_Applications/root/cgi-bin/">
    AllowOverride None
    Options Indexes FollowSymLinks MultiViews
    Order allow,deny
    Allow from all
    </Directory>
    IndexOptions FancyIndexing VersionSort
    AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
    AddIconByType (TXT,/icons/text.gif) text/*
    AddIconByType (IMG,/icons/image2.gif) image/*
    AddIconByType (SND,/icons/sound2.gif) audio/*
    AddIconByType (VID,/icons/movie.gif) video/*
    AddIcon /icons/binary.gif .bin .exe
    AddIcon /icons/binhex.gif .hqx
    AddIcon /icons/tar.gif .tar
    AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
    AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
    AddIcon /icons/a.gif .ps .ai .eps
    AddIcon /icons/layout.gif .html .shtml .htm .pdf
    AddIcon /icons/text.gif .txt
    AddIcon /icons/c.gif .c
    AddIcon /icons/p.gif .pl .py
    AddIcon /icons/f.gif .for
    AddIcon /icons/dvi.gif .dvi
    AddIcon /icons/uuencoded.gif .uu
    AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
    AddIcon /icons/tex.gif .tex
    AddIcon /icons/bomb.gif core
    AddIcon /icons/back.gif ..
    AddIcon /icons/hand.right.gif README
    AddIcon /icons/folder.gif ^^DIRECTORY^^
    AddIcon /icons/blank.gif ^^BLANKICON^^
    DefaultIcon /icons/unknown.gif
    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
    AddEncoding x-compress Z
    AddEncoding x-gzip gz tgz
    AddLanguage da .dk
    AddLanguage nl .nl
    AddLanguage en .en
    AddLanguage et .et
    AddLanguage fr .fr
    AddLanguage de .de
    AddLanguage he .he
    AddLanguage el .el
    AddLanguage it .it
    AddLanguage ja .ja
    AddLanguage pl .po
    AddLanguage ko .ko
    AddLanguage pt .pt
    AddLanguage nn .nn
    AddLanguage no .no
    AddLanguage pt-br .pt-br
    AddLanguage ltz .ltz
    AddLanguage ca .ca
    AddLanguage es .es
    AddLanguage sv .se
    AddLanguage cz .cz
    AddLanguage ru .ru
    AddLanguage tw .tw
    AddLanguage zh-tw .tw
    AddLanguage hr .hr
    LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw
    ForceLanguagePriority Prefer Fallback
    AddDefaultCharset ISO-8859-1
    AddCharset ISO-8859-1 .iso8859-1 .latin1
    AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
    AddCharset ISO-8859-3 .iso8859-3 .latin3
    AddCharset ISO-8859-4 .iso8859-4 .latin4
    AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
    AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
    AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
    AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
    AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
    AddCharset ISO-2022-JP .iso2022-jp .jis
    AddCharset ISO-2022-KR .iso2022-kr .kis
    AddCharset ISO-2022-CN .iso2022-cn .cis
    AddCharset Big5 .Big5 .big5
    AddCharset WINDOWS-1251 .cp-1251 .win-1251
    AddCharset CP866 .cp866
    AddCharset KOI8-r .koi8-r .koi8-ru
    AddCharset KOI8-ru .koi8-uk .ua
    AddCharset ISO-10646-UCS-2 .ucs2
    AddCharset ISO-10646-UCS-4 .ucs4
    AddCharset UTF-8 .utf8
    AddCharset GB2312 .gb2312 .gb
    AddCharset utf-7 .utf7
    AddCharset utf-8 .utf8
    AddCharset big5 .big5 .b5
    AddCharset EUC-TW .euc-tw
    AddCharset EUC-JP .euc-jp
    AddCharset EUC-KR .euc-kr
    AddCharset shift_jis .sjis
    AddType application/x-tar .tgz
    AddType image/x-icon .ico
    AddHandler type-map var
    BrowserMatch "Mozilla/2" nokeepalive
    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    BrowserMatch "RealPlayer 4\.0" force-response-1.0
    BrowserMatch "Java/1\.0" force-response-1.0
    BrowserMatch "JDK/1\.0" force-response-1.0
    BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
    BrowserMatch "^WebDrive" redirect-carefully
    BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
    <IfModule mod_ssl.c>
    Include conf/ssl.conf
    </IfModule>
    ScriptAlias /php/ "d:/webserver_and_applications/php/"
    AddType application/x-httpd-php .php
    Action application/x-httpd-php "/php/php.exe"
    Tomcat:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    <Server port="11005" shutdown="SHUTDOWN" debug="0">
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Tomcat-Standalone">
    <!-- Define an AJP 1.3 Connector on port 11009 -->
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
    port="11009" minProcessors="5" maxProcessors="75"
    acceptCount="10" debug="0"/>
    <!-- Define the top level container in our container hierarchy -->
    <Engine jvmRoute="tomcat1" name="Standalone" defaultHost="localhost" debug="0">
    <!-- Global logger unless overridden at lower levels -->
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="catalina_log." suffix=".txt"
    timestamp="true"/>
    <!-- Because this Realm is here, an instance will be shared globally -->
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    <!-- Define the default virtual host -->
    <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
    <Valve className="org.apache.catalina.valves.AccessLogValve"
    directory="logs" prefix="localhost_access_log." suffix=".txt"
    pattern="common"/>
    <Logger className="org.apache.catalina.logger.FileLogger"
    directory="logs" prefix="localhost_log." suffix=".txt"
         timestamp="true"/>
    <!-- Tomcat Root Context -->
    <Context path="" docBase="d:/webserver_and_applications/root" debug="0"/>
    <!-- Tomcat Manager Context -->
    <Context path="/manager" docBase="manager"
    debug="0" privileged="true"/>
    <Context path="/examples" docBase="examples" debug="0"
    reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_examples_log." suffix=".txt"
         timestamp="true"/>
    <Ejb name="ejb/EmplRecord" type="Entity"
    home="com.wombat.empl.EmployeeRecordHome"
    remote="com.wombat.empl.EmployeeRecord"/>
    <Environment name="maxExemptions" type="java.lang.Integer"
    value="15"/>
    <Parameter name="context.param.name" value="context.param.value"
    override="false"/>
    <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/EmployeeAppDb">
    <parameter><name>user</name><value>sa</value></parameter>
    <parameter><name>password</name><value></value></parameter>
    <parameter><name>driverClassName</name>
    <value>org.hsql.jdbcDriver</value></parameter>
    <parameter><name>driverName</name>
    <value>jdbc:HypersonicSQL:database</value></parameter>
    </ResourceParams>
    <Resource name="mail/Session" auth="Container"
    type="javax.mail.Session"/>
    <ResourceParams name="mail/Session">
    <parameter>
    <name>mail.smtp.host</name>
    <value>localhost</value>
    </parameter>
    </ResourceParams>
    </Context>
    </Host>
    </Engine>
    </Service>
    <!-- Define an Apache-Connector Service -->
    <Service name="Tomcat-Apache">
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
    name="Apache" debug="0">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="apache_log." suffix=".txt"
    timestamp="true"/>
    </Engine>
    </Service>
    </Server>
    *** and here is my workers.properties : *******************************
    # workers.properties
    # In Unix, we use forward slashes:
    ps=/
    # list the workers by name
    worker.list=tomcat1, tomcat2, loadbalancer
    # First tomcat server
    worker.tomcat1.port=11009
    worker.tomcat1.host=localhost
    worker.tomcat1.type=ajp13
    # Specify the size of the open connection cache.
    #worker.tomcat1.cachesize
    # Specifies the load balance factor when used with
    # a load balancing worker.
    # Note:
    # ----> lbfactor must be > 0
    # ----> Low lbfactor means less work done by the worker.
    worker.tomcat1.lbfactor=100
    # Second tomcat server
    worker.tomcat2.port=12009
    worker.tomcat2.host=localhost
    worker.tomcat2.type=ajp13
    # Specify the size of the open connection cache.
    #worker.tomcat2.cachesize
    # Specifies the load balance factor when used with
    # a load balancing worker.
    # Note:
    # ----> lbfactor must be > 0
    # ----> Low lbfactor means less work done by the worker.
    worker.tomcat2.lbfactor=100
    # Load Balancer worker
    # The loadbalancer (type lb) worker performs weighted round-robin
    # load balancing with sticky sessions.
    # Note:
    # ----> If a worker dies, the load balancer will check its state
    # once in a while. Until then all work is redirected to peer
    # worker.
    worker.loadbalancer.type=lb
    worker.loadbalancer.balanced_workers=tomcat1, tomcat2
    # END workers.properties
    thanks again

    Hi joshman,
    no I didn't get error messages as the relevant lines for reading/writing where between try statements, but you were where right it was/is just a simple path problem.
    I expected the refering directory without using a path to be the directory where the servlet is in, but it is not !!??
    Do you know if I set this in the setclasspath.bat of tomcat ?
    *** set JAVA_ENDORSED_DIRS=%BASEDIR%\bin;%BASEDIR%\common\lib ***
    thanks again
    Huma

  • Help: Problems accessing XML file in WebSphere 3.5 Fix Pack 4 on Solaris

    We are having an emergent issue with WebSphere 3. 5 Fix Pack 4 on Solaris 2.6: The WAR file we deployed fails with runtime exception due to the inability
    to access a local resource(XML file) in the converted WAR file's web directory.
    The way we access this XML file is as follows:
    ServletContext theCon = getServletContext();
    URL u = theCon.getResource ("/web/test.xml");
    String newPath = u.toExternalForm ();
    InputStream is = new URL (newPath).openStream();
    The InputStream returned from the URL object is NULL.
    After checked the URL's externalForm string, we noticed that its protocol part is "classloader", e.g. the whole URL string is like "classloader:/opt/...../web/test.xml". However, if we replaced "classloader" with "file", the problem disappeared and the XML file can be read without error.
    Anybody know why "classloader:" in the URL string cause this problem, and what is the solution without changing the URL string?
    Thanks a lot!

    Hi,
    Can you try to replace the two last lines with:InputStream is = new FileInputStream (u.getFile());Hope this helps,
    Kurt.

  • Problems accessing parameters within repeating frames.

    I hope this is a more readable version of the problem I just submitted.
    This is the overall layout of a report I am currently working on
    and having problems with, using Oracle Reports 6i.
    Departments Commitments Obligations
    Dept 1 - Dept 1 Title
    RCC 1 - RCC Title
    RIC
    Non-pay by RIC 308 1 1
    Non-pay by RIC 438 1 1
    Non-pay by RIC 514 1 1
    Subtotal 3 3
    Pay by RIC 514 2 2
    Total RCC 1 5 5
    RCC 2 - RCC Title
    RIC
    Non-pay by RIC 308 1 1
    Non-pay by RIC 438 1 1
    Non-pay by RIC 514 1 1
    Subtotal 3 3
    Pay by RIC 514 1 1
    Total RCC 2 5 5
    Dept n
    Total Dept 1
    Non-pay by RIC 308 2 2
    Non-pay by RIC 438 2 2
    Non-pay by RIC 514 2 2
    Subtotal 6 6
    Pay RIC 514 4 4
    Total Dept1 10 10
    I use a format trigger to calculate the data for
    Non-pay by RIC 308 (the most inner frame).
    If (:RIC = '308') then
    Return (True);
    Else
    Return (False);
    End if;
    And I do something equivalent for the other two RICs, RIC = 438,
    and RIC = 514.
    With this approach, I am able to calculate subtotals and totals
    for all the RCCs for each Dept.
    I work one frame at a time, from the inner frame to the outer
    frame.
    My problem is to get the Total Dept section at the end of each
    Department.
    Total Dept 1
    Non-pay by RIC 308 2 2
    Non-pay by RIC 438 2 2
    Non-pay by RIC 514 2 2
    Subtotal 6 6
    Pay RIC 514 4 4
    Total Dept1 10 10
    I get a frame error when I try this code in a format trigger
    If (:RIC = '308') then
    Return (True);
    Else
    Return (False);
    End if;
    I know this trigger fails because I am trying to reference the ":RIC"
    parameter that is in a different repeating frame.
    How can I check for the RIC at this level?
    Is there a better way to tackle this problem? Any suggestions?
    Thanks,
    Carlos

    Sounds like the source data for the Graph is the wrong Group.
    Dave

  • Problem accessing a file from URL connection

    My swing application uses a file(5MB).
    I tried to open an inputStrem to this file using following codes:
    URL u = new URL("http://..../myfile.jat");
    URLConnection uconn = u.openConnection();
    InputStream iin = uconn.getInputStream();
    DataInputStream in = new DataInputStream(iin);
    System.out.println(iin.available());
    But it gives me available number of bytes sometimes 6761 and sometimes
    1711. But I need the available # of bytes to be equal to 5B.
    can anybody tell me how I can do that?
    thanks

    I think this got posted in the wrong forum, but at any rate: the "available()" method tells you how much data is available to be read at this instant. As soon as you read that data, more data will become available. Write a loop that reads repeatedly until there is no more data available.

  • Adobe Reader X: access to files & problems updating

    Why can't I update my Adobe Reader X, and why won't it let me open my pdf files, including those I have created myself on the same laptopn I use now?

    Hi Mathaa001,
    Can you please let us know the details mentioned below:
    - Operating System;
    - what is the exact version of Adobe Reader X that you are using ;
    - Are you getting any error message while updating Adobe Reader? If yes, please let us know the error message and if possible, please provide us screenshot of the error. (How to post a screenshot: How to post a screenshot in the forum)
    - You also mentioned that you are not able to open any PDF files, please let us know exactly what happens when you open any PDF file? Do you get any error message? If yes, please let us know the error message and if possible, please provide us screenshot of the error.
    - Are you able to launch Adobe Reader? (Without opening any PDF file)

  • With conversion to Leopard, file problems with networked Windows computer

    Last night I did an Archive & Install from Tiger to Leopard on my Intel MacBook Pro. Today, I had trouble finding the other computers at my office. Once I finally got them to show up, I opened a Word file found on another computer, made some changes, and when I tried to save it, I got this message: "This is not a valid file name. Try one or more of the following: *Check the path to make sure it was typed correctly. *Select a file from the list of files and folders." Since this file already existed and I wasn't changing the name, I thought this was odd, but I changed the name from "Seating Chart 3-8-08" to "SeatingChart3-8-08" in case Leopard didn't like spaces when talking to Windows, but I got the same error message. Finally I gave up, not knowing what to do, then discovered that it had in fact saved my file. Still, every time I try to save ANY Word document from the shared folder of the Windows computer, I get the same error message endlessly until I choose "Don't Save."
    When I try to open an Excel file from that computer, it won't even open; it says " 'File Name.xls' cannot be accessed. This file may be Read-Only, or you may be trying to access a Read-Only location. Or, the server the document is stored on may not be responding." As with the Word file problem above, I did not have any problem accessing the files until I converted to Leopard.
    The Windows machine is Windows XP using Microsoft Office 2003; I have Microsoft Office 2004 on my machine.

    See if this Link, by Pondini, offers any insight to your issue...
    Transfer from Old  to New
    http://pondini.org/OSX/Setup.html
    Also, See here if you haven't already...
    http://www.apple.com/support/switch101/     Switching from PC

  • Accessing Serialized Files randomly.

    I have a problem accessing serailized files randomly. I am using ObjectOutputStream to write objects to a file. I am using the ObjectInputStream to read the objects from the file. Both of these work fine if the order in which i Write objects is the same as the order in which I read Objects. But I need to skip few objects when reading objects from the file. I know API states that the order of writing and reading should be the same. But still is there any way where i can read serailized objects ramdomly form the file.
    Please help me with this it is very impritant of the project. We are trying to store tuples in the file. We are going to build an index over these tuples and then read the tuple that we need.
    Thankyou,
    Nishant

    You could wrap the ObjectOutputStream around a ByteArrayOutputStream to first serialize an object to a byte[] and then save that into a RandomAccessFile.
    The trick is to be able to tell where in the file each serialized object starts. Possibilities include:
    1) If your objects are known to serialize to a fixed size (or if there is a reasonable max size of the serialized object), you could pad each byte[] "record" you write to the file (eg, each object always uses 1K bytes). Then you can easily read back the i'th object byte[] and deserialize it.
    2) Design into your RandomAccessFile a "directory" section that keeps track of each stored object and it's starting byte address in the file.
    If the file needs to hold an arbitrary # of objects, the directory could support a special entry pointing to a "next" directory section later in the file.
    -Brian

  • Can´t access my files on Creative Cloud. "Page temporarily unavailable. We will return soon." "We are working quickly to resolve the problem and apologize for the delay. Check back later or visit our website for status updates. In addition, you can get he

    Hello,
    For a few days I have been trying to access my files on Creative Cloud web without success. I´ve got this message only:
    "Page temporarily unavailable. We will return soon."
    "We are working quickly to resolve the problem and apologize for the delay.
    Check back later or visit our website for status updates.
    In addition, you can get help in the forums of the Creative Cloud.
    Thank you for understanding!"
    (I used Google Translate)
    Somebody help?

    You do not need ?&promoid=KRUVP at the end of the url but it should not matter.
    One thing to check is if your hosts file is modified. Open the Command Prompt and type: notepad %systemroot%\system32\drivers\etc\hosts
    This will open a read-only copy of your host file in Notepad. Are there any entries in this file regarding adobe.com?
    The other thing you can do is open the Developer Tools in the Chrome browser. On Windows press Ctrl + Shift to open them. Switch to the Network tab. Reload the page by pressing Ctrl + r. Check for any 4xx or 5xx errors which should be colored red.
    Post screenshots of your results or send me a private forum message with the information.

  • Problem accessing iTunes. Getting error message "The iTunes Library Extras.itdb file is on a locked disk"?

    Problem accessing iTunes. Getting error message "The iTunes Library Extras.itdb file is on a locked disk"

    Close iTunes, delete iTunes Library Extras.itdb from your iTunes folder, start iTunes. iTunes should rebuild the file automatically.
    tt2

  • There was a problem connecting to the server "my server.local" this file is available on your computer. Access the files and volumes locally.

    Hi,
    I have a strange problem connecting one of the office laptops (Macbook Pro 10.7) to the disk in the Apple Time Capsule.  It's just one laptop that has this problem and the other 3 no problems at all and they all run OS X 10.7 Lion, I can access the Time Capsule disk over WAN on all machines but locally on the problem machine i get this message "There was a problem connecting to the server "myserver.local" this file is available on your computer. Access the files and volumes locally."   Now from this message it sounds like the problem laptop thinks the network drive (Time Capsule) is the same as it's self in the way of name or address however they clearly have different IP addresses locally.   
    Any ideas on this would be apreciated as I can only think a clean install but don't want to do this if not necessary.
    Thanks
    Jarrah

    I think I gave you some bad info in the above, where i enterered the text "myserver.local" & "example.local" this was the host name of the server (Time Capsule) so not local on the computer.
    No i didn't try your method, I'll give it a go - I thought the folder option was for local files and not on a server ?

  • I have an MS word doc saved from a Macbook in my flash drive. Now i want to print this from an IBM compatible laptop. problem is -- I can't access the file. Please help.

    I have an MS word doc saved from a Macbook Pro on m flash drive. Now i want to print
    th same doc from an IBM Compatible laptop. Problem is, I can't access the file. Please help.

    I suggest you post your question on Microsofts own forums for their Mac products as it's their software you're having issues with:
    http://answers.microsoft.com/en-us/mac

Maybe you are looking for