GetResourceAsStream questions

I'm trying to understand how the file locations work with the getResourceAsStream() method.
I have properties files for localization. They're kept in the same package (the default package) as my other source code (which is all in a src directory).
I declare the filenames as such:
private static String MESSAGESBUNDLE = "/UI_en_US.properties";
private static String WORDSBUNDLE = "/WORDS_en_US.properties";
To open the files, I use these 3 lines of code:
Class clazz = Runtime.getRuntime().getClass();
in = clazz.getResourceAsStream(_MESSAGES_BUNDLE);
inW = clazz.getResourceAsStream(_WORDS_BUNDLE);
Everything works fine until I try to run this application on the web via the MicroEmulator. At that point it can't locate/open the resource files (even though they're bundled into the jar).
I read in a java forum that the CLASSPATH determines where the jvm looks for the files but I also read the following information (which didn't mention the CLASSPATH--plus I don't have permission to define the value of the CLASSPATH env var running on my ISP anyway).
In the following quote, the Class definition says that the rules are profile specific: "
public InputStream getResourceAsStream(String name)
Finds a resource with a given name. This method returns null if no resource with this name is found. The rules for searching resources associated with a given class are profile specific."
I looked up this section of the MIDP2.0 spec "Resource names refer to the contents of the MIDlet Suite JAR file. Absolute pathnames, beginning with �/� are
fully qualified file names within the jar file.
Relative pathnames, not beginning with �/� are relative to the class upon which getResourceAsStream is
called...."
And I experimented with my files a little. I moved the resource files into a package under the /src/ directory and named it 'res'. Thus now I had this directory structure:
/src/ -- contains all other java classes for my project
/src/res/ - - contains the resource files such as UI_en_US.properties
But if I change these lines:
private static String MESSAGESBUNDLE = "/UI_en_US.properties";
private static String WORDSBUNDLE = "/WORDS_en_US.properties";
To refer to the new subdirectory:
private static String MESSAGESBUNDLE = "/res/UI_en_US.properties";
private static String WORDSBUNDLE = "/res/WORDS_en_US.properties";
Then getResourceAsStream() can't locate/open the fies.
Similarly, if I move the files back to the src directory and make the path relative by removing the leading /:
private static String MESSAGESBUNDLE = "UI_en_US.properties";
private static String WORDSBUNDLE = "WORDS_en_US.properties";
getResourceAsStream() can't locate/open the fies.
I'd like to understand how the file locating is working--especially so I can run the MicroEmulator on my webpage which will run my J2ME app. on the webpage.
Any ideas/clarification/etc. would be immensely appreciated!
jdl

I must confess I did not read the whole post. But since it is an issue of getResourceAsStream, if you but your properties files into the res directory, then you can access them via getClass().getResourceAsStream("/firstFile.properties") for example.
I have never used the MicroEmulator (never even heard of it, but this might be my slip), but this should be a general rule. Once you packaged your application into a jar archieve, you should be able to access your properties files like I mentioned without any problems. In the emulator it works, on a real phone it works, so you should be ok.
When you are usign the method above, the "/" specifies that you are already in the resources folder, so any consecutive folders, like res/localization/english/enFile.properties, can be accessed by using getClass().getResourceAsStream("/localization/english/enFile.properties") Mihai

Similar Messages

  • Problem with getResourceAsStream

    Hi,
    I ran into a problem with using getResourceAsStream. My application is packaged in an ear-file and consists of a WAR an EJB-JAR and multiple utility JARs. Everything deploys fine and I don't have any classloading problems, so the class-path settings in the MANIFEST-MF files seem to be fine.
    The problem starts when a stateless session bean tries to configure a part of the application by calling getResourceAsStream to retrieve the configuration xml file which is packaged in the same JAR file like the class which is calling getResourceAsStream. In every other app server I used so far, that's working perfectly fine. The JAR is even displayed in the list of the class loader and as I said, i can load classes from that JAR. But every time I try to load a resource file from that JAR, it fails. If I call getResource to get a URL object that works and gives me the URL to the desired file, but a load of that fails though.
    If I package the file into the WAR or the EJB-JAR getResourceAsStream will find it and hand it back.
    I'm absolutely puzzeled by this behavior and would greatly appretiate any hints to be able to read this resource file.
    Thanks...
    Andreas

    Let me try to answer both questions -- and thanks for all the help. The class is wihin a package and let me explain further...
    1) I'm testing outside the netbeans IDE by executing:
    java -jar MyJar.jar
    This works fine when I had the old version of the code:
    iStream = this.getClass().getResourceAsStream(strategyFile);
    However, then I have the previously noted problem of trying to run tests within the netbeans ide and not being able to find the test files unless they are included in the source package (non-test version).
    2) If I switch the code as suggested to:
    iStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(strategyFile);
    Then the netbeans Junit tests function and can read the test files from the test package within the netbeans IDE when I execute the Junit tests. However, when I go outside the IDE and try
    java -jar MyJar.jar
    the default file is not found in the jar. I've checked the jar file and verified that data file is inside the jar via jar tf.

  • File input question

    I'm new to java and I'm trying to write a program using file input/output.
    The user is asked for the names of an input file and an output file.
    My question is that in case I don't specify the path of the input file, where should it reside?
    thanks,

    My question is that in case I don't specify the path
    of the input file, where should it reside? In the present working directory. Which is not reliably known at runtime. If the input file will remain unchanged, you can put it into your JAR (if you create one) or somewhere else in your classpath, like the package root, and use getClass().getResourceAsStream("/thefile.ext") to load it. That will always work.

  • How to use get getResourceAsStream

    Gday all,
    I gave up trying to comprehend the API doco and tutorials on the How to use get getResourceAsStream. I don't care how the class loader locates resources... I just it to work. Now!
    Here's what works... and what doesn't work...
    package krc.geometry;
    import java.util.Properties;
    import java.io.FileInputStream;
    import java.io.IOException;
    import krc.utilz.io.RuntimeIOException;
    abstract class GeometryProperties {
      private static Properties properties = new Properties();
      static {
        try {
          // properties.load(new FileInputStream("c:/java/home/src/krc/geometry/Geometry.properties")); //WORKS
          // properties.load(new FileInputStream("c:/java/home/classes/krc/geometry/Geometry.properties")); //WORKS
          // properties.load( (new Object()).getClass().getResourceAsStream("krc/geometry/Geometry.properties")); //DOES NOT WORK
          // properties.load( (new Object()).getClass().getResourceAsStream("krc.geometry.Geometry.properties")); //DOES NOT WORK
          // properties.load( (new Object()).getClass().getResourceAsStream("Geometry.properties")); //DOES NOT WORK
          // properties.load( (new Object()).getClass().getResourceAsStream("krc\\geometry\\Geometry.properties")); //DOES NOT WORK
          properties.load( (new Object()).getClass().getResourceAsStream("/krc/geometry/Geometry.properties")); //WORKS
        } catch(IOException e){
          throw new RuntimeIOException("Failed to load GeometryProperties: " + e.getMessage());
      static Properties get() {
        return properties;
      static String getProperty(String key) {
        return properties.getProperty(key);
      public static void main(String... args) {
        System.out.println(GeometryProperties.getProperty("format.double"));
    }I hope someone finds this helpful someday.
    Some related links are:
    http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)
    http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getSystemResourceAsStream(java.lang.String)
    http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getSystemClassLoader()
    http://www.google.com.au/search?hl=en&q=getResourceAsStream+tutorial&meta=&btnG=Google+Search
    http://rachel.sourceforge.net/tutorial.html
    http://forum.java.sun.com/thread.jspa?threadID=5227823&messageID=9928698
    PS: I think the API has ludicrously complicated explanation of something which can be explained succinctly by example... It's a classic case of a "correct" description which only makes sense once you already know how it works. Whomever wrote that one gets 3 out of 10 stars from me... ie No bananas.
    Cheers. Keith.
    Edited by: corlettk on Dec 2, 2007 9:28 AM - typos.

    I've noticed a good google hit rate on this forum, especially on threads with meaningful a subject lines... That's how I found these forums in the first place... I'm hoping that posting solutions and comments here (as well as the occasional question) will make them available to others from google... I doubt that any site I created would earn the same "front page" status as Sun's site.
    Besides, doesn't it still cost money to setup a blog or your own homepage?
    I admit I'm intrigued despite myself... I'm aware that both http://www.joelonsoftware.com/ and http://www.dreamincode.net/ (and problably many others) started as little personal blogs.

  • GetResourceAsStream()... finding a directory?

    I have a desktop application which, of course, is packaged as a jar. I need it to read out a bunch of files from within its jar. Ideally I would like it to be able to discover what's in there so I don't need to program it with a list. Is there any way to do that? I already know how to read files out of a jar/classpath using Class.getResourceAsStream(), but is there any way to find out which resources are available from the Class?
    Thanks

    The question is this: If I want my classes to be able
    to discover resources in their classpaths, how do I
    do it? If I want to figure out a list of the files
    that could be loaded through getResourceAsStream, is
    there a way?But there could be all sorts of rubbish on the classpath, almost all of it nothing to do with you. The thinking is; you don't want to shuffle through all that stuff looking for what you want.
    Remember getResource doesn't just look in the specific jar or directory with your program in it. It searches the whole classpath and returns the first match. (or all the matches in the case of getResoruces().) Remembers, also, that a resource isn't much use to your program if you don't know what's in it, and if you know what's in it you're almost sure to know the name.
    If you're interested in the specific code source with your program in it do
    URL codeBase = getClass().getProtectionDomain().getCodeSource().getLocation();That will get you the specific source of the class you call it from.
    If it's a jar or a directory you can then read it with File.list or JarInputStream as appropriate, but if it's an online directory you're screwed.

  • What is the difference about two getResourceAsStream()?

    I found a strange thing about getResourceAsStream(). This is my code:
    package pkg;
    class Test1 {
    private static final String absName = "/WEB-INF/database.properties";
    public static void main( String[] args ) throws Exception {
    ClassLoader loader = testClassLoader.class.getClassLoader();
    System.out.println( "classloader: " + loader );
    System.out.println( loader.getResourceAsStream( absName ) );
    Class c = Class.forName( "pkg.Test1" );
    System.out.println( "classloader : " + c.getClassLoader() );
    System.out.println( c.getResourceAsStream( absName ) );
    The output is:
    classloader: sun.misc.Launcher$AppClassLoader@7d8483
    null
    classloader : sun.misc.Launcher$AppClassLoader@7d8483
    java.io.BufferedInputStream@129206
    But after I remove the first slash "/", absName = "WEB-INF/database.properties";
    The output is:
    classloader: sun.misc.Launcher$AppClassLoader@7d8483
    java.io.BufferedInputStream@3169f8
    classloader : sun.misc.Launcher$AppClassLoader@7d8483
    null
    I am confused with the results. Anyone help? Thanks in advance.
    Paula

    Just in case no one has answered this question for you.
    The difference is with the way the file Paths are handled.
    The first filepath is telling the method to start at the root level of your directory tree and look for a directory called "WEB-INF". More than likely you do not have this directory at your root level.
    When you remove the leading slash, you are telling the method to search your classpaths and find a directory called "WEB-INF". This is most likely the case.

  • Servlet + JSP + SQL question

    I have a servlet that is executing a few queries against a database. I am fowarding the results to a jsp page to display the results. I have been able to do this. My problem is when my query selects more than one field I am unsure on how to read that into an array or something like that. All the results I have done so far have had multiple results but only from one field in the database. Here is my serlvet and jsp code. If some one could tell me how to read multiple field into an array and display them on a jsp page that would be great. Thank you
    Servlet
    package nnet;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.security.Principal;
    import java.sql.*;
    import java.sql.DriverManager;
    * <p>Title: NNET</p>
    * <p>Description: Northland Intranet</p>
    * <p>Copyright: Copyright (c) 2004</p>
    * <p>Company: NMI</p>
    * @author not attributable
    * @version 1.0
    public final class home
    extends HttpServlet {
    //Initialize global variables
    //Initialize queries
    private static final String USERQUERY =
    "SELECT public.tblindividual.firstname as firstname " +
    "FROM public.tblloginname " +
    "INNER JOIN public.tblindividual ON (public.tblloginname.indlink = public.tblindividual.indid) " +
    "WHERE LOWER(public.tblloginname.loginname) = LOWER(?)";
    private static final String MAINLINKQUERY =
    "SELECT public.nnetsection.name " +
    "FROM public.nnetsection " +
    "WHERE public.nnetsection.posted = 'true'";
    private static final String ANOUNCEMENTQUERY =
    "SELECT public.nnetanouncement.anouncement, to_char(nnetanouncement.postdate,'MonthDD, YY') as postdate " +
    "FROM public.nnetanouncement " +
    "ORDER BY public.nnetanouncement.postdate DESC";
    public void init() throws ServletException {
    //Process the HTTP Get request
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws
    ServletException, IOException {
    Connection con = null;
    PreparedStatement stmt = null;
    //Initialize Resultset objects
    ResultSet namers = null;
    ResultSet mainlinkrs = null;
    ResultSet anouncementrs = null;
    ResultSet anouncementdaters = null;
    //Initialize Array Lists
    ArrayList mainlinkresults = new ArrayList();
    ArrayList anouncementresults = new ArrayList();
    String firstnameresult = null;
    Principal user = request.getUserPrincipal();
    String username = user.getName();
    Properties props = new Properties();
    InputStream in = getServletContext().getResourceAsStream(
    "/WEB-INF/sql.properties");
    props.load(in);
    in.close();
    //get Users login name to pass on
    try {
    Class.forName(props.getProperty("connection.driver"));
    con = DriverManager.getConnection(props.getProperty("connection.url"), props);
    stmt = con.prepareStatement(USERQUERY);
    stmt.setString(1, username);
    namers = stmt.executeQuery();
    while (namers.next()) {
    firstnameresult = namers.getString("firstname");
    //results.add(namers.getString("firstname"))
    catch (SQLException ex1) {
    catch (ClassNotFoundException ex) {
    finally {
    if (stmt != null) {
    try {
    stmt.close();
    catch (SQLException e) {
    e.printStackTrace();
    stmt = null;
    if (con != null) {
    try {
    con.close();
    catch (SQLException e) {
    e.printStackTrace();
    con = null;
    //get the main links to pass on
    try {
    Class.forName(props.getProperty("connection.driver"));
    con = DriverManager.getConnection(props.getProperty("connection.url"), props);
    stmt = con.prepareStatement(MAINLINKQUERY);
    mainlinkrs = stmt.executeQuery();
    while (mainlinkrs.next()) {
    mainlinkresults.add(mainlinkrs.getString("name"))
    catch (SQLException ex1) {
    catch (ClassNotFoundException ex) {
    finally {
    if (stmt != null) {
    try {
    stmt.close();
    catch (SQLException e) {
    e.printStackTrace();
    stmt = null;
    if (con != null) {
    try {
    con.close();
    catch (SQLException e) {
    e.printStackTrace();
    con = null;
    //get the announcements to pass on
    try {
    Class.forName(props.getProperty("connection.driver"));
    con = DriverManager.getConnection(props.getProperty("connection.url"), props);
    stmt = con.prepareStatement(ANOUNCEMENTQUERY);
    anouncementrs = stmt.executeQuery();
    while (anouncementrs.next()) {
    anouncementresults.add(anouncementrs.getString("anouncement"));
    catch (SQLException ex1) {
    catch (ClassNotFoundException ex) {
    finally {
    if (stmt != null) {
    try {
    stmt.close();
    catch (SQLException e) {
    e.printStackTrace();
    stmt = null;
    if (con != null) {
    try {
    con.close();
    catch (SQLException e) {
    e.printStackTrace();
    con = null;
    request.setAttribute("firstname", firstnameresult);
    request.setAttribute("mainlink", mainlinkresults);
    request.setAttribute("anouncement", anouncementresults);
    RequestDispatcher rd =
    request.getRequestDispatcher("home.jsp");
    rd.forward(request, response);
    //Clean up resources
    public void destroy() {
    JSP Page
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
    <html>
    <head>
    <title>
    index
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
    <!--
    body {
         margin-left: 0px;
         margin-top: 0px;
         margin-right: 0px;
         margin-bottom: 0px;
    -->
    </style></head>
    <body bgcolor="#008000">
    <table width="100%" border="1" cellspacing="0" bordercolor="#000000">
    <tr>
    <td bgcolor="#FFFFFF"><h1>Welcome to NNET <c:out value="${requestScope.firstname}" /></h1>
    </td>
    </tr>
    </table>
    <br>
    <table width="100%" border="0" cellspacing="0">
    <tr>
    <td width="150"><table width="100%" border="1" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
    <tr>
    <td><strong>Main Links </strong></td>
    </tr>
    <c:forEach var="item" items="${requestScope.mainlink}">
    <tr>
    <td valign="top"><c:out value="${item}"/></td>
    </tr>
    </c:forEach>
    </table>
    <p> </p></td>
    <td><table width="100%" border="0" cellspacing="0" bgcolor="#FFFFFF">
    <tr>
    <td valign="top"><h2>Announcements</h2>
    <p>
    <c:forEach var="item" items="${requestScope.anouncement}">
    <c:out value="${item}" />
    </c:forEach>
    </p>
    </td>
    </tr>
    </table></td>
    <td width="150"> </td>
    </tr>
    </table>
    </body>
    </html>

    OK if you look at the code I pasted above I have doen that. I hav ethat book and it is good. My question is how do I get the data read into a multidemisional array or an arraylist like I am using in the code above so I can access that on the jsp page. Can you give an example. Here is what I want . I have a table called anouncements with 3 fields (ID, name, url) I am returning say 10 results. I want to store them in a single arraylist or multideminsional array and call them on the jsp page. What syntax would I use on the servlet and on the jsp page for this? I know how to do it as seen above when I return only one field with many results from the database. Thank you in advance for any help

  • Stupid Question but need help

    Hey Guys
    This is going to sound like a stupid question, but ive been wrecking my head now for about 2 hours on it, and cant find any help on the net.
    Im looking to create an image to add to a j2me application. And basically it cant find the image.
    The image is in my c:\images folder and its called pike.jpg, when i use the following the code it does not find the image
    image = Image.createImage("C:/images/pike.jpg");
    image = Image.createImage("C/images/pike.jpg");
    image = Image.createImage("C:/\images/pike.jpg");
    image = Image.createImage("C:\\images/pike.jpg");Yet when i place it in my working directory and use
    image = Image.createImage("/pike.jpg");It works fine, basically how do i point to the directory c:\images\pike.jpg in java
    Thanks

    Mr.E.H. wrote:
    The MIDP one.
    http://java.sun.com/javame/reference/apis/jsr118/
    Thanks. Now that is clarified, I can see from the documentation:
    The name parameter is a resource name as defined by Class.getResourceAsStream(name) . The rules for resolving resource names are defined in the Application Resource Files section of the java.lang package documentation.
    So it's not a file name. The string you pass must be findable via the classpath.
    So, if C:\images is included in your classpath (which you'll need to do for this example), then just use "/pike.jpg" and have that file live in the images directory only.

  • Midlet - running in FX question

    Howdy. Using NB 6.8 set to run Mobile for an FX project. I have 2 questions on the code here:
    1) Why does the phone emulator come up empty (white screen), instead of displaying the app title and content text in the scene?
    2) Why does the ReadFile.java class never get hit (using the debugger) or print the contents of "thisfile.txt" located in my root folder?
    * Main.fx
    * Created on Mar 13, 2010, 9:31:50 AM
    package javafxapplication94;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    function run(){
    var rf = new javafxapplication94.ReadFile();
    rf.startApp();
    Stage {
        title: "Application 94 title"
        scene: Scene {
            width: 50
            height: 40
            content: [
                Text {
                    font : Font {
                        size : 16
                    x: 10
                    y: 30
                    content: "Application 94 content"
            };and..........
    package javafxapplication94;
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class ReadFile extends MIDlet {
    @Override   public void startApp() {
            try {
                Class c = this.getClass();
                InputStream is = c.getResourceAsStream("/thisfile.txt");
                StringBuffer str = new StringBuffer();
                byte b[] = new byte[1];
                while ( is.read(b) != -1 ) {
                    str.append(new String(b));
                is.close();
                System.out.println(str);
            catch (IOException e) {
                e.printStackTrace();
       @Override   public void destroyApp(boolean b) {}
       @Override   public void pauseApp() {}
    No errors when run. Thanks!

    I tried a few more things. Mainly extending the ReadFile class and binding to its output in the scene. Still get a white emulator screen, nothing prints out in debug, no error....!
    * Main.fx
    * Created on Mar 13, 2010, 9:31:50 AM
    package javafxapplication94;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    var rf = new ReadFileStuff;
    Stage {
        title: "Application 94 title"
        scene: Scene {
            width: 50
            height: 40
            content: [
                Text {
                    font : Font {
                        size : 16
                    x: 10
                    y: 30
                    content: bind rf.startApp2()
    package javafxapplication94;
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class ReadFile extends MIDlet {
    @Override   public void startApp() {
       @Override   public void destroyApp(boolean b) {}
       @Override   public void pauseApp() {}
    package javafxapplication94;
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    * @author Gary
    public class ReadFileStuff extends ReadFile {
        public String startApp2() {
            String a = "";
            try {
                Class c = this.getClass();
                InputStream is = c.getResourceAsStream("/thisfile.txt");
                StringBuffer str = new StringBuffer();
                byte b[] = new byte[1];
                while (is.read(b) != -1) {
                    str.append(new String(b));
                is.close();
                System.out.println(str);
                a = str.toString();
            } catch (IOException e) {
                e.printStackTrace();
            System.out.println("a = " + a);
            return a;
    }

  • Questions on Print Quote report

    Hi,
    I'm fairly new to Oracle Quoting and trying to get familiar with it. I have a few questions and would appreciate if anyone answers them
    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    Thanks and Appreciate your patience
    -PC

    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    I think I posted it in one of the threads2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    Yes, your understanding is correct.3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    No, there is no conc program getting called, you can directly call a report in a browser window, Oracle reports server will execute the report and send the HTTP response to the browser.4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    This is detailed in many threads.Thanks
    Tapash

  • Satellite P300D-10v - Question about warranty

    HI EVERYBODY
    I have these overheating problems with my laptop Satellite P300D-10v.
    I did everything I could do to fix it without any success..
    I get the latest update of the bios from Toshiba. I cleaned my lap with compressed air first and then disassembled it all and cleaned it better.(it was really clean insight though...)
    BUT unfortunately the problem still exists...
    So i made a research on the internet and I found out that most of Toshiba owners have the same exactly problem with their laptop.
    Well i guess this is a Toshiba bug for many years now.
    Its a really nice lap, cool sound (the best in laptop ever) BUT......
    So I wanted to make a question. As i am still under warranty, can i return this laptop and get my money back or change it with a different one????
    If any body knows PLS let me know.
    chears
    Thanks in advance

    Hi
    I have already found you other threads.
    Regarding the warranty question;
    If there is something wrong with the hardware then the ASP in your country should be able to help you.
    The warranty should cover every reparation or replacement.
    But I read that you have disasembled the laptop at your own hand... hmmm if you have disasembled the notebook then your warrany is not valid anymore :(
    I think this should be clear for you that you can lose the warrany if you disasemble the laptop!
    By the way: you have to speak with the notebook dealer where you have purchased this notebook if you want to return the notebook
    The Toshiba ASP can repair and fix the notebook but you will not get money from ASP.
    Greets

  • Question regarding NULL and forms

    Hi all, i have a survey that im working on that will be sent via email.
    I'm having an issue though. if i have a multiple choice question, and the user only selects one of the choices, all the unselected choices return as NULL. is there a way i can filter out anytihng that says "NULL" so it only shows the selected options?
    thanks.
    here is the page that retrieves all the data. thanks
    <body>
    <p>1) Is this your first visit to xxxxxxx? <b><%=request.getParameter("stepone") %></b>
    </p>
    <p> </p>
    <p>2) How did You Learn About xxxxxxx?</p>
    <p><b><%=request.getParameter("steptwoOne") %></b>
      <br>
        <b><%=request.getParameter("steptwoTwo") %></b>
      <br>
        <b><%=request.getParameter("steptwoThree") %></b>
      <br>
        <b><%=request.getParameter("steptwoFour") %></b>
      <br>
        <b><%=request.getParameter("steptwoOther") %></b>
    </p>
    <p> </p>
    <p>3) What was your main reason for visiting xxxxx?</p>
    <p><b><%=request.getParameter("stepthreeOne") %></b>
        <br>
          <b><%=request.getParameter("stepthreeTwo") %></b>
        <br>
          <b><%=request.getParameter("stepthreeThree") %></b>
        <br>
          <b><%=request.getParameter("stepthreeFour") %></b>
        <br>
          <b><%=request.getParameter("stepthreeOther") %></b>
    </p>
    <p>4) did you find the information you were looking for on this site?</p>
    <p><b><%=request.getParameter("stepfour") %>
    <br>
    <b><%=request.getParameter("stepfourOther") %></b>
    </b></p>
    <p>5) Do you plan on using this website in the future?</p>
    <p><b><%=request.getParameter("stepfive") %></b></p>
    <p>6) What is your gender</p>
    <p><b><%=request.getParameter("stepsix") %></b></p>
    <p>7) What is your age group</p>
    <p><b><%=request.getParameter("stepseven") %></b></p>
    8) Would you like to take a moment and tell us how we can improve your experience on xxxxxxxxxx?
    <p><b><%=request.getParameter("stepeightFeedback") %></b></p>

    i was messing around and came up with this. it doesnt remove the null, but if it is null it adds ABC beside it. so i think i might be getting close. i just need to figure out how to replace the null.
    code]
    <b><%=request.getParameter("steptwoFour") %></b>
         <% if (request.getParameter("steptwoFour") == null ) {
         %>
         <% out.print("abc"); %>
         <% }
         %>

  • Anyone know how to remove Overdrive books from my iphone that have been transferred from my computer? They do not show up on itunes. I see a lot of answers to this question but they all are based on being able to see the books in iTunes.

    How do I remove Overdrive books from the library that were downloaded onto my computer then transferred to my iphone? The problem is that they do not show up in iTunes.
    I see this question asked a lot when I google, but they always give answers that assumes you can find the books in iTunes either under the books tab, or the audio books tab or in the music. They do not show up anywhere for me. They do not remove from the app like the ones I downloaded directly onto my iphone.the related archived article does not answer it either.  I even asked a guy working at an apple store and he could not help either.   Anybody...?
    Thanks!

    there is an app called daisydisk on mac app store which will help you see exactly where the memory is focused and consumed try using that app and see which folders are using more memory

  • Basic question

    Hello, i have a basic question. if i have defined 2 fields in a cube or a dso:
    Name Quantity
    and from the external flat file i get some characters for my quantity field. would my load fail?  for standard dso and for write optimized?
    NOTE: quantity field is a keyfigure defined as numeric.
    and the load coming in has "VIKPATEL" for Quantity field and not numbers.
    thanks

    Hi Vik,
    Yes, the load will fail.
    May be you coud first load this data into BW (into PSA) and set both fields as characters fields. Then you can create DSO, do transformation from this PSA to the DSO, and put your logic as to what do you want to do with those Quantity that is not number (e.g. convert to 0, or 'Not assgined', etc).
    You can use transfer rule, or a clean up ABAP code in the start routine.
    Hope this helps.

  • Mid 2010 15" i5 Battery Calibration Questions

    Hi, I have a mid 2010 15" MacBook Pro 2.4GHz i5.
    Question 1: I didn't calibrate my battery when I first got my MacBook Pro (it didn't say in the manual that I had to). I've had it for about a month and am doing a calibration today, is that okay? I hope I haven't damaged my battery? The calibration is only to help the battery meter provide an accurate reading of how much life it has remaining, right?
    Question 2: After reading Apple's calibration guide, I decided to set the MacBook Pro to never go to sleep (in Energy Saver System Preference) and leave it on overnight so it would run out of power and go to sleep, then I'd leave it in that state for at least 5 hours before charging it. When I woke up, the light on the front wasn't illuminated. It usually pulsates when in Sleep. Expectedly, it wouldn't wake when pressing buttons on the keyboard. So, what's happened? Is this Safe Sleep? I didn't see any "Your Mac is on reserve battery and will shut down" dialogues or anything similar, as I was asleep! I've left it in this state while I'm at work and will charge it this afternoon. Was my described method okay for calibration or should I have done something different?
    Question 3: Does it matter how quickly you drain your battery when doing a calibration? i.e is it okay to drain it quickly (by running HD video, Photo Booth with effects etc) or slowly (by leaving it idle or running light apps)?
    Thanks.
    Message was edited by: Fresh J

    Fresh J:
    A1. You're fine calibrating the battery now. You might have gotten more accurate readings during the first month if you'd done it sooner, but no harm has been done.
    A2. Your machine has NOT shut down; it has done exactly what it was supposed to do. When the power became critically low, it first wrote the contents of RAM to the hard drive, then went to sleep. When the battery was completely drained some time later, the MBP went into hibernation and the slepp light stopped pulsing and turned off. In that state the machine was using no power at all, but the contents of your RAM were still saved. Once the AC adapter was connected, a press of the power button would cause those contents to be reloaded, and the machine would pick up again exactly where you left off. It is not necessary to wait for the battery to be fully charged before using the machine on AC power, but do leave the AC adapter connected for at least two hours after the battery is fully charged. Nothing that you say you've done was wrong, and nothing that you say has happened was wrong.
    A3. No, it does not matter.

Maybe you are looking for

  • How do we  difference between condition type   pr00 and pr02  in pricing

    hi sap - sd experts , please help on  below issues . why the pr00 only picks in pricing instread of pr02  under similar circumstances like access sequence and  table. what make the difference  between pr00 and pr02 .. regards srini reddy 91 - 9663 08

  • 340AP only working as a Survey Client?

    I have a 342 AP that will not allow me to set it for AP/Infrastructure mode - it wants to revert to Survey Client at every boot. It's running 4.25 and 11.07 - what am I missing?

  • BuildDatabase.Execute failed

    I'm using awxml.jar in my Java application to create and populate analytic workspace. In my code I created 1 Analytic Workspace, 1 cube, 3 dimensions and 1 measure. The code also handles all the mappings and associations. I then call AW.Create( )and

  • Hr2000 firmware upgrade troubles with external triggering mode

    Hello, Has anyone had any problems with the latest Ocean Optics HR2000+ firmware upgrade while using external triggering mode? I'm using the NI-provided drivers for HR2000+ which used to work without a problem before the driver update. My program syn

  • Need help on subform

    hai everybody,                      I am using subform for creating a table in interactive form in NW 2004s.I am able to correctly get the data in rows that i have binded dynamically using datasource property. My problem is in my application i am hav