Parameters between URL's

1

Good morning!

I can not find the solution to the next problem.

I have an Intranet, which consumes another project (Web page) and shows it inside an IFrame. The question is: How can I retrieve the parameters of the URL of the intranet page within the IFrame with Java?

I am implementing JSF 2.2 with Primefaces 5.0 and Spring Web MVC 4.0.1 under a maven project.

I enclose the example screen so you can understand me better ...

    
asked by Omar Cervantes 19.12.2017 в 19:09
source

1 answer

2

I do not think you can do it on the server side, but it occurs to me that you can pass the parameters to the iframe directly when you assemble it and add them to the src URL.

<iframe src="url?usuario={usuario}">

Where {user} is the way in Spring to bring a GET.

Or else from the iframe with JavaScript using:

<script> 
url = parent.document.URL; 
//Lo que necesites hacer... 
</script>
    
answered by 19.12.2017 в 19:30