sudharsan, varadharajan

Greenhorn
+ Follow
since Jul 12, 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 sudharsan, varadharajan

Hello David,
Thanks a lot for the quick reply.
1.) Regarding your reply point no 1, in my case, SomeObject X is a java.util.Date object instantiated from the caller object. Each caller object instantiates its own date object and so I am safe.
2.) Regarding your reply point no 2, Yes, i did mean, concatenation of 2 strings to point to a new resultant string and not truly "modification" of the original strings b and c.
3.) Regarding your reply to point no 3, I didn't want to write a complete compilable method within my message. i just wanted to get my question across clearly. Yes. It needs a "return String " at the end to compile.
Again, thanks a lot.
Sudharsan.
19 years ago
Hi All,
I have a doubt regarding method parameters passed to static methods in java. Suppose I have a static method on a object A, say
public static String void process( String b, String c, SomeObject X)
{
}
1.) The Static Method modifies SomeObject X.
2.) The Static Method modifies b and c.
3.) The static Method returns a String result.
Is this Thread Safe, if multiple clients access this method supplying
their params(b, c and X). I would really appreciate it if some one could clarify this for me.
Sudharsan.
19 years ago
Hi All,
I have a doubt regarding method parameters passed to static methods in java. Suppose I have a static method on a object A, say
public static String void process( String b, String c, SomeObject X)
{
}
1.) The Static Method modifies SomeObject X.
2.) The Static Method modifies b and c.
3.) The static Method returns a String result.
Is this Thread Safe, if multiple clients access this method supplying
their params(b, c and X). I would really appreciate it if some one could clarify this for me.
Sudharsan.
19 years ago
Hi All,
I even tried checking on the "item" itself instead of "index".
It still blows up with an exception.
<%
java.util.ArrayList list1 = new java.util.ArrayList();
list1.add("First");
list1.add("Second");
list1.add("Third");
list1.add("Fourth");
list1.add("Fifth");
pageContext.setAttribute("list", list1, PageContext.PAGE_SCOPE);
%>
<jsp:useBean id="list" scope="page" class="java.util.ArrayList"/>
<logic:iterate id="item" name="list" indexId="index" >
<logic resent name="item" scope="page" />
<li><em><bean:write name="item"/></em> </li>
</logic resent>
</logic:iterate>
20 years ago
Hi All,
I am new to struts. I am trying to use logic:iterate tag to iterate over a collection (ArrayList) which normally contains String objects. It could also contain NULL . I tried to check for NULL by using the logic resent
tag but it still blows up. Could some one please help me??
I am writing below the code and the exception:
<%
java.util.ArrayList list1 = new java.util.ArrayList();
list1.add("First");
list1.add("Second");
list1.add("Third");
list1.add("Fourth");
list1.add(null);
pageContext.setAttribute("list", list1, PageContext.PAGE_SCOPE);
%>
<jsp:useBean id="list" scope="page" class="java.util.ArrayList"/>
<logic:iterate id="item" name="list" indexId="index" >
<logic resent name="index" scope="page" />
<li><em><bean:write name="item"/></em> </li>
</logic resent>
</logic:iterate
EXCEPTION:
***********
X Servlet Error: Cannot find bean item in any scope: javax.servlet.jsp.JspException: Cannot find bean item in any scope
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:839)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:286)
at _sudha_2D_iterate_jsp_17._jspService(_sudha_2D_iterate_jsp_17.java:181)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:312)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:487)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:620)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:678)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:117)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:151)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:137)
20 years ago
Hello,
I am using WSAD5.0 FixPack 5.0.1 on Windows 2000. When I try to start any 4.0 Server with 4.0 Server Configuration, I immediately get this weird
message in the console.
java.lang.NoClassDefFoundError: 7000 null null
Exception in thread "main"
This is least helpful, completely NOT USER FRIENDLY error message.
I have checked to find out where does 7000 null null is used. When I checked the properties of the server instance under Debug prespective this line appears there.
Following is the value I found.
C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/java/jre/bin/javaw -cp C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/properties;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/lib/bootstrap.jar;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.0.2/runtime/wteServers.jar;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.0.2/runtime/wasToolsCommon.jar;C:\appl\dispute\config -Dcom.ibm.CORBA.ConfigURL=file:/C:/ODA/workspace/.metadata/.plugins/com.ibm.etools.server.core/tmp0\properties\sas.server.props -Dserver.root=C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4 -Dcom.ibm.itp.location=C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/bin -Dws.ext.dirs=C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/java/lib;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/classes;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/lib;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/lib/ext;C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/web/help;C:/SQLLIB/java/db2java.zip;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.0.2/runtime/wasListener.jar;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.webservice_5.0.2/runtime/worf.jar;C:\ODA\workspace\odaDevWeb\Web Content\WEB-INF -Dcom.ibm.websphere.servlet.temp.dir=C:/ODA/workspace/.metadata/.plugins/com.ibm.etools.server.core/tmp0\cache -Djava.library.path=C:\Program Files\IBM\WebSphere Studio\runtimes\aes_v4/bin;C:\Program Files\IBM\WebSphere Studio\eclipse\jre\bin;.;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\WINNT\system32\nls;C:\WINNT\system32\nls\ENGLISH;C:\PROGRA~1\CA\Common\SCANEN~1;C:\PROGRA~1\CA\eTrust\INOCUL~1;C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\Program Files\Symantec\pcAnywhere\;J:\oracle\ora81\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\Hummingbird\Connectivity\7.00\NFSClient;C:\Program Files\Rational\common;C:\Program Files\Rational\ClearQuest;C:\IBM\IMNNQ;C:\SQLLIB\BIN;C:\SQLLIB\FUNCTION;C:\SQLLIB\SAMPLES\REPL;C:\SQLLIB\HELP;C:\PROGRA~1\ULTRAE~1;C:\Program Files\Hummingbird\Connectivity\7.00\Accessories\ -Dwas.loose.config=file:C:\ODA\workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\looseconfig.xmi -Dwas.variable.map=C:\ODA\workspace\.metadata\.plugins\com.ibm.etools.server.core\tmp0\pathMaps.properties -Dcom.ibm.ws.classloader.J2EEApplicationMode=true -Dproperty.file=/appl/dispute/config/propertyfiles.xml -Dwas.debug.enabled=true -Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8236 com.ibm.etools.websphere.tools.runner.UnitTestServerRunnerV4 1223 C:/ODA/workspace/Servers/defaultConfiguration.wsc/server-cfg.xml 7000 "null" "null"
20 years ago
Thanks a lot, Kyle and Raghuveer.
I have decided not to use the third party vendor libraries now
and will wait for them to produce a 1.3.1 compatible version.
Till then I will use a generic product from Sun( 1.3.1 Compatible)
20 years ago
Hi all,
Our company uses WAS4.0 in Production which , I think, is strictly JDK1.3.1. We have a need
to use third party jars which were compiled
using JDK1.4.1. Basically, some of our application code has to be written using those
classes.
Is upgrading to WAS5.0 my only solution? or
is there some hope via some solution?
Any help would be greatly appreciated?
Thanks,
Sudha
20 years ago
Hello All,
I have been reading about the new XmlBeans
construct from BEA Weblogic Workshop 8.1 and
is now given to open source as "XmlBeans 1.0".
Our company is currently using WAS4.0 in Prod
and WSAD5 for desktop development. I know, xmlBeans need JDK1.4.1 and WAS4.0 is ONLY JDK1.3.1.
It is so SAD!. Is there any way I could use
my custom jar which contains JDK1.4.1 compiled
XmlBean classes in WAS4.0 runtime???
OR
Is Migrating to WAS5.0 the ONLY ANSWER?
Any help on this will be greatly appreciated!
Thanks in Advance,
Sudha
20 years ago
Hello All,
I have been fighting a very annoying bug
in WTE( Websphere Test Environment) which is
part of VAJ3.5. Yes! Unfortunately my company
is still in WAS3.5 days and we have not migrated
to WAS4.0 yet.
All was working fine in VAJ till a couple
of days ago. All of a sudden, when I start my
WTE, the servlet engine fails to load the db2
driver.
I have tried all kinds of things
but it SIMPLY REFUSES TO GO AWAY!. Could anybody
please shed some light on this?. or Have anybody
else experienced the same problem?. I am
listing below the exact stack trace :
STACK TRACE:
***********
#ERROR#: Error retrieving connectionException:Error loading JDBC driver: COM.ibm.db2.jdbc.app.DB2Driver
#ERROR#: START STACK TRACE
java.sql.SQLException: Error loading JDBC driver: COM.ibm.db2.jdbc.app.DB2Driver
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.sql.SQLException(java.lang.String)
java.sql.Driver com.ibm.ejs.cm.JDBCDataSource.loadAndCheckDriver()
com.ibm.ejs.cm.pool.ConnectionFactory com.ibm.ejs.cm.JDBCDataSource.createConnectionFactory()
javax.sql.DataSource com.ibm.ejs.cm.DataSourceImpl.getSource()
java.sql.Connection com.ibm.ejs.cm.DataSourceImpl.getConnection(java.lang.String, java.lang.String)
java.sql.Connection com.tuc.database.ConnectionPool.getConnection(java.lang.String, java.lang.String)
com.tuc.database.ScoresDatabase()
void com.tuc.servlets.MediatorServlet.init(javax.servlet.ServletConfig)
void com.ibm.servlet.engine.webapp.StrictServletInstance.doInit()
void com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(javax.servlet.ServletConfig)
void com.ibm.servlet.engine.webapp.PreInitializedServletState.init(com.ibm.servlet.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletConfig)
void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(javax.servlet.ServletConfig)
void com.ibm.servlet.engine.webapp.ServletInstance.init()
void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig)
void com.ibm.servlet.engine.webapp.ServletManager.addServlet(java.lang.String, javax.servlet.Servlet, java.util.Properties)
void com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(java.lang.String)
void com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets()
void com.ibm.servlet.engine.webapp.WebApp.loadServletManager()
void com.ibm.servlet.engine.webapp.WebApp.init(com.ibm.servlet.engine.config.WebAppInfo, com.ibm.servlet.engine.webapp.WebAppContext)
void com.ibm.servlet.engine.srt.WebGroup.loadWebApp()
void com.ibm.servlet.engine.srt.WebGroup.init(com.ibm.servlet.engine.ServletHost, com.ibm.servlet.engine.config.WebGroupInfo)
void com.ibm.servlet.engine.ServletHost.loadWebGroups()
void com.ibm.servlet.engine.ServletHost.init(com.ibm.servlet.engine.ServletEngine, com.ibm.servlet.engine.config.ServletHostInfo)
void com.ibm.servlet.engine.ServletEngine.loadServletHosts()
void com.ibm.servlet.engine.ServletEngine.init(com.ibm.servlet.engine.config.ServletEngineInfo)
com.ibm.servlet.engine.ServletEngine com.ibm.servlet.engine.ServletEngine.getEngine()
void com.ibm.ivj.control.node.ServletEngineRunner.restartServletEngine(boolean)
void com.ibm.ivj.control.node.ServletEngineRunner$RestartServletEngineThread.run()

SOLUTION 1:
**********
It was posted in the javaranch a while back.
a.) close VAJ
b.) Rename the db2driver.zip to something else.
C.) Bring up VAJ.
d.) Rename the db2driver.zip back to its original name
e.) start WTE
THIS DIDN'T WORK!
SOLUTION 2:
**********
Reinstall VAJ 3.5.
THIS DIDN'T WORK!
SOLUTION 3:
**********
May be the db2 driver was bad. So I replaced it
THIS DIDN'T WORK!
aLL Classpaths are pointing to the right db2driver.zip.
Thanks
Sudharsan
20 years ago
Hello William and Others,
I was able to solve my problem. For some
unknown reason, HttpUrlConnection is INDEED doing
URL Decoding without being asked to do so. I tried to encode the received value in my re-directed servlet using URLEncoder and I was able
to see the ORIGINAL VALUES of the POST parameters
before the POST.
I Thank you all for the quick reply to my
problem and your valuable inputs. I really appreciate it.
Sudharsan
22 years ago
Hello All,
I am trying to use HttpURLConnection class
to do a POST from a servlet to an COMPLETELY
OUTSIDE URL, an URL outside of my JVM and my
Servlet Engine.
The post parameter string haS characters like
%2B, %2F, %0A, %3D to signify the ascii values
for characters +, /, '\n', = respectively.
After doing the HttpURLConnection post and
when I look at the request parameter string
in my re-directed servlet I don't see %2B, %2F, %0A etc but I see their values of +, /, '\n','=' etc. I think, the HttpURLConnection is doing some kind of URL Decoding or transformation behind the Scenes. Is there any way to solve this Problem?. Thanks,
Sudharsan.
22 years ago
Hello William Brogden,
Thanks for your reply.
I tried using HttpURLConnection as you said.
Now, there is a different problem.
The post parameter string originally before
using HttpURLConnection had characters like
%2B, %2F, %0A, %3D to signify the ascii values
for characters +, /, '\n', = respectively.
After doing the HttpURLConnection post in the
re-directed servlet, when I look at the request
parameter string I don't see %2B, %2F, %0A etc
but I see their decoded values of +, /, '\n',=
etc. I think, the HttpURLConnection is doing
some kind of URL Decoding behind the Scenes.
Is there any way to solve this Problem?.
Thanks,
Sudharsan.
22 years ago
Hello Joe,
I am sorry if I didn't make myself clear.
Yes! I am not dealing with a relative URI at all.
Iam dealing with a re-direct to an external URL
with protocol prefix "http", "host", "port" etc
for which I observed the RequestDispatcher cannot be used and so I was looking to see if others have found a working solution for this.
Thanks for replying back!.
Sudharsan.
22 years ago
Hello All,
I am running in to a problem regarding which I would really appreciate some assistance. I am
using Visual Age for Java 3.5 for my Java IDE.
My problem is as follows:
1.) Browser issues a HTTP POST to a servlet.
2.) within the servlet, I have to re-direct to
a COMPLETELY DIFFERENT URL which is outside of my servlet Engine itself, like as below.
RequestDispatcher.forward("http://www.cnn.com?param1=value1");
RequestDispatcher.forward SEEMS TO BE WORKING
ONLY with RELATIVE URI's . How do I re-direct my
POST with my ORIGINAL REQUEST PARAMETERS, TO A URL WHICH IS COMPLETELY OUTSIDE OF MY APPLICATION
FROM WITHIN MY SERVLET???.
I am currently trying to get it to work using
HttpUrlConnection object but I have not had success till now.
Thanks in Advance,
SudharsanRequestDispatcher.forward SEEMS TO BE WORKING ONLY WITH RELATIVE URI's
22 years ago