Aniket Khadke

Greenhorn
+ Follow
since Jul 13, 2011
Aniket likes ...
Eclipse IDE Tomcat Server Java
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 Aniket Khadke

Hi,

I am building a online examination system using struts 1. Now to fetch the next question I am making a ajax call to action class and action class should return an object i.e. QuestionDTO. The problem I am facing is I am not able to read/parse that object in java script.

Can anybody tell me what is the best approach to achieve this? Means do I need to use Json like thing? or return a String and split it in java script?

Thanks in advance..!!!

Frankely Diaz wrote:If you want divide a html page you should user divs and mark it using css.

Hey thanks Frankely... this is really helpful..!!!

11 years ago
Hi,
I am building a web application using struts & tiles (1.3 ) framework. On the jsp I want to show menu bar on the left hand side. But not getting how can I divide pages vertically in tiles. Please advice.

Thanks in advance..!!!
11 years ago
Hi,

In my application I have a date 05-09-2012 and I want to print this in text format.

e.g. 05-09-2012 should be printed as Fifth of September Two Thousand and Twelve

or something like that...

Is there any way I can do this quickly?

Thanks in advance..!!!
11 years ago
Hi,
In my application I am currently using my own javascript for selecting date. But it is giving some problems like browser compatibility. So now I am thinking of using dojo for date selection. But I am not clear about how will the dojo's text box will get associated with my form bean's property. Any help is welcome.. :-)
11 years ago
try using /Login in form tags action attribute...
11 years ago



second time iterate through books and books is in category. So in 2nd iterate statement put name as category or cat, as you have given id for category property... This should work..(I hope)
11 years ago
Do one thing in your form bean store categories plus a set of books of that category, that way you will have your bean something like:
String category;
Set<Book> books=new HashSet<Book>();//Book will be another class with book info. now you can store book objects in books set.

in your jsp get category and then iterate through books set using <logic tags>

do a little googling on set's. You will get lots of tutorials on sets. If problem still persists tell me.
11 years ago

So, line number 1 populates the category object.
In line number 2 categoryId(say categoryId of 'Networking') will determine which books (i.e 1) Network Fundamentals 2) Networking Concepts 3) Network Guide) to fetch from the database and populate the books object.




you cannot trigger action automatically at line 2. What I will suggest is fetch all the data first(both categories and books) and put them in collection (like Map). Now in jsp display the map...
11 years ago

shivang sarawagi wrote:So that means no matter in how many Servlets I save the username in a session. I just need a single session.getAttribute() to display the username ??



exactly, because at a time you are going to display only one username. getAttribute method will return the value of current session only..
11 years ago

shivang sarawagi wrote:I created a User Registration servlet, saved the username in a session & displayed in the UserHomePage.jsp
by session.getAttribute("username");

Now when I am logging in with the same user credentials by a User Login servlet
I am again saving the username in a session and want to display username in UserHomePage.jsp

So do I have to put session.getAttribute() again in the UserHomePage.jsp ???



Shivang do you want to display username two times? if not a single session.getAttribute should work
11 years ago

Sandy Chatterjee wrote:Sorry but where is the Resolution.

It's the same thing I have written.



friend I am confused about your problems. Please answer the doubts.
11 years ago

Sandy Chatterjee wrote:

You are trying to say you will click on category id i.e. hyperlink and then a action should be called to fetch books from that category?


Thanks for your reply.

categoryNo is not the hyperlink.
When the jsp is loaded the category object is also loaded.
Somewhat like this:

And my problem is I am not able to fire an Action in line number 2.


still not able to figure out your problem... what are you displaying on this jsp is list of categories or directly list of books ? abd if books then of which category? and if category then why do you need to fire action class at line 2? you can give a submit button and then trigger action.
Regards,
Sandy

11 years ago

Akhilesh Trivedi wrote:I have a class




I use this class to access "connection", there are times where connection might be closed, and performing any operation gives me "connection already closed" error.

is there anything like,


So that I can check it in advance before performing the operation?
Any suggestions are welcome. Thanks!

You are trying to say you will click on category id i.e. hyperlink and then a action should be called to fetch books from that category? let me know this then I can try to solve your problem
11 years ago