Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

kshitij raval

Greenhorn
+ Follow
since Oct 20, 2001
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 kshitij raval

It seems that it works properly with Mozilla Firefox browser but not with IE 6.0 browser

I noticed that firefox is calling the actions properly but IE 6.0 seems to calling the action controller twice.

How to resolve this? Could there be some patch/fixpack for IE 6.0 browser?
15 years ago
Hi JiaPei,

I would like to add to your confusion sorry about that. But I was just curious which "server" you are talking about here ...


I think that I understand it now. Anytime I update my entire application from the version control repository, I should restart the server



Are you talking of a proper WAS runninng on a seperate machine or WAS on your RAD Test Environment?


Your concern: I have seen people using WAS and WSAD. I think that they did some kind of configuration. If they modify the Java class code, they do not have to re-build or re-deploy the application. They are able to run and display the application the reflects the changes made

Daniel's concern: What I am trying to say is my current work concentrates on using the web server only. Therefore, I wish to do some more configuration to AutoDeploy



Yes you can do this with WebSphere Test Environment installed on your RAD:http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.etools.websphere.tools.common.doc/topics/cwte.html


I agree with Chintan and thats what we also do:
- You've RAD with Test Environement
- You create your web application and just say "Run on Server" - select the server you want and run your project on WAS within RAD
- You can do changes, and depending on what type of change it is, to see that reflection is very easy: (1) If you've done changes in just JSPs you can just do a Refresh (2) but even if you've done some changes in java code all you do again is right click and "run on server".

HTH and hope this is what you're looking for.

regards,
Kshitij
[ June 16, 2006: Message edited by: kshitij raval ]
15 years ago
I am using WebSphere Portal version 5.1 with IBM WebSphere Everyplace Mobile Portal Enable 5.1 ( Build Level: 20051112_2319 2005-11-12 23:19 ) on Red Hat Linux operating system.

I am facing a problem in my portlet functionality. On any action the server is calling portlet controller - doView() method twice. This is creating a lot of problem in action redirections and handling the request object. I am having a feeling that this is a bug in the server.

Is my assumption correct?

If yes what could be the remedy - some patch or fix pack or something for the server?

I have made this assumption based on a silimar problem in Java Studio Enterprise:
http://swforum.sun.com/jive/thread.jspa?threadID=61527

regards & thanks in advance,
Kshitij
15 years ago
Consider applying
javax.swing.JFrame.update(Graphics g)
and/or
java.awt.Container.validate()
method after adding a component at run time.
Hope this would help.
If you are using AWT components:
setState(boolean state) java.awt.Checkbox
If you are using JFC components:
setSelected(boolean b) of javax.swing.AbstractButton class
Note that setSelected() method does not trigger an actionEvent.
Call doClick to perform a programatic action change.
Hope this will help.
20 years ago
1) Take username and password as input in a simple JSP file
2) Then authenticate this username and password with the database
3) write this code to add username into a session:
session.putValue(String nameToRefer, Object toBeStoredAsSession);
e.g.,
String userName = "sandeepBalyan";
session.putValue("username", userName);
Then whenever you want to access this object just write,
session.getValue("username");
with regards,
Kshitij.
20 years ago
JSP
Can you specify the query and the Java code which you have written to connect.
Also, firstly try with a simple query to know that wether there is problem with query or environment.
Check wether classes12.zip is there in the classpath or not.
20 years ago
JSP
I have not yet found the solution to saving big images in Oracle using Java can anyone help ???
First of all adding a new column to the table:
alter table tableName add newFieldName newFieldType(size);
Then populating this new column with old column which we want to delete:
update table tableName set newFieldName = oldFieldName;
Then finally, delete the old column:
alter table tableName drop column oldFieldName;
Example,
alter table test add fldnew varchar(40);
update table test set fldnew=fld;
alter table test drop column fld;
with regards,
Kshitij Raval

[This message has been edited by kshitij raval (edited October 22, 2001).]
Well the only issue which I consider when connecting to any database from Java is that of classpath. Other than that I have not encountered any protocol violation error. By the way just check out the access permission of the folder where you have stored your driver. Anyway I am just sending a small code. Hope this will help you.
import java.io.*;
import java.sql.*;
public class ConnectOracle{

public static void main(String args[]){
try{
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
// net is the name of the service which you will find in listener.ora
Connection con = DriverManager.getConnection ("jdbc:oracle:thin:@192.9.200.135:1521:net", "scott", "tiger");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from emp");
rs.next();
System.out.println(rs.getString(1)+", "+rs.getString(2));

rs.close();
st.close();
con.close();
}catch(Exception e){
System.out.println("ConnectOracle - main() : ");
e.printStackTrace();
}
} // main(), method
} // ConnectOracle, bean class

[This message has been edited by kshitij raval (edited October 20, 2001).]
Is the control character in city name a apostophe ('), i.e., a single quote. Like for our city Ahmedabad we generally write A'bad. To avoid this problem we generally use PreparedStatement.
If this is not the control character, is it possible for you specify the values you want to set in the field too?
[This message has been edited by kshitij raval (edited October 20, 2001).]
Check out whether your mysql deamon is running?
I your ..\mysql\bin there is one exe file mysqld.exe
Just type in this command and one deamon will start which will enable you to connect to mysql. Just check this out. If this doesn't work, just elaborate the problem and exception.
But then just make sure to close each Statement after use. Otherwise, I have encountered this exception:
Too many cursors open
and then no further data will reached my JSP page. After closing each Statement after use things were fine.
java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
I encountered this exception only when I try to save a big image. The jpg image was only as big as 5436 bytes.
The reason for this exception is explained at http://www.wamoz.com/JDBC_and_Oracle_LOB.asp, that
LONG data types (LONGVARBINARY, LONGVARCHAR etc) are the original kind of blob. Because the LONG data is fetched with each row, this makes each fetched row potentially very large. It uses up the fetch buffer very quickly and makes the database server much less efficient because far fewer rows will fit in memory.
The site has also given the solution in the form of downloads, but there is dependency on two of its packages:
(1) com.Trysoft.bpe and (2) com.wamoz.db. And discussed that the solution to this is saving a big image in small chunks.
I am interested in solving this problem using pure Java, i.e., either JDK1.2 or JDK1.3 classes ONLY. Can anyone help me out?
Silva,
Well I could not find any solution to this from the API. But I have thought of a solution, let me know if this turns out to be helpful to you. Also let me know if you have found a solution already.
I have added KeyListener to JTextPane then in the keyTyped() method I added the characters typed to a String object. Whenever I wanted just the typed matter, I would refer to that String object.
String typedMatter="";
JTextPane jtp = new JTextPane();
:
:
jtp.addKeyListener(this);
:
:
public void keyTyped(KeyEvent ke){
typedMatter += ke.getKeyChar();
}
Regards,
Kshitij Raval.

[This message has been edited by kshitij raval (edited October 20, 2001).]
20 years ago