JWebUtil
JwebUtil is an ultra simple Java utility class intended to be used in JSP pages and servlets to display
session and request information in the web browser. It was written to help debug servlet based Java web applications.
More will be added in the future as applicable.
An example of the output is displayed at the bottom of this page.
In order to use JWebUtil simply make sure the class file is in your classpath
then import the com.totsp.util.* package into your JSP or servlet, and then
call JWebUtil.sessionDump() or JWebUtil.requestDump (currently the only methods.)
These methods will return a string that contains an HTML table of respective info.
Prereqs: Java, Java Servlet API (servlet.jar in classpath)
Source: JWebUtil.java
Class: JWebUtil.class
Its literally ultra simple, but has been helpful so I am posting it on TotSP in case anyone
else might find it helpful. If you do find it helpful, great, if you dont find it helpful, thats great too.
If you have constructive criticism or any other feedback
then please let me know via the totsp contact page.
|
the session object
|
|
session id = O0sxgxJX6rDfvtUHnhO5AN0OpOnyUuWQaeDAEWAax08BC4f6dR7q|-1506516915420270142/167837980/6/88/88/7002/7002/88/-1
|
| Element Name |
Element Contents |
|
pageImage
|
mom_login
|
|
lastKnownNavPosition
|
1.07
|
|
UserID
|
35072
|
|
hmMomUser
|
*******HMMomUser Info.:*******
-1
35072
2001-09-26
null
null
null
null
null
0
null
null
null
null
null
null
1
2001-06-20
*******HMUser Info.:*******
test_mom
user
2551
g
test
null
user
null
null
null
2500
null
null
ccollins@fakedomain.com
0
2001-06-19
|
|
the request object
|
|
server name = vincent
|
|
protocol = HTTP/1.0
|
|
method = GET
|
|
remote address = 10.1.1.127
|
|
remote host = 10.1.1.127
|
|
request URI = /uploadBabyImage.jsp
|
|
query string = testparam=1
|
| Header Name |
Header Contents |
|
Accept
|
image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
|
|
Accept-Charset
|
iso-8859-1,*,utf-8
|
|
Accept-Encoding
|
gzip
|
|
Accept-Language
|
en
|
|
Cookie
|
WebLogicSession=O0sxgxJX6rDfvtUHnhO5AN0OpOnyUuWQaeDAEWAax08BC4f6dR7q|-1506516915420270142/167837980/6/88/88/7002/7002/88/-1
|
|
Host
|
vincent:80
|
|
User-Agent
|
Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14 i686; Nav)
|
|
X-WebLogic-Force-Cookie
|
true
|
|
Proxy-Client-IP
|
10.1.1.127
|
|
X-Forwarded-For
|
10.1.1.127
|
| Parameter Name |
Parameter Contents |
|
testparam
|
1
|