Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

"Can not find declaration to go to" in JSP web resources with relative path

$
0
0

Project problem:

We are trying to make the code cleaner while still supporting deploying the same app into different contexts under Tomcat.

 

Current solution:

The best solution so far we found is to use the <base href="PATH" /> in the <head> section, and then make all the links inside the html relative to that base path.

The code then would look like:

<head>

     <base href="http://mysite.com/qa" />

     <link rel="stylesheet" href="css/style.css">

     ...

</head>

And we are using the same approach for all the other links inside all JSP files.

It works just fine in Tomcat.

 

Idea problem:

But then we get a problem with navigating to all those relative links in Idea. Whenever we click on such a link we get "Can not find declaration to go to". Changing links to <link rel="stylesheet" href="/css/style.css"> of course works for Idea navigation, but then it doesn't work under Tomcat =)

 

Question:

Is there any way to make Idea using project Web Resource Directory setting as a prefix to resolve all these relative links? Or if there is any other solution to make navigation working with these relative links.

 

Thanks,

Roman


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>