I have a file `faq.jsp` and it has no content. I grepped through the tomcat directories to find any content it produces when loading a page. But I can't find it. What can produce its data if its isn't in any file?
I'm not sure how this content can be produced. The site is pretty much run using a velocity engine. But none of the views have the content it produces. Also this `faq.jsp` is outside out the views directory but when the site is loaded its in a velocity templated window.
For example when the page is loaded through the site, it has some contents like `Some sample paragraph
` and I've searched it in the server and couldn't find any file that has this content.
If I am understanding your question correctly: the generated JSP output is not saved in the file system anywhere. The output is generated using the JSP template, along with any data provided to it, then sent as the content of the response. At no time is the generated content written to the file system.
If you are not acquainted with how JSP works, perhaps this article might be helpful.
I mean like if the data is either generated using a JSP template or if it was provided to it, it might be somewhere on the server? Unless its coming from database, which I haven't searched. I've searched the whole server and no where I found the content string in any file. Is it possible for a JSP template to pull data from database? Maybe like there is a admin panel for the website and the content could be there which means it might be saved in the database.
Also any hint in finding the source JSP template? Like is there a certain path it usually is or is there any config file that I can check to find out where the templates might be?
This file doesn't say where its redirecting to either.. But looking at the velocity engine config file, it seems it is responsible for handling all the html files.
This line:should cause the URL to be rewritten from yoursite/path/faq.jsp to yoursite/path/faq.html, and the browser should then request the new page. The replacement URL should be visibile in the browser's address bar. If this redirection happens quickly, you may not see the Redirecting ... message.
John Herrington wrote:I mean like if the data is either generated using a JSP template or if it was provided to it, it might be somewhere on the server?
Again, at no point in the generation of output is it written anywhere but to the response.
Unless its [sic] coming from database, which I haven't searched. I've searched the whole server and no where I found the content string in any file. Is it possible for a JSP template to pull data from database?
Sure. Caveat being that JSP templates should not have any processing code in them, but since the dawn of JSP they have been used poorly.
Based upon this, it sounds like you are actually trying to find where the data is coming from? (You haven't really said what you are actually trying to accomplish.)
Also any hint in finding the source JSP template?
This is your best bet for finding the source of the data; finding the template and seeing where it's pulling its data from.
As Ron posted, the URL mapping is the thread to start pulling at...