Posts

Tomcat "HTTP Status 403 – Forbidden" on PUT or DELETE REST request

Image
I updated Tomcat from version 9.0.17 to 9.0.65 and I faced a problem with PUT REST request, I got an "HTTP Status 403 – Forbidden" Error. After searching from many posts I found that tomcat has a restricted methods list on its web.xml file, so I just deleted the PUT method there, I don't have "Delete" Web Services so I still restrict it. The list is almost at the end of the file restricted methods /* TRACE DELETE HEAD OPTIONS It worked for me just by modifying that, but another solution I found was to set the parameter " readonly " to " false " on the same file, maybe it works for you. default org.apache.catalina.servlets.DefaultServlet debug 0 readonly false listings false 1 After these changes, th...

LDAP Authentication with users from different OU on Oracle APEX

Image
On My company, the LDAP Administrator wanted to organize the users in the LDAP directory creating Organization Units (OU) for different groups of users, this made to fail my authentication scheme because it authenticated against the DN cn=%LDAP_USER%,ou=users,dc=company,dc=local but I had users in the DN cn=%LDAP_USER%,ou=CityA,ou=users,dc=company,dc=local , they couldn't authenticate on the app. In my environment, I have APEX 19.1, and Oracle 11G R2. APEX has a built-in LDAP Authentication method where you can add the parameters to connect to the LDAP, one of those parameters is "Use Exact Distinguished Name (DN)" if you set this to "No", you can use a filter to find the user, but trying to use it I got this error: In order to perform this operation a successful bind must be completed on the connection. This is because I need a bind connection to perform searches, but fixing this was out of my hands, if you don't have this problem or you can modify the ...

View PDF File on APEX (Simple approach)

Image
PDF ( Portable Document Format ) is a popular file format to store digital documents, many applications require to upload PDF documents. Displaying the uploaded document in the same app could be useful for the user because he can review the PDF file without downloading it. I'll show you a simple approach to display the PDF file on an APEX application. This is simple, but it has a problem, it will use the Browser's PDF viewer, it could be not correctly configured on some users and it will not work on mobiles. However, I hope this be useful for you. This is the DEMO app where you can upload a PDF file and view it on the page, if this is not working, check your browser properties. This has been tested on Firefox 73 , Chrome 80, Opera 66, Safari 12 , Not working on Internet Explorer 11 or Edge. WARNING!!!! This will fail with Large PDF Files. If you need to work with large PDF Files, try Daniel's Approach in the Comments Section. PDF Viewer Demo APP If this is what you...

Listas de selección en Cascada en Oracle APEX

Image
Uno de los ítems más usado en las aplicaciones web son las listas de selección, estas facilitan a los usuarios llenar formularios a la vez que evita errores al ingresar mal texto. en este artículo les explicaré como crear listas de selección en APEX y las diferentes características que posee APEX para facilitarnos las modificaciones. Creación de Listas de selección Listas de selección en cascada Uso de componentes compartidos en listas de selección Facilitar mantenimiento de listas de selección en cascada Ambiente de ejemplo Para el ambiente de ejemplo tendremos dos tablas, Dirección y proyecto, cada proyecto pertenece a una sola dirección Este será nuestro objetivo, tener dos listas de selección de modo que cuando el usuario seleccione una dirección, el sistema muestre solo los proyectos que pertenecen a la dirección seleccionada Creación de Listas de selección Para crear las listas de selección primero creamos una región y luego un ítem Nuestro ítem se llam...