How to create a Separate Servlet application?

Hi,
Till now i have been servlet programs by placing the class files in the following directory path... ie ROOT/WEB-INF/CLASSES... and i access it like this
http://localhost:8080/servlet/hello..
My friend also works in my system... so i get confused which is hers n which is mine.
I know we can create a separate folder inside webapps directory and access... so i cretaed a folder called servpgms in webapps directory.. under serpgms i created web-inf and lib folders.... then inside web-inf i created classes folder n i placed class file there.... but i have not written any web.xml file... so when i access my program like this ie..
http://localhost:8080/servpgms/hello...
i get HTTP 404 servlet not found..
Can any one elaborate on writing the web.xml file and help me in creating a separate app?
Thanks,
Akshatha

Hi
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>dbServlet</servlet-name>
<servlet-class>com.mycompany.dbServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>dbdrivername</param-name>
<param-value>qualified driverclass</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name> dbServlet </servlet-name>
<url-pattern> /com/* </url-pattern>
</servlet-mapping>
</web-app>This is enough for testing a servlet. If you want to add more, read deployment descriptor file structure document and add elements that satisfy your needs.
bye for now
sat

Similar Messages

  • How to create a directory in application server

    Hi all,
    How to create a directory in application server through Progaram??
    eg:\tmp - is already existing
    I want to create \tmp\fi 
    Within \tmp\fi - i should able to store my file,,,
    Kindly help me urgent...

    Hello San,
    Either contact Basis guys at ur end for the same or u can do it dynamically via a piece of ABAP code, i hope it wll help u.
    call function 'GUI_CREATE_DIRECTORY'
         exporting
    dirname = '//<ip_address>/qfilesvr400/<host>/usr/sap/TST/SYS/Folder1'
         exceptions
              failed  = 1
              others  = 2.
    Reward If Helpful.
    Regards
    Sasidhar Reddy Matli.

  • How to create our own web application on apache tomcat

    I am using Tomcat's default location to place my servlets.
    "E:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT"
    But day by day my classes are increasing. Now i am feeling to have my own location to place my servlets.
    Ex. "E:\myservlets"
    How to create and activate our own web application on apache tomcat except from tomcat's directory structure? Please guide me in this regard.
    Thanks in advance.

    hi,
    you can place your own application in any where
    then you to open under tomcat/conf/server.xml file
    add
    <Context path="/examples" docBase="e:/examples" debug="0"
             reloadable="true" ......./>

  • How to create sap directories in application server by coding.

    Hi Experts,
    Please tell me how to create a sap directory via coding in application server.
    Please tell me step by step n send the code also.I have tried alot using FM  'SXPG_COMMAND_EXECUTE' but i dont know how to use it n wht are d parameters i need to pass.
    Also, i found that we need to create a external command in SM69 to pass in this FM...i dont know how to create this.
    Please help me out.

    Hi friend,
    1. Goto to Transaction SM69.
    2. Click on F5.
    3. Click on F6.
    4. Enter a name in Command Name box          ex: z_com
    5. Enter a os command in Operating system command box.     ex: mkdir (creating a directory)
    6. Give location in application server in Parameters for operating system command box   ex: /C dir
    7. Click Save.
    Goto SE 38 and develop a report using FM 'SXPG_COMMAND_EXECUTE' .
    Ex:
    REPORT  zawi_demodownload                       .
    data: g_out like BTCXPM occurs 0,
            z_com type SXPGCOLIST-NAME  value 'mkdir'.
    CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
      EXPORTING
        commandname                         = z_com
      TABLES
        exec_protocol                       = g_out
      EXCEPTIONS
       NO_PERMISSION                       = 1
       COMMAND_NOT_FOUND                   = 2
       PARAMETERS_TOO_LONG                 = 3
       SECURITY_RISK                       = 4
       WRONG_CHECK_CALL_INTERFACE          = 5
       PROGRAM_START_ERROR                 = 6
       PROGRAM_TERMINATION_ERROR           = 7
       X_ERROR                             = 8
       PARAMETER_EXPECTED                  = 9
       TOO_MANY_PARAMETERS                 = 10
       ILLEGAL_COMMAND                     = 11
       WRONG_ASYNCHRONOUS_PARAMETERS       = 12
       CANT_ENQ_TBTCO_ENTRY                = 13
       JOBCOUNT_GENERATION_ERROR           = 14
       OTHERS                              = 15.
    IF sy-subrc = 0.
    ENDIF.
    Thanks.......

  • How to create clustering on oracle application server on windows

    hi,
    i want to know how can i create clustering on oracle application server on windows machine.
    regards

    I think that you need to configure Web cache for this as a frontend, and two or more servers behind it.
    Try to read :
    Metalink DOC ID 312834.1
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/advancedformsconf-128186.pdf
    Edited by: Marcos_Pawloski on 15/12/2010 00:02

  • How to create a separate account on iTunes for my iPhone and iPad

    I have an 8 GB capacity iPhone which I use to connect to iTune for music, video, app synch purpose. Recently I purchase iPad3 capacity 32 GB.  When I connect pad to iTune first time, pop message says that do u want to create a separate account or restore iPhone backup? That time I had chosen restore.
    Now problem which I am facing is:
    1. Say for example I downloaded 3 HD Gages for iPad then I synced with iTune. Next when I am connecting iPhone these 3 HD games are getting installed on the phone, which I don't want.
    2. Say I have selected almost 20 GB audio and video for my iPad which are there in the iTune, when I am connecting iPhone all these audio and video are started copying to the iPhone.
    How to overcome from this issue. How to create separate account for my iPhone and iPad on iTune? So that same Apps, Music, Video etc. will not installed or copied to both the device when connected to iTunes.
    Help....
    Thanks.

    Have a read here...
    https://discussions.apple.com/message/18409815?ac_cid=ha
    And See Here...
    How to Use Multiple iDevices with One Computer

  • How to create URL in Oracle Application Server ?

    Hello,
    I would like to know how to create a URL in Oracle Application server (LINUX) so that our application can be invoked from each and every machine in our
    local hosting.I expect a quick reply.

    You question is not so clear. Basically, after installing infrastructure and middle-tier instances, you can simple run http://localhost:port/appication from any web browser.
    If not, what is your requirements?
    Jaffar

  • How to create form in oracle application express

    hi friends,
    i am a new person in oracle application express software.
    i just want to ask that can we use oracle application express as a front end for oracle 10g database???
    if yes then can any one tell me that how to create form in it?
    is there any connection string to connect that form with oracle 10g.
    Please do me reply soon thanks

    To this forum... please:
    Oracle Application Express (APEX)
    Greetings

  • How to create login page for application with jheadstart

    Is there a how to section for jheadstart?
    After reviewing the jheadstart developer's guide. I am still left with lot of questions:
    1. how to create a login page to allow access to an application using username/password from a database table
    2. how to change the title graphic (jheadstart demo) to (my application)
    3. how to execute a query by hitting enter instead of a mouse clicking a button
    Any suggestion to search for such practical questions in this forum or other blogs and such is appreciated.

    Mahin,
    You can set Authentication Schemes for your applications. If you are using Application Express Authentication, you can create additional users from here:
    1. From Application Express home, click Manage Application Express users.
    2. Click Create to create users. To create end user, select "no" to developer and admin.
    - Christina

  • How to create 2 separate libraries on one computer ?

    I have two music folders (such as "kids" and "Adults") in the "My Music" folder and I want to create 2 separate libraries for managing the music for Kids versus adults.  I cannot figure out how to create a new iTunes library limited to a single folder tree ("kids" for example) . . .  because iTunes only gives the option to "Scan for Media" which is promiscuous and scans everything, regardless of where the library files are created.
    I know I can temporariry remove the "kids" folder then create a the "Adult" library.  Then temporariliy remove "Adults" folder and create a "Kids" library, but thats requires hours of file copying to and from an External USB drive.  Once the two libraries are created then they can live together on the same computer . . . but how to get the libraries initially created is the question ?    Maybe I will try NTFS file permissions to make folder 'A' invisible to iTunes while creating the library for folder 'B'.
    But there must be an iTunes option to do this . . right ?

    RESOLVED . . . Still looking for an iTunes method of creating 2 libraries on 1 computer.   But if it helps for others, you can use NTFS file permissions to deny access to one folder tree to keep iTunes focused on the other folder tree it can see when you select "Scan for Media".
    Then reverse the permissions to create the library for the other folder tree.   When done allow access two both trees and they will then co-exist on one computer. 
    The only remaining inconvenience . . . I have iTunes Match set up on library "Adults".  If I sign into the Apple store to buy a song or get artwork from library "Kids", iTunes is populated with the "Adult" songs from iTunes Match.  I just have to avoid staying signed into the Store from the "Kids" library, so someone doesn't start downloading "Adults" music into the "Kids" library.
    To inform the context of this question, we have 3 Apple portable devices that play from our iTunes Match "adult" library.  We also have "Adult" and "kid" devices that are not Apple, so we just copy the respective folder tree to non-Apple devices.
    So the use NTFS DENY permissions works for creating two libraries on a single computer, and it only take a few minutes to do,  BUT FOR THOSE WHO AREN'T SYSTEM ADMININSTRATORS, IS THERE AN "APPLE WAY" TO DO THIS ON A WINDOWS COMPUTER?

  • How to create datasource for standalone application using JPA

    In the persistence.xml configuration file, we have data source got it from web server configuration file, and created by server like Jboss or tomcat.
    I just wonder how to create this same data source via Java stand-alone application?
    I have Java standalone application embedded Jetty server running with JPA module. Question is how to setup or create data source from my Java application just like web server; which called by persistence.xml?
    Thanks,

    Hello,
    Sharepoint deployment is completely different. I don't think you can deploy any solution as wizard in prod so you have to first identify what you want to deploy.
    If you just want to deploy only web application then backup/restore process is available in sharepoint. you can use STSADM or powershell to deploy your web app.
    http://technet.microsoft.com/en-us/library/ee748618%28v=office.14%29.aspx
    If there is any custom code or .NET code then create a WSP package and deploy it on prod. If you have multiple WSP's then create a batch file (as exe package) then run this package on prod.
    http://www.ironspeed.com/Designer/9.1.1/WebHelp/Part_VI/SharePoint_Solution_Package_WSP_Deployment.htm
    Let us know in case any doubt
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to create customized Disco Viewer applications

    I've searched the Orcale websites and handbooks for "how to" on this issue. At the moment I know the most basic ways to customize the Disco Viewer user interface:<br>
    editing ui_config.xml, pref.txt, using url-arguments etc.
    In addition, the documentation tells me that by using xsl/html editors it is possible to create a completely customized application. I have found the xsl-files like gui_components.xsl.
    Can someone tell me where to find more information about how to get started, use of tools etc.?

    Hi,
    i have H4 Help problem.
    how can i restrict an attributes of infoobject in H4 Help value.
    Please help me
    Madhu

  • How to Create One Full EJB Application?

    Hi,
    Does Anyone knows how to Create the EJB Application, as JSP as The Client using Eclipse and Weblogic?
    Thanks in Advance,
    Sundar

    Dont they come with sample projects.
    else search for tutorials in the net

  • How to create rooms in paid applications

    I have upgraded my lccs account.I am creating rooms programmatically. Earlier rooms were creating in the default application but now when the free quota is over and I want to create rooms in my paid application. How can I create rooms in paid applications.
    Thanks.

    hi satish.......
    Navigate to Collaboration ->Rooms->Room Creation ->in the Room creation wizard enter the mandatory fields as shown in the fig below and click on Next button
    If you want to add members to the room enter the userID of the users in the input field and click on Add button
    Click on Next button to check your settings and then Click on Finish button
    After clicking on Finish button check for the message “Room ATestroom has been created” with a link  Enter Room  . Check whether able to enter the room by clicking on the link Enter Room
    hope this is goin to help u....
    and plz dont forget to award points.....
    Dinesh

  • How to create the simple EJB Applications.

    Hi
    I have asked about the what are the necessary softwares required for creating the Simple EJB Applications.
    I have
    Jdk 1.6,
    Netbeans 5.5,
    J2EE5 ,
    Apache Tomcat 5.5
    what are other necessary softwares?please tell me From where i get the source code samples?
    Please Tell me it is necessary for me..

    Hi U,
    Tomcat is only JSP/Servlet container -- no EJB support.
    Easiest is to download the Netbeans 6.1 bundle including Glassfish and JavaDB, thats all you need + JDK and Java EE of course.
    Glassfish has both web/JSP/Servlet-container and EJB-container, so Tomcat is not needed then.
    ( If for some reason you really want to use Tomcat, you can use it together with OpenEJB for example, to add EJB-support. )

Maybe you are looking for