Problem for ResourceBundle calling from jsp file

Hi, I am using WebLogic 5.1 in Solaris 8
          I use java.util.resourceBundle to get the information from a .properties
          file
          I put the properties file in /opt/weblogic/myserver/serverclasses
          When I call the properties file from EJB, It seems to be OK
          But when I call the properties file from JSP using the same script, It said
          the properties files not found
          The Error message is:
          <ServletContext-General> Servlet fail
          ed with Exception
          java.util.MissingResourceException: Can't find bundle for base name
          test.dbini,
          locale zh_TW
          at
          java.util.ResourceBundle.throwMissingResourceException(ResourceBundle
          .java:707)
          at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:679)
          at java.util.ResourceBundle.getBundle(ResourceBundle.java:546)
          at
          jsp_servlet._test._global_95_variable._jspService(_global_95_variable
          .java:85)
          at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
          at
          weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
          pl.java:105)
          at
          weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
          pl.java:123)
          at
          weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
          textImpl.java:742)
          at
          weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
          textImpl.java:686)
          at
          weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
          ContextManager.java:247)
          at
          weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
          a:361)
          at
          weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
          PLease Help!!
          Regards,
          Fannie
          

Hi,
open dataset file for input in text mode.
check sy-subrc = 0.
while sy-subrc = 0.
  read dataset file into wa.
  if sy-subrc = 0.
  append wa to itab.
  else.
    exit.
  endif.
endwhile.
close dataset file.
regards
Siggi
PS: check also the F1-help for open, read and close statements!

Similar Messages

  • Scheduling Problem for uploading Data from Flat file to SAP

    Hi guys,
    I am facing a weared problem in uploading some leave records in z table. The code is working fine if we run it through se38 after selecting the file from a shared location from production server which has all the access rights.
    This folder lies in the \usr folder of SAP Production.
    I have kept all the Flat files in the shared path "
    Tis-mum-iz-s1\migration\SAP-INT\leave\" ...
    To give u exact directory structure..
    Tis-mum-iz-s1 is the Server Name
    usr is the SAP System folder used for uploads and downloads
    usr |
    ...-> Migration |
                      -> SAP-INT |
                                 -> leave -> (Flat Files)
    Migration folder is shared with all rights.
    Obviously, we cannot give shared drive as the variant in the scheduler.
    So i use the system path i.e. \usr\sap\tmp\migration\sap-int\leave\ as the variant.
    All my other download programs are working fine with this path as a variant...
    But my this particular upload program does not work with this path....
    I am giving u my code...
    TATA INTERACTIVE SYSTEMS (A Division of TATA INDUSTRIES LIMITED)
    REPORT      :  ZMIGRATE_ZLEAVE
    DESCRIPTION :  To Upload the Leave data. (ZLEAVE)
    CREATED BY  :  Abhishek Bachhawat
    CREATED ON  :  01.09.2005
    CONSULTANT  :  ANAND
    REPORT  ZMIGRATE_ZLEAVE.
    TABLES: ZLEAVE.
    data: begin of wtab,
              MANDT(3),
              ZLVID(8),
              PERNR(8),
              ZSTDT(8),
              ZENDT(8),
              ZDAYS(4),
              AEDAT(8),
              ERDAT(8),
          end of wtab,
          itab like WTAB occurs 0 WITH HEADER LINE.
    data: temp like zleave occurs 0 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK file
                   WITH FRAME TITLE text-005.
    parameters: file like rlgrap-filename Obligatory.
    Concatenate File SY-DATUM '_Leave.txt' into File.
    SELECTION-SCREEN END OF BLOCK file.
    at SELECTION-SCREEN ON VALUE-REQUEST FOR file .
      CALL FUNCTION 'WS_FILENAME_GET'
        IMPORTING
          FILENAME = file.
      IF SY-SUBRC <> 0.
      ENDIF.
    start-of-selection.
      if file ne space.
        CALL FUNCTION 'WS_UPLOAD'
          EXPORTING
            FILENAME = FILE
            FILETYPE = 'DAT'
          TABLES
            DATA_TAB = ITAB.
      else.
        message e000(zps) with 'Specify a file'.
      endif.
      SORT ITAB BY ZLVID.
      LOOP AT ITAB.
        REFRESH TEMP.
        CLEAR TEMP.
        TEMP-MANDT = sy-mandt.
        TEMP-ERDAT = SY-DATUM.
        TEMP-ZLVID = ITAB-ZLVID.
        TEMP-PERNR = ITAB-PERNR.
        TEMP-ZSTDT = ITAB-ZSTDT.
        TEMP-ZENDT = ITAB-ZENDT.
        TEMP-ZDAYS = ITAB-ZDAYS.
        TEMP-AEDAT = ITAB-AEDAT.
        TEMP-ERDAT = ITAB-ERDAT.
        APPEND TEMP.
        SELECT SINGLE *
               FROM   ZLEAVE
               WHERE  ZLVID = TEMP-ZLVID
               AND    PERNR = TEMP-PERNR.
        IF SY-SUBRC = 0.
          UPDATE ZLEAVE SET ZSTDT = TEMP-ZSTDT
                            ZENDT = TEMP-ZENDT
                            ZDAYS = TEMP-ZDAYS
                            AEDAT = TEMP-AEDAT
                            ERDAT = TEMP-ERDAT
                 WHERE ZLVID = TEMP-ZLVID
                 AND   PERNR = TEMP-PERNR.
        ELSE.
          INSERT ZLEAVE FROM TABLE TEMP.
          COMMIT WORK.
        ENDIF.
      ENDLOOP.

    Hi,
    open dataset file for input in text mode.
    check sy-subrc = 0.
    while sy-subrc = 0.
      read dataset file into wa.
      if sy-subrc = 0.
      append wa to itab.
      else.
        exit.
      endif.
    endwhile.
    close dataset file.
    regards
    Siggi
    PS: check also the F1-help for open, read and close statements!

  • IE 6 giving the problems while downloading content from JSP File

    Hi,
    I am trying to download the file JSP, Blwo is the test code
    <%
    response.setContentType("application/csv");
    response.setHeader("Content-Disposition", "filename=commissionData.csv;");
    %>
    This     is     test
    This     is     test1
    This     is     test2
    When I try to load this file in IE 6, The error message comes like below
    "Internet Explorer cannot download MyJsp.jsp from localhost.
    Internet Explorer was not able to open this Internet site. The
    requested site is either unavailable or cannot be found. Please try
    again later."
    Can anyone help me in this regards.
    Thanks in advance
    Shailesh S Deshpande

    works fine for me on Tomcat 4.
    What server are you using?
    Is it running? Try restarting it.

  • Calling method from jsp file

    Hi
    is it possible to call any method with in the class except handle method from jsp file?

    You can call , but it would not be a good design approach.A droplet can do the same task for you.
    otherwise :
    eg :
    <%@ page import="com.mypackage.MyClass"%>
    for Static access :
    <%
    String test= MyClass.myMethod();
    %>
    for normal classes :
    <%
    MyClass object = new MyClass();
    String test= object .myMethod();
    %>
    http://stackoverflow.com/questions/10918526/call-java-method-in-jsp-file
    http://www.javaworld.com/javaworld/jw-05-2003/jw-0523-calltag.html?page=2
    ```
    Praveer
    Edited by: Praveer Rai on Mar 26, 2013 5:08 PM

  • How to call a .jsp file from Applet

    Could any one guide me how to call a .jsp file from a Applet using action Event.
    Thanks

    http://javaalmanac.com/cgi-bin/search/find.pl?words=URL+post

  • Problem with accessing init parameters from JSP file

    Hi,
    I have my init parameters and Jsp configured in web.xml
    <servlet>
              <servlet-name>TestJsp</servlet-name>
              <jsp-file>/Test.jsp</jsp-file>
              <init-param>
                   <param-name>username</param-name>
                   <param-value>Balboa</param-value>
              </init-param>
    </servlet> How do I access 'username' field from JSP file.
    Kindly help.
    Thanks.

    you can do this in the jsp
    <%=config.getInitParameter("username")%>or do it in the jspInit method in the jsp:
    <%!  String userName = null; 
      public void jspInit() {   
        ServletConfig config = getServletConfig();   
        userName   = config.getInitParameter("userName ");  
    %>
    Hello <%=userName%>

  • Calling oracle reports from jsp file

    how to pass parameters from jsp file oracle reports.i am getting reports wihtout passin parameters.
    pls help me
    urgent
    vasavadatta

    Karthik,
    You might want to repost this question to the reports forum - you'll be more likely to get a response from a reports expert.
    Thanks
    Blaise

  • I am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    i am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    hi TimoHahn,
    i am getting following exception in JDeveloper(11g release 2) Studio Edition Version 11.1.2.4.0 but it works perfectly fine in JDeveloper 10.1.2.1.0
    Root cause of ServletException.
    java.lang.NullPointerException
    at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:136)
    at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
    at java.util.ResourceBundle.getString(ResourceBundle.java:334)
    at org.rbi.cefa.master.actionclass.UserAction.execute(UserAction.java:163)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

  • Dynamic Internal Table for reading data from external file

    Hello All,
    The task was to create a internal table with dynamic columns,
    Actually this is my first task in the WebAS 6.20, my program is based on input file provided by user with certain effort. this file can have different effort for a one yr to five year frame..
    I needed to read the raw data from file, based on months create a internal table to hold the data, after this i need to validate the data...
    I have browsed thru dynamic internal table topic, but couldn't find any dynamic appending structure, the dynamic structure would contains 12 month fileds.
    can any one help me in getting my task completed..
    Thanks
    Kumar

    Hi,
    I see that you posted the same question a couple of days ago at Dynamic Internal Table for reading data from external file Didn't Charles's response address your problem?
    Regards

  • How to make SOAP call from jsp

    how can i make a SOAP call from JSP.
    I'm new to this.
    This is my requirement
    After the user logs in i need to make a soap call to a given url.
    i need to fill two values in the xml. i have the value with me.

    Although you could do it, why would you put this kind of logic into a presentation file like JSP? It depends on the API you want to use:
    Try this one:
    https://jax-ws.dev.java.net/
    MeTitus

  • TIFF-VIs for reading/writing from/to files

    To whom it may concern,
    I'm looking for TIFF-VIs for reading/writing from/to files
    for Labview 6 without any add-on package.
    Unfortunately I can't use TiffRd04 and TiffSv05 from
    Koji Ohashi due to the different file format!
    Any hints?
    Thank you in advance. Best regards from Germany
    Udo Weik

    Hi Udo,
    did you check these TIFF related libraries? .. maybe one of them is working.
    Good Luck

  • How to run .ksh file in unix from .jsp files

    Hi frnd,
    How to connect unix servers from .jsp file & I want to run unix scripts .ksh files from .jsp files
    Thanku
    bhupathipawan

    It is usually a bad idea to do any major processing directly within a JSP. It is better to create a helper class and invoke methods on that. This helper class can then be tested outside of the inhospitable JSP environment.
    To run the '.ksh' file you will need to use either Runtime.exec() or the more modern ProcessBuilder. You will save yourself a lot of grief if you read thoroughly the 4 sections of http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html and then implement the recommendations.
    Note - although the 'traps' article is written around the use of Runtime.exec(), it's content is equally applicable to ProcessBuilder.

  • I'm having problems using Firefox when opening up PDF files that are called from jsp.

    I'm trying to open my billing statement in pdf format. When I click on the link, Firefox 4 takes me to the dowload page and starts to download a readPDF.jsp file. How come Firefox is asking for that? When I use IE 7 I get no problems. Please advise on how to get Firefox to open jsp files automatically.

    I have same problem too

  • Calling RDF files from JSP files

    Hi,
    I created a report file using Oracle 9i Report Builder and save it as RDF extension.After that I deployed it into the server and it's working properly.But, when I created a simple JSP file(not a report) and try to call that RDF file from this JSP file,the web browser prompts for downloading the entire RDF file.Is there any way to aviod this prompting, and make it to proper ruuning from that JSP ??
    Thanks &Regards
    Rajesh K.R

    You are in the wrong forum
    Go to Reports

  • How to call a jsp file from an servlet and access the jsp file objects??

    Hi everybody
    I have an jsp file where it contains a vector object with some data and I have a servlet that needs to access this vector object . How can my servlet call for this jsp page and get the vector object. ?
    then an applet will be calling this servlet to get some other object created with the data contained within this vector object...so each time Applet ask the servlet for the object the servlet need to call for this jsp page somehow
    My main question is the communication servlet-jsp
    please if u have any clue I will appreciate it
    thanks

    Hi
    There are several ways to share objects between JSPs/Servlets.
    You can share objects by putting them in the request-in which case the objects lifetime is limited by that of the request, Another way is to store them in the session, againg the lifetime is limited by the lifetime of the session. To have objects that have to persistent over the application life-span use the servletContext to store the objects.
    Any good tutorial should help you get started. Please see the link below for a tutorial on Servlets/JSPs
    Note: Local variables in the JSP cannot be shared with other components as their scope is limited to that particular Page/Servlet.
    Link: http://java.sun.com/docs/books/tutorial/servlets/
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc
    http://www.sun.com/developers/support

Maybe you are looking for

  • View, Clustur & Pooled Table

    Hi, I have few questions on the above topics. How can we retreive data from View , Clustur & Pooled Table using Select statements. If possible can you explain me with an example. what kind of data can we retreive from them . for example BSEC - how ca

  • How to find out the common things between two rpds?

    How to find out the common things between two rpds? And place the common things in a common RPD.

  • Printing of subcontracting  challan

    Hello Experts Pl guide me how to print the subcontract challan after reconcillation. Thx Umesh

  • How to use smart groups?

    I am now unable to use my smart groups. If I do the command A in the address silhouette in a new message, only one smart group appears. I can't seem to expand my smart groups listings when I do this. Help! Thank you.

  • Message Control in sales order

    Could some one help me to change the message control from Info to Error for Application area V1 (sales order) Thanks