I am working on a project in which i have to crawl through a number of *.jsp files and index some data from them. These files contain links to other jsps and .wav files. However, these links are of the form $root_dir$/<%=language%>ABC.wav, there language is a variable defined in the javascript file. Basically, the links change with different inputs to the file. Is there a way I could somehow execute these .jsp files from my java program (maybe start tomcat to do so), and then obtain the values of these variables from there?

Recommended Answers

All 3 Replies

I'm not going to tell you how to create an application to steal content from websites, which is exactly what you're trying to do.

It may seem so that Im trying to steal content from websites, but it is not so. This is what I am supposed to do as part of my work for a company where I am presently interning! Please help me out!

nope, not helping your employer steal content either.

Anyway, it's far from trivial and not worth the trouble (unless of course you're trying to steal content).
You'd need to write an html parser, a javascript parse, feed that javascript with the input it would be provided with in all possible scenarios that could be encountered when accessing the page, etc. etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.