veera sangham

Greenhorn
+ Follow
since Dec 30, 2011
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by veera sangham

<SCRIPT language="javascript">
function disabled(){
<%
String user= session.getAttribute("username");
%>
var userName=<%= user%>;
if(userName.equals("someName"){
document.getElementById("edit").disabled=true;
document.getElementById("delete").disabled=true;
}
}
<body onload="disabled()">
<html:form action="/someAction">
<html:submit property="add">ADD</html:submit>
<html:submit property="edit">EDIT</html:submit>
<html:submit property="delete">DELETE</html:submit>
</html:form>
</body>

I written like above code and it is working fine.
I think it is not a good programming and also not secure.

9 years ago
JSP
Sorry Bear,
I didn't get it what you are said, could you explain with example?
please give me atleast some code patch.
9 years ago
JSP
I written the code for put user credentials in session in the StrutsAction class and
using scriptlet tag I got the userCredentials and I try to access the credentials from scriptlet tag code for disabling buttons using javascript but I unable to do.

please give me some Idea
9 years ago
JSP
Thanks for everyone,

Bear Bibeault sounds good,
I need to provide more secure to login credentials?
we are using Tomcat 6.0 server, Oracle db, struts , Hibernate.
could you please tell me briefly? if possible ,please provide code patch
9 years ago
JSP
how to disable submit button in jsp based on the login credentials?
suppose if Admin login, I need to show and enable the all the buttons like(ADD,EDIT,DELETE)
but if Employee login then i need to show and enable only ADD button.
could you give me some suggestions?
Thanks
9 years ago
JSP

Campbell Ritchie wrote:The Iterable<E> interface was introduced in Java5 along with the for-each loop; the two support each other. Any collections class which supported the iterator() method was retrofitted to implement the Iterable<E> interface. The way this was done was to change the Collection<E> interface to Collection<E> extends Iterable<E>. Since interfaces like Set<T> and List<T> already extend Collection<T>, this means any List<E> or Set<E>, etc. is also an Iterable<E>. The iterator() method was put into the Iterable<E> interface (I can’t remember whether it is removed from Collection<E> or not).
Maps<K, V> have never implemented an iterator() method, because you never go through a Map<K, V>. You go through its Ks or its Vs, so you can get them as a Set<K> or a Set<V>, which you can traverse with a for-each loop, since th/ose are now Iterable<E> objects.





Thank you Campbell
9 years ago
Thanks for giving the quick reply
9 years ago
what is difference between foreach and for?
Which gives better perfomance?
please give reply ........
9 years ago
please solve my problem. I was developed small struts application.It was worked on windows xp and i used the these softwares for that myeclipse 8.5,tomcat 5.5,jdk 1.5,struts 1.2 and windows XP . I changed OS(operation system) to windows7. all sofwares are working fine but while trying to start tomcat server from myeclipse .it raised this alert."A configuration error during startup of tomcat 5.5.please verify the preference field with prompt:cannot find free socket for debugger".I am using myeclipse 8.5 ,tomcat 5.5 and tomcat 6.x
9 years ago
we can not send interface reference to a implemented class type variable.
But we can send implemented class type variable to interface argument type variable

class Ball implements Bouncable{}

class ZiggyTest{

public static void main(String[] args) {
Bouncable bn = new Ball();
bounce(bn);
Ball b =new Ball();
bounce(b);
}
public static void bounce(Bouncable b){}

}