3
Hello.
The problem is this: inside the Webcontent folder I have the hotel folder and inside this hotel folder I have the arqivo cadastro_hotel.jsp.
In the Webcontent root, I have the menu folder and inside this folder, I have the menu_inicial.jsp file. I created a link, inside the menu_inicial.jsp to point to hotel/cadastro_hotel.jsp, but I can’t. I already used .. / and nothing.
<a href="../hotel/cadastro_hotel.jsp">Cadastrar hotel</a>
I mean, I’m one level down from the root, I want to go back to the root, and so, down to the other folder. I can make the return to the root using .. / but I can’t get to the level below.
What is the full address of these two files? ex:
www.exemplo.com/hotel/cadastro_hotel.jsp
andwww.exemplo.com/menu/menu_inicial.jsp
? if that is so, you can use only the/
and this is the ideal way to organize links: always start with/
and keep adding from there. This is called absolute links, those others that have../
are called relative and usually cause problems because they work on one page, but not on the other that is within a different structure.– Michelle Akemi
@Michelle Akemi The links are: localhost:8080/sgh/hotel/cadastro_hotel.jsp In the menu: localhost:8080/sgh/menu/menu_inicial.jsp That is, inside the webContent folder you have the hotel folder and the menu folder. I want to find out how to go back and forth between these two folders with the links herf.
– André Nascimento
Then use
/menu/menu_inicial.jsp
and/hotel/cadastro_hotel.jsp
at the links.– Michelle Akemi