My Classes folder

Hi,
This is my first day working on Jdeveloper. I have configured the database and create anoe dummy page. The page was succesfully created and run succesfully, but when i tried to build the project (OAWorkspace1), myclasses folder not created. Please help. Thanks

Hi,
Does your page has an associated controller ?
do you have an environment variable JDEV_USER_HOME set to path <JDEVRootPath>\jdevhome\jdev
Regards
Ivar

Similar Messages

  • Class not found in web-inf/classes folder of war file within ear file

    Hi all,
              I am using Weblogic 8.1 sp4. I have a war file within an ear file. I am trying to deploy the war file with a few classes within its web-inf/classes folder, however when the classes are in that folder I consistently get a class not found exception when trying to instantiate them. If I package the classes in a jar file and then put that jar file within the web-inf/lib folder of the war, the classes are also not found.
              If I put these two classes in the app-inf/classes folder of the ear file, everything works as expected and the classes are found.
              Any ideas of why this is happening. This seems to be a very simple thing that should work, but appears to not be working at all.
              thanks in advance for any suggestions or ideas.

    Hi,
              This is a known limitation/issue with WL. There is also no way around this.
              Regards,
              LG

  • WEBINF/classes folder contents packed in _wls_cls_gen!.jar on server start

    Hi,
    I'm having an issue with respect to deploying my project application in weblogic application server 9.2.
    I'm creating a war file in which I'm packaging all application contents which includes the /WEBINF/classes contents.
    I deployed the war in admin console, associated it with a managed server. When I started the managed server. I could see that all /WEBINF/classes contents have got packaged in wlscls_gen!.jar automatically. Because of this, Im getting ClassNotFoundException for all java classes which were supposed to be in /WEBINF/classes directory.
    Is there any workaround to knock off this dynamic jar and retaining the /WEBINF/classes folder contents even after server start.
    Any help would be appreciated
    Thanks

    Hi,
    The creation of wlscls_gen.jar file can not be avoided. This is a problem with WebLogic. The only way to avoid it is by creating JAR files on your own and then keeping them inside "WEB-INF/lib" directory.
    *Topic:  wlscls_gen.jar Issue*
    http://middlewaremagic.com/weblogic/?p=408
    There is no WAY to tell WebLogic to Not to create this Problematic JAR.
    Thanks
    Ravish Mody

  • Can't find the Classes folder in j2sdkee1.3.1

    hi
    I am working on a project on JSP and EJB. For my JSP file i have a class file which i need to save in the classes folder under lib folder in j2sdkee. But i didn't find any such folder, i even tried to re-install the software but its of no use. Can any one tell me Where to Save the CLASS file in j2sdjee1.3.1.

    TooMuchConfusionException
    If you have a class to be called from the JSP, place it in WEB-INF/classes directory under your web app directory... not in the lib directory.
    I wonder how you manage to work on EJB...
    ***Annie***

  • Customizing the classes folder contents during build

    Hello,
    Can I have non java source files, get copied to the build folder after doing a project build? Lets say that in src folder you have the following structure:
    |--src
      |--project1
        |--Class1.java
        |--Class1.htmlAfter doing a build on a project with the above source structure, you get the following contents in the classes folder:
    |--classes
      |--project1
        |--Class1.classJDeveloper by default wont copy the Class1.html file into the build folder. I know I can customize this in the case of a web app by editing the deployment profile and playing with the WEB-INF/classes contributors, but can I achieve the same thing using the normal build inside JDev without deploying to a WAR, and without going for an ant build file? I tried using the Project Contents link in the Project Properties to achieve the same effect, but I couldnt get the same result. Is this possible?
    Thanks

    Hi,
    The creation of wlscls_gen.jar file can not be avoided. This is a problem with WebLogic. The only way to avoid it is by creating JAR files on your own and then keeping them inside "WEB-INF/lib" directory.
    *Topic:  wlscls_gen.jar Issue*
    http://middlewaremagic.com/weblogic/?p=408
    There is no WAY to tell WebLogic to Not to create this Problematic JAR.
    Thanks
    Ravish Mody

  • APP-INF/classes folder

    Anyone know where is the APP-INF/classes folder in Workshop? Is there a way to create it in Workshop?
    Thanks!

    Hi,
    I have the classes packaged correctly under the App-inf folder. But still i get the same error
    The domain structure is as follows
    Myapplication
    |->App-INF->classes->mypackage
    |->expressWebApp
    |->expressWebEJB
    |->expressWebWebEJB
    |->Meta-INF
    The mypackage contains the exact folder structure like
    com\bellatlantic\eo\service\user\User.class
    Any idea why this error is comin out
    Moreover i cannot give these classes on the classpath as it would remove the hot deployment feature.
    right now we have give the classes on the classpath and we have to restart the server for every small change we make
    Any help in this regard would be greatly appreciated
    Thanks,
    Rajkumar
    Message was edited by rajkumarc_2000 at Oct 18, 2004 11:03 PM

  • J2EE Classes Folder

    Hi All,
    I have installed J2EE 1.3.1 on windows XP, But the installation is not creating the classes folder where the class files are to be added. I have also tried the new version of J2EE but get the same result. Can someone please help me out here & tell me what is going wrong or what i am doing wrong???
    Thanks & Regards,
    Cooljacks

    When I look at $APPSERVER/lib, there's no classes directory. There's one in $APPSERVER/domains/$DOMAIN/lib, but it's empty for me; I imagine if you need it to be there, you could just create it?

  • Access servlets from subdirectory of classes folder

    Hi,
    This is my directory structure.
    Tomcat home dir>webapps\lessons\WEB-INF \classes\examples\HelloClientServlet.class
    and here is my web.xml
    <servlet>
    <servlet-name>HelloClientServlet</servlet-name>
    <servlet-class>examples.HelloClientServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloClientServlet</servlet-name>
    <url-pattern>/servlet/examples.HelloClientServlet</url-pattern>
    </servlet-mapping>
    Now I run run Tomcat and try to access the URL
    http://localhost:8083/lessons/servlet/examples.HelloClientServlet
    It gives this ERROR:
    javax.servlet.ServletException: Error allocating a servlet instance
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    java.lang.Thread.run(Thread.java:534)
    root cause
    java.lang.NoClassDefFoundError: examples/HelloClientServlet (wrong name: HelloClientServlet)
    java.lang.ClassLoader.defineClass0(Native Method)
    java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    Now here is the problem. I tried putting HelloClientServlet.class in classes directory and made appropriate changes to web.xml and it works.
    But not in the subdirectory classes. I find it very strange. I feel there is no problem with my web.xml file. Am I am missing some configuration here.
    Please give you inputs.
    Thanks,
    Tick_Tick

    When you put the HelloClientServlet class in the examples folder and reference it using examples.HelloClientServlet then the class needs to be compiled in the examples package.
    Check out the Java tutorial on packages:
    http://java.sun.com/docs/books/tutorial/java/interpack/index.html

  • Servlet classes folder

    hello everyone
    im new in servlet, my question is which folder should i dump my servlet file in tomcat-4.0.1
    and how can i invoke this servlet from my html files.my servlet compile good but i dont know which folder should i put this file
    thankz

    If your servlet is in package "yourpackage", place the class file in
    .../WEB-INF/classes/yourpackage/YourServlet
    where WEB-INF is under your app's document root.
    To invoke this servlet from HTML, code
    href="servlet/yourpackage.YourServlet"
    or
    ACTION="servlet/yourpackage.YourServlet"You could also use a servlet mapping in web.xml if you wish to hide the full name.
    For more info, see http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

  • How to use Classes stored in "Classes" folder in JSP with tomcat ?

    Hello friends
    im using tomcat as server and MySQL as a Backend. now i am using the date calculation in Diff.class files which i have stored in catalina_home/webapps/prj_dev/Prj_files/classes/diff/DIff.class.
    now i am getting error that :
    Generated servlet error:
    Only a type can be imported. diff.Diff resolves to a package
    wht i have to do ?

    I don't include the "classes" word in my import anymore.. Waa.. I'm going nuts.. T.T
    Now, I'm trying to use the class through useBean..
    this is how my application looks like:
    /webapps
    -----/hangman-jsp
    ------------index.jsp
    ------------/WEB-INF
    -------------------web.xml
    -------------------MysteryPhrase.java
    -------------------/classes
    ---------------------------/beans
    ----------------------------------MysteryPhrase.class
    -----------/images
    -------------------hangman.gif
    This is what is in my MysteryPhrase:
    package beans;
    import java.lang.String;
    import java.lang.StringBuffer;
    public class MysteryPhrase {
         private String answer;
         private StringBuffer mysteryPhrase;
         private int guesses;
         private char[] alphabet;
         public MysteryPhrase () {
         this.alphabet = new char[26];
    public void setMysteryPhrase (String mysteryPhrase) {
         this.answer = mysteryPhrase;
         this.mysteryPhrase = new StringBuffer(mysteryPhrase.length());
         for (int i = 0; i < mysteryPhrase.length(); i++) {
              this.mysteryPhrase.setCharAt(i, '_');
    public void setGuess (char guess) {
         for (int i = 0; i < answer.length(); i++) {
              if (answer.charAt(i) == guess) {
                   mysteryPhrase.setCharAt(i, guess);
         guesses++;
    public String getMysteryPhrase () {
         return mysteryPhrase.toString();
    public String getAnswer () {
         return answer;
    public int getGuesses () {
         return guesses;
    This is what is in my index.jsp (It is not yet finished..I just started..)
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <jsp:useBean id="phrase" class="beans.MysteryPhrase"/>
    <jsp:setProperty name="phrase" property="MysteryPhrase" value="Hello!"/>
    <html>
         <head>
              <title>JSP/JSTL Implementation of Hangman</title>
              <style type="text/css">
                   div {
                        color: white;
                        background-color: gray;
                        position: absolute;
                        border-style: solid;
                        border-width: thin;
                        width: 20%;
                        height: 30%;
                        text-align: center;
                   #guessBoard {
                        top: 28%;
                        left: 42%
                   #mysteryPhraseBoard {
                        top: 50%;
                        left: 25%;
                        z-index: 2;
                   #statisticsBoard {
                        top: 57%;
                        left: 58%;
                        z-index: 2;
                   #categoryBoard {
                        top: 23%;
                        left: 10%
                   #hangman {
                        top: 7%;
                        left: 70%;
                   #char {
                        width: 20px;
                   body {
                        background-color: black;
              </style>
         </head>
         <body>
              <div id="categoryBoard">
                   <form method="post">
                        Please choose a category:
                        <select name="category">
                             <option>Category 1</option>
                             <option>Category 2</option>
                             <option>Category 3</option>
                             <option>Category 4</option>
                             <option>Category 5</option>
                             <option>Category 6</option>
                             <option>Category 7</option>
                             <option>Category 8</option>
                        </select>
                        <input type="submit" value="Change"/>
                   </form>
              </div>
              <div id="mysteryPhraseBoard">
                   The mystery phrase is
              </div>
              <div id="guessBoard">
                   <form method="post">
                        Enter a letter: <input id="char" type="text" name="letter"/>
                        or
                        Enter a word: <input type="text" name="word"/>
                        <input type="submit" value="Guess"/>
                   </form>
              </div>
              <div id="statisticsBoard">
                   Guesses: 0
                   Remaining Letters: 8
              </div>
              <div id="hangman">
                   <img src="images/hangman.gif"/>
              </div>
         </body>
    </html>

  • Cant find Classes folder in my J2sdkee1.3.1

    Its not j2sdjee1.3.1 but j2sdkee1.3.1

    This might not relate to this case, but anyway:why
    do all those people that write they're currently
    working on an EJB-or-whatnot project post their
    trivial questions in here instead of simply askinga
    co-worker? It can't be because they don't want to
    appear clueless to their co-workers, I bet theystill
    do nevertheless.I bet they'd be put in just for the sake of getting
    something out of the,... I know a few software
    companies who behave like "Three newbies put
    together could do the job of a person working for 3
    years". This one might be falling under the same
    category. When they ask questions... which obviously
    is greek to them... they sound funny to their
    co-workers.
    I train a few like these nowadays. *SIGH*
    ***Annie***More likely the entire team is made up of those newbies and all of them are as clueless as the poster so even with their combined mental powers (or lack thereof) they can't arrive at even blatantly obvious answers.
    But maybe I'm overly sarcastic, it has been suggested to me at times that I have the tendency ;)

  • The name "Folder" does not exist in the namespace

     I am trying to learn Wpf and doing some of the examples on the Microsoft site. https://msdn.microsoft.com/en-us/library/vstudio/bb546972(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
    I am using Visual studio 2013. As I work through the example I am getting the following error. 
    Error 1
    The name "Folder" does not exist in the namespace "clr-namespace:FolderExplorer".
    c:\users\hbrown\documents\visual studio 2013\Projects\FolderExplorer\FolderExplorer\MainWindow.xaml
    11 17
    FolderExplorer
    Error 2
    The name "Folder" does not exist in the namespace "clr-namespace:FolderExplorer".
    c:\users\hbrown\documents\visual studio 2013\Projects\FolderExplorer\FolderExplorer\MainWindow.xaml
    16 7
    FolderExplorer
    Here is the code:
    <Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:my="clr-namespace:FolderExplorer"
        Title="Folder Explorer" Height="350" Width="525">
        <Window.Resources>
            <ObjectDataProvider x:Key="RootFolderDataProvider" >
                <ObjectDataProvider.ObjectInstance>
                    <my:Folder FullPath="C:\"/>
                </ObjectDataProvider.ObjectInstance>
            </ObjectDataProvider>
            <HierarchicalDataTemplate 
       DataType    = "{x:Type my:Folder}"
                ItemsSource = "{Binding Path=SubFolders}">
                <TextBlock Text="{Binding Path=Name}" />
            </HierarchicalDataTemplate>
        </Window.Resources>
    I have a class file named Folder.vb with this code. 
    Public Class Folder
        Private _folder As DirectoryInfo
        Private _subFolders As ObservableCollection(Of Folder)
        Private _files As ObservableCollection(Of FileInfo)
        Public Sub New()
            Me.FullPath = "c:\"
        End Sub 'New
        Public ReadOnly Property Name() As String
            Get
                Return Me._folder.Name
            End Get
        End Property
        Public Property FullPath() As String
            Get
                Return Me._folder.FullName
            End Get
            Set(value As String)
                If Directory.Exists(value) Then
                    Me._folder = New DirectoryInfo(value)
                Else
                    Throw New ArgumentException("must exist", "fullPath")
                End If
            End Set
        End Property
        ReadOnly Property Files() As ObservableCollection(Of FileInfo)
            Get
                If Me._files Is Nothing Then
                    Me._files = New ObservableCollection(Of FileInfo)
                    Dim fi As FileInfo() = Me._folder.GetFiles()
                    Dim i As Integer
                    For i = 0 To fi.Length - 1
                        Me._files.Add(fi(i))
                    Next i
                End If
                Return Me._files
            End Get
        End Property
        ReadOnly Property SubFolders() As ObservableCollection(Of Folder)
            Get
                If Me._subFolders Is Nothing Then
                    Try
                        Me._subFolders = New ObservableCollection(Of Folder)
                        Dim di As DirectoryInfo() = Me._folder.GetDirectories()
                        Dim i As Integer
                        For i = 0 To di.Length - 1
                            Dim newFolder As New Folder()
                            newFolder.FullPath = di(i).FullName
                            Me._subFolders.Add(newFolder)
                        Next i
                    Catch ex As Exception
                        System.Diagnostics.Trace.WriteLine(ex.Message)
                    End Try
                End If
                Return Me._subFolders
            End Get
        End Property
    End Class
    Can someone explain what is happening. 
    Thanks Hal

    Did you try to build the application (Project->Build in Visual Studio) ? If the error doesn't go away then and you have no other compilation errors (if you do you need to fix these first), you should replace "FolderExplorer" with the namespace
    in which the Folder class resides. If you haven't explicitly declared a namespace, you will find the name of the default namespace under Project->Properties->Root namespace. Copy the value from this text box to your XAML:
    xmlns:my="clr-namespace:FolderExplorer"
    The default namespace is usually the same as the name of the application by default so if your application is called "FolderExplorer" you should be able to build it.
    If you cannot make it work then please upload a reproducable sample of your issue to OneDrive and post the link to it here for further help.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question.

  • Adding .class files to your project and making them work.

    Ok, im fairly new to java and having trouble understanding how to make importing of .class files work. Im using eclipse 3.2
    I have the files in a directory and I have gone to project->properties->java build path->libraries->add external class folder and pointed it to the correct place.
    Now, I am trying to use some of the classes it provides. I get no errors when creating the object with this code:
    com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
    Before I did the add external class folder that code would error cause it didnt know what com.ECS was. Now it works fine. My problem is that when I try to use a class, it does not recognize it as a class. After doing the above code I have:
    itemRequest.setSearchIndex("Books");
    its giving me an error on the period, saying: "Syntax error on token(s), misplaced construct(s)". Its not seeing that it is a class, so I can't use it. But when I am creating the object I get no errors. For reference, here is the chunk of code:
    com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
    itemRequest.setSearchIndex("Books");
    the second line of which errors. So my question is, how do I get it to recognize that the itemRequest is a class when I have imported the .class files to my project already?

    It's working fine. It's just that you have to put your code in a method.

  • Use of deployment classpath or shared-libraries to pick-up "custom" classes

    Hi,
    I’m trying to determine an approach to dealing with how classes are found in a deployed ADF application via classpath, etc. I’ve tried to explain the situation below as best I can so it’s clear. If you have any comments/suggestions as to how this could be done, it would be much appreciated
    Current Application structure:
    Consists of an application initially deployed to OC4J 10.1.3.4 using an alesco-wss.ear file
    Application contains a single Web Module, initially deployed as wss.war file within the alesco-wss.ear file above.
    The Web Module (wss) was built in JDeveloper 10.1.3.4 using 2 projects, a Model and ViewController project, and uses ADFBC.
    The Model project seems to also generate an alesco-model.jar file in the /WEB-INF/lib/ folder, even though Model classes are in the /WEB-INF/classes/ folder below?
    Exploded structure of application on application server looks something like:
    applications/alesco-wss/META-INF/
    /application.xml <- specifies settings for the Application such as Web Module settings
    /wss/
    /app/ <- directory containing application .jspx pages protected by security
    /images/ <- directory containing application images
    /infrastructure/ <- directory containing .jspx files for login, logout and error reduced security
    /skins/ <- directory containing Skin image, CSS and other files
    /WEB-INF/
    /classes/ <- directory containing application runtime class files as per package sub-directories
    /lib/ <- JAR files used by application (could move some to shared-libaries?) – seems to contain alesco-model.jar
    /regions/ <- directory containing .jspx pages used for Regions within JSPX template page
    /templates/ <- directory containing template .jspx pages used for development (not really required for deployment)
    /adf-faces-config.xml
    /adf-faces-skins.xml
    /faces-config.xml
    /faces-config-backing.xml
    /faces-config-nav.xml
    /region-metadata.xml
    /web.xml
    testpage.jspx <- Publicly accessible page just to test
    The application runs successfully using the above deployment structure.
    We plan to use the exploded deployment structure so that updates to pages, etc. can be applied individually rather than requiring construction and re-deployment of complete .EAR or .JAR files.
    What I’m trying to determine/establish is whether there is a mechanism to cater for a customisation of a class, where such a class would be used instead of the original class, perhaps using a classpath mechanism or shared library?
    For example, say there is a class “talent2.alesco.model.libraries.ModelUtil.class”, this would in the above structure be found under:
    applications/alesco-wss/META-INF/classes/talent2/alesco/model/libraries/ModelUtil.class
    Classes using the above class would import “talent2.alesco.model.libraries.ModelUtil”, so they effectively use that full-reference to the class (talent2.alesco.model.libraries as a path, either expanded or within a JAR).
    From the Oracle Containers for J2EE Developer’s Guide 10.1.3 page 3-17, it lists the following:
    Table 3–1 Configuration Options Affecting Class Visibility
    Classloader Configuration Option
    Configured shared library <code-source> in server.xml
    <import-shared-library> in server.xml
    app-name.root <import-shared-library> in orion-application.xml
    <library> jars/directories in orion-application.xml
    <ejb> JARs in orion-application.xml
    RAR file: all JARs at the root.
    RAR file: <native-library> directory paths.
    Manifest Class-Path of above JARs
    app-name.web.web-mod-name WAR file: Manifest Class-Path
    WAR file: WEB-INF/classes
    WAR file: WEB-INF/lib/ all JARs
    <classpath> jars/directories in orion-web.xml
    Manifest Class-Path of above jars.
    search-local-classes-first attribute in orion-web.xml
    Shared libraries are inherited from the app root.
    We have reasons why we prefer not to use .JAR files for these “non-standard” or “replaced” classes, so prefer an option that doesn’t involve creating a .JAR file.
    Our ideal solution would be to have such classes placed in an alternate directory that is referred to in a classpath such that IF a class exists in that location, it will be used instead of the one in the WEB-INF/classes/ directories, and if not such class is found it would then locate it in the WEB-INF/classes/ directories.
    - Can a classpath be set to look for such classes in a directory?
    - Do the classes have to replicate the original package directory structure within that directory (<dir>/talent2/alesco/model/libraries)?
    - If the class were put in such a directory, without replicating the original package directory structure, I assume the referencing “import” statements would not locate it correctly.
    - Is the classpath mechanism “clever” enough to search the package directory structure to locate the class (i.e. just points to <dir>)?
    - Or would the classpath mechanism require each individual path replicating the package structure to be added (i.e. <dir>/talent2/alesco/model/libraries/ and any other such package path)?
    If we are “forced” to resort to the use of JAR files, does a JAR file used for the purpose of overwrite/extending a sub-set of classes in the original location need to contain ALL related package classes? Or does it effectively “superset” classes it finds in all JAR files, etc. in the whole classpath? That is, it finds talent2.alesco.model.libraries.ModelUtil in the custom.jar file and happily goes on to get the remainder of talent2.alesco.model.libraries classes in the other core JAR/location. Or does it need all of them to be in the first JAR file for that package?
    Any help would be appreciated to understand how these various class visibility mechanisms could be used to achieve what is required would be appreciated.
    Gene

    So, nobody's had any experience with deploying an ADF application, and providing a means for a client to place custom classes in such a way as they're used in preference to the standard application class, effectively to implement a customised class without overwriting the original "standard" class?
    Gene

  • Creating a folder in web application directory?

    Hi
    I have a web application which contains some jsps and servlets and i am running it on Apache Tomcat 4.1. The name of my application is MyApp which contains all the servlets and jsps.
    In order to deploy the application i have placed the MyApp folder in the 'webapps' folder of Tomcat. Now in one of my servlets i.e. 'DirectoryCreator', i am trying to create a folder i.e. 'Directory' in the MyApp folder. The problem is that i dont want to give an absolute path to the File class constructor. The class files of my servlets are in classes folder i.e. MyApp \ Web-INF \ classes.
    I have tried:
    File f = new File("/Directory");
    f.mkdir();
    but this creates the Directory folder in my C drive.
    Please tell me how i can avoid giving the absolute path.
    Thanks.

    if the code to create the directory is a servlet, you can use
    String path=getServletContext().getRealPath("/");
    //getRealPath("/") will return the actual path on your machine of the base directory
    //of the webapp. getRealPath("/SomeDirectory/SomeFile") will return the real
    //path of SomeFile
    File f=new File(path + "/Directory");
    if(!f.exists())
        f.mkdir();if the code is in a .jsp file simple replace getServletContext(). with application.

Maybe you are looking for