supriya riya

Ranch Hand
+ Follow
since Feb 23, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by supriya riya

Hi,

I am new to spring.I am trying to implement method level permission access using @PreAuthorize annotation.
Please find below all the code I have written to build sample application.
I have made changes to my web.xml,mvcWeb-servlet.xml mvcWeb-security-servlet.xml.
I am getting below exception when it reaches HelloWebPermissionEvaluator class which implements PermissionEvaluator.



Do I have to add any thing more?Am I missing out something.

I am getting exception



Thanks!
9 years ago
Issue is with MAC OSX .
Found a post regarding file name and MAC OSX .My file name had "/" where there is time stamp value.
Normal file download where I/O stream accesses the excel directly removes the read only from file.But when I download a complete folder it's contents (excel files)are all have read only permission.
So I replaced "/" with "-" in file name and it works fine !
Below is link to the post
Saving files with name containg "/" on MAC


Another solution we found is the you can not use '/' in the name of your file. It will allow you to save it on your mac, where as in Windows it says you can't use the character / (backslash) however once you save it and reopen it on a mac, it will be read only....

9 years ago
Other Excel files created from Java code in same system are not read only particular excel files created using above code are read only.Hence user is not able to edit them as soon as they open.
Why so?Same file system different behavior.
All I want is Excel files created should not have read only permission set on them.
I am not using any cell style to lock cells either.
I even tried on sheet.


Uploading via http://expirebox.com is downloading without read only, but downloading on my system (Mac Osx 10.9.5) is giving problem, it has read only permission set to it by default.
9 years ago
My problem is I am creating an folder with excel files in it, later zipping the folder.
All the excels created are Read Only user cannot edit them.
I don't want excel sheets to be read only.
Can anyone please help?






Thanks.
9 years ago
Hi Fred,

Thanks a lot your explanation which cleared all my doubts(which were pending for a long time) .
how many objects are created exactly with and with out new operator etc..
And when exactly is string created in pool and heap.
Even I read Kathy Siera and was quite confused with the explanation, but your two simple ways of thinking really helped


12 years ago
"my set method means"

method.invoke calls a setter method with argument as string array
13 years ago
Hi,
i am getting same error arguments type mismatch my set method has a String array.
and my value is Object which has a String seprated by ","
Please help.
Thanks
Code is given below for reference.


13 years ago
Hi,
I recently took the Exam lab test for SCJP 6 and my scores were very disappointing.
I started thinking i don't know anything about java and can never clear the real exam.
But i took an mock test on scjptest.com
and it was easier than Devaka's exam.First failed there too later after practice and studying my weak chapters passed exam with a good score.

But Devaka's exam , i am disappointed as i took exam lab test 3 times and failed(badly) every time.

So do i need to pass Devaka's exam ?..then can i be sure of passing real SCJP 6 exam,isn't it enough to pass exam on other website i mentioned ?its really bothering me as i m rescheduling my exam again and again. ( i really want to clear my exam.....)
This explanation helped a lot.
13 years ago
hi,
I have confusion regarding the output which is: sub1 2
But i can't understand why obj.i prints value 1 rather than 2
as the actual type of obj is B at run time ( it calls obj.myInt of class B???). So it must print sub2 2.
Not getting overriding concept right.Confused what gets called subclass /super class method depending on reference type.
Below is the code




13 years ago
hi,
I am new to jasper reports.I have written a action and service class for Jasper Reports xml is reports.xml,
My problem is red cross are displayed in HTML format , i searched many websites found the code for htmlexporter,i added that code in my service class but still i am not getting the output properly,it shows red cross ,like it shows when image not found,i also made changes in web.xml
I am creating .jrxml through ireport-nb-3.6.1,using eclipse,hibernate
creating .jasper file from class compilation and filling it with list which is generated using hql.

when i give PDF format i get the result,but when i give HTML format i don't get to see proper result all i get is ugly page with small red image not found cross.
I need to embed these in my application please help.

i am getting an exception on line where there is JasperPrint loadobject method


as

o h id:CHECKNEWPRODUCT
net.sf.jasperreports.engine.JRException: Error loading object from file : F:\supriya.projects\kite\kite1\kite\WebContent\jasper\kitereport2.jprint
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:94)
at reports.JasperService.report1(JasperService.java:333)
at reports.JasperAction.report1(JasperAction.java:40)

.
.
.
.
.
caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)

i am providing the code below ..please help me,if any one has any clue about it.
i am trying this from long time..
and yes all jars are properly added.
And i might have written some code completely wrong also i am new to jasper..so please help me out

xml--



changes in web.xml



my service class



I'll be carefull about using the same thread.

I have used paintComponent method, and super.paintComponent(g) in first line of paintComponent
Still my deleted lines appear on jpanel.
I want to delete a drawn line on mouse click,i am writing code in mouseClicked() for deleting,i have used points.remove() to remove clicked coordinates that match the points vector storing all the coordinates,and hence line does not get drawn.
It works fine for single line,but when i need to show all drawn lines and when i click on particular end point of a particular line it must get deleted
It shows "clicked" in console,but changes are not seen in JPanel.It even deletes the coordinate from points vector.
Thats where i am not getting what is going wrong,i have done all changes that have been suggested ........

so any more suggestions about where i am going wrong in my code?
thanks

15 years ago
hi,i am able to delete line in code where there is only single line displayed.
But for multiple lines it does not repaint.even if line is deleted,it shows deleted line on panel.It prints "clicked" as coordinates match in console.Jpanel refreshes when i minimize or maximize the window and then it shows the lines without the deleted lines i.e it repaints.

Please help me with repaint or any thing i can change to get jpanel without deleted lines.


15 years ago
hi my code is to draw lines on mouse click between mouse click and release.Though i am able to draw lines but ,previously drawn lines are also shown on JPanel.I want only recently drawn line to be shown.So somebody help me on this where should i make changes in my code to meet my requirement.

And my jpanel does not show the black line border which i have added in setBorder method of JPanel.
Suggestions will be helpfull.
thanks.


15 years ago