Difference between GET and URL Rewriting in Servlets

What is the difference between GET and URL Rewriting in Servlets?.Please illustrate with an example.

Thanks for your reply gimbal.
GET appends query string at the end of the URL. URL rewriting also does the same thing. It also appends query string right?. Then what is the difference between two. I have this question in my mind for long time.To my surprise an interviewer asked this question in an interview also.

Similar Messages

  • Difference between urn and url

    what's the difference between urn and url?

    <b>What is an URL</b>
    An Uniform Resource Locator (URL) is the term used to identify an Internet resource, and can be specified in a single line of text.
    <b>What is an URN</b>
    An Uniform Resource Name (URN) is the term used to identify an Internet resource, without the use of a scheme, and can be specified in a single line of text.
    <b>What is an URI</b>
    An Uniform Resource Identifier (URI) is used by a browser to identify a single document, and it too can be specified in a single line of text
    <b>The general form of an URL has four parts</b>
    A scheme followed by a colon.
    Invokes a TCP/IP-based application level protocol
    Schemes are: http, https, ftp, news, mailto, file, telnet.
    <b>A server name.</b>
    A // followed by the host name or IP address of the server
    Not needed if the server is the default
    news server
    mail server
    <b>An optional port number. Standard or default port numbers are:</b>
    ftp *
    ssh 22
    telnet 23
    smtp 25
    gopher 70
    http 80
    nntp 119
    SSL 443
    <b>A path.</b>
    Consisting of folders and/or files.
    May include a file extension which identifies the type of document.
    May also include a QUERY_STRING with arguments.
    Ftp uses port 20 for data and port 21 for flow control.
    <b>DIFFERENCE BETWEEN URN & URI</b>
    The idea is that a URL is a mechanical link to a resource's location, where it can be downloaded. For this reason, a URL contains a hostname and a local part, all of which can be resolved anywhere on the Internet.
    What a URN tries to do is different. It tries to give a description of a resource without actually pointing at it. For example:
    urn:isbn:90-365-17273
    <b>URI:</b> is a string that identifies any resource. Indentifying the resource does not necessarily mean we can retrieve it. URI is a superset of URL and URN.
    files/reports/marketing/report.html
    <b>URL:</b> URI that specify a common Internet protocol such as HTTP or FTP are also called URLs. URL is an informal term an is not used in technical specifications.
    http://www.foo.com/files/reports/marketing/report.html
    <b>URN:</b> A URN is an identifier the uniquely indentifies a resource but does not specify how to access that resource.
    ISBN: 1-930110-59-6
    I hope it helps
    Best Regards

  • Difference between URI and URL

    hi,
    i'm having trouble understanding the difference between a URI and URL.
    The javadoc explains that
    "A URI is a uniform resource identifier while a URL is a uniform
    resource locator. Hence every URL is a URI, abstractly speaking, but not every URI is a URL. This is because there is another subcategory of URIs, uniform resource names (URNs), which name resources but do not specify how to locate them. The mailto, news, and isbn URIs shown above are examples of URNs.
    The conceptual distinction between URIs and URLs is reflected in the differences between this class and the URL class.
    in what way does a URL 'locate' a resource rather than name a resource?
    eg.
    URI example: mailto:[email protected]
    URL example: http://java.sun.com/j2se/1.3/
    I don't see why the email address does not 'locate' the particular email alias?
    thanks,
    asjf

    Look at the class java.net.URL.
    It has a number of methods, such as 'getContent', 'openConnection', 'openStream'. It is what differs URL from URI and answers your question about "I don't see why the email address does not 'locate' the particular email alias?".
    With URL you can read the contents of the resource, pointed by URL, e.g. read a file from HTTP or FTP server. An URI does not imply that it refers to such a downloadable resource. It just names something, that somebody may know how to access.
    Also consider the following examples:
    - an URL of a document, if followed by a '#' symbol and by an anchor name ('fragment identifier') is sometimes referred as an URI, not URL, because it does locate a fragment in the file, not a downloadable file.
    - a query ('?' followed by something, up to '#') is a part of the URL, because it is required to locate the file.
    The syntax of an URI is described in RFC 2396, http://www.ietf.org/rfc/rfc2396.txt.

  • Difference between Web Service URL and Report Manager URL

    What is the difference between Web Service URL and Report Manager URL in Reporting Service configuration manager in SQl Server 2008 Reporting Setrvices

    Another way to put it is the Web Service URL is just that, its used for services that are connecting to issue API calls.  The Report Manager URL is the nice GUI that users should use.  If you click the links, you should see the difference.  I
    am sure you have likely done that, but functionally one is for programmatic purposes and the other to be the front end graphical user interface.
    Sometimes pictures help as well...
    http://bretstateham.com/reporting-services-architecture-diagram%E2%80%A6/

  • Difference between GET pernr LATE and GET pernr LAST?

    Hi all,
    does anyone know the difference between GET PERNR LATE and GET PERNR LAST?
    Regards
    Mart

    hi,
    Please refer to this link:
    [http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9abd35c111d1829f0000e829fbfe/frameset.htm]
    Hope this will Help.
    reward if useful.
    Sumit Agarwal

  • Difference Between doGet() and doPost

    Hi Everyone !!!
    I'm very new to servlets.I dont know what is the difference between doGet() and doPost() Method.
    Can anyone explain me .
    Can any give me details and differences between these two
    thanks in advance

    As you mention Why developer will use GET, if POST have all the advantages. Please look into, it may clear you doubts
    GET
    the GET type request is normally used for simple HTML page requests. The types of events that generate this type of request are clicking on a hyperlink, changing the address directly by typing in the address textbox on a browser or application that has HTML functionality, and submitting an HTML form where the method header is set to get as in method=get. Also, a GET request is triggered when selecting a favorite from the Favorites list and using JavaScript to change location.href. Usually the browser is configured to send a GET request even if no method is set explicitly by the HTML.
    The benefits of the GET method are
    1. It retrieves information such as a simple HTML page or the results of a database query.
    2. It supports query strings (name-value pairs appended to URL). Servers usually limit query strings to about      
         1024 characters.
    3. It allows bookmarks.
    POST
    This occurs when a browser or application submits an HTML form with the method attribute set to post as in method=post.
    The benefits of the POST method are
    1. It sends information to the server such as form fields, large text bodies, and key-value pairs.
    2. It hides form data because it isn't passed as a query string, but in the message body.
    3. It sends unlimited length data as part of its HTTP request body.
    4. It disallows bookmarks.
    Conclusion, always prefer to use GET, except mentioned in the following reason:
    1. If data is sensitive
    2. It is greater than 1024 characters
    3. If your application don't need bookmarks
    As because GET is more faster than POST.
    Both are used to send the request to the server, if you analyze than you may make the differnces like
    In the case of GET means send the request to get the simple HTML page from server whereas, in the case of POST means send the request to post the data to server.
    By Ausaf Ahmad
    Message was edited by:
    Genius_Brainware

  • Difference between sendRedirect and RequestDispatcher?

    Difference between sendRedirect and RequestDispatcher?

    I have a situation of needing to redirect a request to a URL that is outside of the container. The scenario is the following, we have a simple logging in servlet that takes some POST parameters (username, password, and other values.) Depending on the username and password, the logon request along with all its POST parameters need to be redirected integrally to another machine. How do i do a redirect with all my parameters intact? sendRedirect does not seem to have any (visible to me) mechanism to do this. We cannot send them on the URL as this will reveal things too easily to our users and we don't want them to bookmark the resulting page.
    Thanks for any help,
    t

  • Difference between forward and redirect

    difference between forward and send redirect

    + a Redirect will change the URL in the browser, whereas a forward will not.
    + a Redirect can be any URL, whereas a forward has to be directed to a resource within the container,
    + a Redirect MUST be an absolute URL (though the Servlet functions will do this for you).
    + a Redirect, being a new request, triggers filters, whereas a forward does not.

  • Could any one tell me what is the difference between swfloader and module loader?

    Hi  All,
                          Could any one tell me what is the difference between SWFLoader and Module Loader in Flex3 in detail?

    Hi,
    ModuleLoader is a kind of strange API that is really just intended to look like SwfLoader for modules that contain a single visual component, and hides most of the module loading infrastructure, which is all about class factories.
    What I mean by "only loaded once" is that if you have several places in the code that call the ModuleManager.getModule("url").load() call, it will only ever get loaded over the wire and interpreted once, subsequent "loads" will just re-dispatch pseudo-load events to the new client.  In other words, the class factory is a singleton for a given url. Unloading is a totally different story.  As you note, not everything is truly unloadable, because there may be lots of references to stuff in
    the module that will keep it alive and un-GC'ed.
    I suggest playing with the low-level API so that you understand the backing implementation, and this should help you understand the limits of ModuleLoader.
    The main difference between modules and applications is that modules have lower overhead, and they only ever get loaded once, no matter how many times you load them. If you're using the ModuleLoader API, keep in mind that you're losing about half the functionality of the module system.  I will assume that you are, because otherwise it would be obvious where to expose methods.  You might want to play around with the lower level ModuleManager API just to get a hang of what's going on - ModuleLoader is a pretty thin veneer over the lower API.                
                    Basically, what you want to do is to have your module implement an interface, say IModuleWhatever.
    Also try and refer to this link which was previously discussed in this forum..
    http://forums.adobe.com/message/74404
    Thanks,
    Bhasker

  • Difference between automatic and non-automatic page attributes

    Hi,
    Can anyone tell me difference between automatic page attributes and non-automatic page attributes?
    and also difference between stateful and stateless mode with examples?
    Thanks
    Narendra

    Hi Mullapudi,
    If you mark a page attribute as u2018automaticu2019 (auto in the system), the attribute automatically gets its values via the calling URL or
    via the navigation process from other pages.
    This kind of attribute only has to be declared for one page.
    It is identified by its name equivalence.
    If another page uses a parameter with the same name,
    at runtime that parameter automatically
    gets the same values as the attribute.
    Non-automatic page attributes
    If you flag a page attribute as non-automatic, the attribute gets its values from the class attribute.
    The visibility of page attributes when parameters are transferred between BSP pages depends on whether the navigation is explicit or implicit.
    Explicit navigation
    For example, if navigation->goto_page(page.htm)
    Implicit navigation
    With implicit navigation, the page attributes are transferred automatically from OnInputProcessing to OnInitialization, both in stateful and stateless mode.
    The auto page attributes are refilled by the request, both in stateful and stateless mode.
    Reward if Useful...
    Regards,
    Anita. B

  • What is difference between abstraction and encapsulation ?

    Hi,
    I am trying to figure out the difference between abstraction and encapsulation but confused.
    Both are used for data hiding then what is the exact difference ?
    Thanks.

    Tushar-Patel wrote:
    I am trying to figure out the difference between abstraction and encapsulation but confused.
    Both are used for data hiding then what is the exact difference ?This is the picture I have:
    When you encapsulate something you get an inside and an outside. The outside is the abstraction. It describes how the encapsulated entity behaves viewed from the outside. This is also called the type. Hidden inside is the implementation. It holds detail information about how the type's behaviour is accomplished.
    It's a very simplified picture but I think it's quite accurate and it works for me.

  • Can Oracle be forced to use the spatial index for sdo_filter in combination with an or clause? Difference between Enterprise and SE?

    We’re seeing the following issue: sql - Can Oracle be forced to use the spatial index for sdo_filter in combination with an or clause? - Stack Overflow (posted by a colleague of mine) and are curious to know if this behaviour is due to a difference between standard and enterprise, or could we doing something else wrong in our DB config.?
    We have also reproduced the issue on the following stacks:
    Oracle SE One 11.2.0.3 (with Spatial enabled)
    Redhat Linux 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    11.2.0.3.0 Standard Edition and 11.2.0.4.0 Standard Edition (both with Spatial enabled)
    Microsoft Windows Server 2003R2 Standard x64 Edition
    However, the SQL works fine if we try it on Oracle 11.2.0.3.0 *Enterprise* Edition.
    Any help or advice would be much appreciated.
    Kindest Regards,
    Kevin

    In my experience sdo_filter ALWAYS uses the spatial index, so that's not the problem. Since you did not provide the explain plans, we can't say for sure but I think yhu is right: Standard Edition can't use the bitmap operations, and thus it'll take longer to combine the results of the two queries (because the optimizer will surely split this OR up in two parts, then combine them).
    BTW: when asking questions about queries here, it would be nice if you posted the queries here as well, so that we do not have to check another website in order to see what you are doing. Plus it will probably get you more answers, because not everyone can be bothered to click on that link. It would also have been nice if you had posted your own answer on the other post here as well, because my recommendation would have been to use union all - but since you already found that out for yourself my recommendation would have been a little late.

  • What is the difference between #variable_name and :variable_name?

    Hi!
    What is the difference between #variable_name and :variable_name?
    I have found that if we use alphanumeric variable then :variable_name return value in quotes but #variable_name without quotes.
    Why it does not work in the same way for variable default values when variable is used in filter? (It works in mapping)
    I use variable in filter like T.OUT_DATE>convert(datetime,:LAST_UPDATE_DATE,121)
    When I use my variable in package and do refresh it works fine. But when I try to execute the same interface with variable default value I get error. Seems that variable name has been not changed to the value. It does not work with default value in quotes neither without quotes.
    Any ideas how to solve that?
    Thank you in advance!
    Edited by: user13278245 on Sep 15, 2010 4:34 AM

    Question is how to make it work with default value, when I execute interface standalone, not in package? And why it works in mapping but not in filter?
    + I have found that it works if source is Oracle. It doesn't work only for MS SQL source.
    Edited by: user13278245 on Sep 15, 2010 6:43 AM

  • What is the difference between avi and mov

    Hi FCP users,
    I am actually an audio guy, but I would like an answer on something.
    I work with Logic, and usually use quicktime movies when I am working to movies. But I am working with a client who is an Avid user and swears by avi files. Can someone explain to me the difference. My client explained to me that avi's are better than mov files. He claims their file sizes are bigger, so therefore there quality is better. He said there is some form of compression on quicktime movies which lessen the quality to avi, even if the mov is uncompressed apparently the quality is still less than an uncompressed avi. If this is not true, could someone give me the real big difference between the two.
    I thought is was more of a preference, like windows users prefer wav, and apple users like quicktime movies. Like with audio, there isnt a huge difference between aif and wav. Windows users prefer wav and apple users aif.
    Thanks in advance for any information.

    gazo wrote:
    The vid guy has sent me some files to work with. So I am working in Final Cut to edit some of the video, and then sending it back to him. He is working on PC with Avid. What is the best. Should I convert the avi files he has sent to me to mov files. Then pull these into FCP, and then export it out as avi for him. Or should I export out as mov, and then he converts them to avi when he pulls it into Avid on his PC? Very confusing which is the best procedure between Mac and PC.
    Thanks in advance for any help.
    This is a disaster in the making. You can avoid being part of the train wreck by either renting an Avid, going to live at his house, or telling him to get a Macintosh.
    You must find the lowest common denominator video format that will work on both of your systems. That could be conventional DV, dunno, never used Avid and never tried to edit anything on a PC. But I can tell you this with absolute certainty, it will be easier and, in the end, much less expensive for one of you to adopt the other's platform for the duration of this project. The time you waste transcoding, arguing, formatting your drives, buying secondary products, fitting round pegs into square holes, and trying to find a workable solution (that will keep changing as the project gets more complicated) will cost you much more in terms of money out of pocket and creative frustration than simply buying/renting another station.
    bogiesan

  • What is the difference between PUSH and FETCH

    I am a little confused. I use my iphone for both my personal POP email accounts and my business exchange account. I am trying to save as much battery as I can so I turned off push and set everything to manual...but now when I try and get may mail....it either says "connecting" or "checking for new mail" at the bottom of the screen and nothing happens from there.
    What is the best way to setup this situation for the most battery life? I don't need it to automatically download emails just when I open the email accout would be nice.
    I also noticed that when I delete an email from my iphone on my exchange account, it also deletes is on my desktop at work...I need to turn this off...is it possible?

    Hi maxum25,
    The difference between push and fetch is that:
    When using push, the server sends a signal to the iphone and lets it know that an email is coming its direction. Kind of like receiving a call. The iphone does not need to do anything except receive the email.
    When using fetch, the iphone has to wake up every so often and send a request to the server to see if there is any new email waiting for it on the server to download. This takes more time because the iphone sends a request, the server says yes there is some, the iphone says ok give me the new email.
    Now the exchange email uses active sync to keep all changes on the exchange server and mobile device in sync. This is automatic and is the nature of exchange and active sync. In order to keep this from happening you would need to talk to your IT dept. and see if they have an imap or pop alternative. Even using imap reflects the changes back to the server.
    Hope this helps.

Maybe you are looking for

  • I can't activate my iPad2 after upgrading to ios6?

    I download ios6 for my ipad2, but it can NOT activate?

  • How do I transfer my music to another computer?

    How do I transfer my music from my ipod nano to another computer; keep getting message "ipod is synced with another iTunes library. An iPod can be synced with only one iTunes library at a time."?

  • How Big a Hard Drive can I put in my macbook?

    I'm looking to upgrade my internal hard drive, is there a limit on the size I can upgrade to? I have a 150G drive, and I'm running out of space. I'm thinking about going for the gold, and getting a 1T...  any recommendations? Thanks!

  • Running a batch file on ftp server

    HI All, i am trying to use Command line facility of file adapter to run a batch file.. i batch file i have a single command as mkdir ranjeet. how should i call this batch file from file adapter.. i tried putting batch file name in the command line se

  • Problem with Barcode printing in smartforms

    Hi Gurus, I have  made  changes to the system barcode  height in SE73 from say 1.3 to 0.7 cm. But when I take the printout  from the  barcode printer I am getting  the  barcode with old height. My concern is do we  need to do change anything with the