How to create a simple web.xml for using servlets

Hello i wanna configure the web.xml that i can use sevlets and beans, but how can i do that?
This is de directorie i have installed my webapp
C:\Tomcat 4.1\webapps\testapp
C:\Tomcat 4.1\webapps\test\WEB-INF\classes (in this dir, I wanna put my beans and servlets, I got one servlet and the name is LogIn.class).
And i wanna request my servlets with the url http://localhost:8080/testapp/servlet/LogIn
How can i create a very basic web.xml with working beans, servlets and session? It is for testing-use only, so the security is not important for me at this moment.
Tnx

under your web-inf
in your web.xml file you must map
the servlets
under the <web-app> tag type
<servlet>
     <servlet-name>LogIn</servlet-name>
     <servlet-class>com.LogIn</servlet-class>
</servlet>
<servlet-mapping>
      <servlet-name>LogIn</servlet-name>
      <url-pattern>/LogIn</url-pattern>
</servlet-mapping>ps: start using some IDE such as NetBeans or Ecclipse
since they will take care of mapping all servlets and Beans
and generate all the necessary files for your web-app

Similar Messages

  • What changes i should made in web.xml for using jsp/xml using weblogic

    Hi all,
    I just know some changes has to made in web.xml or weblogic.xml if i have to use weblogic for jsp/xml.
    Pls. anybody post the steps to intereaction with xml using weblogic.
    I am using jdk1.4

    The problem is solved.
    The information is given at
    http://e-docs.bea.com/wls/docs61/webapp/webappdeployment.html

  • Configuing web.xml for using JSTL tags in WAS

    Hi All
    I have an application deployed in websphere.
    After extracting jakarta-taglibs-standard-current.zip I copied the jar files ( from the \jakarta-taglibs-standard-1.0.6\lib folder) to the web-inf\lib folder.
    Then I saved the c.tld ( from the jakarta-taglibs-standard-1.0.6\tld folder) to the \web-inf\taglibs\ folder
    Then I modified the web.xml to include
           <taglib>
                 <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
                 <taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
          </taglib>The problem is when i restart the application from the WAS administrative console. The application does not restart with the error
    Exception:
    com.ibm.ejs.sm.exception.ActiveObjectException--------
    com.ibm.ejs.sm.client.command.ExecutionException: Command HostPubServer.start Sub-command Error.     at com.ibm.ejs.sm.client.command.AbstractCommand.handleAct(AbstractCommand.java:288)
         at com.ibm.ejs.sm.client.command.StartCommand.execute(StartCommand.java:94)
         at com.ibm.ejs.sm.client.command.CommandManager$ExecutionThread.run(CommandManager.java:264)
         at com.ibm.ejs.sm.client.command.ThreadPool$PooledThread.run(ThreadPool.java:89)
    When I remove the " <taglib-location>/WEB-INF/tlds/c.tld</taglib-location> " I am able to restart the application. But the path is right.. and the tld is ther. What cud be the issue here ??
    Any thoughts ??
    Thanks
    RV

    Hi
    The position of the tablig tag in web.xml was wrong. So it was not validated according to the dtd specification. I placed the tag after the errortag in the web.xml and it resolved the issue.
    Thanks
    RV

  • Iplanet 4.1 SP9 suports web.xml for using taglib ?

    I try to make taglib work.
    I use Iplanet 4.1 SP9.
    I know I can do it with the jar file that include the TLD inside it.
    But can I use a web.xml in it ?
    My question : are we force to use the taglib.jar method ?
    thanks
    tony

    Hi,
    I hope below link will helps:
    http://knowledgebase.iplanet.com/ikb/kb/articles/4585.html
    Regards,
    Dakshin.
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support.

  • How to create a simple File structure for a large project?

    Hi to all,
    I've own and operated my own website design/development (a 1 woman office, plus many sub-contractors) over the period of 8 years. I started hand-coding HTML sites in 1997, before the creation DW (though I think the first ver was for Mac in '97). Over the recent years I've udated my skills to include CSS and enough Java/PHP to customize and/or troubleshoot current projects (learn as I go).
    The majority of my clients have been other 1-10 person entrepreneur companies. I've recently won a bid to redesign a government site which consist of 30 departments, including their main site.
    The purpose of this thread is to get some ideas on creating a file management/structure. Creating file management setup for smaller companies was a piece of cake, using a simple file mgmt structure within DW. Their current file structure is all over the place. I've read about a very good, simple file struture in a DW CS4 manual and wanted to get feedback on different methods that have worked, and have not worked, or your client:
    Here's my thinking:
    1. within the root dir place home.htm and perhaps a few .htm related only to home
        2. create the following folders off the root, "docs, imgs/global, CSS, FLA, Departments"
                - sub folders within docs for each dept
                - site wide css's placed into CSS
                - site wide FLAs into the FLA
                - sub-folders created within 'imgs' for each dept, including a 'global folder' for sitewide images and menu imgs (if needed)
    - OR -
    1. create same file structure for each dept folder, such as 'imgs/CSS/FLA/Docs'
    Open for suggestions....
    Ciao

    It is a problem I have thought over at length and still feel what I use could be better. You are doing it the right way around researching before you start, as moving files once things are underway can course real problems. One issue is the use of similar assets across site(s), and version control if you have multiple versions of the same asset.
    Can not say I have built a site(s) of that size but would recommend putting together a flow chart to help visualise the structure and find out better ways organising (works for me). Good luck, post back with your solution.

  • How to create a simple filing system for my personal material

    --After using Windows for several years, I have bought my first Apple computer last month: MacBook Pro, with OS X Mavericks 10.9.5. I find that just creating files, saving text/photos etc in them, and then creating a folder and saving the files in the folder, is a major operation for me. Obviously there must be a simple, straightforward way to do it, that I don't know. I have not found anything in my Apple books - too basic for them. If somebody could help me, I will appreciate. I am new to the Apple system, so please describe to me step-by-step the way.
    --Also, should I download the new Yosemite 10.10 now? Thanks.

    Hi ..
    You can save text files to the Documents folder.
    You can save photos to the Pictures folder.
    Open the Finder. From the Finder menu bar click Finder > Preferences then select the Sidebar tab.
    The Finder can also be opened by clicking the Finder icon in the Dock.
    Select both:  Documents and Pictures
    That makes it convenient to save text files and photos.
    As far as Yosemite goes, since you're coming from Windows, it be better to learn Mac OS X there first, then upgrade to Yosemite at a later date. It's free and available at the App Store. The App Store icon should be in your Dock.
    Bob LeVitus writes a very helpful Dummies for Mavericks manual for sale at Amazon here.

  • How to get XML value using servlet?

    how to get values from a XML file using servlet ? Thank you.
    for example: how can I get the location value (aaa) from this XML file?
    abc.xml:
    <business>
    <location>aaa</location>
    </business>

    Try to use XML Parsers to do the job.
    Use DOM or SAX Parsers that are freely available.
    Some of the popular ones are xerces, DOM, SAX.

  • How can I create a magazine web app for all devices?

    How can I create a magazine web app for all devices?

    magazine web app is not supported in DPS as of now. You can share the contents to preview it on web content viewer.

  • Creating a simple java client for a session EJB local interface

    Hi all
    Is it possible to create a simple java client for a session ejb local interface with JDeveloper.
    The problem is that it creates a test client for a remote interface only...
    i.e.
    MySessionEJB sessionEJB = context.lookup("MySessionEJB")
    and once i try to adjust it manually for the local interface...
    MySessionEJBLocal sessionEJB = (MySessionEJBLocal) context.lookup("MySessionEJBLocal") (MySessionEJBLocal - is the name of my local interface)
    it generates the exception:
    javax.naming.NotFoundException: SessionEJBLocal not found
    at...........................(RMIClientContext.java:52)
    There is still no problem with accessing the local interface object from the jsf project where i've added <ejb-local-ref> tag into the web.xml file.
    but i need the possibility of testing the simple java client for the local interface to test business methods wich should return objects without indirect properties
    Thanks in advance.
    Alex.

    Pedja thanks for reply.
    I still dont understand what is wrong with my example.
    The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
    Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
    Thanks. Alex.

  • How to create a user in UME Database using web dynpro java custom application

    Hi,
    Can you please suggest me how to create a user in UME Database using web dynpro java custom application.
    My Requirement is user can register his/her user id in SAP Portal 7.3 UME database.
    Please suggest me.
    Thanks and Regards,
    Amit

    Hi Amit,
    Generated Documentation (Untitled)
    This is what you're looking for, there's no real cook-book -- though Amey mentioned there might be some material on SDN, perhaps some tutorials.
    You should be looking into com.sap.security.api.IUserFactory, methods newUser(String) which gives you and IUserMaint and commitUser(IUserMaint, IUserAccount) -- IUserAccount can be obtained using com.sap.security.api.IUserAccountFactory, method newUserAccount(String)
    Hope it helps,
    D.

  • How to create a simple idoc in practice? can you provide an example?

    how to create a simple idoc in practice? can you provide an example with full source code?

    Try with the follwoing steps
    Sending System(Outbound ALE Process)
    Tcode SALE „³ for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ¡V Create Model View
    Tcode BD82 ¡V Generate partner Profiles & Create Ports
    Tcode BD64 ¡V Distribute the Model view
    This is Receiving system Settings
    Receiving System(Inbound ALE )
    Tcode SALE „³ for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ¡V Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 ¡V Idoc List for inbound status codes
    Message Type MATMAS
    Tcode BD10 ¡V Send Material Data
    Tcode WE05 ¡V Idoc List for watching any Errors
    1)a Goto Tcode SALE
    Click on Sending & Receiving Systems-->Select Logical Systems
    Here Define Logical Systems---> Click on Execute Button
    go for new entries
    1) System Name : ERP000
    Description : Sending System
    2) System Name : ERP800
    Description : Receiving System
    press Enter & Save
    it will ask Request
    if you want new request create new Request orpress continue for transfering the objects
    B) goto Tcode SALE
    Select Assign Client to Logical Systems-->Execute
    000--> Double click on this
    Give the following Information
    Client : ERP 000
    City :
    Logical System
    Currency
    Client role
    Save this Data
    Step 2) For RFC Creation
    Goto Tcode SM59-->Select R/3 Connects
    Click on Create Button
    RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
    give the information for required fields
    RFC Destination : ERP800
    Connection type: 3
    Description
    Target Host : ERP000
    System No:000
    lan : EN
    Client : 800
    User : Login User Name
    Password:
    save this & Test it & RemortLogin
    3)
    Goto Tcode BD64 -- click on Change mode button
    click on create moduleview
    short text : xxxxxxxxxxxxxx
    Technical Neme : MODEL_ALV
    save this & Press ok
    select your just created modelview Name :'MODEL_ALV'.
    goto add message type
    Model Name : MODEL_ALV
    sender : ERP000
    Receiver : ERP800
    Message type :MATMAS
    save & Press Enter
    4) Goto Tcode BD82
    Give Model View : MODEL_ALV
    Partner system : ERP800
    execute this by press F8 Button
    it will gives you sending system port No :A000000015(Like)
    5) Goto Tcode BD64
    seelct the modelview
    goto >edit>modelview-->distribute
    press ok & Press enter
    6)goto Tcode : BD10 for Material sending
    Material : mat_001
    Message Type : MATMAS
    Logical System : ERP800
    and Execute
    7)goto Tcode : BD11 for Material Receiving
    Material : mat_001
    Message Type : MATMAS
    and Execute --> 1 request idoc created for message type Matmas
    press enter
    Thanks & regards
    Sreenivas
    Here Master Idoc set for Messge type MATMAS-->press Enter
    1 Communication Idoc generated for Message Type
    this is your IDOC
    Take a look at this guide.
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/ale/configuration.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapdevelopment.co.uk/training
    http://www.sappro.com/downloads/OneClientDistribution.pdf
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    Create The Extension Segment
    Transaction: WE31
    The first step in extending an IDoc is to create the new segments that will go into that IDoc. There are some rules that you need to follow when creating the segments:
    - The name of each segment type must start with ‘Z1’
    - For each field in the segment you need to define a field name and a
    data element.
    - The data element for the segment structure must be of data type ‘CHAR’.
    How to create new segments:
    Run the segment maintenance transaction WE31.
    Type your new segment name, and click on Create.
    Define the fields of your segment:
    Field name
    Data Element for the field (from the ABAP dictionary).
    Do not change the Export length!
    Save the segment
    Run Segment -->Check to check the segment for consistency.
    Release the segment for transport. Select Edit -->Set Release. Note that the “Release’ column now has a check mark.
    Create the Extension IDoc Type
    Transaction: WE30
    After you create the segments to be added to the extension type, you can create the extension type itself. Execute transaction WE30, enter the extension name, select Extension type, and click Create. You now have three options:
    Create new type: Does not refer to other extension types
    Create copy: Copies info from an extension type that already exists
    Create successor: Extends an extension type from a previous release
    of R/3. You can only have one version of an extension type for
    each release.
    Enter the Basic IDoc type that this extension type will extend.
    The screen now shows the structure of the IDoc type you used as
    a reference.
    Position the cursor on one of the segments and click Create. This will insert an extension segment as a child of the selected segment.
    NOTE: A segment cannot appear more than once in an IDoc type! You must control the use of duplicate segments with the segment attributes (the next screen).
    The segment attribute screen appears. Enter the information and save.
    Extension segments should not be mandatory (for future upgrades), and will need to have minimum and maximum number of instances defined. This answers the question, “for each instance of the parent segment, how many instances of the child segment may we have?”
    You can press the Segment Editor pushbutton to view or change the segment definition.
    Create the new Message Type
    You can only use an extension IDoc type by assigning it to a message type. You can create a new message type for this.
    First the message type itself needs to be created.
    Transaction: WE81
    Create a new entry and save. Use SAP established customer naming conventions (good form is to start with a Z and retain the rest of the related SAP message type, so, for example, MATMAS becomes ZMATMAS).
    After creating the message type, associate it with the corresponding Basic IDoc Type and Extension Type. This relationship is used when IDocs are sent to or received from a partner to determine what segments are valid and what the hierarchy for those segments is.
    Transaction: WE82
    Create a new entry and enter the Message type, Basic IDoc type, Extension type, and Release, and save your data. Note: the release assignment is not valid for prior SAP releases.
    One message type can be associated with many basic IDoc types; however, you need a one-to-one relationship for distribution via ALE.
    regards,
    srinivas
    *reward for useful answers*</b>

  • How to create function module in abap for VirtualProvider in bi

    how to create function module in abap for VirtualProvider in bi ???????????????
    can any one help me with simple example ?????????????????
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jun 15, 2011 4:40 PM

    Hi ,
    Thanks for replies about my question??.
    If i am using the exit in my char relation ship how can i debugg that exit???
    if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
    Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
    Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
    Thanks.

  • How to create  calendar in web dynpro abap

    Hi ,
    how to create  calendra in web dynpro abap.
    Thanks in advance.
    Regards, Chetan

    hi,
    For calender control, there is Date Navigator under "complex tab". You can just click and drag it and provide calender control.
    One more easy way is to create a input field. In the context, create a node and attribute of type "D"(which means DATE). And bind the context to your input field under "values" in property window. While running the program, you will see an calender attached to lt on the input field.
    Regards,
    Jithin

  • Configuring web.xml for OpenSSO

    Hello!
    I am developing simple web application and want to use opensso in my web application.I have downloaded opensso,deployed and configured ,so i dont need how to configure web.xml ,what filters and jars i needed,i have the simple web.xml
    <web-app>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>admin</web-resource-name>
                   <url-pattern>/admin/*</url-pattern>
              </web-resource-collection>
              <auth-constraint>
                   <role-name>admin</role-name>
              </auth-constraint>
         </security-constraint>
         <login-config>
              <auth-method>FORM</auth-method>
              <form-login-config>
                   <form-login-page>/login.jsp</form-login-page>
                   <form-error-page>/error.jsp</form-error-page>
              </form-login-config>
         </login-config>
         <security-role>
              <role-name>admin</role-name>
         </security-role>
    </web-app>so what filter should i add in web.xml so that when i access admins page <url-pattern>/admin/*</url-pattern>it should redirect to opensso s login page?

    Yes, I restarted the app server after making changes to web.xml file. No effects.

  • Simple Web Frontend for existing Java app

    Hi there!
    (sorry for my english at first ;)
    I have an existing java app which currently is used via command line. It's a server application which mostly does monitoring outputs and functions you can use in the shell are like starting/stopping the server. For these outputs and for starting/stopping and so on i want to create a simple web frontend which gives me the ability to do this.
    What do i need? It would be fine if i do not have to set up a large tomcat server because the program should run out of the box. Of course i want to access the website via the internet (simple login). The whole thing would be about 2-5 simple pages. Best thing would be if i could update the monitoring variables via java script.
    Can i use servlets (not much experience with it so far, that's why i ask :) )? What do i need for the webserver? Can i access my data variables from right from the servlet?
    Thanks in advance,
    kiwaque

    If you are familiar with Swing, I would suggest GWT for the Frontend... you can build and debug the Frontend similar to a Swing App, and then compile it to HTML/CSS/Javascript...

Maybe you are looking for

  • No longer able to use Capture (only capture now)

    I used to be able to capture with the full capture functionality (in Final Cut Express) and now I can only 'capture now'. I have not changed any of the system settings. I confirm my camera (Sony HDR-HC7) is recognised in system profiler and I can als

  • Context menu How to add extra lines in Windows 7

    Windows 7. Just updated from XP.  Only modest technical skills, so I would appreciate simple detailed instructions if anyone is able to help me.

  • Select statement on unique key consraint

    I have a table 'PO' in which 'ID' is primary key and 'PO_NUM' is unique key. I am using a select statement on unique key 'PO_NUM' to get the 'ID'. select id from po where po_num= '3266'; it says, 'no data found' But the exists in the database. Can an

  • HELP!! HELP!! h.264!! HELP!! HELP!!

    Hello! Can anybody tell me what i make wrong? I tryed a lot of freeware Programms to convert dvd to ipod with h.264 codec. The programs are dvd catalyst, Pqdvd, cucsoft,.... With not even one of those programs it is possible to bring the m4v file to

  • Download slow for Mavericks

    My Mac mini is downloading Mavericks but it really slow.  Is it because of the DSL line?   It is going to take hours.