Where does a servlet reside?

I am using NetBeans 5.5,
Tomcat folder is located at C:\jakarta-tomcat-5.0.25
Suppose the code.
// Fig. 26.6: WelcomeServlet.java
// A simple servlet to process get requests.
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
public class WelcomeServlet extends HttpServlet
   // process "get" requests from clients
   protected void doGet( HttpServletRequest request,
      HttpServletResponse response )
         throws ServletException, IOException
      response.setContentType( "text/html" );
      PrintWriter out = response.getWriter(); 
      // send XHTML page to client
      // start XHTML document
      out.println( "<?xml version = \"1.0\"?>" );
//      out.printf( "%s%s%s", "<!DOCTYPE html PUBLIC",
//         " \"-//W3C//DTD XHTML 1.0 Strict//EN\"",
//         " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n" );
      out.println( "<html xmlns = \"http://www.w3.org/1999/xhtml\">" );
      // head section of document
      out.println( "<head>" );
      out.println( "<title>A Simple Servlet Example</title>" );
      out.println( "</head>" );
      // body section of document
      out.println( "<body>" );
      out.println( "<h1>Welcome to Servlets!</h1>" );
      out.println( "</body>" );
      // end XHTML document
      out.println( "</html>" );
      out.close();  // close stream to complete the page
   } // end method doGet
} // end class WelcomeServletand index.jsp is
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
    <form action="/jhtp6/WelcomeServlet" method="get">
        <p><label>Click the button to invoke the servlet
            <input type="submit" value = "Get HTML Document" /></label></p>
    </form>
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
        <!-- Let's welcome the user ${param.name} -->
        Hello ${param.name}!
    </c:if>
    --%>
    </body>
</html>My question is where is the physical location of the file "WelcomeServlet" ?
Do I need create a subdirectory "jhtp6" manually somewhere?
I get the error message:
HTTP Status 404 - /jhtp6/WelcomeServlet
type Status report
message /jhtp6/WelcomeServlet
description The requested resource (/jhtp6/WelcomeServlet) is not available.
Apache Tomcat/5.5.17Thanks for your advice!

hi,
common things... do it upto well known
store your servlet in C:\jakarta-tomcat-5.0.25\webapps\root\WEB-INF\classes
if no classes folder create there and store
store your jsp in C:\jakarta-tomcat-5.0.25\webapps\root\
run your jsp file
http://localhost:8080/filename.jsp

Similar Messages

  • Where does presentation cache reside in obiee?

    Hi all,
    where does presentation cache reside in obiee?
    Regards,
    Vishal

    Hi Vishal,
    Presentation cache stores the finished report output in the presentation server. It resides here,
    OracleBIData\tmp\ folder
    Rgds,
    Dpka

  • Can I use "find my iPhone" from my Mac? If so, where does the app reside?

    I have Find My Mac on my iPhone, but can this be used from the Mac to find the iPhone? If so, where does the app reside on the mac?

    Which browser? Safari, Finder ETC.
    In icloud on my desktop(system pref) I can only selet the tick box next to Find My iPhone.

  • Where does exe files reside in oracle

    hi,
    Can anyone tell me where does the exe files of the utilities like listener ; sqlplus ; dbca etc reside in oracle?
    thanks

    874275 wrote:
    hi,
    Can anyone tell me where does the exe files of the utilities like listener ; sqlplus ; dbca etc reside in oracle?
    thankswhat is your oracle version and operating system name and version?
    open command command prompt or terminal
    give set command it will show you the path for bin directory
    eg: in windows
    Path=D:\oracle\product\10.2.0\db_2\bin
    in linux
    PATH=/u01/db/app/oracledb/bin
    also check ORACLE_HOME/bin directory you can find.
    Announcement: Forums Etiquette
    Posters, please mind these common-sense rules when participating here:
    - When asking a question, provide all the details that someone would need to answer it. Consulting documentation first is highly recommended. - When answering a question, please be courteous and respectful; there are different levels of experience represented here. A poorly worded question is better ignored than flamed - or better yet, help the poster ask a better question.
    - It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    - See more tips in the FAQ
    Thanks for doing your part to make this community as valuable as possible for everyone!
    - OTN

  • In Trex where does the documents reside ?

    We have Enterprise portal and use TREX for collaboration rooms and document indexing. EP is a java only Netweaver stack on AIX and TREX is on a window box. What I wanted to know is where do the actual documents, which TREX indexes reside?
    Does Trex retain a copy of the indexed document? For a particular index where is the mapping of the actual document? Where can I look at all this data?
    Pls advise.
    thank you
    regards
    Laxmi

    Hello Kai,
    documents original location is transparent on KM, whether it is on a external repository or not doesn't matter,
    for KM and TREX it is part of repository manager (configured at System Administration > System Configuration >
    Knowledge Management > Content Managenement > Repository Managers).
    Once a repository manager is activeted, there are several services running on top of it, eg.: subscription, rating,
    etc. and other global services which affects every repository. Crawler service and Index Management are the
    global services which will do indexing work
    In fact TREX doesn't look for documents, the crawler is the component that retrieves the documents and
    deliver for TREX. Have in mind that the crawler is part of KM, not TREX. It is active for every repository,
    you can check on the monitor at System Administration > Monitoring
    for more information: http://help.sap.com/saphelp_nw70/helpdata/en/fb/38ef207d0a47ee9dc08deeed855392/frameset.htm
    once documents are retrieved by the crawler and is at TREX hands, it will index normally, it uses
    a file system based architecture, if you browse through TREX server you can find the indexes you have
    created as folders and documents information inside. Be careful when checking at file system level, data
    there is designed for TREX work only, it doesn't serve as backup and can't be considered for any
    other functioning.
    kind regards,
    Rafael

  • Where does a class reside?

    I confess, I'm new. I'm trying to learn Java progrmming and in the book "Teach Yourself Java in 21 Days" it says that an instance can reference and update class variables. Where are these class variables? Okay, they reside on a hard drive somewhere but does an instance have update authorization to the hard drive? or is the class held in memory somewhere and when and instance updates the class it is only in memory? It would not make sence if you are creating a dozen instances of the same class to keep going out to the hard drive for the creation of every instance.
    I'd appreciate any light you can shed on the subject.
    Thanks,
    Byron in Seattle

    You hit the nail on the head; it would be way too costly to run java having to read class file definitions from the hard drive every time you use one.
    Here's how it works:
    When you start java, all of the classes in the java software version you are using (1.3, 1.4, etc) are automatically loaded into memory along with the Java Virtual Machine (JVM)
    Next, everything in your classpath (well, not everything, but all .class files) will be loaded into memory.
    After that, classes can be 'bootstrapped' by using Class.forName(...)

  • Where does system preferences reside?

    Hi there,
    I am trying to locate the actual coding of system preferences. Does anybody know where it is? I have looked under system and library but not able to find it.
    thanks for your help
    m

    I assume you mean the location of the preference pane files. I'm not sure what you mean by "coding." If you're looking for system preferences and where they're stored, the answer depends on what preference you're looking for. Most can be found in your user library: /Users/YOURUSERNAME/Library/Preferences
    The panes themselves are located in:
    Macintosh HD/System/Library/PreferencePanes
    You may also have user-specific preference panes installed. Those reside in: /Users/YOURUSERNAME/Library/PreferencePanes

  • Where does my application resides for deployment?

    1) I have stepped thru deploying the HelloWorld and Fortune sample applications .. and they worked fine.
    What I don't understand is how to deploy my JSP/JDBC application. Where do I put my application? The ias-samples put the samples in ..\ias-samples\fortune\assemble\fortune.war (and .ear file here too) and then on the browser the link is http://127.0.0.1/NASAppl/fortune/fortune.
    (In Apache-Tomcat, my application would go to the \WebApps folder under Tomcat).. where would I put in
    iPlanet and it would recognize it with http://127.0.0.1/NASAppl/myAppl ?
    2) does the folders under 'myAppl' need to be in a certain structure, ie: the classes go to a a folder named 'classes' and JSP go to ? and any other types where?
    3) deployment must have an .ear file ? so after I create .war with my class/jsp files, i have to create .ear (I have not tried with myAppl yet).
    4) I believe I have to re-start iAS after I deploy myAppl ?
    (I am running iAS test drive version win NT)
    your reply asap appreciated.. thanks ...

    You need to first create a .war or .ear file. Then you need to deploy this .ear file either using the iPlanet Deploy Tool or from the command line (for ex. iasdeploy deployapp fortune.ear)
    All the classes and files related to the application will be under APPS directory.
    I advise you to first read the Developer's guide and Admin guide. All your questions will be answered.

  • Downloading using Snow Leopard-Where does the DL reside?

    I have been using leopard along with third-party "Speed Download" without difficulty. When I switched to Snow Leopard each download began with a Safari screen turning totally gray(blank!) while the address bar showed progress of the download through completion... , then returned to a normal Safari blank screen. Using Spotlight, there is no sign of where the download went! Suggestions welcomed!

    Same problem sys 10.6.8. with safari 5.1.  I know where my downloads are supposed to go but the screen goes dark and the download appears to goes to completion and the download stalls. Firefox downloads the same file perfectly??

  • Where does the email reside?

    When I go to my previous downloaded emails the iPhone seems to be connecting with the server, does that mean that some messages does not download completely to the iPhone? Or why when I have seen an email and return to it I get a message that the email has not been downloaded from the server? Thanks, ex-crackberry here, have mercy!

    Cory K wrote:
    To my knowledge, Yahoo doesnt use any encryption (SSL or TLS).
    This probably wont be an issue, but whenever you transfer usernames/passwords without any encryption you are taking a risk.
    If you want to use a secure mail server, try something like GMail.
    There are VIs already written to handle SSL encryption, try a search on the forums.
    You don't necessarily have to encrypt the entire transfer. There are options to encrypt just thelogin authentification credentials. Methods used for that are for instance MD5 or SHA1.
    This does not secure the actual transport of emails, but at least the login credentials.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Where does camera raw reside?

    I'm on a Mac. Is it inside my app folder? Is it an independent app? have an important quesiton once I figure that out. thanks.

    thanks Jeff, solved the issue. In Bridge right click was not offering ACR, but changed preference to automatically open all supported jpegs/tiffs. Don't know why is was set otherwise.

  • Where does the song metadata reside (cover art work and other information)?

    I edit the metadata for each album/song - add cover art, correct any album name or artists erros, make some notes to myself to help search/browse. Where does this data reside - with the song file or the library file or somewhere else? BTW I don't download the cover artwork from iTunes. I just find it online and copy and paste it into the metadata window. I have too many obscure albums to rely on iTunes.
    The reason I ask is because I double backup my music and iTunes files. Normally, when I rip new albums I just add the new files and updated library files to me backup hard drives, by sorting by the modified date. But I'm now going back and editing all of my oder albums/songs metadata as I just described. In order to make sure this information gets backed up I'm simply backing up the entire iTunes Music folder, which takes all night cause it's around 500GBs. But I'd prefer to only add the modified files to the backup, which usually only takes a few moments.
    When I sort by modified date the albums/songs I edited metadata for do not show up as modified that day. So, is it pointless to always backup the entire folder when all I have to do is back up what was modified? And if so, what are those files?
    Also, is there a good app that will compare two hard drives and keep them in synch? So that I can basically do what I want to do automagically? Set one as the master and one as the backup, and ahve the app always synch the backup to the master. That would be nice!

    Andrew Thompson2 wrote:
    I edit the metadata for each album/song - add cover art, correct any album name or artists erros, make some notes to myself to help search/browse. Where does this data reside - with the song file or the library file or somewhere else? BTW I don't download the cover artwork from iTunes. I just find it online and copy and paste it into the metadata window. I have too many obscure albums to rely on iTunes.
    If you're not downloading artwork from iTunes, all of the tags and artwork are stored with the individual song files. Some iTunes-specific data, like play count and rating, are stored in the iTunes Library database file.

  • Where does BPM context data store ?

    hi experts,
    When we start a BPM process, the process instance gets created. And we use the BPM context to store data for the purpose of passing it to another task. Where does this data reside ?? In server's primary memory(RAM) ?? Or there is some portal local data base where this conext data is getting stored ?
    If it is in RAM, If we restart the server will we loose this context data ?? Or there is some place(portal local database) where active process instances are saved.
    I am confused.. Why are we saying BPM sould not hold large volume of data ??. By this I believe the data is putting weight on RAM.
    Edited by: pramod bagauly on Sep 21, 2010 12:47 AM

    Hi,
       Context data is stored in the DB. I highly recommend you read the CE architecture guide. Below is a quote (page 14) that relates to context:
    "Instead, at every save point, the data context of a process is serialized to XML and stored as one
    u201Eblob‟. When the data needs to be read back, it is fetched from the DB and parsed to re-instantiate the data
    objects in the memory."
    You can read Ulf's blog:
    /people/ulf.fildebrandt/blog/2010/04/20/composite-development-architecture-guidelines
    The document itself is here:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/109b805f-2e28-2d10-ed9c-94eea0e8ae5c?quicklink=index&overridelayout=true
    HTH,
    O.

  • What's the Deal with the iPhone Backup? Where Does It Back Up to?

    When my iPhone does its backup thing (and gee I wish I could turn that off permanently but nothing seems to stick in the preferences... have to stop it manually in iTunes each time... anyway...), where does the backup reside? It takes a couple of hours to do a backup, so I'd think there was a lot of actual content being moved to my Mac. But there's 14GB of content on my iPhone and my hard drive isn't losing 14GB of storage space... not even 100MB from what I can tell!
    So what's really happening during a "backup"? If I wipe the content off my iPhone with a restore, where will the backup content come from?

    On a Mac, the iPhone's backup file is stored at Home > Library > Application Support > MobileSync > Backup.
    The iPhone's backup stores data such as most iPhone settings, SMS messages, email account settings, notes, recent calls, call favorites, 3rd party applications or some 3rd party applications and any data created/stored by a 3rd party application, and photos captured by your iPhone.
    The backup does not store iTunes content, contact information, bookmarks, or photos transferred from your computer to your iPhone. This data should be available on your computer.
    Basically the iPhone's backup stores all data not included with the sync process.
    When performing a Restore with iTunes, the options are to restore your iPhone from your iPhone's backup, or as a new iPhone or not from your iPhone's backup.
    If you constantly cancel the backup process, this may cause the backup to become corrupt and if you never allow it to finish, you won't be able to restore what should be saved with the backup.
    How many 3rd party applications do you have installed and regularly use that create/store data?
    And do you have a number of photos that were captured by your iPhone available that have not been imported by your computer and then erased from your iPhone as with any other digital camera?
    If so and you regularly capture more photos, these are included with the backup.

  • Where does the iPhoto library reside?

    Where does the iPhoto library reside on your hd?  when I go to the search bar above, it shows 2 libraries!  I am about out of hd space so I am hoping that it has been duplicated somehow.  It's about 36GB. =)
    Thanks for your help!
    MK

    By default it's in your Pictures Folder.
    If space is an issue you can move the Library to an external disk:
    Make sure the drive is formatted Mac OS Extended (Journaled)
    1. Quit iPhoto
    2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
    3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
    4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
    Regards
    TD

Maybe you are looking for

  • Error in using bapi

    Hi, I am using bapi 'BAPI_QUOTATION_CREATEFROMDATA' for creating quotation. it is giving error 'External number assignment is not defined for document type ZSQ' Can you please suggest me the reason of this error. Thanks, Sushant.

  • How to handle this payment scenario in SAP

    Hello Gurus, Can anyone please help me with how we make this payment in SAP. Customer A is the alternate payer for Customer B. We gave customer B a credit memo. When customer A is making payments, customer A wants to use the credit memo assigned to c

  • Is there a non-edit zone?

    Hi, I am having trouble editing a picture that has a self printed border and am having a hard time working on the edges without messing the border line up. Is there an option to make the sides un-editable so I can work faster? thanks

  • Error with XCode

    Hey there, I just got the following error message in XCode: Uncaught Exception: * -[XCActionManager buildAndGo:]: unrecognized selector sent to instance 0x2883bf0 Stack Backtrace: The stack backtrace has been logged to the console. I think is is rela

  • Why does Windows 7 say that PRS-T2 is NOT COMPATIBLE with Windows 7 and not install it?

    I have downloaded and installed the Reader for PC and System updates that came out in March of this year (I believe). But since I had to do a clean reinstall of Windows 7 several months ago, I cannot install the reader. Can anyone help me?