Steve Mutonshi

Greenhorn
+ Follow
since Jun 13, 2008
Merit badge: grant badges
For More
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steve Mutonshi

Hi, if I have a eclispe java project "project_1" imported from some version control repository,  then I did copy project and paste it into same workspace and name it "project_2".  So I have "project_1" and "project_2" in workspace.  

1. Suppose I make some changes on project_2,  will it affect my "project_1" ?   Maybe I am not explaining well what I concern..   Basically I just want to make sure any change I make on project_2 will be on project_1 and thus when I check in project_1 into repository, the changes made on project_2 will not be shipped in.

2. Suppose later I delete project_2, will that affect project_1 ?

Thanks
4 years ago
Does hibernate support mixed code with some using annotation based java class (with filed annotated to columns and relationships) and some using xml based configuration ?
I have following simple code



When I use eclipse IDE and highlight "handleAccess" method of "Manager" class, and click "reference", I saw two references to this method: one is "ManagerHandle", and one is "EmployeeHandle". I don't understand why it shows "EmployeeHandle" in the reference as well. "EmployeeHandle" code explicitly invokes "Employee" class' "handleAccess" method. It doesn't invoke "Manager" class' "handleAccess" method.
7 years ago


wondering if change it into


Does it cause any problem (I know it compiles and runs fine and make more sense if it is "void") if use boolean return type ?
7 years ago
********************************************

***************

uestion: if I change "void doSomehing()" into "boolean doSOmething()" it still works fine. I know it look awkward, but doesn't it cause any problem ?
7 years ago
I have an ArrayList containing some objects. Each Object has the following format

public class Contact {
private String phone_num;
private String firtName;
..
}


So the array list includes lot of such "Contact" objects. How do I sort the Array list to order them by the order of "phone num" or "firt name" ?
What's the best and simple way to do such thing ?

Thanks.
15 years ago
Many data objects implement Serializable. It is necessary when transfering objects across network. Now if my application doesn't require such transfer or serialize an object, but I have coded in a way that my class still implements Serializable. DOES THAT HURT ??
15 years ago
Suppose I have a browser window opened and from there I click to open a new window. How do I implement a close window button so I when I click it, both windows will be closed ?

Originally posted by Eric Pascarello:
'x' is a string
window.opener is normally the reference to the window that opens up a pop up window.

People used to run code sort of like that to trick the browser into letting the parent get closed. I could not tell you if that is the case here without seeing all of the code in that section.

Eric



Eric, you are right. I saw the following sample code for closing the window

window.opener='x';window.close();

Since I am not familiar with Javascript, I don't know if I can "copy" the same code without changing the syntax 'x' ? what I want to do is to close the window without getting a pop up warning msg.
I saw some code looks like

window.opener='x';

what does this mean ? what is this 'x' ?

thanks.
I heard one advantage of using EJB is it utilizes RMI type protocol that allows people to make remote calls from different JVM. But in most cases, people pack .jar(EJB codes), .war (servlet/jsp code) into a single .ear and deploy this .ear to application server.

1. Does this mean the servlet/EJB are in the same JVM ?? Then what advantage are we taking of ?

2. I see in some books' code sample, when they create "value object", they implement "Serializable" to make it able to pass via network. But if the value object is packed in the .ear deployed to a server, is it still necessary to implement "Serializable" ?
when my servlet filter intercepts request, I did a "req.getRequestURI". When I click a "submit" button, it calls "submit.do" action (struts). To my surprise, the print out of "req.getRequestURI" includes some JSP pages that are unrelated to this "submit.do". So I am wondering ---

If "my.jsp" includes another "another.jsp" in its content, when you click "submit" and it forwards to "my.jsp", does ""req.getRequestURI" return "another.jsp" in addition to "my.jsp" ?
15 years ago

Originally posted by Ben Souther:
Filters will only be invoked on forwards if configured to do so.
Look at SRV.6.2.5 in the servlet spec (link in my signature).



Yes, I just found that. But if you specify your filter to be applied to /*.jsp, then even you don't add "FORWARD" in the web.xml filter config, it still applies to it.

Is there a way for me to tell the filter to exclude a certain page in web.xml ? guess not.
15 years ago

Originally posted by Satya Maheshwari:
@Steve Mutonshi


You are correct here in the sense that this would result in an infinite loop, but I think the design you are following is not correct. A filter which intercepts a particular page must not forward to the same page.



Eaxctly. I tried to do "if condition is met, forward to another JSP page". However, since my filter applies to all JSP page, it will have to go through this filter again. What a problem ! Any idea how to bypass it ?
15 years ago