jasper2 option for html files

S

Sam Takoy

Hi,

I use .html as the extension for my JSP files. However, the jasper ant
task only looks for .jsp files by default. How do I tell it to work on
my .html files as well?

Many thanks in advance,

Sam
 
A

Arne Vajhøj

I use .html as the extension for my JSP files. However, the jasper ant
task only looks for .jsp files by default. How do I tell it to work on
my .html files as well?

Good question.

As I read the source code, then you have two choices:
1) specify a comma separated list in jspFiles
2) get the source code, add html to the list of extensions
and rebuild

I would use .jsp or .jspx as is standard.

Arne
 
S

Sam Takoy

Good question.

As I read the source code, then you have two choices:
1) specify a comma separated list in jspFiles
2) get the source code, add html to the list of extensions
and rebuild

I would use .jsp or .jspx as is standard.

Arne

So how do I modify the following to include the HTML files?

Thanks,

Sam
 
A

Arne Vajhøj

So how do I modify the following to include the HTML files?

JspC.java

if ((getExtensions() == null) || (getExtensions().size() < 2)) {
addExtension("jsp");
addExtension("jspx");
}

Arne
 
S

Sam Takoy

The class has a setter for it, so it should work
via the ant task.

Arne

Sorry for being dense, but how do you actually modify the following task
to make it include .html files?

<jasper2
validateXml="false"
uriroot="${webapp.path}"
outputDir="${home}/code/bak/DU/src-jsp" />


Thanks again!
 
A

Arne Vajhøj

Sorry for being dense, but how do you actually modify the following task
to make it include .html files?

<jasper2
validateXml="false"
uriroot="${webapp.path}"
outputDir="${home}/code/bak/DU/src-jsp" />

Try:

<jasper2
validateXml="false"
uriroot="${webapp.path}"
jspFiles="page1.html page2.html ... page777.html"
outputDir="${home}/code/bak/DU/src-jsp" />

Arne
 
S

Sam Takoy

Try:

<jasper2
validateXml="false"
uriroot="${webapp.path}"
jspFiles="page1.html page2.html ... page777.html"
outputDir="${home}/code/bak/DU/src-jsp" />

Arne
Thanks! Any way to do it with an *?
 
R

Roedy Green

I use .html as the extension for my JSP files. However, the jasper ant
task only looks for .jsp files by default. How do I tell it to work on
my .html files as well?

generally ANT stuff comes with Java source. Go digging for the string
"jsp" or ".jsp" and see if there is a built in mechanism. If not, hard
code your modification.
--
Roedy Green Canadian Mind Products
http://mindprod.com
To err is human, but to really foul things up requires a computer.
~ Farmer's Almanac
It is breathtaking how a misplaced comma in a computer program can
shred megabytes of data in seconds.
 
A

Arne Vajhøj

generally ANT stuff comes with Java source. Go digging for the string
"jsp" or ".jsp" and see if there is a built in mechanism. If not, hard
code your modification.

This is Tomcat stuff not ant stuff.

And we were already into source code 3 days ago.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top