Aravind Prasad

Ranch Hand
+ Follow
since Dec 28, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aravind Prasad

But Boss

The data is saving properly in the database. The issue is with JTable. I have an updateTable Function, even if i am calling the function, it is not refreshing the data. That is my issue. Infact i have tried also repaint(), but still failing.

I have described the functioanlity such that, you might be able to assume the path/parent frame where the JDialog is opening.

Thanks/Regards

Aravind
9 years ago
Dear Ranchers

I am preparing a small solution. Below is how the functionality works.

1. Login Screen
2. Successful Login will take to a MDI Form
3. Click the menu, a JInternalFrame will open in the JDestopPane.
4. JInternalFrame has a JTable.
5. JInternalFrame has a JButton available for adding new data.
6. When JButton is clicked, a new JInternalFrame is popped up with some JTextField and JButton to save the data.
7. After saving the data (after insert query), a JDialog is opened to upload Logo (update query for BLOB), There are two buttons in the JDialog, one is for uploading the image, another one is uploading it later.
8. The logo is displayed in the JDialog and if the JButton, for upload is pressed, update the database and reload the JTable in the JInternalFrame is called.

My challenge is in point 8. The function is called properly, but the table is not getting refreshed.

Below provided my code, can you please help to understand where i went wrong.

JButton in JDialog for uploading the Logo


Code in the JInternalFrame to populate JTable

>
9 years ago
Dear Ranchers

Happy New year!!

I am in the process of developing a JSP Web application, with frame sets and iframes. The purpose of using the frame set and iframe is the page remains same throughout the application (egs: Header, left panel menu, footer) and the content part will the only one changing.

Now, I have in my web.xml, I have the session time out set to 10 minutes.



My challenge, if I left the web page idle for more than 10 minutes, the session is getting invalidate and when I come back and click any link in the left menu/content page, the iframe or content frameset is only giving the session time out message and not the whole page.

Please give me an idea to resolve this.

Thanks/Regards

Aravind Prasad
10 years ago
JSP
Hi Ramesh

Sorry I found my mistake.

I initialized the object lList and recreate another object iList .

I have rectified it and thankyou very much for your time.

Regards / Aravind
10 years ago
Hi Ramesh

Here it is ....

10 years ago
Hi Ramesh

I am calling this function from another class.

When i run this, i can see the values are actually passing in System.out.println.

But the actual JTextField (countryName) is not displaying any field.

Regards / Aravind
10 years ago
Dear Ranchers

I am trying to send a value from one class to another class in Java Swing.

I wanted to display a string value in the JTextField and unfortunately I am failing to do that. But the getText() is displaying the answer well.

Below is the code and kindly help me understand where the problem is.



The function test() is the one giving the problem.

public void test(String ctryName)
{ System.out.println("I have reached here" + ctryName);
System.out.println("Before Updating: "+ countryName.getText());
String abc = ctryName;
countryName.setText(abc);
jTextField3.setText(abc);
System.out.println("Text is: "+ countryName.getText());
}


Awaiting your usual prompt support.
10 years ago
It is not actually sending the html tag. May be a limitation in the webpage.

I am sending the screen shot of the same.

Regards / Aravind
11 years ago
Sorry the code was not coming out well. Here it is, only the html part i am putting now.

messageBodyPart1.setContent( "<html><body bgcolor=#FFFFFF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
</body></html>", "text/html; charset=utf-8" );

Regards / Aravind
11 years ago
Dear Ranchers

I have been assigned to make a small program for "Email Notification System" with the images and texts are coming from mysql database. This is used for sales promotion and stuffs like that. Some times attachments also has to be there... I have prepared a code snippet and below is the information. But when i run the code without any images in the background, the email is working so perfectly. The moment, when i put the images code (html part), the email recieved is with blank pages. Kindly let me know how best i can sort out the below issue with your enriched knowledge.



Thanks/Regards

Aravind Prasad
11 years ago
Dear Ranchers

I have a JSP file which is provided below.



The Class File - bondhandler.java is also provided below.



The Javafile comiles and the class file is generated and put under the path WEB-INF\classes\com\cordelia\projects under the project folder.

I am using the following applications


JRE : 1.6
Tomcat Webserver : 6.0


When I run the page, I get the following error.


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 8 in the jsp file: /programs/bonds/creation/index.jsp
BondHandler cannot be resolved to a type
5:
6:
7: HashMap hmp = new HashMap();
8: BondHandler bh = new BondHandler();
9: ArrayList bondList = new ArrayList();
10: bondList = (ArrayList)bh.listBond();
11: int sizeofary=bondList.size();


An error occurred at line: 8 in the jsp file: /programs/bonds/creation/index.jsp
BondHandler cannot be resolved to a type
5:
6:
7: HashMap hmp = new HashMap();
8: BondHandler bh = new BondHandler();
9: ArrayList bondList = new ArrayList();
10: bondList = (ArrayList)bh.listBond();
11: int sizeofary=bondList.size();



Please kindly help me resolve this issue.

Thanks/Regards

Aravind PRasad
11 years ago
JSP
Dear Seetharaman

Thanks again. Your proposal is really good, but customer wants it the way i explained.

Presently I am using the substring option and displaying is fine and the customer is happy. Code is provided FYI and please refer the screen shot's line number 37




If there is any easier way, please advise, so that i can update myself accordingly.

thanks/Regards
12 years ago
JSP
Dear seetharaman

Thanks for the feedback.

I tried no-wrap before and if i put, the information is streatching the table and it is becoming un-tidy. The only option is to display few characters.

The solution in my mind is

1. get the value in the string.
2. make substring
3. display the sub-string.

I am not sure whether the above login is correct or is there any easier way to sort this out.

Thanks/Regards

Aravind
12 years ago
JSP
Dear Ranchers

I have to provide a tabluar view of the data retreiving from the database table. One column has a long description of the data where by i have provided 50% width for it. Once it is exceeding the 50% width, the information is going to the next line (like WRAP Text) which is making my display un-tidy.

I would like display only the information with 40 characters, so that all the table rows will look perfectly.



Attached here with the sample output of the table. Please look at line number 37

Please let me have a solution for this.

Thanks/Regards

Aravind Prasad
12 years ago
JSP
Dear Ranchers

I have a table structure and the values in the table which are in trillions. Please see the below information for your better understanding.



In the table the values are displaying properly. But when I call the Double value using query and display in the JSP Page, I get the values like for

Please advise, how can i solve this issue..

Thanks/ Regards

Aravind
12 years ago
JSP