jishnu dasgupta

Ranch Hand
+ Follow
since Mar 11, 2011
jishnu likes ...
Netbeans IDE Eclipse IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
7
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jishnu dasgupta

I need a way to determine, if my session has been invalidated due to session time out. I have a HttpSessionBindingListenner, which has a valueUnbound() interface, which gets called whenever my session is invalidated. However, my session is invalidated, both when my user Logs off, as well as when he crosses the session timeout limit.
Is there as way where I can uniquely identify, when my session has been invalidated due to session timeout.

I have already implemented a logic, in valueUnbound(), where i check the timestamp of the session's creation time as compared to the current timestamp, and determine if the difference is more than or same as the session timeout parameter. However, is there any alternative for the same.
7 years ago
I have a jsp page,home.jsp, which consist of two frames: Header and Content
The Header section is always constant and the Content keeps on changing.
In some of the jsps which are displayed in the Content Frame, I have link tag as:



where downloadAttachment is a javscript function which has the below call:



where RetirevFile.display is a servlet which reads a document from a shared location and then writes it to the outpust stream,which allows me to save,open or cancel the document download.

Now in my home.jsp, I have a check for onbeforeunload like

.

Ideally, the above onbeforeunload event would be triggered when home.jsp is unloaded. I have also ensured that whatever jsp is being displayed in the content frame is not being saved in browser cache.

Now , suppose i am in google, and then go to home.jsp and navigate to a page which has an attachment.When i click on the download atttachment link, the attachment is downloaded corectly, adn i get the option to open,save or cancel the download. Once i have clicked any of them, and the click the browser back button, then i get the popup message from home.jsp.
But, if i perfom any other action on the jsp after that(like submitting or closing a form) and then click browser back, i do not get any pop up message and am redirected taken to google.
Could you please tell me, why i am not getting the pop up, even though home.jsp is getting unloaded. i am using ie8 for my application
I have the below code in my jsp page,popUpWrapper.jsp:



where request.getParameter(), gets the jsp page which is appended with URL of popUpWrapper.jsp.

For example

if i have the below code:


then abc.jsp, is included inside PopUpWrapper.jsp.

The issue with this, is it works fine, when i pass a jsp page as a parameter.
However in some cases i have to pass a url like

where workspace.do, has a mapping in struts-config.xml, from where it gets redirected to an Action class, which in turn determines, what jsp page to be displayed.

When i pass such URL in my PopUpWrapper.jsp, the jsp:include tries to find page workspace.do, in its namespace, to display, instead of redirecting to Action class from struts config. AS a result, i get the page not found error.

Please advice on how to proceed for such URLS, where the Action class needs to be hit.

Note: i need to put this jsp, inside the PopUpWrapper.jsp. I had tried with requestDispatcher, but that didnt help me include inside PopUpWrapper.jsp.
8 years ago
Hi Stefan,


I tried keeping the image in the web context, but it did not work out. I might possibly me making an error on the same. could you please show an example of doing it. Regarding opening the file by a separate servlet and then writing in output stream, the challenge is I have a form with a group of buttons whose color change automatically depending on some back end data. So I am really confused, that every time i set the background of the button to some image file, so i need to call the servlet...and if i do so how to go about with it.




9 years ago
Hi Bear,

I tried the alternative, where i placed th image file in the root directory.

So while i am able to access the file with the url: http:\\ip:port\root\imageFile,

I am not able to display it in the servlet, although it works fine for the local host. And i am using the text/html, as i need to display some text along with the images, and i though using that mime type would make my life a lot more easier, if it wasnt for this problem!!!
9 years ago
Hi,
I am trying to display an image in a servley, using the html <img src> tag.....my code is as follows



I am using Netbeans IDE for my application. The problem is, while the image is displaying fine in the localhost machine, when i am accessing the servlet through other systems in the network, the image file is not getting displayed.

P.S: the MIME type needs to be "text/html"

Please advice as I am at my wits end.
9 years ago
Hey Guys,

I finished off my ocpjp on 28th April 2011, and ddint yet receive my certificate as of yet. Ideally it should probably take a month or so. I had provided my location in Bangalore, India. I had also send a mail to who@contact@sun.com, but havent yet received any response form their side . And in addition, i find that the certificate database is moving from sun cert manager, and we are not being able to access the database.
Dont know what to do!!!
Hi all,

I have just started off with EJB and i cant make sense that whay should my argument/return types of method must be of Serializable type, for a remote Object.

Again, if it is Serializable, then the Class 'es must be present in the remote client, if i want to deserialize my remote Object/ stub. In that case what is the point of having a RPC?? Please help me out as I am really confusing myself!!!
hi All,

Just dont want to confuse every one, but isnt a an object reference pointing to an Array of int. so When a =b, doesnt it means that a now points to the array {2,3,1,0}, so when the 3 rd position value is retrieved, which is 0, shouldnt the return value be 2???

Thanks Udara,

I just need one more help.As a beginner in EJB, where can i start at grass root level. The books suggested at the SCBCD link requires some prior knowledga of beans

Mak Smash wrote:Hi,

If you implement an interface B and that interface extends to another interface C that time you must have to implement method of both the interface otherwise compiler wont allow...

If you dont know what methods interface C has... you can find using javap -p InterfaceName... This will show you all the methods inside that interface...



Yes I can, but that option is not viable due to some design issues.
9 years ago

Matthew Brown wrote:Sounds like you possibly want something like this:




Agreed!!!...Thanks a lot. Really was very simple
9 years ago
If you are sure about the size of the array you want to pass, you could just make aan array of that size, make lineCoords, point to it, and then copy the elements of coords to it. Although its is a bit cumbersome, I beleive their must be easier methods...
9 years ago
Is there a solution???
9 years ago