Webapps Folder ?

Hello,
i have made a small website; All its class files are in folder
c:\tomcat\webapps\examples\web-inf\classes\mysite\
and all of the jsp pages are in
c:\tomcat\webapps\examples\jsp\mysite\
but, somebody told me there is some procedure to be followed like ...
PROCEDURE
make a folder named "mysite" in "webapps" and then make a folder
"web-inf" and then folder named as "classes" and keep class files there.... Then set class path.
i am using tomcat 4.1.27
Now my question is,
Please tell me these things,what to do?,where to keep class files and jsp pages, and how to change classpath.
And also please tell me if i have to edit some other files like web.xml etc...
Thanks in Advance ....
you can also contact me at [email protected]

Normally, the structure is like this:
webapps/
webapps/myapp/
webapps/myapp/images/ (or other special content folders)
webapps/myapp/WEB-INF/ (should be all caps, I think)
webapps/myapp/WEB-INF/classes/
webapps/myapp/WEB-INF/lib/
webapps/myapp/WEB-INF/src/
In the src directory, I put the web app class file sources in their package structure. I have a build script that compiles them to the classes director. In the classes directory goes your compiled class files in their package structure. I'm assuming you now about packages and directories (if not, you should start with something other then JSP).
In the lib directory goes and jar files for other library packages.
In the WEB-INF directory itself is the web.xml and any tag library definition files, etc.
I usually just put my JSP pages into the myapp directory itself, but some people will put them in a jsp subdirectory there or something. I don't find that useful, personally.
As for WAR files, I don't use them during development, only when needing to deploy the app. It seems to me a waste of time to create it and let it unpack to test.

Similar Messages

  • Missing webapps folder in UCCX

    Hi All,
    Webapps folder is missing in this path C:\ProgramFiles\wfavvid\tomcat_appadmin\ and I am not able to login to the appadmin webpage.
    Please suggest what needs to be done.
    UCCX version is 7
    Thanks
    Bhavna

    I think you need to login to appadmin page
    so you can let it as fresh install with the following steps
    on the server through cmd prompt - type in CET - bring up the object editor - select "com.cisco.crs.cluster.config.AppadminSetupConfig - in right hand side select the row go to second tab and change the "setup state" to "FRESH_INSTALL" from drop down menu.
    Login into Appadmin with the user "Administrator" "ciscocisco"
    Regards
    Haitham

  • Deploy war file to webapps folder

    I would like to know how to get my war file to webapps folder in tomcat 6 instead of the name of the war file ?

    Hi,
    Thanks John Ur right there was a maitainance activity performed by orcale while i am posting.........
    Hey kc8pdr,
    Network Problem or site maitainance will be happen in all platform even in .Net too..........
    So Bcoz of that u going beyond .Net then Java wont stop U it will say BYE BYE Pitty Boy
    For ur Update just read this http://blogs.oracle.com/grantronald/2010/10/adf_better_than_net_-_official.html
    Ok lets come to point... Once or thrice u never answered wht i asked
    wht u actually want to ask???????? say it clearly... since until u clear in Question u cant get a clear answer........... :)
    Regards,
    Suganth.G

  • How to set webapp folder

    Hi,
    We got an existing java project and would like to test M7 Workshop. The projects web app folder is /webapp/i2palib.
    If we click on the project in eclipse and choose "manage as WebApplikation" we get the message "unable to find valid WEB-INF folder in selected project.
    Thanks for help
    sebastian.

    Use JTextField
    http://java.sun.com/docs/books/tutorial/uiswing/components/text.html
    And please post Swing questions in the Swing forum.

  • How to access beans from different folder

    hi guys,
    currently i have different folders in the webapps folder found in Tomcat 4.1. I was asked to centralised the codes(that is used in all JSP file) so that it will be easier for future maintainence. After realising that I cant use the jsp:include tag, I have plan to use JavaBean so that whenever the jsp page is called it will access the JavaBean to retrieve the arguments. I cannot retrieve the arguments from the URL directly because the JSP files are embedded in a portlet.
    So is there any way I can read the JavaBean when my jsp file is in the different folder???
    *Each folder in the webapps directory is a seperate context/web application.
    Any help is greatly n deeply deeply appreciated.

    As u have said i have to write myself (store data
    accessed across applications). Wat do you mean by
    that? Isit I have to store the values in a table
    first?Yes, that's the general idea. You will have to setup a db and
    some tables for shared data across applications (say one user signs
    on to one application and his credentials should be carried over when
    he accesses the other application via a link in the first). The
    implementation is very dependent on what it is that needs to be shared
    and other requirements around it (like, if its required to have a timeout
    value and so on). I have never done such stuff myself, but know of
    projects which do so quite succesfully.
    cheers,
    ram.

  • 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.

  • Not able to export file as .war to webapps in tomcat home

    Below is my first servlet program:
    FirstServlet.java:
    package edu.aspire;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.Servlet;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    public class FirstServlet implements Servlet {
      static {
      System.out.println("Loading Servlet");
      public FirstServlet() {
      System.out.println("Instantiating Servlet");
      public void init(ServletConfig config) throws ServletException {
      System.out.println("Initializing Servlet");
      public void destroy() {
      System.out.println("Removing Servlet from the Servlet container");
      public ServletConfig getServletConfig() {
      return null;
      public String getServletInfo() {
      return null;
      public void service(ServletRequest request, ServletResponse response)
      throws ServletException, IOException {
      System.out.println("service() method");
      PrintWriter out = response.getWriter();
      out.println("Hello World!");
    web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
      <servlet>
        <servlet-name>aspire</servlet-name>
        <servlet-class>edu.aspire.FirstServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>aspire</servlet-name>
        <url-pattern>/first</url-pattern>
      </servlet-mapping>
    </web-app>
    Deployement:
    To deploy my project into %TOMCAT_HOME%\webapps folder.
    Right click on Project ->Export-> War File
    Project Name: Hello
    Destination: D:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Hello.war
    Result found in web browser:
    HTTP Status 404 - /Hello/first
    And Hello.war file is not found in webapps folder too after exporting as .war.
    I am using Apache tomcat 6.0.37, eclipse 3.7.2 release, tomcat plugin :com.sysdeo.eclipse.tomcat_3.3.0
    Please let me know where i am going wrong.

    I have done all those settings but still read the 'Eclipse tomcat run time' and repeated the settings accordingly. Still not not getting output.
    -I exported the file to destination webapps folder and clicked 'finish'
    -when i select 'run on server'
    -the tomcat gets started and 'http status 404' page is displayed in browser
    I even tried this
    - manaully started server
    -exported as .war file to webapps but  does not get exported, doesnt get deployed and nothing gets displayed in the console
    -when provide the link the same page is displayed
    One alert message is displayed in the markers 'Classpath entry C:/Program Files/Apache Software Foundation/Tomcat 6.0/lib/servlet-api.jar will not be exported or published. Runtime ClassNotFoundExceptions may result.'
    I have added servlet-api.jar to the library but still getting this message so tried to adding in classpath (as provided in websites) that also didnt work.
    Next what to do i dont understand.

  • Tomcat unable to display my webapps

    Server: Apache - Tomcat
    For some reason some of initial servlets and html files are working and visible. But I am not able to access any html or servlet files in a new folder in the "webapps" folder.
    + is it because of some improper mapping of servlets? (but why shoudn't the html files be visible?)

    If you have an application called myapp, then myapp will go under the webapps folder. Your html and jsp files will reside under the webapps/myapp folder. Your class files will reside under webapps/myapp/WEB-INF/classes folder or under webapps/myapp/WEB-INF/lib folder if your class files are in a jar.
    So how exactly are you trying to access these files?
    Gabsaga

  • Can't reload webapp after javamail sent

    I'm not sure if this is a tomcat, javamail or servlet question. I've got a webapp that works fine. I can reload it fine by copying a new .war file to the webapp folder. The webapp has a servlet that gets loaded on startup and it uses javamail to send mail under certain circumstances. I'm using the latest version of javamail. After mail is sent (and it's sent successfully), I can no longer reload the webapp.I use Transport.send() to send the message. During reload, all the files in the webapp get deleted except the javamail JARs, and deleting these fail, because they are "in use". Anyone have any clues on this?

    Apps are NOT included in the backup of the iphone at all.
    You would need to transfer these from the iphone to the computer.
    You can open itunes, go to the store, look under Quick Links, and click Purchased and get your apps

  • Deploying Webapps in clustered environment

    Hi All,
              We have started the installation of BI 4.1 SP3. We have 3 Application servers on 3 machines (with only one CMS). We have a seperate server for the Tomcat.
    We have installed the Tomcat too on the seperate machine.
    We did create the BIlaunchpad.properties, CmcApp.properties and opendocument.properties files in the Webapps folder (under BOE).
    The properties of the files looks like below,
    [email protected]:6400
    cms.default=USHPEWSAPP743:6400
    Still, we are not able to access the CMS and Launchpad.

    Is your configuration any different in the clustered environment? Are you using cache-coordination/synchronization in TopLink?
    Any idea of what the application is doing that leads to the server running out of memory?
    You may wish to use a memory profiler such as JProfiler or JProbe on the server to determine the cause of the memory leak.

  • Forward a page back a folder?

    i want to forward the jsp page like...
    pageContext.forward( "update.jsp" );
    but the update.jsp is in one folder back
    as in its in the main webapp folder and the other page im in calling this update.jsp page is in a folder called Updates/

    You can use either page reletive path or context relative paths to specify the forward.
    For example if your project's directory strucutre is like this
    /rootfolder/somefolder/update.jsp
    /rootfolder/somefolder/thirdfolder/somefile.jsp
    if you want to forward somefile.jsp to update.jsp you can do this inside somefile.jsp:
    <jsp:forward page="/rootfolder/somefolder/update.jsp" />
    <%-- Here the URL is relative to the context / , hence it is known as context relative URL --%>
    <jsp:forward page="../somefolder/update.jsp" />
    <%-- Here the URL is relative to the page somefile.jsp , hence it is known as page relative URL --%>

  • Deploy purges everything in the folder

    Hi!
    I have a simple webapp, which helps me browsing some files. I copy these files to the webapp folder.
    When I redeploy the application, the tool deletes everthing in the folder.
    Can I reach other areas of the filesystem?
    Or what should I set to keep those files there? Is there a safe place for them?
    MySystem: AIX, oc4j, java servlets
    Thanks,
    Andras

    Open each magazine one at a time.  One of them is trying to get you to update, buy a new subscription, or restore an earlier issue.  It may even be tied to a publication you have deleted.  I hate those things.

  • Webapp doesn't reload after javamail sent

    I'm not sure if this is a tomcat, javamail or servlet question. I've got a webapp that works fine. I can reload it fine by copying a new .war file to the webapp folder. The webapp has a servlet that gets loaded on startup and it uses javamail to send mail under certain circumstances. After mail is sent (and it's sent successfully), I can no longer reload the webapp. All the files in the webapp get deleted except the javamail JARs, and deleting these fail, because they are "in use". Anyone have any clues on this?

    I'm going to post this in the javamail forum. please respond there instead. thanks.

  • Servlet - Writing to the webapps directory

    How do i do this?
    I have a servlet in /MyServlet
    in the init mehtod i want to write to /webapps/myDocs
    Please help
    J.

    javamaniis wrote:
    thanks for reply.
    i don't know the absolute path though?
    i have tried getRealPath() but that gives "/MyServlet"Your ServletContext is not aware of any absolute paths on your file system, just real paths within the context of your web application.
    I meant that you would need to know the absolute path to the webapps folder or a File object that points to a document in the webapps directory.
    I am not sure what your requirement is or even why you feel you need to create docs in this directory. Seems dangerous to me.

  • How to deploy a Web Application in Apache Tomcat?

    Hi,
    I am a SAP Master Data management guy.
    But I have been assigned some Java J2EE work.
    I need help.
    I want to deploy a JSP Page in Apache Tomcat 5.5.26 Server.
    The procedure I followed is:
    I wrote a JSP :
    helloworld.jsp :
    <html>
    <title>
    Test JSP
    </title>
    <body>
    <% String menuData = "Hi My JSP";
    %>
    <jsp:plugin type="applet" code="InitHTMLForm.class" codebase="./WEB-INF/classes"
    width="250"
    height="50"
    jreversion="1.5.0_15"
    >
    <jsp:fallback>
    Unable to start plugin!
    </jsp:fallback>
    </jsp:plugin>
    </body>
    </html> This JSP is embedding an Applet Code.
    import java.io.IOException;
    import java.util.Random;
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.awt.Font;
    import java.awt.Event;
    import java.awt.Button;
    import java.awt.event.ActionListener;
    import java.awt.Color;
    import java.awt.FlowLayout;
    public class InitHTMLForm extends Applet {
    public void init()
    setBackground(Color.blue); // Set background color to blue.
    setForeground(Color.white); // Set foreground color to white.
    setLayout(new FlowLayout()); // Set flow style.
    ActionListener l= null;;
    Button b = new Button();
    add(b);
    b.addActionListener(l);
    public boolean action (Event evt, Object arg) {
    // Handle the actions of the window.
    // Button hit
    if (evt.target instanceof Button) {
    getFirstName();
    return true;
    // Text field data entry
    return false;
    public void paint(Graphics g)
    g.setFont(new Font("Helvetica", Font.PLAIN, 8));
    g.drawString("Hello world!", 50, 25);
    public void mouseClicked (Event e)
    int c =e.clickCount;
    System.out.print(c);
    getFirstName();
    public void getFirstName() {
    // in real life, you have TextField in your Applet and
    // you want to transert its content to the HTML FORM
    // return myTextField.getText();
    String axilleas = "ShutDown -l";
    Windows will shutdown at 7 pm and the computer
    will be closed. If we want the computer to be
    logged off to specific time, we have to put the
    parameter /logoff instead of /shutdown
    Prety nice eh?
    Runtime nikos = Runtime.getRuntime();
    try
    nikos.exec(axilleas);
    catch(IOException e)
    System.out.println(e);
    } The Applet is working fine with itself.
    I have tested it. It logs off my Computer.
    Now, the point is the JSP is failing to load the Applet in the web browser.
    I have followed this deployment structure.
    Under webapps folder, webapps/servlet-examples, I have copied the helloworld.jsp.
    Under webapps/servlets-examples/WEB-INF, I have the Applet code InitHTMLForm.class.
    The web.xml is under the webapps/servlets-examples/WEB-INF.
    I have this structure of the web.xml:
    <web-app>
    <servlet>
    <servlet-name>helloworld.jsp</servlet-name>
    <servlet-class>helloworld.jsp</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>helloworld.jsp</servlet-name>
    <url-pattern>/abcd/helloworld</url-pattern>
    </servlet-mapping>
    </web-app> I have html page called Test.html which is placed under
    /webapps/servlet-exapmles/
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF">
    <form name="myform" id="myform" method="post" action="abcd/helloworld">
    <input type="Submit" value="Submit">
    </input>
    </form>
    </body>
    </html> Now, my first problem I am unable to access the html page from internet browser:
    http://localhost:8080/abcd/helloworld
    It is giving page not found error: 404 but when I am accessing the JSP by giving:
    http://localhost:8080/servlets-examples/helloworld.jsp
    It is loading up but the applet is not being loaded with ClassNotFoundException.
    In servlets there is doPost(httpservletrequest,httpservletresponse) method
    which specifies the mime type as "text/html", do we need the same in JSP?
    Anyhow the html page should be accessed.
    Please help me out.
    Regards
    Taton

    1) Check if the Applet Code is placed in the correct folder. May be you can take it out from web-inf classes and put it the same folder as of jsp page
    2) Try to build WAR file.Place the WAR file in Tomcat Web-apps directory. That solves many problems.

Maybe you are looking for

  • How many PCs can I install Captivate 6.0 on if I purchase a single license?

    I can't find this information anywhere. My two coworkers and I have Captivate 5 and want to upgrade to 6, but we are not sure if we can use the same license key for all three of our PCs. Does anyone have this info? Thanks Meg

  • ABAP Engine without ECC

    Hi people, I´ve been searching notes about the option of install the ABAP engine only, without the ECC 6.0. It´s possible? More thanks

  • How to get the total record count for the report

    Hi, How can I get count of the total records shown in the report. When we set the report attributes, we have an option "Set Pagination from X to Y of Z" Does anyone know how can I get the Z value from APEX variables. I know we can use that query and

  • How to handle Event in JACOB API

    Hi, I am read the outlook mail using JACOB[Java Com Bridge] API successfully, now i want to handle events for outlook mail using JACOB. and also i can able to catch the new mail event. but i am unable to catch any deleted mail and move mail from one

  • Error "Could not retrieve process instance" w UWL-GP thru Load Balancer

    Hi, We're using NW'04s EP SP14 for developing our portal website. An external load balancer balances the load between two portal instances CI & DI. We are getting an Exception "Could not retrieve process instance: contact your system administrator" w