Finding taglib's from war files

          Within a war file, I have a jsp which lies within a directory called /phase1 underneath the document root,
          containing the line:
          <%@ taglib uri="../xlab-taglib.tld" prefix="xlab" %> (1)
          which is saying that the taglib is in the directory above, which is the document root. So when
          xlab-taglib.tld is in the document root, everything works fine on JRun & Tomcat, but on Weblogic,
          I get this error:
          Fri Jan 05 13:52:13 GMT 2001:<I> <ServletContext-geneExp> looking for taglib uri ../xlab-taglib.tld as resource /WEB-INF/../xlab-taglib.tld in Web Application root:
          Fri Jan 05 13:52:13 GMT 2001:<E> <ServletContext-geneExp> Cannot find resource '../xlab-taglib.tld' in document root 'D:\weblogic\myserver\geneExp.war'
          Fri Jan 05 13:52:13 GMT 2001:<E> <ServletContext-geneExp> Cannot find resource '/WEB-INF/../xlab-taglib.tld' in document root 'D:\weblogic\myserver\geneExp.war'
          Fri Jan 05 13:52:13 GMT 2001:<I> <ServletContext-geneExp> looking for taglib uri ../xlab-taglib.tld as resource ../xlab-taglib.tld in Web Application root:
          So for some reason weblogic starts looking for the tag-lib from /WEB-INF, whereas Tomcat & JRun
          both start from the directory that the calling jsp is in (/phase1).
          (In fact, either way you end up at the document root, but weblogic doesn't seem to like the fact that I'm
          trying to go up a level from WEB-INF).
          If I change the line (1) to:
          <%@ taglib uri="xlab-taglib.tld" prefix="xlab" %> (2)
          and put xlab-taglib.tld under /WEB-INF, then (on weblogic) the error is eliminated, but Tomcat and
          JRun then both fail because they're looking in the document root for the tag-lib, but now it's in WEB-INF.
          I've also tried including several variations of the taglib element in the web.xml file, e.g.:
          <taglib>
          <taglib-uri>../</taglib-uri>
          <taglib-location>xlab-taglib.tld</taglib-location>
          </taglib>
          or
          <taglib>
          <taglib-uri></taglib-uri>
          <taglib-location>xlab-taglib.tld</taglib-location>
          </taglib>
          (or not including it at all), but none of these variations seem to make any difference on either
          webserver.
          Does anyone know how to solve this?
          Thanks,
          Steve Hargreaves
          

          Within a war file, I have a jsp which lies within a directory called /phase1 underneath the document root,
          containing the line:
          <%@ taglib uri="../xlab-taglib.tld" prefix="xlab" %> (1)
          which is saying that the taglib is in the directory above, which is the document root. So when
          xlab-taglib.tld is in the document root, everything works fine on JRun & Tomcat, but on Weblogic,
          I get this error:
          Fri Jan 05 13:52:13 GMT 2001:<I> <ServletContext-geneExp> looking for taglib uri ../xlab-taglib.tld as resource /WEB-INF/../xlab-taglib.tld in Web Application root:
          Fri Jan 05 13:52:13 GMT 2001:<E> <ServletContext-geneExp> Cannot find resource '../xlab-taglib.tld' in document root 'D:\weblogic\myserver\geneExp.war'
          Fri Jan 05 13:52:13 GMT 2001:<E> <ServletContext-geneExp> Cannot find resource '/WEB-INF/../xlab-taglib.tld' in document root 'D:\weblogic\myserver\geneExp.war'
          Fri Jan 05 13:52:13 GMT 2001:<I> <ServletContext-geneExp> looking for taglib uri ../xlab-taglib.tld as resource ../xlab-taglib.tld in Web Application root:
          So for some reason weblogic starts looking for the tag-lib from /WEB-INF, whereas Tomcat & JRun
          both start from the directory that the calling jsp is in (/phase1).
          (In fact, either way you end up at the document root, but weblogic doesn't seem to like the fact that I'm
          trying to go up a level from WEB-INF).
          If I change the line (1) to:
          <%@ taglib uri="xlab-taglib.tld" prefix="xlab" %> (2)
          and put xlab-taglib.tld under /WEB-INF, then (on weblogic) the error is eliminated, but Tomcat and
          JRun then both fail because they're looking in the document root for the tag-lib, but now it's in WEB-INF.
          I've also tried including several variations of the taglib element in the web.xml file, e.g.:
          <taglib>
          <taglib-uri>../</taglib-uri>
          <taglib-location>xlab-taglib.tld</taglib-location>
          </taglib>
          or
          <taglib>
          <taglib-uri></taglib-uri>
          <taglib-location>xlab-taglib.tld</taglib-location>
          </taglib>
          (or not including it at all), but none of these variations seem to make any difference on either
          webserver.
          Does anyone know how to solve this?
          Thanks,
          Steve Hargreaves
          

Similar Messages

  • How to find largest number from text file

    I am using the "Read from text file" block to read the data from my .txt file into labview.  It is now in string format.  I have many numbers in the file.  
    For example:
    0.45
    0.35
    0.12
    1.354
    1.56
    2.89
    5.89
    0.56
    That is what a text file might look like.  I want to find which of these numbers is largest, and do calculations with that number.  I am having trouble with strings/number formats/arrays, etc.  Thanks
    Solved!
    Go to Solution.

    The spreadsheet functions and VIs typically work on strings representing numbers separated by delimiters.  This is a typical way to save a "spreadsheet" (of numbers) to a text file, for example .csv files.  These are quite versatile and powerful functions.  Spend a bit of time becoming familiar with them because you may find yourself using them a lot.
    Lynn

  • Class file missing from war file deployment

    I have a web application that is being deployed to a war file. I have deployed several times successfully. Then with the latest changes, there is a class file that does not get included into the war file. It does get compiled and does exist in the project directory.
    The class file is in a seperate project from the project where the war file deployment profile is; however both projects are in the same workspace.
    There are several other classes in the project that contains the missing class file that does get included in the war file. I don't see anywhere in the profile where these files are selected individually.
    I'm at a loss as to how to fix this problem other than add the file after deployment.
    Appreciate any help or ideas...
    Keith...

    Hi Keith,
    You may want to follow this thread....
    class object missing from ear file
    Brigette

  • SJWS SP3 - Not including some jars from war file

    I have a problem when deploying my application using the new Java Web Server SP3 that when my application is deployed my weblogic.jar and j2ee.jar are not included in the classpath that is created.
    I have turned on finest detail logging and it does not say why these jar files are not being included in the path.
    They are in the war files lib dir just like all the other jars(about 14 of them).
    The only way I can get the app to run under SJWS is to add these other two files manualy to the classpath in the server.xml file.
    This app runs fine under JRun 4.0 with no issues.
    Why is this server dropping these jars and not even telling me it did it? What can I do to make it include these files in the proper classpath?
    Thx

    Here are the log entries.
    finer: WebappLoader[/vc]: WEB3107: Deploy WAR /WEB-INF/lib/weblogic.jar to
    C:\Sun\WebServer6.1\https-mis-lt-23974.corporate\webapps\XXXXXXX\WEB-INF\lib\weblogic.jar
    finer: WebappLoader[/vc]: WEB3107: Deploy JAR /WEB-INF/lib/j2ee.jar to
    C:\Sun\WebServer6.1\https-mis-lt-23974.corporate\webapps\XXXXXXX\WEB-INF\lib\j2ee.jarAs you can see it see's the two jar files from my WAR file.
    But when I try and run the app, have a look at the CLASSPATH it created. The two jar's are missing. WHY??????????????
    info: for host 127.0.0.1 trying to GET /vc/login/jsp/login_redirect.jsp, service
    -j2ee reports: WEB2798: [] ServletContext.log(): WEB4077: Classpath from the ser
    vlet context is:
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/NetComponents.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/aseclient.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/client.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/dbswing.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/dx.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/xxx-xxxxtags.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/xxx-xxxxxtags.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/internetbeans.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/jbcl.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/jcert.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/jnet.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/log4j.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/regexp.jar;
    C:/Sun/WebServer6.1/https-mis-lt-23974.corporate/webapps/XXXXXXX/WEB-INF/lib/xerces.jar;
    /C:/Sun/WebServer6.1/bin/https/jar/webserv-rt.jar;/C:/j2sdk1.4.2_04/lib/tools.jar;
    /C:/Sun/WebServer6.1/bin/https/jar/webserv-ext.jar;
    /C:/Sun/WebServer6.1/bin/https/jar/webserv-jstl.jar;
    /C:/Sun/WebServer6.1/bin/https/jar/ktsearch.jar;
    /C:/app/XXXXXXX/;
    /C:/j2sdk1.4.2_04/jre/lib/ext/dnsns.jar;
    /C:/j2sdk1.4.2_04/jre/lib/ext/ldapsec.jar;
    /C:/j2sdk1.4.2_04/jre/lib/ext/localedata.jar;
    /C:/j2sdk1.4.2_04/jre/lib/ext/sunjce_provider.jar

  • Running Oracle Reports via a client using system.exec call from war file

    Hi all,
    I am trying to deploy a war file application to a J2EE 10.1.3 application server. The deployment successfully completes. However testing the application fails.
    When testing, the application reveals that calling a Oracle Reports 6i client (using a cmd line exec) from the war file returns application errors. The errors we get from executing the call below (using debug statements), creates this error:
    OperatingSystemCmd: cmd = D:\Oracle\Dev6i\BIN\rwcli60 MODULE="CLTMLST" USERID="<userid>/<pwd>@<db>" DESTYPE="FILE" DESFORMAT="PDF" DESNAME="<path>\<pdf filename>.PDF" PARAMFORM="NO" BACKGROUND="NO" SERVER="r6i.world" TOLERANCE=0 ADVCODE="<param>"
    OperatingSystemCmd: Command returned 3
    WrsRunReport: Done executing report
    WrsRunReport: Error running report Return code 3
    Error on Screen is REP-0178 : Cannot connect to reports service.
    However running the same command from a operating system command prompt in windows reveals that the command runs successfully.
    Is there any particular OC4J J2EE settings that are required to get this statement to run properly?
    Any help is most appreciative.
    Cheers
    Rodney

    Hi All,
    From much research and experimenting to get this to work I looked at the java.lang.Runtime class and noticed that seperate processes can be started using this very important Java class.
    The first thing that I experimented with was in regards to seeing the environment OC4J runs against. Using the java.lang.Runtime class I executed a standard "cmd /c set" command in my Windows environment, and noticed that Oracle Application Server uses its own environment and not a standard windows login environment for its OC4J containers. Apache Tomcat on the other hand uses the standard user login environment.
    So to get the application to be able to work properly we needed to override the particular environment the process needed to be able to get it to work. There is a exec command which allows you to override completely the environment for a process you would like to run. This method call does not in any way shape or form change the standard OC4J environment. This was done by executing the same "set" but with the overriden environment. Note that no environment variables from the OC4J container are carried into this new environment.
    Cheers
    Rodney

  • Can't read JSP from WAR file

              Hi, Everyone:
              The WAR really drives me crazy.
              everytime when i reach the jsp files in war, it throws exception:
              <I> <WebAppServletContext-skylos> Generated java file:
              C:\weblogic\myserver\_tmp_war\jsp_servlet\common\test.java
              <E> <WebAppServletContext-skylos> Servlet failed with Exception
              java.lang.NullPointerException
              at java.util.Hashtable.put(Hashtable.java:380)
              at weblogic.servlet.jsp.OneOffJspLoader.loadClass(JspStub.java:433)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              i uses WLS5.1 SP6.
              my WAR is under /weblogic/myserver/ (i can load html from my war)
              thanks
              han
              

              i solved it.
              it is about relative path and absolute path.
              coz browser tries to search /common/checklogin.jsp
              from documentRoot.
              han
              "hansen" <[email protected]> wrote:
              >
              >i solved it.
              >
              >the reason is i didn't install SP6 correctly.
              >
              >but i got another question:
              >
              >everytime, i enter password and login name on login.jsp
              >page,and press "Login". it should call checkLogin.jsp. but
              >the browser asks me to "save it" or "open it".
              >
              >thanks
              >
              >han
              >
              >han
              >
              >
              >"hansen" <[email protected]> wrote:
              >>
              >>Hi, Everyone:
              >>
              >>The WAR really drives me crazy.
              >>
              >>everytime when i reach the jsp files in war, it throws exception:
              >>
              >><I> <WebAppServletContext-skylos> Generated java file:
              >>
              >> C:\weblogic\myserver\_tmp_war\jsp_servlet\common\test.java
              >>
              >><E> <WebAppServletContext-skylos> Servlet failed with Exception
              >>
              >>java.lang.NullPointerException
              >>
              >> at java.util.Hashtable.put(Hashtable.java:380)
              >>
              >> at weblogic.servlet.jsp.OneOffJspLoader.loadClass(JspStub.java:433)
              >>
              >> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              >>
              >>i uses WLS5.1 SP6.
              >>
              >>my WAR is under /weblogic/myserver/ (i can load html from my war)
              >>
              >>thanks
              >>
              >>han
              >
              

  • Finding whole mapping from database file - filesystems - logical volume manager - logical partitions

    Hello,
    Trying to make reverse engeneering of database files and their physical carriers on logical partitions ( fdisk ).
    And not able to make whole path from filesystem down to partitions with intermediate logical volumes.
    1. select from dba_data_files ...
    2. df -k
    to get the listing of filesystems
    3. vgdisplay
    4. lvdisplay
    5. cat /proc/partitions
    6. fdisk /dev/sda -l
       fdisk /dev/sdb -l
    Problem I have is that not able to determine which partitions are consisten in logical volumes. And then which logical volumens are consisted in filesystem.
    Thank you for hint or direction.

    Hello Wadhah,
    Before start the discussion let me explain I am newcommer to Oracle Linux. My genetic with dba experience of Oracle is from IBM UNIX ( AIX 6.1 ) and Oracle 11gr2.
    First task is to get the complete picture of one database on Oracle Linux for future maintenance tasks and make database more flexible and
    preparing for more intense work:
    -adding datafiles,
    -optimize/replace archive redolog files on separated filesystem from ORACLE_BASE
    - separating auditing log files from $ORACLE_BASE to own filesystem
    - separating diag directory on separated file system ( logging, tracing )
    - adding/enlarging TEMP ts
    - adding/enlarging undo
    - enlarging redo for higher transaction rate ( to reduce number of switched per time perceived in alert_SID.log )
    - adding online redo and control files mirrors
    So in this context try to inspect content of the disk space from the highest logical level in V$, DBA views down to fdisk partitions.
    The idea was to go in these steps:
    1. select paths of present online redo groups, datafiles, controlfiles, temp, undo
       from V$, dba views
    2. For the paths got from the step 1
       locate filesystems and for those filesystems inspect which are on logical volumens and which are directly on partitions.
    3. For all used logical volumes locate the logical partitions and their disks /dev/sda, /dev/sdb, ...

  • Itunes can't find my music from old file

    Although my music is available on my ipad and phone, Itunes can't find and play my music on my laptop.  WTH?

    +changed the location of the music folder to E: iTunes Music.+
    All this does is make future additions go to that new place.
    When you move things around outside of itunes, it loses the path, as you've found.
    Can you move everything back and use the Consolidate Library command to move it to the new location?
    Here is a good article from iLounge on what you need to understand about the process.
    http://www.ilounge.com/index.php/articles/comments/moving-your-itunes-library-to -a-new-hard-drive

  • JDEV 10.1.3 EA1 - Error in running Imported war file (war file is correct)

    Hi
    Thank you for reading my post.
    I have an Odd problem with Jdev EA1
    I have a war file , I import it into Jdev (new /project/projects from war file)
    I should mention that this war file developed in Rational application developer (Struts based ,database, higly use of other Taglibs)
    Now when i try to run my imported application , it does not run at all, it stops with some errors :
    for example in compiler log it return error for following line :
         <logic:redirect page="<%=session.getAttribute("LastPage").toString() %>" />
    the error is :
         Error(29): Attribute: LastPage").toString() is not a valid attribute name
    Error(29): Attribute: % is not a valid attribute name
    Error(30): Encountered end tag </logic:present> without corresponding start tag.
    Also it returns :
         Error(32): Tag attempted to define a bean which already exists: currentModel
    Error(33): Tag attempted to define a bean which already exists: currentName
    for the following code :
    <logic:equal name="Language" value="en">
         <SCRIPT SRC="language-en.js"></SCRIPT>    /////line 32
         <SCRIPT SRC="ctst.js"></SCRIPT>               ////line 33          
    </logic:equal>
    I import it into netbeans and it run correctly on tomcat, i deploy it inot sun Java apps and it works ok.
    Even i tried Jboss , geronimo to test my application corectness
    Can you tell me what is wrong ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Allen,
    A JSP with web.xml web-app element
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    runs in JDeveloper 10.1.3
    thanks,
    Deepak

  • Unable to deploy a war file: could path length in a war file be an issue on WIN2K?

    Hi all,
    I am unable to auto deploy a web app as a war file but has no problem to auto deploy it as an exploded directory that I drop under the
    $PortalHome/config/mydomain/applications directory of the WebLogic Server installation.
    Portal Server runs under W2K.
    I noticed that the generated war file located under $PortalHome/config/mydomain/applications.wlnotdelete contains files which path is 10 level deep and may be over
    255 char.
    Could this be a problem?
    The error I got is:
    ####<Dec 27, 2001 3:29:13 PM PST> <Info> <HTTP> <EBRIDONNEAU> <portalServer> <main> <system> <> <101059> <[portalServer] Loading efs40 from WAR file:
    D:\Bea\wlportal4.0\.\config\portalDomain\applications\.wlnotdelete\wl_comp19136.war>
    ####<Dec 27, 2001 3:29:13 PM PST> <Info> <HTTP> <EBRIDONNEAU> <portalServer> <main> <system> <> <101031> <[WebAppServletContext
    (23419224,personalizedPortal,/personalizedPortal)] extracting classfiles to D:\Bea\wlportal4.0\config\portalDomain\applications\.wlnotdelete\WEB-INF
    \_tmp_war_portalServer_portalServer_personalizedPortal:>
    ####<Dec 27, 2001 3:29:20 PM PST> <Error> <HTTP> <EBRIDONNEAU> <portalServer> <main> <system> <> <101034> <[WebAppServletContext
    (23419224,personalizedPortal,/personalizedPortal)] failure extracting WAR classes>
    java.io.IOException: The system cannot find the path specified
         at java.io.Win32FileSystem.createFileExclusively(Native Method)
         at java.io.File.checkAndCreate(File.java:1162)
         at java.io.File.createTempFile(File.java:1247)
         at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:95)
         at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3359)
         at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:3330)
         at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:854)
    <snip>
    Thanks for any input.

    Puthanampatti, thanks for responding.
    What is the complete command line to deploy the war to a managed server, not Admin Server ?
    Our thinking is to deploy an exploded war directory but copy the descriptor files first.
    What do you think ?

  • Jdev EA1 return error in running an already tested war file (imported war )

    Hi
    Thank you for reading my post.
    I have an Odd problem with Jdev EA1
    I have a war file , I import it into Jdev (new /project/projects from war file)
    I should mention that this war file developed in Rational application developer (Struts based ,database, higly use of other Taglibs)
    Now when i try to run my imported application , it does not run at all, it stops with some errors :
    for example in compiler log it return error for following line :
         <logic:redirect page="<%=session.getAttribute("LastPage").toString() %>" />
    [/Code]
    the  error is :
         Error(29): Attribute: LastPage").toString() is not a valid attribute name
            Error(29): Attribute: % is not a valid attribute name
            Error(30): Encountered end tag </logic:present> without corresponding start tag.
    Also it returns :
         Error(32): Tag attempted to define a bean which already exists: currentModel
            Error(33): Tag attempted to define a bean which already exists: currentName
    for the following code :
    [CODE]
    <logic:equal name="Language" value="en">
         <SCRIPT SRC="language-en.js"></SCRIPT>    /////line 32
         <SCRIPT SRC="ctst.js"></SCRIPT>               ////line 33          
    </logic:equal>I import it into netbeans and it run correctly on tomcat, i deploy it inot sun Java apps and it works ok.
    Even i tried Jboss , geronimo to test my application corectness
    Can you tell me what is wrong ?

    Hi
    I think its serious , Jdev Does not works correctly with a correct war file ,
    some one from Jdev team should think about it.

  • How can I read only a line of text from a file, line by line using Scanner?

    Here's the code I currently have for a program that finds a keyword from numerous files and prints every line in every file that has that keyword. The keyword is indicated by the first parameter in a command line and the files are every parameter after that. Right now, with the code I have, the program will not print multiple lines of each file if they contain the keyword. I am trying to solve this problem by figuring out a way to have a loop continue until an \n EOL character is found. I am not sure how to do this though. Here's the portion of code that I would like to change to do this. I need to add a condition somewhere after in.hasNext() I think to stop when it it hits a /n.:
    while (in.hasNext()) {
                        count++;
                        String nextWord = in.next();
                        lineOfText.add(nextWord);
                        if (nextWord.equals(keyword)) {
                            flag = true;
    import java.util.Scanner;
    import java.io.IOException;
    import java.io.FileNotFoundException;
    import java.io.FileInputStream;
    import java.io.PrintWriter;
    import java.util.ArrayList;
    public class Find {
        static ArrayList<String> lineOfText = new ArrayList<String>();
        static boolean flag = false;
        public static void main(String args[]) {
                   run(args);
        public static void run(String args[]) {
            try {
                PrintWriter out = new PrintWriter("output.txt");
                String keyword = args[0];
                for (int i = 1; i < args.length; i++) {
                    Scanner in = new Scanner(new FileInputStream(args));
    int count = 0;
    while (in.hasNext()) {
    count++;
    String nextWord = in.next();
    lineOfText.add(nextWord);
    if (nextWord.equals(keyword)) {
    flag = true;
    if (flag == true) {
    System.out.print(args[i] + ": " );
    out.print(args[i] + ": " );
    for (String s : lineOfText) {
    System.out.print(s + " ");
    out.print(s + " ");
    System.out.print("\n");
    out.println(" ");
    lineOfText.clear();
    out.close();
    catch (FileNotFoundException e) {
    System.out.println("file not found!");
    catch (IOException e) {
    System.out.println(e);
    Thanks

    Well, I thought I had this program finished, then I realized I need to match the keyword anywhere in the file(including within a word) and print out each line that "contains" the keyword in each file. So, I need some way of testing to see if the keyword is a part of each word and then flag the line that contains the keyword. Is there some method to do this? Thanks
    Here's the code I have now:
    import java.util.Scanner;
    import java.io.IOException;
    import java.io.FileNotFoundException;
    import java.io.FileInputStream;
    import java.io.PrintWriter;
    public class Find {
        static String line = "";
        static boolean flag = false;
        static boolean flag2 = false;
        public static void main(String args[]) {
                    run(args);
        public static void run(String args[]) {
            try {
                PrintWriter out = new PrintWriter("output.txt");
                String keyword = args[0];
                System.out.print("Searching for the keyword: " + keyword);
                out.print("Searching for the keyword: " + keyword);
                System.out.print("  in files: ");
                out.print("  in files: ");
                for (int k = 1; k < args.length; k++)
                     System.out.print(args[k] + " ");
                     out.print(args[k] + " ");
                     System.out.println("\n");
                     out.println("");
                     out.println("");
                for (int i = 1; i < args.length; i++) {
                    Scanner in = new Scanner(new FileInputStream(args));
    while (in.hasNextLine()) {
    line = in.nextLine();
    String[] splitLine = line.split(" ");
    for (int j=0; j < splitLine.length; j++) {
    if (splitLine[j].equals(keyword) && flag2 == false) {
    flag = true;
    flag2 = true;
    System.out.print(args[i] + ": " + line + "\n");
    out.println(args[i] + ": " + line);
    flag2 = false;
    System.out.print("\n");
    out.println(" ");
    out.close();
    catch (FileNotFoundException e) {
    System.out.println("file not found!");
    catch (IOException e) {
    System.out.println(e);

  • Web application deployment failure when Mozilla Rhino 15R2 included in war file

    Hi Guys
    I'm currently attempting to deploy a web application under weblogic 6.1.
    The application makes use of Mozilla Rhino15R2, packaged in the file js.jar.
    With js.jar contained in the WEB-INF\lib directory in the war file, the
    application fails to install, the weblogic.log file has the following entry.
    ####<22-Oct-00 09:53:53 BST> <Info> <HTTP> <winnt2> <winnt2> <main> <system>
    <> <101053> <[HTTP winnt2] Loading web app: SWIFTAccessControl>
    ####<22-Oct-00 09:53:53 BST> <Info> <HTTP> <winnt2> <winnt2> <main> <system>
    <> <101059> <[winnt2] Loading SWIFTAccessControl from WAR file:
    I:\bea\wlserver6.1\.\config\mydomain\applications\.wlnotdelete\wl_comp53845.
    war>
    ####<22-Oct-00 09:53:53 BST> <Info> <HTTP> <winnt2> <winnt2> <main> <system>
    <> <101031>
    <[WebAppServletContext(6025277,SWIFTAccessControl,/SWIFTAccessControl)]
    extracting classfiles to
    I:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\WEB-INF\_tmp_wa
    r_winnt2_winnt2_SWIFTAccessControl:>
    ####<22-Oct-00 09:53:53 BST> <Debug> <HTTP> <winnt2> <winnt2> <main>
    <system> <> <101158> <Exception thrown while loading SWIFTAccessControl:
    java.lang.IllegalArgumentException: Prefix string too short>
    java.lang.IllegalArgumentException: Prefix string too short
    ####<22-Oct-00 09:53:54 BST> <Error> <J2EE> <winnt2> <winnt2> <main>
    <system> <> <160001> <Error deploying application SWIFTAccessControl: Could
    not load SWIFTAccessControl>
    If I rebuild the war file, excluding js.jar weblogic successfull deploys the
    application and I can access the application. Question has anyone come
    across a similar problem and does any one know of a solution. I'd be most
    grateful for any help on this one.
    Regards
    Tony

    Check this thread...
    Spring's JSF DelegatingVariableResolver cause InvocationTargetException

  • War-File without jsf-library

    Hello,
    I am using to pack the jar-files (myface-apl.jar, myface-impl.jar, common-*.jar,....) in WEB-INF/lib of War-file. It makes the large file, but I want to reduce the size of War-file. I want to separat the jar-files from War-file, because there are the jar-files in the Path default/deploy/jbossweb-tomcat55.sar/jsf-libs on JBOSS-Server 4.0.5.GA. How can I configure that war-file links to the jar-files in the jbossweb-tomcat55.sar/jsf-libs?
    Manuel

    Now I solved my problem.
    That code should be added in jbossweb-tomcat55.sar/conf/web.xml to make a reference to jbossweb-tomcat55.sar/jsf-libs/myfaces-impl-1.1.5.jar and tomahawk-1.1.5.jar
          <init-param>
             <description>MyFaces tlds</description>
             <param-name>tagLibJar0</param-name>
             <param-value>jsf-libs/myfaces-impl-1.1.5.jar</param-value>
          </init-param>
          <init-param>
            <description>Tomahawk tlds</description>
            <param-name>tagLibJar1</param-name>
            <param-value>jsf-libs/tomahawk-1.1.5.jar</param-value>
          </init-param>Thank you for posting.
    Manuel

  • Pre-load servlets from a war-file

    Hello,
              is there a way to pre-load a servlet (or execute any other code)
              at server startup, when the application is deployed as a .war-file?
              I know how to use the weblogic.servlet.utils.ServletStartup and
              the weblogic.system.startupClass... property, but these two
              seem to require that the servlet (or application class, respectively)
              are found in the servlet classpath (or the weblogic.class.path,
              respectively), so these mechanisms cannot peek into war-files to find
              the class, am I right?
              The page http://www.weblogic.com/docs51/classdocs/webappguide.html#dtprops
              says:
              <load-on-startup>load_order</load-on-startup>
              (Optional) This property is not honored by WebLogic Server in this release.
              Is this still valid?
              Is there a workaround?
              When will this element be supported?
              Concerning a possible workaround, I have read:
              > Subject: Re: Pre-load
              > Date: Fri, 19 Nov 1999 14:38:41 -0500
              > From: Jeff Martin <[email protected]>
              > Newsgroups: weblogic.developer.interest.servlet
              > Tom Gerber wrote:
              > >
              > > How do you get your startup class to start? Do you have a
              > > script which calls your startup class via a URL? Or is
              > > there a setting in the weblogic properties file for it?
              > Starting WebLogic in unix is a shell script. Just add a line to run your
              > preload program (e.g. java Preload).
              > Some unixes have utilities to get a web page from the command line (to
              > do shell parsing on it); create a series of calls, one per page.
              That sounds like a possibility, but I do not understand exactly.
              1) Where do I have to put the line into the shell script?
              2) Which line is it?
              3) What is the UNIX utility?
              I am using WL 5.1 (evaluation) under Solaris.
              Any help appreciated,
                   Oliver Matz
              | _ \ / \ | __)( ) Oliver Matz, Engineer
              | _/( () )| __) | | fon: +49(0)40/60990-0
              |_| \__/ |___) |_| fax: +49(0)40/60990-113
              

    Yes you can load a java applet form a jar file.
    Here is the code for internet explorer.
    <body>
         <table align="center" border="1">
              <tr>
                   <td>
                        <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="10" height="10" codebase="/plugin/">
                        <param name="code" value="XXX.class">
                        <param name="archive" value="XXX.jar">
                        </object>
                   </td>
              </tr>
         </table>
    </body>
    </html>
    Just replace the XXX.class with the class containing the init() method and XXX.jar with the jar file.

Maybe you are looking for

  • How can i stop itunes changing manually typed in genres when playing a track?

    hi, for a long time, itunes has been changing genre information that i typed in manually when playing a track, example giving "soundtrack" to "Filmmusik" or "rock" to "Rock" (i prefer lower case letters). until upgrading to itunes 11, it was able to

  • Error at run time When Access Web Service in web dynpro java

    Hi I am used web service created on other machine.I am used wsdl file created in web service. is there any setting on J2EE Engine server for accessing web service? after run web dynpro application it gives following error. The initial exception that

  • Work flow for leave request through email

    Hi guru, my issue is, when employee requesting for leave through Net viewer (ESS). it must be trigger to out-look email id of authorized person. plz suggest me how i have to do configuration for this. Thanks, Rajesh

  • Related to Transaction MB56

    Hi SAP Professional, I'm working on Transaction MB56 and wanted to display data in "Top-Down Analysis" and as well as "Bottom-Up Analysis" through OOPS ALV ONLY. If anybody's    have the code for the same then just let me know, how can I create Hiera

  • Error when run java file on windows 7 64bit

    unexpected failure: Error:Only x32 JVM supported java.io.IOException: Error:Only x32 JVM supported at com.adobe.air.ipa.IPAOutputStream.addInitialContent(IPAOutputStream.j ava:142) at com.adobe.air.ipa.IPAOutputStream.addFile(IPAOutputStream.java:96)