Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Dakshinamurthy Ramachandran

Greenhorn
+ Follow
since Mar 09, 2002
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 Dakshinamurthy Ramachandran

"Jesus is coming back !" .... (Written by missionaries in walls ...)
One True (?) hindu's reply ....
"To join in Hindu religion" ...
...
15 years ago
Hi,
We deployed our application in iPlanet 6.0 on Solaris.
Our report links are routed thru one "intermediate" jsp file for getting the configuration values.
Configuration values are read and kept in application scope in first time invocation of any report, using
application.setAttribute("reports_properties", properties);
and subsequent call to reports will take the config values from application object.
Application is working fine for past one month and the following exception thrown a day back.
java.lang.NullPointerException
at
com.netscape.server.servlet.platformhttp.PlatformServletContext.getAttribute(Unk
nown Source)
at jsp.APPS.maps.common.intermediate._jspService(intermediate.java:119)

The following is the coding snippet used in the "intermediate" jsp file.

if(application.getAttribute("reports_properties") == null)
{
/* Get Values from Reports.properties file */
synchronized(this)
{
properties = new Properties();
FileInputStream file = new FileInputStream("/Reports.properties");
properties.load(file);
file.close();
application.setAttribute("reports_properties", properties);
readTheProperty = true;
}
}
else
{
/* Get Values from session object */
properties = (Properties) application.getAttribute("reports_properties");
}

Please clarify me by any chance "application" object
(ie) application = pageContext.getServletContext();
can be NULL.
Thanks in advance
Murthy.
15 years ago
JSP
Hi,
From my understanding of concepts, i'll try to give the answers to your questions.
1. There is no impact, if actual values are less than the "size" which was set.
2. This way you can't set the size, and will fail for 'TYPE_FORWARD_ONLY'. Refer JDK API.
3. Definitly yes, but it is default, so no need to set explicit.
4. No idea !
5. Definitly NOT ... why additional query ? count(*) is as costly as retrieving all the values ...
Cheers
Murthy
Hi,
Basically servlets are multithreaded by design. Meaning single object instance of servlet will serve all the clients. In a specific scenario, when you expect concurrency will affect the integrity of data, you can go for single threaded servlet by implementing Single Thread Model interface.
Hope this answers your question.
Cheers
Murthy
15 years ago
Very crude think ...
Just changed the Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
from '1.4', to '1.3'. Try then. Let us know what you are getting ....
16 years ago
Hi,
Why dont you use PrepareStatement for insertion ... Think it does the escaping of special characters automatically.
Hey,
Send your code. It may be useful to see what's going on ... Good luck.
Hi,
I'm not clear about your question. If you want to make duplicate resultset, try out using CachedRowSet & further explore the ways to make a copy of it (Ofcourse it is disconnected result set, not a true resultset).
Thanks to you all for replay.
I would like to try both JBoss & Orion.
Hi All,
Can anyone tell me, which is the lightweight, easy to use EJB server. (with small memory usage). Need not be a robust one. I require it for learning & testing purpose only. Tx in advance.
Hi,
Check out this book also. "Enterprise Java Beans" by Tom Valesky.
Hi Mike Curwen,
Tx for the reply.
About my first problem, why i hurry for finding out the workaround is, Our project already went live. If customer reports any defects, we are fixing it & sending the same to him. In order to update even a single bean, we are forced to bring down the server. In initial stage it is okay. But customer is not happy about this procedure. They want server to be up 24 hours a day.
I'll be ver ymuch thankful if anyone give some solution on this.
My second problem is, yes it is really a problem.(500 error again not coming from cache, because, i've removed the cache, as well as i've seen from the log that request went to server again.
This is not a big issue for me now. I'll appreciate, if anyone explains why this is happening like this.
16 years ago
Hello all,
We are developing applications in iPlanet - iAS6 on Solaris platform. (Most of us having solaris on NT box for development & porting only using Solaris).
My problem is whenever i change some code in ordinary bean, i've to restart my server(iAS) to take the effect. (Both on NT & Solaris).
Any work around, so that dynamic reloading of class is possible ?
Another problem is, when ever some JSP is missing in the path, system came out with the message 500 Internal Server Error (File Not found). But after copying the file in the specified location, again same error is coming. Once i do the restart it takes effect. Any work around for this also ..
Thanks in advance.
16 years ago