Srinivas Rao

Greenhorn
+ Follow
since Aug 05, 2004
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 Srinivas Rao

Lasse Koskela, If you have any sample code/example, can you post it here or can you send me aluri.java@gmail.com

thanks in advance
18 years ago
I assume that there is problem in the validate() method of the form bean. If the validate method will not return an empty ActionErrors collection, the request will not go to Action class and return to the JSP for which 'input' attribute set for the action.

To quickly identify this, modify the 'validate' attribute of the action in config, to 'false'. so your validate method will not be called. If still it is not going to Action class, some thing else is error.
18 years ago
Raj,

Over loading the default behaviour with another attribute is best choice and we are doing the same.
18 years ago
We are working on a migration project from ASP to J2EE using struts. Because in ASP the complete logic in ASP file itself, so while calling stored procedure to render a report, they are showing 'Loading Data....' message on the screen by temporarily writing the message to the response. This message flushing is followed by a call to Procedure. So till the time the procedure executes, user can see the 'Loading Data...' message.

Now we have to achieve the same functionality. It means once click 'Search' button, we need to call the action class which gives temporary message to the user and followed by calling the Database procedure.

Can any body implemented like this? How to achieve it and is there any other alternatives for it?
18 years ago
I have to check for 'OR' condition in Struts. For example, if the status is 1 or 2, I have to show a bunch of code. So far I am using 2 blocks of logic:equal and copying the whole bunch of code. The problem with this approach is if I want to check many 'OR' conditions, difficult to maintain.

If I have to check many 'OR' conditions, I am doing all these checks in Action class and setting the result to another form variable and comparing these new variable in JSP. But this leads to additional(unnecessary) properties in the Form bean.

What is the best approach to achieve the above condition.
18 years ago
I have a requirement in which a connection should made asynchronous call to stored procedure (which will contain to refresh a multiview in oracle). Why we need to make it asynchronous call is the refreshing will take few minutes for which we dont want the user to wait to get the success/fail message back.

Is there any way to make such call using normal JDBC stuff? As the refreshing is not compulsory (even refresh fails for some time, no problem), not preferring to go for JMS.

I heard that in ASP there is a way to made the command object as asnchronous connection. Is there any similar way using JDBC.
Thanks for replies.

What Padma Lalwani looks, it will solve my problem. Any still better solutions Post here.
When I am inserting a row which contain primary key (generated by sequence), I want to get the sequence back after inserting the row in table. That key value I need to insert into child table. I am using Oracle 9i. I heard that there is some thing for this with Sybase. But don't know about the availability for Oracle. So far we are firing a query to get the sequence number and inserting with that value both in parent & child tables. This is making another DB trip (to get sequence).

Is is a DB/drivers feature or JDBC mandates to provides similar to that?
replace each single quote within a string with two single quotes when using Statement. Otherwise Preparestament.setString() will work for you.

ex: insert into values("St. Mary''s Church");
When I am trying to access a Ref cursor in oracle through Java using oracle thin driver, some times we are getting error : No more data to read from socket. This is making that particular connection invalid for further DB operations.

Actually what does it mean by No more data to read from socket. What are all the things will result those error (bad SQL in SP, driver problem or improper java code)?

Please provide reasons of that error and corrective measures
Hi Ranchers,

We are using jrun 4.0 connection pool for connecting to oracle 9. Apart from the connection pool, we are externally managing (to allocate the connection to the user) and giving the connection from the pool based on our own logic. After some time of running the application, one/few connections are timedout and returned to the pool as a stale/damaged connections. When my logic gives me the staled connection, further DB operations are failing. So I want to know

1. Is there any way in Jrun Connection pool to check the staled connections and recreate them in the pool itself?
2. Or when the connection pool returns me the connection, did I need to check for the valid connection and recreate and return if it is stale (how to recreate and return to pool)?
3. Which method is better or any other way which will manage stale connections properly?

Thanks in advance
Can any one give the new features in Struts 1.2.x compared to 1.1. I am also getting some features but looking for consolidated quick reference. Any ranchers can help?
18 years ago
This will given me the basic difference between both the type of forms. Can any one suggest where we can use each of one? If any one explains with some example it is more clear.
18 years ago
It will expect Boolean object rather than boolean value.

use set("name", Boolean.valueOf(false)) rather than using set("name", false).
18 years ago