hasina kumar

Greenhorn
+ Follow
since Jan 06, 2006
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 hasina kumar

Initially that was what i was doing trying to do, to write to ServletOutputStream from the response object. But i kept on getting "Writer already retrieved error", so i used FileOutputStream instead. But finally i figured out why i was getting the error while using response.getOutputStream(). So myster solved . Thanks
17 years ago
I am trying to download a file from a blob column in the database in my action class. I know that blob object was correclty populated in the first place by uploading a file. I can verify that by clicking the blob field in TOAD.
No matter what the size of the file is, it always downloads only 3k, and when i try to open the file, it says it cannot determine the type of the file. I am using Oc4j Application server with oracle database(9.2.0.5). I got the latest jdbc driver for this database version and put in my oc4j lib folder. My action class looks like:
17 years ago
I am using Oracle Application Server 10g(9.0.4.0.0) with latest version of IBatis. I am uploading a file and inserting file data as byte[] in the database field which is a Blob. I keep on getting SQLException:Data size bigger than max size for this type when i try to insert. If i take out the file data from my insert statement , a record is inserted into the table.

My xml mapping file is:


And my sqlmap-config.xml is
Yes that is true i have all my jsp' under /WEB-INF for security reason. If i create another action in the struts-config.xml file and try to use that in setTimeOut method, i will get bean properties are not defined, since the all the bean properties are set in the action class, so if we try to point to progress.do page, it does not get bean properties from the request.

May be i am not doing this correclty. Can you show me how you would do this, when i do not have any ActionForm defined:

In that case, simply define the ActionForm name to the Action that starts the thread, so that Struts will instantialte the DynaActionForm and pass it to the execute(). You can then cast it as a DynaActionForm and pass it via a setter to the status bean. In a situation like this, though, I find it easier to work with a subclass of ActionForm. That way I'm able to instantiate the form bean whenever I want. The disadvantage to a DynaActionForm is that Struts has to instantiate it.

17 years ago
I am not using ActionForm bean. I am using DynaActionForm. I tried to put the code, where i start the thread in the action class instead of having in status.jsp, but that did not make any difference. Also i cannot specify "progress.jsp" within setTimeOut javaScript function. I just get "Page Not found". I cannot get rid of setTimeOut function. If i do that, then my next page(after processing) does not show up at all. It just keeps on showing the interstitial page.
17 years ago
I am trying to show a interestitial or status page as there is few seconds wait before my webservice call returns results. I was trying to implement this using Threads, but i end up calling the webservice twice. First time i initiate the action method when i click on the next button. Second time i have to call the same action again so i can the status of the thread. If the status is complete then i show the next page, otherwise i show the interstitial page, which just contains a gif image and a wait message. I can do this in plain jsp by following the instruction in this link, but i cannot get around the Struts Framework to implement. Any ideas will be appreciated
http://www.precisejava.com/book/chapter1/progress_message.html

Plust there is a sleep in the thread, which causes unnecessary delay.
17 years ago
I am not using Session Bean. I getting the dataSource by using JNDI context
try {
// Get the JNDI context
Context ic = new InitialContext();
ds = (DataSource) ic.lookup(dsName);
}
catch (NamingException e) {
e.printStackTrace();
throw new RemoteException(e.getMessage());

And this is the try-catch blocks to get the connection. I close connection in finally block
try
{
try {
conn = DbConnectionPool.getConnection(dsName);
}
catch (RemoteException e1) {
e1.printStackTrace();
}
stmt = conn.prepareCall(sql);
}
catch (SQLException e)
{
try {
throw new RemoteException(e.getMessage());
}
catch (RemoteException e1) {
e1.printStackTrace();
}
}
finally{
try{
conn.close();
}
catch(SQLException e){
}
}
return stmt;
}
After creating a DataSource on Oracle Application Server, we deploy a war file for the application. But when we try to run the application, it results in following error:
OrionCMTConnection not closed, check your code
Logical Connection not closed, check your code.
I have checked my code for closing all the open connections. All the connections are closed in the finally Block.

I have checked the web.xml for resource-ref tag pointing to correct DataSource. Also check the connection string in DataSource on the application server. Everything seems to be correcty. Does anybody have any idea why i would get this error. -Thanks
A valid user logs in from a .NET application and is forwarded to ASP.NET Home page. Java application consisting of Serlvet/JSP has to read the Cookie in the browser to authenticate the user on the J2EE application side.The user is already authenticated on .NET application, how do i authenticate the user on the Java side without going to the database.
All i am doing on after i get the ASP.NET home page is, i am putting the URL for the Java Web application, which reads the cookies in request object, and displays the name and value of the Authorization Cookie in JSP. But my java application is never able to find this Cookie. A

Any help on this will be appriciated
Thanks
18 years ago