raj sekhar

Ranch Hand
+ Follow
since Oct 16, 2001
Merit badge: grant badges
For More
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 raj sekhar

Thanks Praful for your replies. But NO, getSession(false) should not be creating the session. The API and specification does say that. What am I reading wrong ? Also, if that is the case...how do I get the user do sign in...if the refresh does the job of gaining access. Agreed, I can use the userID password to control access...but still am not convinced.

As for the RequestDispatcher, according to the specs, forward gives the control to the 'other' web resource (something like 'go to') whereas include is something like a 'call' where the control gets back. It doesnt quite fit the behaviour.

Thanks
19 years ago
I am trying to centralize the creation of sessions in the application. Look at this piece of code:

session = request.getSession(false);
if (session == null) {
System.out.println("Session is null, send to login page");
RequestDispatcher rd = request.getRequestDispatcher("/jsp/Login.jsp");
rd.forward(request,response);
System.out.println("service(): after forwarding to JSP page");
return; // Why do I need to do this ? the forward should not get the control back here
}
else {
System.out.println("service(): Session is available is not null.");
}

1. When the request comes for the first time, Lgoin.jsp is displayed. But, when a refresh is hit on the browser, a session is available and is NOT null.Confusing. How is that ?

2. Am assuming the forward method of requestDispatcher gives away the control of the servlet ...but what I observed is that the control stays with the servlet. I see the statements printed..and so I had to use return..wierd.Am I doing anyting wrong here ?
19 years ago
Thanks very much for the reply Jeanne.getTestVector()a regular 'get' method that returns a vector object which is an instance.

Mark: Thanks to u too for the reply. I agree Vector is an old way of storing but dont u think , regardless of what object I use, the web request model shd not retain it beyond the request scope ? am lost. Am gonna try to use ArrayList but am doubtful that this problem wud go away using arrayList.

Any other reasoning for this behaviour ?

Thanks
19 years ago
Hi
Am trying to read from hashtable using JSTL tags in JSP. What I found when doing a c:forEach is , with Hastables, it returns lastIn firstOut order from the Hashtable when I do the looping. How can I reverse it. I wud like to have FirstInFirstOut Oreder. Here's the code snippet:

<c:forEach var="item" items="${testHash}">
The next Hash key is <c ut value = "${item.key}"/> <br/>
The next Hash value is <c ut value = "${item.value}"/> <br/>
</c:forEach>

Also is there a good reference site for EL and JSTL with lot of examples ?

Thanks for u time.
RS
19 years ago
Hi
Am assuming that the HttpRequest lifetime is limitd to service method. Look at the code below :
getTestVector().add("Str1");
getTestVector().add("Str2");
getTestVector().add("Str3");
req.setAttribute("StrVector",getTestVector());
RequestDispatcher reqDisp = req.getRequestDispatcher("/jsp/testVectJSP.jsp");
reqDisp.forward(req,res);

and in the jsp am retrieving the StrVector object from request using JSTL c:forEach.

<c:forEach var="item" items="${StrVector}">
The value in vector is <c ut value = "${item}"/> <br/>
</c:forEach>


The problem is everytime I reload the page on the browser, the reuslt shows cumulative repetitions of the objects in the vector.

The result when loaded thrice is: (and it increments everytime I relaod)

The value in vector is testVect1
The value in vector is testVect2
The value in vector is testVect3
The value in vector is testVect1
The value in vector is testVect2
The value in vector is testVect3
The value in vector is testVect1
The value in vector is testVect2
The value in vector is testVect3

My expectation is to have just:

The value in vector is testVect1
The value in vector is testVect2
The value in vector is testVect3

With hashtable it just prints one set but not with vector. Any specific reason ? What am I missing here ? Doesnt the request refresh everytime its invoked ?

Note: I even tried to removeAttribute("StrVector") before setting but that has no effect too.

Environment: win2K, weblogic8.1

Thanks
RS
19 years ago
Hi
Can somebody guide me how to deploy an appliacation in WLS8.1 in a exploded directory structure using wldeploy task ?
Thanks for your time.
20 years ago
Hi
Is there a url on bea site or elsewhere that contains a listing of all ant tasks that is included in wls8.1 ? I tried to browse the documentation on the edocs site of bea ...but there is no one finite location as much as I know. for ex: one doc refers to tasks specific to webservices...another doc speaks abt wlserver/ wlconfig tasks for admin etc...
I'd love to know all available tasks in one listing.
Thanks
Raj
20 years ago
am using iAS6.0 sp1(NT) and trying to deploy a .war file. I have class files and html files in a directory different from the iAS install directory. The deployment tool sometimes is so frustrating and behaves differently at different times.
1.Why does it create <app-name>/tmp/war/<app-name>/Web-inf instead of <app-name>/web-inf ?
2.How does it assume paths? very rarely it asks for the root-dir.No said pattern for this behaviour.
3.Is there a way I can edit .war file without using the deploy tool ? It will be so much easy to add all paths if I can edit direct. I am getting real upset with these tools.
4.Appreciate if somebody can point to a cleaner set of deployment document other than the admin guide. The bahaviour is very much different than what is said in the docs.
Thanks
R
21 years ago
Carl Trusiak / Mike Curwen
Its been very long that we didnt hear anything from anybody. Do we still have a chance. It will help to let us atleast know the problem.
Appreciate you reply.
Thanks
Raj
21 years ago
Sure David. Thanks so much. Its really surprising. I dont think it has ever happened like this on JavaRanch. Am sure Carl and Mike are doing their part.
Raj
21 years ago
nope. we havent yet received the books
Thanks
Raj
21 years ago
Mike
Guess I have waited till the month-end(if you meant september )....but havent recd the book yet.....
Unfortunate
Thanks
Raj
21 years ago
Thanks very much Mike. Will do.
Isaias, John, Sanjay....can you guys let me know if you recd so that I may know where I stand.
Thanks
Raj
21 years ago
Guys
Did any of you winners receive the book ? I am not sure if I should have by now but I havent yet.
Carl: I sent an email to you with my question. Hope you recd my email.
Moderator: Can you throw some information.
Thanks
Raj
21 years ago
David
In that case, is it true that the process does not consume more memory than what is specified by the Java args param(heap size) even when more physical mem is available ? we have a total of 6 kjs running and the total max heap size of all 6 process should not exceed 40% of physical mem ? Can you let me know why is it preferred to keep to less than 40%(the rest 60% for other processes seems too high which we dont have many anyway !) ?
The below are the settings from the kjs script. I guess this is the right spot to change the heap sizes.
$JAVA_HOME/bin/java -XdoCloseWithReadPending -ss256k -mx256m com.kivasoft.hpCppRTinit.hpCppRTinit com.kivasoft.engine.Engine $opts
With the above settings does it mean that not more than 1.5G will be consumed by all the 6 processes together ?
suggestions?
Thanks
Raj
21 years ago