Results 1 to 3 of 3
  1. #1
    mtz1406 is offline Member
    Join Date
    Aug 2008
    Location
    Riyadh - Saudi Arabia
    Posts
    15
    Rep Power
    0

    Post Questions About JSP?

    hi;
    I am php devloper and I am learning Java now.
    I am using NB6.1 , Tomcat 6.0 , J2ee 5.
    I have some questions about devleoping web application with jsp.

    1.What are
    /WEB-INF/web.xml
    /META-INF/context.xml
    /META-INF/MANIFEST.MF
    files that generated with NB.are important or optional.are auto generated or may I edit.

    2.can I distribute my web application in non text format.How?

    3.if I want to add some files to my application that its running in tomcat.how can i do that with out rebuild all.

    thank you

  2. #2
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Quote Originally Posted by mtz1406 View Post

    1.What are
    /WEB-INF/web.xml
    /META-INF/context.xml
    /META-INF/MANIFEST.MF
    files that generated with NB.are important or optional.are auto generated or may I edit.
    These are magic configuration files. You can edit them manually, but I do not recommend it. Netbeans can edit them for you and you will make fewer mistakes.

    2.can I distribute my web application in non text format.How?
    Can you be more specific? With servlets and jsp, you typically deploy your application to a webserver for use by clients with browsers. So you don't deploy it to users, you do deploy it to the server. You deploy a WAR file, which is actually just a .zip file of the manifest, config, and other administrivia files, plus the compiled .class files.



    3.if I want to add some files to my application that its running in tomcat.how can i do that with out rebuild all.
    Can you be more specific? In general, you use Netbeans (or eclipse) to build the war file. You do this when you make any changes to the classes, config, or .jsp files.

    Tomcat, JBoss, etc. will allow you to deploy a new war file while there are users accessing the application, and it does the right thing.

  3. #3
    mtz1406 is offline Member
    Join Date
    Aug 2008
    Location
    Riyadh - Saudi Arabia
    Posts
    15
    Rep Power
    0

    Default

    thank you all for helping.

    I will write more information about my questions may this help others:

    { /WEB-INF/web.xml - The +Web Application Deployment
    Descriptor+ for your application. This is an XML file describing
    the servlets and other components that make up your application,
    along with any initialization parameters and container-managed
    security constraints that you want the server to enforce for you.
    This file is discussed in more detail in the following subsection.

    As mentioned above, the /WEB-INF/web.xml file contains the
    Web Application Deployment Descriptor for your application. As the filename
    extension implies, this file is an XML document, and defines everything about
    your application that a server needs to know (except the context path,
    which is assigned by the system administrator when the application is
    deployed).

    The complete syntax and semantics for the deployment descriptor is defined
    in Chapter 13 of the Servlet API Specification, version 2.3. Over time, it
    is expected that development tools will be provided that create and edit the
    deployment descriptor for you. In the meantime, to provide a starting point,
    a basic web.xml file
    is provided. This file includes comments that describe the purpose of each
    included element.

    NOTE - The Servlet Specification includes a Document
    Type Descriptor (DTD) for the web application deployment descriptor, and
    Tomcat 6 enforces the rules defined here when processing your application's
    <code>/WEB-INF/web.xml</code> file. In particular, you must
    enter your descriptor elements (such as <code><filter></code>,
    <code><servlet></code>, and <code><servlet-mapping></code> in
    the order defined by the DTD (see Section 13.3).
    } from tomcat documentation
    {
    Tomcat Context Descriptor

    A /META-INF/context.xml file can be used to define Tomcat specific configuration options, such as loggers, data sources, session manager configuration and more. This XML file must contain one Context element, which will be considered as if it was the child of the Host element corresponding to the Host to which the The Tomcat configuration documentation contains information on the Context element.

    }from tomcat documentation
    but I still want more information about this question:
    Q2: I want to distribute (sell to another organaization) without give sorce code in jsp files.So I want to precompile it to be just class files or jar files.
    I want to use ant that become with netbeans 6.1.can anyone give me information about how to do that.

    thank you again

Similar Threads

  1. Stuck on Two Questions, Please Help
    By sylo18 in forum New To Java
    Replies: 5
    Last Post: 03-11-2008, 02:03 AM
  2. Just a Few Questions
    By pringle in forum New To Java
    Replies: 21
    Last Post: 01-09-2008, 07:21 PM
  3. questions
    By Gilgamesh in forum New To Java
    Replies: 3
    Last Post: 11-28-2007, 12:18 AM
  4. 3 Questions
    By hiranya in forum AWT / Swing
    Replies: 4
    Last Post: 11-14-2007, 05:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •