Posts by Resende • 505 points
17 posts
-
0
votes1
answer466
viewsA: Could not Verify the provided CSRF token because your Session was not found
CSRF means Cross Site Request Forgery and is a kind of attack on websites. Spring Security documentation discusses the subject at this link, it is highly recommended that you read this documentation…
-
1
votes2
answers162
viewsA: I wanted to add more than one permission in the springSecurity roles
I would like to know the correct way to add more than one permission for same folder in springSecurity... You can use the expression hasAnyRole([role1,role2]),example: <intercept-url…
-
0
votes1
answer930
viewsA: Problems Installing Java 7 on Ubuntu
I am using Ubuntu 16.04 and for me these commands worked: sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-7-jdk The Oracle repository request returns a…
-
1
votes1
answer892
viewsA: Apache POI: how to know if a spreadsheet has come to an end?
You can use the sheet iterator: FileInputStream excelFile = new FileInputStream(new File(FILE_NAME)); Workbook workbook = new XSSFWorkbook(excelFile); Sheet sheet = workbook.getSheetAt(0);…
-
1
votes1
answer203
viewsA: Doubts about the construction and relationships between classes and the mapping in JPA
In the following class diagram I am trying to make the following class relationships where a demand will have a responsible analyst and a requesting client. I wonder if my mapping is right if the…
-
0
votes2
answers435
viewsA: Problems sending email with Javamail
I have not tested your code, but port to Google smtp using SSL is the 587, this may be the problem with your code. A complete example of how to send email using javax.mail can be seen here. Update:…
-
0
votes1
answer24
viewsA: How to extract information from a video when uploading with Fileupload?
This can be done with the Xuggler, which is an open source video manipulation library. Code example: public long getVideoDuration(String path){ private static final String filename = path; //EX.:…
-
1
votes2
answers198
viewsA: How do select in specific columns and continue to receive an entity list and not an Object array?
Completing the escapistabr’s response, it is possible to do, and it is practically what he has already said in his reply: Assuming your User class is in the following package:…
-
0
votes2
answers287
viewsA: How to avoid Lazyexceptions?
How to avoid Lazyexceptions? Unfortunately there is no ready answer to this question, the solution always depends on the context. When we perform a very large flow in the system, is it more likely…
-
0
votes2
answers558
viewsA: Edit with Radio button in jsf
An important detail in your Datatable and selectOneRadio, is that the way it was encoded, a radio will be generated for each row of the table, so this does not prevent the user to select more than…
-
2
votes1
answer397
viewsA: Annotation @Manytomany in the same entity/table
...I am correct using Subreport and Report in the same Class/Table? The answer to this question depends on your business rules, you need to analyze the whole context, and define whether you need a…
-
0
votes1
answer111
viewsA: How to find out which tab is enabled
When I needed to do something similar, I got the id of the tab active in the back end, using the flowListener method, for example: <p:wizard nextLabel="Próximo" onnext="return onnext();"…
-
1
votes1
answer2395
viewsA: Calling a JSF popup from a Managed Bean
With the first faces just do this: RequestContext.getCurrentInstance().execute("PF('nomeDoDialog').show();"); I passed the answer through the first faces because you put it in the question tags.…
-
3
votes1
answer337
viewsA: Error while trying to update a Primefaces dialog
Check the name you put in the update, because the message says that you did not find :frmPrin:parecer and according to your post the correct would be update=":frmPrin:dialogParecer", I am missing…
-
1
votes2
answers437
viewsA: Select if the collection contains a particular object with Hibernate Criteria
I got a solution using a loop, I do not know if it is the best solution, but at the moment met the need: List<Produto> resultList = new arrayList<Produto>(); Criteria criteria =…
-
2
votes2
answers437
viewsQ: Select if the collection contains a particular object with Hibernate Criteria
I’m trying to make a query that would be something like the method contains of interface Collection java. I have a class GrupoProdutos and want to select the groups if your Collection, calling for…
-
4
votes1
answer1034
viewsQ: Spring Security without authentication
I have a system that already authenticates the user, and controls access to pages that require authentication, I need to use spring security to control access to pages by user rules and to control…