answersLogoWhite

0

Retrieving HTTP Request Header Information

The Http Request header is the area where all the details of the request are bundled. This is where the browser specifies the file wanted, date, image file support, and a lot more. Let us take a look at a sample Servlet that is going to read through the Http Request Header.

Servlet code:

import java.io.*;

import java.text.*;

import java.util.*;

import javax.servlet.*;

import javax.servlet.http.*;

/**

* Displaying request headers

*

* @author Anand V

*/

public class ReadHttpRequestHeaderServlet extends HttpServlet {

public void doGet(HttpServletRequest request, HttpServletResponse response)

throws IOException, ServletException

{

response.setContentType("text/HTML");

PrintWriter out = response.getWriter();

out.println("< HTML >");

out.println("< head >");

String title = "Read Request Header Example";

out.println("< title >" + title + "");

out.println("< / head >");

out.println("< body >");

out.println("< h3 >" + title + "< / h3 >");

out.println("< table >");

Enumeration e = request.getHeaderNames();

while (e.hasMoreElements())

{

String headerName = (String)e.nextElement();

String headerValue = request.getHeader(headerName);

out.println("< tr >< td bgcolor="#CCCCCC" > " + headerName);

out.println("< / td >< td > " + headerValue + " < / td > < / tr >");

}

out.println("< / table >");

out.println("< / body >");

out.println("< / HTML >");

}

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Information Science

What information goes in the header along with the page number?

In addition to the page number, headers often include the document title, chapter or section titles, author's name, date, or any pertinent identifiers for the document's context. This information helps readers quickly identify the content of the page while navigating through the document.


Which file contain metadata?

The source page of your website or blog contains the metadata which can of many types ....some metadata is to verify ownership ... some is for adding relevant keywords for traffic generation. I do hope this answer is sufficient.


What is the syllabus in DIT?

Information & Communication Technology (ICT)(PAPER- 1)Total Th Hrs 40 Total Pr Hrs 40Total Th Mks 100 Total Pr. Mks 50OBJECTIVES.This course provides an overview of computing and computer science, including such topics as the history of computers, computer application, and basic understanding of various hardware components. Hands-on experience in installation and configuration is included. Students learn how software interacts with and controls the computer's hardware elements. Analytical logic and troubleshooting skills are emphasized. Basic networking concepts are introduced.Course Contents.1. Introduction to information technology(Information Technology, Data types of data, information, History of computingIntroduction to computer hardware and trouble shooting concepts2. Introduction to computerHardwareIntroduction to the personal Computer, safe Lab procedures and Tool Use, Computer Assemble Step-by-Step, Basics of preventive Maintenance and Troubleshooting. Fundamental Operating System, Fundamental Laptops and portable Devices, Fundamental printers and Scanners.Storage DevicesMain / primary memory (RAM, ROM)Secondary / Auxiliary Storage Devices(Hard Disk, CD-ROM, Magnetic tape, Magnetic drum), USBIntroduction of Microprocessor, Basic Architecture of microprocessor, and Introduction of different technologies of microprocessors3. Software design and algorithm:Software, System Software, Application Software, Flow Charts, concepts of programming languages & their types, compiler, Interpreter, Assemble4. Productive Enhancement Software PackagesIntroduction of Word Processors, Spread Sheets, DatabaseIntroduction of Number System and their inter conversionImpact of computers and internet on society (uses and misuses) Computer Codes(BCD, EBCDIC, ASCII, and Unicode)CAD/CAMSpeculation on future computers and their uses, Al Neural network, Expert System, virus, Antivirus.5. Fundamental NetworksNetworks and its types, networks media, Topologies, network DevicesBooks:1. Introduction to computer By Peter Norton,2. Introduction to computer By John R,. Roos, Glencoe.3. DIT-1 by Mohammad Khalid.4. Introduction to I.T by Imran Syed.Part-1/ First Semester Diploma in information TechnologyOFFICE AUTOMATION .(Version 2007 and onward)(PAPER-I)Total Th Hrs 40 Total Pr Hrs 80Total Th Mks 50 Total Pr. Mks 100A- WORD PROCESSINGMs-Word, Word processing, Manual and electronic Word processing1. Screen LayoutsMenusShortcutToolbarsCustomization of ToolbarsTitle Bar, Status Bar, ScrollBars and Rulers.2. Working with filesCreate, Open, Save, Rename and Close a documentWorking on Multiple Documents.Cut, Copy, Paste, Special Undo and Redo OperationsFind Replace and go to CommandsText, Paragraph and Page FormattingHeader and FooterDate and TimeBullets and NumberingColumns and Drop CapsTabs and MarginsComments and Foot NotesInsert a picture and its FormattingUse of Spelling and Grammar Check , Auto Correct Synonyms Theasurus.Page Break Section Break and Background PrintingTable of contents Glossary,Hyperlink and BookmarkInsert a Table, Add andDelete Columns Rows andCellsMerge and Split CellsFormula Implementations3. Document PrintingSelection of a printerPrinting SettingPrint PreviewPrint and Page SetupShortcut KeysB- MS- EXCELBasic Terminology of Ms- ExcelCreating Opening Renaming Saving and Closing Workbook/ Spread SheetEditing Functions: Undo, Redo. Fill, Auto Fill, Delete, Cut, Copy, Paste, Clear, Find and ReplaceInserting: Header & Footer Cells Rows / Columns and WorksheetWorking with Formulas: Entering Formula with the help of Formula Bar Entering Formula.Directly into the cells, sue of Arithmetic and Logical Formulas.Use of Built- in functions Time and Date Concatenation, Sum if, Nested Max, Min.Average, Count, Now, Month, Day, Year Upper , Lower, Left & Right.Tools and Date: Spell Check, Auto Correction, Workbook protection Data Sorting and filteringFormatting Cells and Text, Borders and Shading, Positioning Cells and Text, Auto Format,Categories, of numbers, Cell / Range Referencing, Alignment, Date & Time Working With Charts, Creating Editing and Formatting of various types of ChartsPrinting: Selecting Printer, Print selected areas page selection- Sorter View.C- POWER POINT1. Define Power Point2. PRESENTAION.Power point presentation environmentView icon of Power PointStart Power Point, Open a Presentation3. Creating a new presentation usingMS- Power point byCreating By Design TemplateCreating By Blank PresentationWhat is slide?4. Choose an Auto Layout, Using Auto Layout5. Editing and Formatting a Text Box6. Choose a Common Text Tool in theFormatting Tool Bar7. Apply design Template8. Set Background & Layout of Slides9. Adding Pictures and Graphics in a slide10. Apply Custom AnimationApply present animation11. Apply Action Setting12. Adding Sound to an Animation13. Add Sound and Music effectsto the presentation14. Set view OptionsNormal ViewOutline ViewSlide ViewSorter ViewNotes Page ViewSlide ShowSlides Show OffImportant Short cut keysReference books / Helping MaterialBusiness information technology-1 by Mohammad Khalid.Microsoft Office by Danoja & June Jamrich Parsons.Part-1/ First Semester Diploma in information TechnologyComputer Networking .(PAPER-I)Total Th Hrs 60 Total Pr Hrs 40Total Th Mks 50 Total Pr. Mks 100OBJECTIVESUnderstanding the basic concept of computer networks.Understanding the different types of computer networks.Understanding the different types of communication.Configuring different network devices.Creating different network scenarios in a network simulator (packet tracer)COURSE CONTENTSPART-1 Basic TerminologiesDefinition and History of Computer Networks.Local Area Network (LAN)Metropolitan Area Network (MAN)Wide Area Network (WAN)Basic Network Terminologies.&middot; Data&middot; Data rate&middot; Baud rate&middot; Peak data rate.&middot; Bursty data.Peer-to-peer Network Vs Server basic NetworkNetworking TopologiesMesh, Bus, Star, Ring, HybridNetworking DevicesNodeNICModemAccess pointHub ( active Hub, Passive Hub)BridgeSwitchRouterTransmission mediaWired mediaCoaxial cable ( 10 Base2 10 Base 5 10Base T, 100Base X)Twisted pair cableUnshielded twisted- pair ( Cat1,Cat 2, Cat 3, Cat 4, Cat 5, Cat 6, )Shielded twisted- pairFiber optic cableWireless mediaReasons for wireless networkWireless communication with LANsTypes of ConnectorsRJ45RJ11BNCWhat is OSI Model?&middot; Application Layer&middot; Presentation Layer&middot; Session Layer&middot; Transport Layer&middot; Network Layer&middot; Data Link Layer&middot; Physical LayerIP AddressesIPv4Class A, Class B, Class C, Class D, and Class E, IP addressesIntroduction to IPv6SubnetsRouted protocols and Routing Protocols (Deification, Similarity, Differences and examples)Practical PortionInstalling and Configuring ModemDSL ConfigurationCreating Straight Through cableCreating Cross CableCreating Rollover CableBasic Commands for TroubleshootingPing, ipconfig / all, ipconfig / renew, ipconfig / release, trace route,Case Study:Installing network simulator (packet Tracer)Creating simple network scenariosConfiguring PC's with IP addresses subnet mask and gatewayConfiguring switches by giving name to switches and management IP addressesConnection PCs to switch and then ping each other` that they are working properly.Reference Books / Helping MaterialDIT -I by Mohammad KhalidNetworking Essential By Andrew Tanenbaum.Part-1/ First Semester Diploma in information TechnologyOPERATIONG SYSTEM.(PAPER-I)Total Th Hrs 40 Total Pr Hrs 80Total Th Mks 50 Total Pr. Mks 100OBJECTIVES&middot; Understanding Desktop Operating System and Server Operating System.&middot; Understanding the role of Operating System in computing environment.&middot; Hands on practice on Windows 7, Windows 2008 Server and Linux.&middot; Networking Features in Operating System.COURSE CONTENTSGeneralWhat is an Operating System and its role in the Computing environment?Major parts of Operating System.Classification of Operating System.Desktop Vs Server base Operating System.Windows 7Installing Windows 7Configure disks, Partitions, volumes, and device drivers.Configure file access and printers on a Windows 7 client computer.Configure network connectivity on a windows 7 client computer.Configure wireless network connectivity on a windows 7 client computer. ( Bluetooth, Wi Fi)Secure Windows 7 client desktop computers.Optimize and maintain the performance and reliability of a windows 7 client. computerRemote access setting for a windows 7 client computer.Windows ServerInstalling Windows Server 2008Introduction to Administrative Tasks in Windows Server 2008 EnvironmentManaging Server Roles and Features.Overview of Action Directory.Using Windows Server 2008 Administrative Tools.Creating Action Directory Domain Services User Computer ObjectsManaging User Accounts.Creating Computer Accounts.Creating Groups and Organizational UnitsIntroduction to Groups .Managing Groups .Creating Organizational Units.Creating and Configuring Groups PolicyOverview of Groups Policy.Configuring the Scope of Groups policy Objects.Managing Groups policy Objects.Delegating Administrative Control of Group Policy.Configuring Group policy setting.Configuring Security Policies.Configuring an Audit Policy.DNS&middot; Installing and Configuring the DNS Server Role.&middot; Managing and Troubleshooting DNS.Managing Windows Server 2008 Backup and RestoreBackups with windows Server 2008.Planning Backups Policy on Windows Server 2008.Planning a Server Restore Policy.LinuxInstalling Linux ( Red Hat ).File System Management.Creating user accountsInstalling application software's in Linux.Configuring device drivers.Executing basic commands in Terminal .Reference Books / Helping Material1. DIT-I by Mohammad Khalid.2. Operating System concept by William stalling.3. Operating System by Andrew S.Tanenbaum.Part-1/ First Semester Diploma in information TechnologyComputer Programming C / C + +(PAPER- 1)Total Th Hrs 40 Total Pr Hrs 40Total Th Mks 50 Total Pr. Mks 50ObjectiveHundreds of computer languages are in use today, C/C ++ is one of them. It is one of the most powerful, general purpose high level programming language. It is a versatile language. This language can be sued for almost any programming task. The purpose of including this subject in DIT course is to enable the students to develop application programs in various fields such as business, education, accounting, database management etc.Chapter No. 1 WHAT IS C / C + + ?ObjectiveThe purpose of this chapter is to discuss the C/C ++ language, its advantages and its brief history.What is C?Advantages of C language.C' s WeaknessesHistory of C.Difference between C & C ++Chapter No.2 BASIC LELMENTS OF C/C ++ PROGRAMObjective:The purpose of this chapter is to equip the students with different elements ofC/C ++ that are required to write a complete C/C ++ program.o C/C ++ Character Set.o C/C ++ Reserved Words.o User- defined Words.o Variables- Naming Variables- Variable TypesConstants.- Numeric ConstantsInteger ConstantsFloating Point Constants.Exponential Real Constants.- Non-Numeric Constants.&middot; Character Constants&middot; String Constants* C/C + + Operators.* C/C + + Expressions* C/C + + Statements.Chapter No.3 STRUCTURE OF C/C + + PROGRAMObjectiveC/C + + statement are usually composed of keywords, which are used in conjunction with the basic element of the language like constants, variables and expression. The purpose of this chapter is to discuss the structure of a C/C ++ program as well as those statements, which appear in almost every C/C++ program.* Structure of C/C ++ program* C/C ++ comments.* C/C++ libraries* C/C ++ Data types.* The size of operator* Declaring Variables & Constants.* Assignment & Multiple Assignment operator.* How to assign String data?* Priority of Operations* Types Casting Operator.* Increment (++) & Decrement (--) operators.* Compound assignment operatorsChapter No. 4 OUTPUT STATEMENS.Objective:There are several C/C++ functions to indicate different types of actions to be performed during executions. Output functions are one of them. This chapter will discuss those functions, which appear in almost every C/C ++ program.* The printf ( ) function.* The clrser ( ) function.* The cout, output stream.* The putch ( ) & putchar ( ) Character output Function.* The puts ( ) String output Function.Chapter No. 5 INPUT STATEMENTS.ObjectiveData may be accepted for variables at the time of program's execution. For this purpose, different input statements are used, which will be discussed in this chapter* The scanf ( ) function* The gets ( ) function.* The getchar ( ), getch ( ) , and getch ( ) functions.* Input using cinChapter No. 6 MAKING DECISIONS.ObjectiveIn this chapter, students will learn how to make decisions in C/C++. They learn how to code the program, so that the computer tests a condition and selects one of two alternative actions depending on whether the condition is true or false.* Transfer of Control Process.* The if, if- else and nested if statements.* Relational operators.* Conditional Operators.* Multiple Choice statements (switch / case / break / default).Chapter No.7 loopingObjectiveThe counter & looping are two main features of computer programming. After this chapter, students will be able to know, how to construct or design a program with looping structure.* Counters.- Standard Counter.- Accumulator Counter.- Multiplicative Counter.* Looping in C/C ++* The for & nested- for statement* The while loop.* The do while loop.* The break, continue and exit ( ) statements.* Preprocessor Directive.Chapter No. 8 STANDARD LIBRARY FUNCTIONObjectiveLibrary functions make programming much simpler in many situations and save the programming effort. This chapter equip the student with the most important the most widely used library functions.Trigonometric FunctionsSin ( ) , cos ( ) , tan ( ) etc.Arithmetic Functions.Abs ( ), sqrt ( ), log ( ), exp ( ), ceill ( ) . floor ( ) pow ( ) pow 10 ( ), random( ) , rand ( ), etc.String Functions.Strlen ( ) strlwr ( ), strupr ( ) ,strrev ( ), strncpy ( ), strecat ( ), strncat ( ), etc.Reference Books / Helping MaterialC and C++ by Tariq Siddiqui.C / C++ by Mohammad Khalid.Let us C / C++ by Yashvant Kenetkar


Related Questions

What is the purpose of inserting header and footer in document?

The header and footer in a document are very important. These notes can give the reader more information about the document they are reading.


How do you display a documents header in an editable format?

Simply double-click in the area where the header belongs. The header will appear &amp; you can edit from there. Hope this helps!


What is used to display column headings?

header row


Where does The form header section display?

At the top of each form.


What are three common HTTP message types?

REQUEST HEADER


What is the default styling for h1 HTML tag?

The H1 tag is used to display Headings in HTML. &lt;H1&gt; Hi this is a H1 header &lt;/H1&gt; would display like = Hi this is a H1 header =


What is the use of DOS header files in graphics?

It shows the header information..


How can I build a header for my website?

To build a header for your website, you can use HTML and CSS coding. Start by creating a header tag in your HTML code and then style it using CSS to include elements like a logo, navigation menu, and any other important information you want to display at the top of your webpage. You can also use pre-made templates or website builders to easily create a professional-looking header for your site.


What Contains information about an email message such as sender time sent and subject?

Message Header


What information goes in a resume header?

Applicant's personal contact information


Different text control tags?

Some Text control tags are * &lt;FONT&gt; to decide the display font * &lt;B&gt; to display text in Bold * &lt;I&gt; to display text in Italics * &lt;H1&gt; to &lt;H6&gt; to display text in header format * etc...


What is headerfile?

who hold the header information is called headerfile.