Jsp run from Different directory

It is possible to run .jsp file from some other directory not from webapps dir?
And i don't want to put my directory in webapps folder.
And if it is possible how ?

On Tomcat at least, /webapps is the deployment master directory for all apps. I don't know if Tomcat offers you an override of that directory name in server.xml or anywhere else.
As for JSP files, you can save them anywhere you want under your application directory (which yes, goes under /webapps/) and then map them using the <jsp-config> and <url-pattern> elements of your application's web.xml.
Here are a few possible resources:
[http://www.datadisk.co.uk/html_docs/java_app/tomcat6/tomcat6_web_config.htm|http://www.datadisk.co.uk/html_docs/java_app/tomcat6/tomcat6_web_config.htm]
[http://caucho.com/resin-4.0/admin/deploy-ref.xtp|http://caucho.com/resin-4.0/admin/deploy-ref.xtp]
[http://docs.oracle.com/cd/E12840_01/wls/docs103/webapp/web_xml.html|http://docs.oracle.com/cd/E12840_01/wls/docs103/webapp/web_xml.html]

Similar Messages

  • Running a java application from different directory

    I have the file in my
    c:/Folder/Program.java
    I want to compile and run it from D:/ (drive)i.e from different directory.
    Thanks in advance,
    Praveen.

    javac -cp c:\Folder c:\Folder\Program.java
    java -cp c:\Folder Program

  • Running  sql scripts from different directory

    Hi
    I have sql scripts in different directories as follows:
    D:\myapp\sql
    - load.sql
    - init.sql
    D:\myapp\sql\schema
    -users.sql
    -structure.sql
    D:\myapp\sql\populate\
    - data1.sql
    - data2/sql
    load.sql call all the other scripts as below:
    @init.sql
    @schema\users.sql
    @schema\structure.sql
    @populate\data1.sql
    @populate\data2.sql
    All my scripts run correctly when I run load.sql from D:\myapp\sql on comand prompt.
    I need a way to run this script from a different directory say D:\ or C:\
    I am writing a installer which will execute from a different directory.
    Right now I get a file not found error for scripts within schema an populate folder.
    Please let me know how can I make this work from a different directory.
    Thanks
    kelvin

    Hi peter. i think you cannot run files spread across different locations.
    --the method which u specified always looks to the defined path                                                                                                                                                                                                                                                                                       

  • How run JSP report from my directory on 9iDS & 9iAS

    How i can run .jsp report(web layout) from my directory now i have to copy jsp file in ORACLE_HOME\reports\j2ee\reports_ids\web directory then it is called by browser.
    Regards,
    Neeraj

    Hi Neeraj,
    There are two ways you can deploy your JSP-based Web reports: through the existing Reports application, and through a J2EE application you create yourself. Using an existing application is particularly useful when you are developing and
    testing your JSP-basedWeb reports.
    What you are doing is using the existing Reports application. In both methods you will have to do some manual work (copying the file into a directory where an existing Reports application is deployed, or packaging it and deploying it as a new application). It may not be possible to run the JSP reports (web layout) from your own directory.
    Navneet.

  • Importing class from different directory

    Hi, Can anyone tell me how to import a class from a different directory? I have a DGenerator class in ./generator directory.
    I have tried Import generator.DGenerator; to use the DGenerator class. However. I got the error:
    cannot access generator.DGenerator
    bad class file: ./generator/DGenerator.class
    class file contains wrong class: DGenerator
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    Help please.
    Thank you!

    I don't understand why this is a Swing question, but at any rate if you want your DGenerator class to be found in a particular directory, you must do one of two things:
    1. Put that directory in your classpath and just refer to the class as DGenerator.
    2. Make the class belong to the package "generator".

  • Including flash from different directory

    hi. I want to include swf file from another directory. I'm
    including flash in this way:
    *** file: flash/flash.cfm
    <script type="text/javascript"
    src="swfobject.js"></script>
    <div id="flashcontent"><strong>no
    flash</strong></div>
    <script type="text/javascript>
    var so = new SWFObject("flash.swf", "flash", "111", "200",
    "8.0.0", "#00000");
    so.addParam("allowScriptAccess", "sameDomain");
    so.addParam("menu", "false");
    so.write("flashcontent");
    </script>
    this file is located in directory flash with flash.swf file.
    Now, I wish to inlude the flash object into page from up
    directory. I try somthing like this:
    *** /test.cfm
    <cfinlude template="flash/flash.cfm>
    but i get message: no flash (from div). My question is: how
    to attach swf file from another directory?

    hi. I want to include swf file from another directory. I'm
    including flash in this way:
    *** file: flash/flash.cfm
    <script type="text/javascript"
    src="swfobject.js"></script>
    <div id="flashcontent"><strong>no
    flash</strong></div>
    <script type="text/javascript>
    var so = new SWFObject("flash.swf", "flash", "111", "200",
    "8.0.0", "#00000");
    so.addParam("allowScriptAccess", "sameDomain");
    so.addParam("menu", "false");
    so.write("flashcontent");
    </script>
    this file is located in directory flash with flash.swf file.
    Now, I wish to inlude the flash object into page from up
    directory. I try somthing like this:
    *** /test.cfm
    <cfinlude template="flash/flash.cfm>
    but i get message: no flash (from div). My question is: how
    to attach swf file from another directory?

  • RMI client running from different machine giving error

    HI all
    I am trying to run the sample application getStart hello world.
    I am able to run the java applet from the same machine ....
    but i am get error when i am trying run client applet from the different machine .
    (HelloApplet exception: access denied (java.net.SocketPermission)
    client applet on machine1 and server and registory on machine2 in same lan .
    i copied the Helloapplet.class and Helloclient.html to machine1.
    appletviewer Helloclient.html
    but the java version is different in both machines.......
    can any one give some idea ....
    the errror i am geting is :
    HelloApplet exception: access denied (java.net.SocketPermission Neind-ws-003 res
    olve)
    java.security.AccessControlException: access denied (java.net.SocketPermission N
    eind-ws-003 resolve)
    at java.security.AccessControlContext.checkPermission(AccessControlConte
    xt.java:272)
    at java.security.AccessController.checkPermission(AccessController.java:
    399)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1042)
    at java.net.InetAddress.getAllByName0(InetAddress.java:559)
    at java.net.InetAddress.getAllByName0(InetAddress.java:540)
    at java.net.InetAddress.getByName(InetAddress.java:449)
    at java.net.Socket.<init>(Socket.java:100)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
    SocketFactory.java:25)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
    SocketFactory.java:120)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:499)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:190
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Naming.java:84)
    at examples.hello.HelloApplet.init(HelloApplet.java:23)
    at sun.applet.AppletPanel.run(AppletPanel.java:344)
    at java.lang.Thread.run(Thread.java:484)
    The helloapplet.java code is :
    package examples.hello;
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.rmi.Naming;
    import java.rmi.RemoteException;
    public class HelloApplet extends Applet {
    String message = "blank";
    // "obj" is the identifier that we'll use to refer
    // to the remote object that implements the "Hello"
    // interface
    Hello obj = null;
    public void init() {
         try {
              System.out.println("Path looking: " +getCodeBase().getHost());
         //obj = (Hello)Naming.lookup("//" +
              //     getCodeBase().getHost() + "/HelloServer");
                   obj = (Hello)Naming.lookup("//Neind-ws-003/HelloServer");
         message = obj.sayHello();
         } catch (Exception e) {
         System.out.println("HelloApplet exception: " +
                        e.getMessage());
         e.printStackTrace();
    public void paint(Graphics g) {
         g.drawString(message, 25, 50);
    The helloclient.html code:
    <HTML>
    <title>Hello World</title>
    <center> <h1>Hello World</h1> </center>
    The message from the HelloServer is:
    <p>
    <applet
              code="examples.hello.HelloApplet"
    width=500 height=120>
    </applet>
    </HTML>

    Your problem is at the following line.
    obj = (Hello)Naming.lookup("//Neind-ws-003/HelloServer");
    The line you had commented beforehand is
    //obj = (Hello)Naming.lookup("//" +
    // getCodeBase().getHost() + "/HelloServer");
    This worked because the applet was being retreived from the same server where the RMI server exists.
    Remember, applets can only connect themselfs to the same host they are stored in and retreived from. This is because of VM, the sandbox does not allow you to connect to other machines other than the server where it resides on. If you use a applet viewer it might work if you loosen the security features. On a browser i do not belive it can be done. Maybe if you modify your security options for the VM you are able to achieve something, but personally i'm going for the "It cannot be done " answer because of what I said before.
    Hope this helps
    If any trouble then reply and I'll answer later.
    Rui P.

  • Specify a exe running from certain directory from java program

    Hi there,
    I had a java program, which will spawn some child process to run vb COM;
    what I wanted to do: have a child process start the COM from a specific diretory?
    IS there any way to do it from Java, like shell programming?
    Thanks

    I do all my portable shell stuff now in ant.. http://jakarta.apache.org/ant/
    it is an XML driven java script for doing builds.. but it can be used for shell scripting.
    They are also some java scripting languages like jPython but i am not very familiar with them.
    u can also get Cygwin and write unix shell scripts. www.cygwin.com
    hope this helps

  • Allow apps to run from specific directory

    This is more of an MS thing, but I've a question about group policies.
    We're using the "Run only allowed Windows applications" policy to specifiy which apps users can run. We now need to allow a group of many apps, instead of adding each one individually, I'd like to specify a directory so that anything in this directory can be ran.
    I don't see this setting in the adm I have. I've search for an updated XP SP3 adm hoping that maybe it's in there but cannot find it.
    Anyone have any ideas?

    I'm not sure, but everything that is possible should be covered here.
    http://technet.microsoft.com/en-us/l.../bb457006.aspx
    Craig Wilson - MCNE, MCSE, CCNA
    Novell Knowledge Partner
    Novell does not officially monitor these forums.
    Suggestions/Opinions/Statements made by me are solely my own.
    These thoughts may not be shared by either Novell or any rational human.
    "jdwall" <[email protected]> wrote in message
    news:[email protected]..
    >
    > This is more of an MS thing, but I've a question about group policies.
    >
    > We're using the "Run only allowed Windows applications" policy to
    > specifiy which apps users can run. We now need to allow a group of many
    > apps, instead of adding each one individually, I'd like to specify a
    > directory so that anything in this directory can be ran.
    >
    > I don't see this setting in the adm I have. I've search for an updated
    > XP SP3 adm hoping that maybe it's in there but cannot find it.
    >
    > Anyone have any ideas?
    >
    >
    > --
    > jdwall
    > ------------------------------------------------------------------------
    > jdwall's Profile: http://forums.novell.com/member.php?userid=2475
    > View this thread: http://forums.novell.com/showthread.php?t=389537
    >

  • All labview Vi's load from different directory

    OK this may be a stupid question but I done a save with options/ include VI.llbs. on my machine and now when I create a new vi whenever I try to put something on the block diagram it tells me that it is loading the files from the library that i saved for distribution. It only does this when I have the top level vi open of the library and try to open a new blank vi. It even does it when I open labview then open a blank vi and put anything down on the diagram and it does not give me this. then I can open up the top level vi from the library in question and put the same thing on the diagram and it will give me the warning. Maybe this is normal behavior, I don't know.
    It just seams kind of funny that it would try to lo
    ad NI VI's from the llb instead of mine. Hope some can shed some light on this. I do not want to mess anything up.
    thanks in advance.
    Joe
    Joe.
    "NOTHING IS EVER EASY"
    Attachments:
    labview.jpg ‏32 KB

    If I understand what you are saying, this is annoying, but normal behavior.
    LabVIEW can only have one VI of a specific name in memory at a time. So if you have the top level VI in question open, all of it's sub-vis get loaded into memory. So then if you create a new VI and drop the 'General Error Handler.vi' from the palette, it will use the one already in memory from your library.
    Creating a new VI right after you start LabVIEW will let you use the vi.lib files, but then when you open your application from the library, it must use any vi.lib files that are in memory first.
    Usually it's best not to save a .llb with the vi.lib files unless it's required for source code control. Then it's a good idea to use the Development Environment Applicaiton
    Builder from OpenG to build the library for you. This will add a suffix you specify to every VI in the library and relink them to their callers. This way, other VIs you open will use the vi.lib files.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • URGENT: How to run a Java program from a different directory?

    Hi.
    How do I run a Java program from a directory that the file is not located in? So lets say im in c:\Java. But the file is in c:\Java\abc\efg\.
    What would be the command to run the Java file from c:\Java.
    I can't remember it and I need it asap.
    Cheers.

    If the class you are trying to run is MyApp.class, try
    c:\Java\>java -cp abc\efg MyAppThe actual classpath you specify will depend on whether or not MyApp.class is in a package (I've assumed it isn't) and whether or not any 3rd party jars are involbed (I've assumed not).
    Edited by: pbrockway2 on Apr 1, 2008 6:42 PM
    The command arguments read as "Run the MyApp class using as a classpath abc\efg relative to here (c:\Java)".

  • How to call a jsp page from oaf and run in jDeveloper

    Hi all,
    I created sample jsp and then tried.
    String temp = "sample.jsp?";
    pageContext.setForwardURL(temp,
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    It worked.
    But when i tried with one of the custom page that i downloaded from server it is giving error.
    But now i need to call that page.
    Its Code is given on below link:
    Re: how to call a jsp page from oaf
    Please help me to do this.
    Thanks in advance.
    Regards,
    Raj

    Raj,
    1. Hope you have placed the custom jsp page (which you have downloaded from server) under "jdevhome\jdev\myhtml\OA_HTML" directory ?
    2. Try to run the custom jsp page from Jdeveloper directly and check whether its working properly or not ?
    (i.e. add jsp page to any project in Jdeveloper then right click on jsp page and select Run xxx.jsp)
    3. If page errors out then custom jsp page seems require few parameters to run it successfully. Pass all requied parameters and test.
    4. There is no problem in the way you are calling jsp page from OAF page.
    regards,
    Anand

  • Running a JSP file from the IDE causes error

    When I try to run a JSP file from a list of project files, I'm getting the following error:
    - C:\jdev\jdev9.0.3.4\jdev\mywork\ei_SmartWS\JavaEdge.war!\JavaEdge\src\web\WEB-INF\jsp\searchFormContent.jsp
    X Error: JSP files must reside in the server root directory or a subdirectory beneath it
    Anyone knows why it's doing this?

    Or Web app root, of course:
    your-web-app ---> JSPs, HTML pages here
    WEB-INF ---> web.xml goes here
    classes ---> Loose .class files go here.
    lib ---> 3rd party JAR files go here.
    MOD

  • How to run a Oracle 9i .JSP report from outside 9i Reports Builder

    Hi,
    I have successfully created a .JSP report from within 9i Reports Builder. It runs fine and generates desired output using Run -> Web Layout from the Reports Buider menu. The output is a .htm one.
    Now, my requirement is to run this .JSP from my application without using Reports Builder. In other words, I want to integrate this .JSP with my existing application which will fetch data dynamically for the user. There is no hint to this solution in the 9i Reports Tutorial available at OTN.
    A sample code would be highly helpful.
    Regards,
    - Partha

    partha,
    you deploy a reports-jsp to your oracle9i application server like any other JSP. copy it to a directory in the application servers document tree.
    when you execute the reports-jsp it will need a reports server (in process or stand alone) to execute since the actual data-management is done by the reports-server.
    regards,
    philipp
    PS : if you have further reports related questions, you might want to post those in the reports forum here on OTN.

  • Run program from any directory on Linux

    Hi, I'm using a shell on a Sun computer to run a Java program.
    The program requires the user to specify the name of an output file and and then an input file, manipulates the text in the input file, and prints it to the output file.
    I would like to be able to run the program from any directory.
    An IOException occurs if the input file is not in the same directory as the directory where you run the program.
    If I have an input file which I want to manipulate in a different directory to where the actual program files are located (.java and .class), how do I specify that?
    Thanks

    When you execute a java program from a given directory, all relative file paths (i.e. foo.txt) are resolved using the current directory. You can most likely run the program from anywhere as long as you specify an absolute path to your files and have permissions to both read and write. I say most likely because you could be doing something incorrectly in your code.
    If you want to run a program from anywhere, it must be:
    1) on your PATH
    2) be able to find its classes
    An easy way to do that is write a small "wrapper" shell script and put that on your path.
    I guaruntee you that a wise combination of terms used in this reply to compse a search engine query will yield you a useful tutorial or example.

Maybe you are looking for

  • Migration from 8.1.6.0.0 - 9.2.0.6.0

    Hi all, I need some help with migrating a Database from an old Server to a new one. Here is the Scenario: An old DB (Oracle Version 8.1.6.0.0) runs on an old Server, which needs to be replaced with new Hardware. The new Hardware runs Oracle 9.2.0.6.0

  • Disable / re-assign key lock button on top of device

    Hi, I'd appreciate your help please.  How can I disable or re-assign the key lock button on the top of my 9320? Thanks Andy Solved! Go to Solution.

  • How to make the headings bold of a csv file

    Hi, I am able to create .csv file, is there a way to make the content bold programmtically for the headings? thanks Shubha

  • How to query webservice datacontrol from bean

    Hi all, In Jdeveloper 11 I have a web-service based data-control. In order to perform some checks, I need to query that DC from within a bean. Only question is, how to do that? If it were a 'normal' VO based DC I would use something like this: DCBind

  • Opening I Photo images and Apple works drawings, after installing time mach

    I cant open documents and images compiled using apple works, after I installed my new 27inch 3.06 ghz intel core 2 duo OS10.6.2 all my file ikons are there but are white, I finished a dwing in my existing and prefered apple works drawing program save