I have a jsp file that passes a parameter to another jsp file. This parameter is of type string and takes the value of a folder name in the web server path (i.e. http://myserver.com/Page/Folder_Name).
In the second jsp file, I have quite a few js and css files I'm attaching using script and link tags, respectively. I need to make their paths relative to the parameter passed. My thought-process is construct dynamic source (src) paths using jsp tags and javascript.
<head>
<link rel="stylesheet" type="text/css" href="Folder_Name/css/style.css" />
<script type="text/javascript" src="Folder_Name/js/script.js"></script>
</head>
Except Folder_Name will be dynamic, utilizing JSP somehow. At least, that's my mindset.
The question is how may I accomplish this? I'm open to other suggestions, with the initial condition of said parameter is passed to the second jsp page.
Thank you.
<jsp:param>inside a<jsp:include>? It would be very helpful if you could show some code.