Sunil Sunny

Ranch Hand
+ Follow
since Oct 18, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
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 Sunil Sunny

java.sql.Date will only provide you the date not the timestamp. So please modify your code line to

statement.setDate(1, new java.sql.Timestamp(t));
6 years ago
initialize you array as e[0]=new EstanteriaMultimedia(1) or whatever parameter you want to give
12 years ago
As you are just a beginner you can use array list and use the for loop to iterate as Array List maintains indexes with no overhead. And also for loop works faster than iterator.

But as william said different collections for different purpose
12 years ago
Welcome to this Forum
If your program contains more than one classes . then you must only declare one public class only and name save that with your publiclassname.java . Hope this will also help you.
12 years ago

when we use interface and when we use abstraction?



if you mean abstract classes then There is no perfect definition of this by Sun . We have to use them according to what situation demands.
12 years ago
look at the line 47 theRooms.add(newRoom);

Here you are storing objects in your array List . and when you are retreiving you are getting objects So what you have stored you are getting
12 years ago
You must develop in whatever you are experienced with as there is nothing that can be done only in php or only with java. Java hosting is a bit costlier than php's .
12 years ago
JSP
RequestDispatcher rd = request.getRequestDispatcher("/index.jsp"); Instead of this Try this


RequestDispatcher rd =getServletContext().getRequestDispatcher("/index.jsp");
12 years ago
JSP



Well,How can I write a Table with display tag to the response stream?


I think i am not getting you . what you are trying to do exactly ? please explain it clearly.
12 years ago

hemamalini nithyanandam wrote:will change to jstl .. will change the practice from now onwards. thank you so much for the suggestions



Ok that's good to learn jstl but see how to trace the error the error isin line : 64 saying clearly that your fromlist is null i.e. has nothing in it . that's why you are getting an error.
12 years ago
JSP
Well Bear you are an author . written books on jQuery. I will surely read your book as i had to interact with Jquery
12 years ago
JSP

surya naidu wrote:Well..but My Question was how do i get it on to the JSP from an AJAX call?



Ok sorry for misunderstanding . Well i do not know much about struts 1.2 but i know struts 2.0 . First the url which are using via get or post in ajax might be "something.do" in this "something.do" you must be forwarding to another jsp page in which you have to display the table.

as in ajax you will be executing the action. and as action will be forwarded to the jsp (what you have mapped in struts.xml). So indirectly you will be getting that jsp as response from your ajax request.


what i wrote, i had done that via struts 2.

12 years ago

An error occurred at line: 68 in the jsp file: /index.jsp
From cannot be resolved
65: {
66:
67: String from=(String)fromList.get(i);
68: out.println("<option value='" + From + "'></option>");
69: }
70: %>
71: </select>




Look at this carefully "From" is not same as "from".

String from=(String)fromList.get(i);

here from is small case.


68: out.println("<option value='" + From + "'></option>");


here "From" is camel case.

So a variable problem
12 years ago
JSP