oops的call trace分析求问

shine777 2012-03-26 02:23:52
对内核进行修改增加代码,但是会出现oops的情形,想问一下大牛,这个call trace中有些函数前面打着(?)问号的是什么意思?我是在多核下运行的?
具体见图,先谢过了。
file:///home/ninggao/Desktop/Screenshot%20at%202012-03-26%2014:07:20.png
...全文
1017 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
deep_pro 2012-03-26
  • 打赏
  • 举报
回复
我的理解是不会
所有的内核模块内核线程都共享相同的内存空间,退出也起不到回收作用

也不能说你的module中的exit函数未执行 ,printk需要时间,代码里的问题带来不可预计的影响。
建议exit里首先
smp_mb();
printk("bye\n");
udelay(1000);
udelay(1000);
udelay(1000);
udelay(1000);
smp_mb();

我想不大可能没执行exit
shine777 2012-03-26
  • 打赏
  • 举报
回复
那么看来还是不能依靠这个call trace来跟踪调试了。
我这是在rmmod的时候出错的,并且在terminal上出现segmentation fault的错误。
然后我通过dmesg中发现oops信息
[221.633901] general protection fault: 0000 [#1] SMP
而且我的module中的exit函数明显还未执行,因为exit函数的第一条指令就是输出goodbye但是没出现。
所以我想问一下rmmod在调用exit函数之前会不会访问该模块申请的内存。
deep_pro 2012-03-26
  • 打赏
  • 举报
回复
大概是oops时 任何情况都可能发生 任何寄存器或内存都可能被破坏 ,Call Trace:也不见得可靠正确
如果有? ,看起来就不可靠了
shine777 2012-03-26
  • 打赏
  • 举报
回复
对,我的问题是?从哪儿来。我的内核版本是2.6.39。我刚才分析了一下源码,发现?意味着是否reliable,当bp+sizeof(long)==(unsigned long)sp时,表示是reliable,就没有问号。但还是不够清晰。
deep_pro 2012-03-26
  • 打赏
  • 举报
回复
如果你要是问 ? 从哪来的,问什么有的有有的没有?
我也没见过 ,提供你的内核版本我找找
deep_pro 2012-03-26
  • 打赏
  • 举报
回复
例如[ 221.634988] [<ffffffff8103fbc7>] ? kmld_pte_lookup+0x17/0x60

ffffffff8103fbc7 是指令在内存中的虚拟地址
kmld_pte_lookup 是函数(symbol 名)
0x17/0x60 ,0x60是这个函数编译成机器码后的长度,0x17是ffffffff8103fbc7这条指令在相对于kmld_pte_lookup这个函数入口的偏移

shine777 2012-03-26
  • 打赏
  • 举报
回复
上面的图可能看不到,下面贴出来了。
Call Trace:
[ 221.634988] [<ffffffff8103fbc7>] ? kmld_pte_lookup+0x17/0x60
[ 221.635016] [<ffffffff8103ff04>] ? kmld_fault+0x94/0xf0
[ 221.635051] [<ffffffff8103fbc7>] ? kmld_pte_lookup+0x17/0x60
[ 221.635079] [<ffffffff8103ff04>] kmld_fault+0x94/0xf0
[ 221.635109] [<ffffffff815c8f95>] do_page_fault+0x3f5/0x550
[ 221.635140] [<ffffffff8104e36d>] ? set_next_entity+0x9d/0xb0
[ 221.635169] [<ffffffff8104e497>] ? pick_next_task_fair+0xc7/0x110
[ 221.635209] [<ffffffff815c5a95>] page_fault+0x25/0x30
[ 221.635245] [<ffffffff811675c7>] ? copy_strings+0x97/0x240
[ 221.635272] [<ffffffff811675af>] ? copy_strings+0x7f/0x240
[ 221.635299] [<ffffffff81167f92>] do_execve+0x202/0x2b0
[ 221.635326] [<ffffffff81012847>] sys_execve+0x47/0x70
[ 221.635360] [<ffffffff815cd81c>] stub_execve+0x6c/0xc0
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= ~ Import REConstructor v1.7c FINAL by MackT/uCF2000 in 2001-2008 ~ = = ~ - *for Windows 9x, ME, NT, 2K, XP, Vista32/64* - ~ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= If you would like to help continue developing and bug fixing ImpREC and you have ideas, suggestions or bug fixes please visit Tuts 4 You forum in the following topic to share your ideas: http://www.tuts4you.com/forum/index.php?showtopic=6410 Thank you! v1.7c FINAL (PUBLIC VERSION) ---------------------------- - Misc - Fixed bug introduced in 1.7b when DLL's have discardable sections (jstorme) v1.7b FINAL (PUBLIC VERSION) ---------------------------- - Misc - Fixed invalid API bug in user32.dll on Windows 98 (jstorme) - Modified code to improve support for discardable/unreadable sections (jstorme) - Fixed ImageBase problem with DLL's when "Use PE Header from Disk" is checked (jstorme) - Added an "ImpREC Classic" looking version v1.7a FINAL (PUBLIC VERSION) ---------------------------- - Misc - Fixed Win2K crash, AllocConsole was replaced with ActivateActCtx (jstorme) v1.7 FINAL (PUBLIC VERSION) --------------------------- - Misc - Fixed RestoreLastError API set to SetLastError for WinXP/Vista compatibility (MaRKuS_TH-DJM) - user32.dll is always read from the system, prevents a crash from corrupted PE of user32.dll (MaRKuS_TH-DJM) - Latest version of psapi.dll (6.0.6000.16386) included - Fixed Vista64 crash bug (jstorme) - GUI modified and improved (based upon Fly's modification) - Updated/corrected plugins and deleted dups v1.6 FINAL (PUBLIC VERSION) --------------------------- - Misc - Finally fixed the bug in the check for adding section (Thanks to Christoph) v1.6 beta *PRIVATE* ------------------- - Tracers - Tracer Level3 - Added EIP Log - Misc - Finally, support relative calls rebuild (not with the loader yet) - Added a disassembler window for redirected code - Added colour to all known imports (Thanks to Jeff Schering) - Added a hex viewer (built with the disassembler) - Fixed blink in RichEdit control - Checkbox "OpCodes" is enable/disable depending on "Hex View" (Thanks to Muffin) - Removed the useless '/' when there's no name (ordinal only) - Disassembler is allowed on valid slot too now - Fixed HexView to show all printable chars - Added disasm comment for where - Added Right Click function on disasm code to ease the life (TRY IT!) - Added 'Get Imports Filter' in 'Advanced Commands' (Greetings to Titi) - Tooltips added in Options - Fixed bug in "Fix dump" renaming (with the char '_' before the ext) - Added Original First Thunks rebuilder (in Options) - Fixed bug on disabled editboxes (you could edit them.... erm) - Added checks in PEFile.cpp for invalid executables (Thanks to Snacker!) - Fixed some possible problems on sscanf and ordinals ("%X" with WORD type) v1.5.1 beta2 *PRIVATE* ---------------------- - Tracers - Error codes updated for the Tracers Level2 and 3 - Misc - Fixed bug from the 1.5.1 beta1 in the Import Editor (a string bug) - Fixed bug on validation check for the 'Congratulations' text (Thanks to LordByte) - Fixed bug in the (Thanks to LordByte) - New imports scheme added (NOT COMPLETE SO DO NOT USE IT) - Support relative calls rebuild => visible with a (R) tag in imports - Fixed a bug with "Create New IAT". It can now manage a thunk which has several apis of different module (Thanks to EOD) - Added 'Load PE Header'. It could be useful to force ImportREC to use your own PE Header (Thanks to EOD) v1.5.1 beta1 *PRIVATE* ---------------------- - Tracers - Tracer Level3 - New approach (Thanks to EliCZ) - Support SEH chain - No more FS instructions emulation - Dumb Mode (YES, it could be useful for redirected scheme which copies the start code of an API and jump later. It has the behaviour of the Tracer Level1 but it really executes the code) - Misc - Added 'Get API Calls' dialogbox to set addresses filter and heuristics - Added 'Mode Cloak' (for anti-imprec tricks) v1.5 *PRIVATE* -------------- - Loader - Clean up code (the injected loader) - Added an IRC log to explain how to use it (Greetings to LaBBa) - Tracers - Error codes updated for the Tracers Level2 and 3 - Plugin Tracer - Redesigned interface for good reasons (See ) - All examples have been updated for the new interface - Support 'Exact Call' feature - GUI switched into a Submenu (ala WorkerBee#2 by ZigD) - Misc - 'AutoTrace' will not use the Tracer Level2 anymore (play CAREFULLY with the TL2 because it's a global hook) - Windows 95 Support (Thanks to EliCZ, Unknown One and ZigD for testing) - Tested under NT4 (Thanks to Unknown One) - The Import Editor (double click on a function) will look for the nearest valid function in the thunk and will get its module name. => Much faster when editing each function by hand. - Improved 'Exact Call' (It will not retrace all exact calls from a slot if they have already been resolved) - New Module Loader (It should be faster) - Support function names which have more than 256 characters. ImportREC left when clicking on (Thanks to ToyBomB and shandi for reports) - added (Right click on the Log listbox) - Fixed Import Editor to look for the name first before looking for the ordinal - Added 'Skip Main Slot' in Options. It will allow you to trace *ONLY* on all Exact Calls. The main slot will be skipped by the tracer. - will stop any tracers (except 'Plugin' if you did not manage it) even when you have selected several slots to trace - ApiHooks Updated (Greetings to EliCZ) - Added an Exact Calls window (right click on the tree) - Added Remove buttons - Sort datas by column when clicking on it (Yop G-RoM! ;p) - will set the IAT RVA and Size in the PE Directories to 0 (Thanks to Crusader) - *ALL* docs have been updated v1.4.2+ ------- - Misc - Fixed wrong image base/size usage when disabling "Use PE Header From Disk" AGAIN! v1.4.2 ------ - Loader - Finally fixed the bug when rebuilding imports of ripped layers (sometimes, it produced an invalid PE file) - Tracers - Tracer Level3 - A little bit faster - Fixed wrong opcodes (Damn copy&paste! Erm)... (Thanks to necrotoad for his target so i could find that bug) => Should work for latest SD2 => The target should not quit anymore under XP - Misc - Added a filter to "Get API Calls" to get valid addresses only - Fixed wrong image base usage when disabling "Use PE Header From Disk" for reloc'ed target for example (Thanks to Thigo) v1.4.1a ------- - Tracers - Tracer Level1 - Fixed a little bug added from the previous version (It could trace into k32.dll... D'oh myself!) v1.4.1 ------ - Loader - Can handle Kernel32 Ordinal - Tracers - Tracer Level1 - It will not be fooled anymore by latest ASProtect Emulated API - Misc - Erratum: "Fix Damaged PDB" is for Win9x/ME only! - "Create New IAT" feature - "Select Code Section(s)" to precise where is the code in the target - Fixed bug when loading imports file which contains Exact Call with ordinal - Debug stub scheme added (for getting API from an executable which was compiled in debug mode) - Full Dump (can dump EXE & DLL and it should work for antidumping tricks) v1.4 ---- - Tracers - Tracer Level1 - Fixed a small bug on the stack emulator (D'oh! Tamus! :p) - Tracer Level3 - Recoded from scratch (Thanks a lot to G-RoM for his precious help and patience) - Plugin - Asprotect v1.2x Emulated API Plugin (Thanks to ZigD) - Misc - Use PE Header informations from dump or disk (in Options) - Debug privilege is now managed and damaged PDB can be repaired (Thanks to EliCZ) - Renormalized exports (for Win9x/ME only) - Fixed a GPF when using the wheel mouse (or arrows keys) just after selecting a process - "Stick" current imports with new added ones correctly (when you do GetImports with several contigous regions) - "Get API Calls" feature - "Exact Call" for Safecast/Safedisc 2 redirections - Load & Save "Exact Call" Imports - Updated to APIHooks 5.6 v1.3 ---- - Import Editor - An editbox for entering the name of the API (MSDN-like when using Index) - Loader - Layers Auto Finder (with recursion) - Layers editor (add/modify/remove) - Improved relocations - Multiple modules can cohabit in a same thunk - Direct calls/jumps to any imports in all layers, are rebuilt (for portability) - Tracers - Tracer Level1 - A little stack emulator was implemented (very basic though) - Plugin Tracer - TRACERS LEVEL 2 AND 3 ARE STILL NOT COMPLETE AND THERE JUST FOR EXPERIMENTATION. THEY ARE LAME so use them if YOU ARE BORED AND NOT AFRAID TO CRASH your computer, YOU ARE WARNED. - Misc - Improved IAT scanner + Bug fixed on the invalid IAT size (negative) found by it - DLL's names are now based on their filename and not on their header structure - New ApiHooks and as usual it still is impressive how it gains speed each time! (Thanks to EliCZ again) - Check on overlapped IAT by new imports (when not adding a new section) v1.2 *Final* ------------ - Fixed a little bug when there is only one invalid pointer and loader is activated, the dialogbox for entering interval of ripped data/code didn't appear. - Fixed a bug in showing new import size when it is empty (0x100 instead of 0) - Added error managing in the loader if it can't find a dll or an api. (So its size has grown up a little bit) - Fixed a bug on wrong section table location when loading PE files (YODAAAAA!!!!!! ;-)) (and for all my PE related code too...) - ApiHooks updated again!! Thanks to EliCZ, it's really faster than before... Wow! ;-) - Autotrace (do not expect a miracle from its part). Moreover prepare to crash if you manage to use it because it uses the tracer level2... you are warned!! :-) - Improved Ripper analyzer v1.2 RC1 PRE Release -------------------- - Added a loader against faked APIs in thunks. - Fixed a little bug when loading a tree for the last parameter if it has only one character - Get the invalid pointers in the running process when reloading a tree which contains some - Added a flag for loader in tree text files (still is compatible with v1.2b3 version though) - ApiHooks updated - You can rebuild DLL now by clicking on "Pick DLL" button - I decided to retire my Tracer L3 for the moment because it's too buggy v1.2b3 ------ - Useless but funny, changed icon... thanks to Avl!s :-) - Function is correctly selected when double clicking on it for Editing. - Oops! Where was the and file on previous versions???! :-) - Don't use anymore GetCurrentDirectory for looking for - A little note when launching the first time - TimeOut option for Tracer Level2 and 3 - Fix EP to OEP option when fixing a dump - Options are saved in an INI file - Maintaining "Shift" key for Tracer Level1 shows the Module name in the MessageBox title instead of "huhu" :-) and moreover it shows VA correctly now. - Correct ImageSize in PE Header when adding a new section (Windows 98SE and 2k do it automatically but it is better to do it ourselves though) - Added the old good Dennison's uCF logo (i mean the logo, not you Denni! ;-P) in 'About' dialog box - Replace all "between" by "by the way" in all txt files... :-x - Stastistics are shown regularly (thx to Pal) - 'Show Suspect' button (thx to Pal) - Fixed a GPF when closing the running target and continuing to rebuild it (thx to Pal) - Load & Save Tree in text format. (You can still load old binary ".rec" files) (Pal, you can edit them manually now! :-)) - Fixed a bug in my module loader when the module image base is different to its pe header one (ie when it has been moved by windows). (BIG THX TO PAL! ;-)) - Module loading log is more precise now - First prebeta version of tracer l3 (still is VERY BUGGY! You are WARNED!) v1.2b2 ------ - Argh!!!! Export ordinals were fixed now! Sorry, i have forgotten to add the Base for all ordinals!! Marf! That's why my "Import all by ordinal" option didn't work under NT/2000... It's now reactivated under those systems (even if your exe will not be portable to another system) - Fixed a GPF (oops! :-P) when invalidate some particular APIs - Load and Save Tree Models - Enable and Disable controls (buttons and editboxes) when necessary - Tracer level2 is slower (not under Win2000! ;-)) but less buggy than previous version - "Cut thunk" action in right click popup menu. Thanks to my best beta tester Thigo (normal, he's alone ;-P) for reporting me tELock tricks. (Greetz to tE! by the way) ;-) (Read Tips.txt for further details) - Current directory will be the path of your selected process for browsing files - Statistics after clicking on "Get Import" were fixed - Readme.txt was updated. :-) v1.2b1 ------ - Fixed a lame bug on my original IAT finder (a pb on computing its size... thx Chris ;-)) - Multiple Tree Selection - Right Click on Tree (invalidate functions, delete thunk...) - Tracer Level1 (Disasm) was improved (with magic 'Shift" key... look at Tips.txt) - *New* Tracer Level2 (Hook) uses ApiHooks. And big thanks to Yoda for advising me it ;-) - Import module name is auto updated depending on all its functions v1.1 ---- - I have forgotten to considerate the max recursion of the tracer in the options! Now it's fixed. Shame on me, yeah! ;-) - Give up the method to the start address (image base) bounds of the target too (not reliable). Unreal Tournament has shown me that ;-)... BY THE WAY, WHAT A GAME! :-D - Improved tracer again - Improved Original-IAT Auto Finder - GUI : Tree view for import - Default parameter is 'Add new section' DLL v1.0 -------- - DLL was released for GUW32 (by Christoph/UG2000) with its open source code ;-) v1.0 ---- - Give up the method with the limit address of the target (not reliable). Need to reput it in an option - "Auto-IAT Search" button added - "Ultra Arrange" button added - Modify entry point to given OEP into the dump file when fixing it v0.7 ---- - Reorganized code to export it in a dll v0.6a ----- - Show first (or second) invalid element in the 'Imported Function Found' list if it detects a problem in a thunk array - You can change the module of any import functions with the Import Editor - Disable "Import all by ordinal" under NT/2000... It does definitively not work :-( v0.6 ---- - No more leaked memory... I swear! :-) - Support NT/2K by fixing all forwarding export functions (thanks to +The Owl+ AGAIN! ;-)) (Tested on an ASProtected game with total success under win2000 (i mean portable on another system)) - Icedump v6.0.2.2 was released!!! ImportREC will be able to rebuild a 100% portable executable (or very close) with it. (ONLY UNDER WIN9x BY THE WAY) Icedump tries to solve 4 main windows dll which have export functions which point to the same address... => Check it out NOW!!! -> http://icedump.tsx.org v0.5 ---- - Added 2 buttons "Previous ????" and "Next ????" for looking at unresolved pointers quickly - Improved tracer engine... test it and you will see ;-) - Some errors messages are more comprehensible (for Lutin Noir especially ;-D) - GUI has changed a little bit - 'About' diabogbox finally added v0.4 ---- - A memory bug fixed when freeing export infos - "Add new section" in the dump file for the new import datas v0.3a ----- - Bug fixed on hint value which was always set to 0... erm :-) - Import ASCII name address is now aligned on WORD and not DWORD (more smaller size again) - Little filter on all Editboxes - Getting the size of the memory used by the process for memory bounds testing and the tracer v0.3 ---- - First public release - Tested on win2000 and it can not rebuild correctly because of module which contains some API from kernel32.dll of win95/98! :-( (like RltDeleteCriticalSection, ...). If anyone has a solution, please mail me!!!!! - Added a real tracer engine (from Borg disasm of Cronos) but still need to improve its use - Added a function editor (for fixing Asprotect 'GetProcAddress'-like redirected function by yourself for example) ** Double-click on the function in the "Import Functions Found" list and choose the good API. - Bug fixed : you can fix a dump which does not have RVA=RAW addresses and sizes - Import all by ordinal for smaller import datas v0.2 ---- - Not yet tested on NT/2000 - Fixed a lot of bugs - Added a poor tracer for redirected functions Feb/01/2001 ----------- v0.1 - First release
JSP Simple Examples Index 1. Creating a String In jsp we create a string as we does in a java. In jsp we can declare it inside the declaration directive or a scriptlet directive. String Length In java, Strings are objects that belong to class java.lang.String. A string is a sequence of simple characters. We can get the length of the string by using the method length() of java.lang.String. Declaring string array in java An array is the collection of same data type. Suppose if we have a declare an array of type String, then it will store only the String value not any other data type. When we have a closely related data of the same type and scope, it is better to declare it in an array. Multidimensional array java A two dimensional array can be thought as a grid of rows and columns. The first array will reflect to a row and the second one is column. int array Array is a collection of same data type. Suppose if we have declared an array of type int then the array will take only the int values and not any other data types. We can find find out the length of the variable by using the variable length . JSP string array String array cannot hold numbers or vice- versa. Arrays can only store the type of data specified at the time of declaring the array variable. Custom exceptions Custom Exception inherits the properties from the Exception class. Whenever we have declare our own exceptions then we call it custom exceptions. Throwing an exception All methods use the throw statement to throw an exception. The throw statement requires a single argument a throwable object. Here is an example of a throw statement. Arrayindexoutofboundsexception ArrayIndexOutOfBoundException is thrown when we have to indicate that an array has been accessed with an illegal index. printStackTrace in jsp printStackTrace is a method of the Throwable class. By using this method we can get more information about the error process if we print a stack trace from the exception. Runtime Errors Errors are arised when there is any logic problem with the logic of the program. Try catch in jsp In try block we write those code which can throw exception while code execution and when the exception is thrown it is caught inside the catch block. Multiple try catch We can have more than one try/catch block. The most specific exception which can be thrown is written on the top in the catch block following by the less specific least. Nested try catch We can declare multiple try blocks inside the try block. The most specific exception which can be thrown is written on the top in the catch block following by the less specific least. kilometers per liter to miles per gallon Kilometers per liter : The distance traveled by a vehicle which is running on gasoline or diesel fuel in a kilometer. Miles per Gallon: The distance traveled by a vehicle which is running on gasoline or diesel fuel in a mile. Ascii values table ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as @, #, $, and so on. ASCII was developed when non- printing characters were rarely used. life cycle of a jsp page Life of the the jsp page is just same as the servlet life cycle. After get translated the jsp file is just like a servlet. Page directive attributes A directive is a way to give special instructions to the container at page translation time. The page directive is written on the top of the jsp page. Html tags in jsp In this example we have used the html tag inside the println() method of the out implicit object which is used to write the content on the browser. Password Controls In this program we are going to know how the server determines whether the password entered by the user is correct or not. This whole process is controlled on the server side. Multiple forms in jsp The form tag creates a form for user input. A form can contain checkboxes, textfields, radio- buttons and many more. Forms are used to pass user- data to a specified URL which is specified in the action attribute of the form tag. Interface in jsp In interface none of its methods are implemented. All the methods are abstract. There is no code associated with an interface. In an interface all the instance methods are public and abstract. Interfaces are always implemented in the class. They add extra behaviors to the class. Inheritance in java with example Inheritance is one of the concept of the Object- Oriented programming. It allows you to define a general class, and later more specialized classes by simply adding some new details. Constructor inheritance Constructors are used to create objects from the class. Constructor declaration are just like method declaration, except that they do not have any return type and they use the name of the class. The compiler provides us with a default constructor to the class having no arguments. Abstract classes We does not make a object of the abstract class. This class must be inherited. Unlike interface the abstract class may implement some of the methods defined in the class, but in this class at least one method should be abstract. Using Super class Variables With Sub-classed Objects One of the strong features of java is that it is follows a OOPs concept, and one of the feature of OOP in java is that, we can assign a subclass object or variable to the variable of the superclass type. Log files Log files keeps a records of internet protocol addresses (IP), Http status, date, time, bytes sent, bytes recieved, number of clicks etc. Calculate a factorial by using while loop In this example we are going to find out the factorial of 12 by using the while loop. In while loop the loop will run until the condition we have given gets true. Calculating factorial After going through this example you will be understand how you can calculate the factorial by using recursion in jsp. To make a program on factorial, firstly it must be clear what is recursion. Celsius Fahrenheit Celsius is a unit to measure temperature scale on which water freezes at 0 degree and boiling point is 100 degree. This unit is discovered by Celsius in 1742, a Swedish astronomer and physicist, he has invented the centigrade, or Celsius thermometer divided between the freezing and boiling points of water into 100 parts. comment in jsp In a jsp we should always try to use jsp- style comments unless you want the comments to appear in the HTML. Jsp comments are converted by the jsp engine into java comments in the source code of the servlet that implements the Jsp page. Html tag inside out implicit object In this program we are going to use a html tag inside a out object. out object is used to display the content on the browser. To make this program run use out object inside which define some html code along with the content you want to display on the browser Jsp methods In this example we are going to show you how we can declare a method and how we can used it. In this example we are making a method named as addNum(int i, int b) which will take two numbers as its parameters and return integer value. Multiple methods Jsp is used mainly for presentation logic. In the jsp we can declare methods just like as we declare methods in java classes. Methods can be declared in either declaration directive or we can declare it in scriptlet. If we declare method inside declaration directive, then the method is applicable in the whole page. Passing Array method Array is a collection of similar data type. It is one of the simplest data structures. Arrays holds equally sized data elements generally of the similar data type. Two index In this example we will show how we can use two indexes in a for loop. We can solve this problem by using for loop defined inside the scriptlet directive. Date in JSP To print a Date in JSP firstly we are importing a class named java.util.Date of the package java.util. This package is imported in the jsp page so that the Date class and its properties can accessed in the JSP page. If- Else Ladder A ladder means a vertical set of steps. It is a computer generated list of pairings used in eliminations. Nested If We use the if condition to check if the particular condition is true then it should perform a certain task, and if a particular condition is not true then it should do some other tasks. Quintessential JSP Quintessential means representing the perfect example of a class or quality. It is pure and concentrated essence of a substance. Include File JSP using directive and include action <%@ include file = " "%>: - This is include directive. This directive has only one attribute named as file, which is used to include a file in the jsp page at the translation time. :- This is known as the include standard action. This standard action is used to include a file at run time. This standard action is evaluated at the run time. Snoop in JSP It mostly contains the request information, ServletContext initialization parameters, ServetContext attributes, request headers, response headers etc. sendRedirect In JSP sendRedirect() method is a method of HttpServletResponse interface. In sendRedirect() the object of request will be generated again with the location of page which will perform the request of the client. Request Header in JSP Whenever an http client sends a request, it sends the request in the form of get or post method or any other HttpRequest methhods. It can also sends the headers with it. Specific request headers in JSP Whenever an http client sends a request, it can also sends the headers with it. All the headers are optional except Content-length, which is required only for POST request. Java class in JSP To use the class inside the jsp page we need to create an object of the class by using the new operator. At last use the instance of the class to access the methods of the java file. Setting Colors in JSP In Jsp also we can set the background color which we want, the font color can be changed. The table can be coloured . By using the colors code we can give colors according to our wish. Sine Table in JSP Mathematically, the sine of an angle is the ratio of the length of the opposite side to the length of the hypotenuse of an imaginary right triangle having that angle in it. Applet In Jsp Applets are small programs or applications written in java. These applets are those small programs that runs on web browsers, usually written in java. We can use the applets in jee also. In jee it runs on the context of web application on a client computer. Creating a Local Variable in JSP Consider a situation where we have to declare a variable as local, then we should declare the methods and variables in tag except the declaration directive. Method in Declaration Tag Anything which will be declared inside declaration tag will be applicable within the whole application. We call this tag a Declaration Tag. The syntax of this tag is <%! --------- %>. Forward a JSP Page The request object goes to the controller then the controller decides by which jsp or servlet this request will be processed, then the request object is passed to that jsp or servlet and the output is displayed to the browser by the response object. Random in JSP Random numbers are the numbers that are determined entirely by chance. User does not have any control over the working of random numbers. random() is a method of Math class which extends java.lang package. JSP include directive By using the include tag the file will be included in the jsp page at the translation time. In this example we have created a jsp file which has to be included in the other jsp file by using the tag <%@ include file = " "%>. Literals in JSP Literals are the values, such as a number or a text string, that are written literally as part of a program code. A literal is a expression of a value, including a number or a text string. Passing Parameter using Request parameters can be passed by using . This tag contains two attributes: 1) name 2) value. Tag Handler Custom tags are usually distributed in the form of a tag library, which defines a set of related custom tags and contains the objects that implement the tags. Custom tag libraries allow the java programmer to write code that provides data access and other services, and they make those features available to the jsp author in a simple to use XML- like fashion. UseBean Syntax: Twitter Digg Facebook Del.icio.us Reddit Stumbleupon Newsvine Technorati Mr. Wong Yahoo! Google Windows Live Send as Email Add to your CodeProject bookmarks Discuss this article 85 Print Article Database » Database » Other databasesLicence CPOL First Posted 19 Jan 2012 Views 24,219 Downloads 992 Bookmarked 74 times RaptorDB - The Key Value Store V2 By Mehdi Gholam | 8 Mar 2012 | Unedited contribution C#.NETDBABeginnerIntermediateAdvanceddatabase Even faster Key/Value store nosql embedded database engine utilizing the new MGIndex data structure with MurMur2 Hashing and WAH Bitmap indexes for duplicates. See Also More like this More by this author Article Browse Code Stats Revisions (8) Alternatives 4.95 (56 votes) 1 2 3 4 5 4.95/5 - 56 votes μ 4.95, σa 1.05 [?] Is your email address OK? You are signed up for our newsletters but your email address is either unconfirmed, or has not been reconfirmed in a long time. Please click here to have a confirmation email sent so we can confirm your email address and start sending you newsletters again. Alternatively, you can update your subscriptions. Add your own alternative version Introduction What is RaptorDB? Features Why another data structure? The problem with a b+tree Requirements of a good index structure The MGIndex Page Splits Interesting side effects of MGIndex The road not taken / the road taken and doubled back! Performance Tests Comparing B+tree and MGIndex Really big data sets! Index parameter tuning Performance Tests - v2.3 Using the Code Differences to v1 Using RaptorDBString and RaptorDBGuid Global parameters RaptorDB interface Non-clean shutdowns Removing Keys Unit tests File Formats File Format : *.mgdat File Format : *.mgbmp File Format : *.mgidx File Format : *.mgbmr , *.mgrec History Download RaptorDB_v2.0.zip - 38.7 KB Download RaptorDB_v2.1.zip - 39 KB Download RaptorDB_v2.2.zip - 39 KB Download RaptorDB_v2.3.zip - 39.6 KB D

4,436

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧