srinath anand

Ranch Hand
+ Follow
since Nov 20, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by srinath anand

This is just a wonderful idea. I listen to a lot of audio books and have been thinking about this for a long long time. Finally we have someone who has taken the step in the right direction!!

Great Job!
15 years ago
Thanks for the replies. But I am using IE. Basically I am trying to track a JSESSIONID which is being lost somewhere. Thus I have to do it programatically.
15 years ago
I want to see them.
I am printing out the request headers right now but I want the corresponding response headers sent by the server to the request headers.

Thanks
15 years ago
Hello All,

Is there any way for me to get back the HTTP Response Headers using the J2EE framework in the format as given below ? I have a Filter which gets me the Request headers but I want to get the corresponding Response Headers also. Can it be done ?

HTTP/1.1 200 OK
Date: Mon, 19 Oct 2004 22:12:57 GMT
Pragma: no-cache
Server: WebLogic WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
Content-Length: 297
Content-Type: text/html
Expires: Thu, 01 Dec 2004 16:00:00 GMT
Set-Cookie: SessionID=null; path=/
Set-Cookie:
JSESSIONID=O1mD6qo4DcTRQPV3IuQFKR2TBiANadyyzQG2WqsRLOuyPjIABhPQ!1713637281!-
1073741567!7001!7002; path=/
Cache-Control: no-cache, post-check=0, pre-check=0


Thanks
15 years ago
Thank you all for the help and pointers. I am going to try out the Session Monitor. The problem happens on BEA WebLogic and not on WAS.
15 years ago
Hello All,

I have a problem in that where users are suddenly being kicked out of the application and brought back to the login screen. I need to track why this is happening or what causes it to happen (say a particular request etc.). I can think of implementing the HttpSessionListener to track session creation and destruction. Any other suggestions ? Has anybody programmed anything for sessions that I can modify and use ?

Note: session timeout is set to 1 hour. So that is not the problem.

TIA
[ September 01, 2005: Message edited by: srinath anand ]
15 years ago
I guess your name is null that is why it is not even entering the if block.
Whatever you do, do not leave your present job in the hope of getting an immediate placement with this consulting firm. Continue with your present job till you get a concrete placement at a client site in the US.
16 years ago
The file will not compile because of page.x. However if you take that out x should print 5.

A declaration in JSP is global and is available to the whole class. However anything inside the scriptlet code is inside the _jspService method. So when u say x= <%=x%> it prints the value of x inside the _jspService method which is 5.
Wouldn't using the HttpSessionListener methods help ?
You can use the session.invalidate() method.
Get the Head First JSP & Servlets book by Kathy Sierra, Bert Bates. This book has all details on EL that you want to know for the Exam.
Thanks Siva and others for clarifying.

I guess the most efficient way of including other jsp files is through jsp:include when the pages change quite often.
Both of your observations are correct.

I guess there is a bit more overhead using the include directive because of the fact that the Container has to include the whole of the page in the enclosing page and that may make the enclosing page huge.

On the other hand, using the jsp:include will probably be faster since the response is the only thing that is included.

The rule is that use include directive when you want to include stuff that rarely changes in a web app and use jsp:include for dynamic values.
Here is what you can do to get it working:

In result.jsp -
<html><body>

<jsp:useBean id="person" class="com.example.web.Person">
<jsp:setProperty name="person" property="name" value="<%=request.getParameter("userName")%>" />
</jsp:useBean>
<h1> The name of the person is: <jsp:getProperty name="person" property="name"/></h1>
</body>
</html>

In form.html -
<html><body>
<form action="Tester.do">

Name: <input type = "text" name="userName">
<input type="submit">

</form>
</body></html>

Even if you say <form action="result.jsp"> it will work without any problems but since you have a mapping in the web.xml for Tester.do it may be wise to use it.

Let me know if it works.

Thanks
Srinath