Win a copy of Rust Web Development this week in the Other Languages forum!

Bhardwaj Shweta

Ranch Hand
+ Follow
since Mar 29, 2011
Bhardwaj likes ...
jQuery Eclipse IDE Java
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bhardwaj Shweta


I want to implement session management in struts2.

//Action Class

Now I am not getting what should i write in jsp page to retrieve the value of session object.
please help..

or if there is any other way for session management please let me know.

thanks in advance:)

10 years ago
correction in line 19:
<s:div id="logo"></s:div>

10 years ago

I am using stylesheet in jsp page(struts2) but images as well as desired effects are not getting reflected.I have addedd all the libraries.please help.


//css file

10 years ago
Thank you guys for helping me out, i will try this
@ Mohamed
Thanks for replying:)
umm can you please give some example.

if i have <input type="text" name="pname" id="pname" size="25" value="<%=##%>" disabled>
<input type="text" name="remarks" size="25" value="<%=##%>" disabled>
how should i retrieve respective value from list object??
In order to use JSTL
i have added <%@taglib prefix="c" uri=""%>

but its showing and error:
"The absolute uri:http://java.sun/jstl/core cannot be resolved in either web.xml or the jar files deployed with application"
i have already added two jar files
jstl-impl-1.2.jar and jstl-api-1.2.jar

how to resolve it please help
in between i am learning how to use JSTL and EL.

I have changed my code to

and servlet is working fine:)
but in my jsp page its showing value of String s6 = rs.getString("priority") in all the fields..
error is in my logic
// jsp

when the control gets out of the loop mystring holds value of s6. how to fix it
here is my complete code:
//jsp page

// servlet

i tried to typecast it but its still not showing any result..
can you please modify the code
Thank you
hello Mohamed

can i typecast it into Arraylist!!!

as far as separate class for result set,i am new to java and quite apprehensive regarding making so many classes ,i think i will get confuse :P i know you are telling me the correct approach but can i fix this problem and then make my code better by making separate classes.

and can you give me some example how to use tag library for traversing through the lists.

Thank you so much

I need to store my result set into an ArrayList and then to display data in a jsp page..

//coding in servlet

//coding is jsp page

but its not showing anything,may be its taking long time to process it..please help
You are absolutely right:) Thanks for the suggestion,i will make necessary changes.
Hey swastik Thanks for this great understanding and encouraging me
i tried doing this by using hidden fields and problem is fixed

oops!!! i sincerely apologize for that.
i am not using ajax, the problem with submit type is if i make add (of submit type)the moment i press add, control goes to servlet but i dont want that.
So button type seems more appropriate
Thanks for your replies..
@swastik I cannot make these buttons of submit type because i want to retain the control on the same jsp page..

i have two functionality in save button.
first case:
1.user clicks add button to insert new records--->clear all the textboxes and enables save and cancel button.
2.user can either click save or cancel.

second case:
1.user clicks edit button to edit the existing record.
2.either save or cancel

now i am not getting how to identify which button has been clicked..need to replace this ### in if condition