Kash Mhai

Greenhorn
+ Follow
since Apr 01, 2005
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 Kash Mhai

Thanks Ben,
I knew this was a frequently asked question, but i was not able to frame the exact text for framing the question. Maybe i'll start off with HttpClient

Thanks,
13 years ago
Download the J2SE specs and go thru it. What you ask for is a HUGE topic and its tough posting it here.
13 years ago
Is there a way to populate a Set with Map and vice versa?
13 years ago
Hi,
I have a small issue with the servlets. I have two servlets which need to communicate to each other. But both of them are in different applications on different servers (Websphere) Is there a way in which these can communicate to each other? I need to pass all request attributes/parameters of one servlet to be available to the other servlet in another application? I thought of appending stuff to URL, but thats ruled out. Am not sure RequestDispatcher would work too...!

Any ideas?
Thanks
Kash
13 years ago
All,
I use WAS 5.X and use connection pooling for obtaining database connections. However i get "connection closed" exception, and i traced it back to the stale connections in the pool. How do i identify from java code or any other means that a connection has become stale and obtain a new connection?

Any help is appreciated,

Thanks
Kash
Hello everyone,
The app that i am building has some very large JSPs. Something to the tune of 100kb (JSP). when the page is accessed for the first time, the java file that is generated is at 700KB and the subsequent class file is around 110 KB. The subsequent hits to the page are pretty fast. But the first hit is taking a lot of time. Is there a way in which I can reduce the response time in the first hit? I have done the following and have also inferred the following -
1. The buffer size is set to 150KB with autoflush set to true.
2. Am using gzip compression to compress the data.
3. I have tracked each step of the process and i have come to the conclusion that the conversion to the .java and to subsequent .class is what is taking a long time, and NOT the actual execution.
4. I do know there is an option of pre-compiling the JSPs but am looking for options beyond this.

The server is WAS 5 and JDK is 1.4 with JSP 2.0. Am using Struts 1.3 (!!?) in the app.

Can anybody help? It could be in the form of tweaking the app server or a change in the code, any suggestions is appreciated.

Thanks,
Kash
14 years ago
JSP
Shaliesh,
Thanks!
I also should have mentioned that my machine is a windows 2000 and the VAX machine is a seperate one. Do I also need to have a RDB Client installed on my machine?
Also have you used the RDB anytime? Is the method of getting a connection similar to what we do for regular database accesses!?

Thanks for the earlier replies!

Kash
Hi all,
I have a requirement to connect to Oracle RDB from Java. The Oracle RDB is hosted on a VAX Server.
The queries I have are -
1. Is classes12.zip used for Oracle 9i sufficient for accessing RDB?
2. Is there a jar file available taht can be used the same way as regular Oracle Thin Drivers?
3. Is there a specific way to approach this connectivity?
4. Any info on this is appreciated

Looking forward for ANY replies whatsoever,

Thanks
Kash
Hi all,
I needed to compile all available JSPs in WAS 5.0 through the command line tool called jspbatchcompiler. All jsps are getting compiled correctly, but when it comes to struts, I get a weird ClassCastException. It says the following -
What could be the problem? When the same jsp is accessed thru the app server, it works as needed.

Did anybody try this?
I know that we can try checking pre-compiling JSPs option while deployment, but I got same error even then.
Have checked all classpaths, and there doesnot seem to be a problem there.

Any help would be appreciated.

Thanks,
Kash
------Had to replace C with K in Kookie.Javaranch doesnt accept it, otherwise ----------------

The error thrown is :

java.lang.ClassCastException: org.apache.struts.taglib.bean.KookieTei
at org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:414)
at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD
14 years ago
Hi,
I need to upload a file using a servlet, but WITHOUGHT USING HTML. I mean I need to pass a variable to a servlet and it should upload the file. Eg., I cal a servlet like this http://localhost:7001/sampleapp/abc.servlet?fname=abc.txt
and t he abc.txt should be uploaded. Is this possible? I have uploaded files using Multipart Request and all, but in this condition i need to bypass the HTML totally. Is this possible?

Kash
14 years ago
Hi all,
I wanted the procedure in deploying a web app into Websphere. The way that i had seen it done was -
1. Create a .war file of the app
2. Dump it into a shared folder.

After 10 minutes, the app got deployed automatically.

How do i do that? Any help would be appreciated

Regards,
Kash
14 years ago
Hi All,
Please see the following code..
------------
//con=getConnection();//Assume connection is there..
try
{
con.setAutoCommit(false);
...
..
//Insert some rows into a table
..
..
//All succeded.. no problems
con.commit();
}
catch (Exception e){
con.rollback();
}
------------
My questions are -
1. Does the AutoCommit property of the connection need to be set to TRUE?? before the connection is closed?
2. Does the rollback() need to be commited? I mean,
after using con.rollback(); in catch, do we need to use con.commit() again?
3. If i dont set the connection to setAutoCommit(true) again, will there be an effect while managing data from backend?
4. Does not using con.commit() after con.rollback(), and not setting the AutoCommit to true cause any performance issues?

Regards,
Kash
Marc,
I have used the <html:multibox /> as a workaround. This worked too. Involved a lil bit more code, but it worked.

Thanks for the solution. Will check it out. I am all smiles coz i feel this is gonna work.
Thanks a lot
Kash
15 years ago
Hi guys,
Have started using Struts recently. I have a small problem with <html:checkbox />. In the JSp whether I check the box or not the value of the checkbox is appearing as "on" in the Action class. I haev a getter, setter method too for this control and am resetting the property to null also. But still I am getting the same prob. Can some help me in correcting my mistake?
The code -
---------------------------
<html:checkbox property="chkItem" value="Y" /> etc etc
<!-- Have tried removing the value attribute too, but of no use---->
-----Action form--------
private String strChkItem;
public String getChkItem()
{
return strChkItem;
}
public void setChkItem(String strTmp)
{
this.strChkItem = strTmp;
}
public void reset()
{
strChkItem = null;
}
-------------------------------

THanks in advance,
Kash
15 years ago