开发者

Tool to reverse map JSP to URL?

Is there a tool to automate the task of finding out where a given JSP is used, by URL?

Ultimately, the question I need to answer is, What URL(s) do I need to call, to see the output of this JSP in my browser?

Finding out involves searching for the JSP name, then searching for any JSPs that include it (possibly through several levels), ending up with one or more servlets - then trawling through web.xml to get the mapping of URL to servlet.

Having spent this morning doing exactly that, looking for examples of deprecated tags in our project, it seems to me that a computer wo开发者_Python百科uld be quicker, if not better, at this than I am. For my purposes, I can live with not getting every URL; I really need to see only one use of the file in question.

So, is there a tool to do this? My IDE is Eclipse, so if Eclipse or some plug-in can do this that would be my preferred option. The application is running on Tomcat 6.

Thanks,


Check the contents of web.xml; it contains this mapping.

[EDIT] If you want to remove a JSP, here is what you need to do:

  1. Check for an entry in web.xml
  2. Search for <jsp:include and <%@include in all *.jsp files

That's all the places where your JSP can be used. You don't have to check for redirects and such since for a redirect to work, the JSP must be listed in web.xml.


Why do you require any eclipse plugin? How about a simple text search in eclipse, where you can do a file search, that is search a text in all required file patterns - as below

Tool to reverse map JSP to URL?


(source: dopefly.com)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜