Java Doc for JspC.java in  » Build » ANT » org » apache » tools » ant » taskdefs » optional » jsp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.taskdefs.optional.jsp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.taskdefs.MatchingTask
   org.apache.tools.ant.taskdefs.optional.jsp.JspC

JspC
public class JspC extends MatchingTask (Code)
Runs a JSP compiler.

This task takes the given jsp files and compiles them into java files. It is then up to the user to compile the java files into classes.

The task requires the srcdir and destdir attributes to be set. This Task is a MatchingTask, so the files to be compiled can be specified using includes/excludes attributes or nested include/exclude elements. Optional attributes are verbose (set the verbosity level passed to jasper), package (name of the destination package for generated java classes and classpath (the classpath to use when running the jsp compiler).

This task supports the nested elements classpath (A Path) and classpathref (A Reference) which can be used in preference to the attribute classpath, if the jsp compiler is not already in the ant classpath.

Usage

 <jspc srcdir="${basedir}/src/war"
 destdir="${basedir}/gensrc"
 package="com.i3sp.jsp"
 verbose="9">
 <include name="**\/*.jsp" />
 </jspc>
 

Large Amount of cutting and pasting from the Javac task...
since:
   1.5


Inner Class :public static class WebAppParameter

Field Summary
protected  VectorcompileList
    
protected  booleanfailOnError
    
 VectorjavaFiles
    
protected  WebAppParameterwebApp
    


Method Summary
public  voidaddWebApp(WebAppParameter webappParam)
     Adds a single webapp.
public  PathcreateClasspath()
     Adds a path to the classpath.
public  PathcreateCompilerclasspath()
    
public  voiddeleteEmptyJavaFiles()
     delete any java output files that are empty this is to get around a little defect in jasper: when it fails, it leaves incomplete files around.
public  voidexecute()
    
public  PathgetClasspath()
     Get the classpath.
public  VectorgetCompileList()
    
public  PathgetCompilerclasspath()
    
public  FilegetDestdir()
     Get the destination directory.
public  booleangetFailonerror()
     Gets the failonerror flag.
public  StringgetIeplugin()
     Get the IE CLASSID value.
public  StringgetPackage()
     Get the name of the package.
public  PathgetSrcDir()
     Get the source dir.
public  FilegetUribase()
     Get the uri base value.
public  FilegetUriroot()
     Get the uri root value.
public  intgetVerbose()
     Get the verbose level.
public  WebAppParametergetWebApp()
     Get the web app.
public  FilegetWebinc()
     Get the webinc attribute.
public  FilegetWebxml()
     Filename for web.xml.
public  booleanisMapped()
     If true, generate separate write() calls for each HTML line in the JSP.
protected  FilemapToJavaFile(JspMangler mangler, File srcFile, File srcDir, File dest)
     get a filename from our jsp file.
Parameters:
  mangler - the jsp filename managler.
Parameters:
  srcFile - the source file.
Parameters:
  srcDir - the source directory.
Parameters:
  dest - the destination directory.
protected  voidresetFileLists()
     Clear the list of files to be compiled and copied..
protected  voidscanDir(File srcDir, File dest, JspMangler mangler, String[] files)
     Scans the directory looking for source files to be compiled.
public  voidsetClasspath(Path cp)
     Set the classpath to be used for this compilation.
public  voidsetClasspathRef(Reference r)
    
public  voidsetCompiler(String compiler)
     Class name of a JSP compiler adapter.
public  voidsetCompilerclasspath(Path cp)
    
public  voidsetDestdir(File destDir)
     Set the destination directory into which the JSP source files should be compiled.
public  voidsetFailonerror(boolean fail)
     Whether or not the build should halt if compilation fails.
public  voidsetIeplugin(String iepluginid)
    
public  voidsetMapped(boolean mapped)
     If true, generate separate write() calls for each HTML line in the JSP.
public  voidsetPackage(String pkg)
     Set the name of the package the compiled jsp files should be in.
public  voidsetSrcDir(Path srcDir)
     Set the path for source JSP files.
public  voidsetUribase(File uribase)
     The URI context of relative URI references in the JSP pages.
public  voidsetUriroot(File uriroot)
     The root directory that uri files should be resolved against.
public  voidsetVerbose(int i)
    
public  voidsetWebinc(File webinc)
     output filename for the fraction of web.xml that lists servlets.
public  voidsetWebxml(File webxml)
     Filename for web.xml.

Field Detail
compileList
protected Vector compileList(Code)



failOnError
protected boolean failOnError(Code)
flag to control action on execution trouble



javaFiles
Vector javaFiles(Code)



webApp
protected WebAppParameter webApp(Code)
web apps





Method Detail
addWebApp
public void addWebApp(WebAppParameter webappParam) throws BuildException(Code)
Adds a single webapp.
Parameters:
  webappParam - add a web app parameter
throws:
  BuildException - if more than one webapp is specified.



createClasspath
public Path createClasspath()(Code)
Adds a path to the classpath. a path to be configured.



createCompilerclasspath
public Path createCompilerclasspath()(Code)
Support nested compiler classpath, used to locate compiler adapter a path to be configured.



deleteEmptyJavaFiles
public void deleteEmptyJavaFiles()(Code)
delete any java output files that are empty this is to get around a little defect in jasper: when it fails, it leaves incomplete files around.



execute
public void execute() throws BuildException(Code)
execute by building up a list of files that have changed and hand them off to a jsp compiler
throws:
  BuildException - on error.



getClasspath
public Path getClasspath()(Code)
Get the classpath. the classpath.



getCompileList
public Vector getCompileList()(Code)
get the list of files to compile the list of files.



getCompilerclasspath
public Path getCompilerclasspath()(Code)
get the classpath used to find the compiler adapter the compiler classpath.



getDestdir
public File getDestdir()(Code)
Get the destination directory. the directory.



getFailonerror
public boolean getFailonerror()(Code)
Gets the failonerror flag. the flag.



getIeplugin
public String getIeplugin()(Code)
Get the IE CLASSID value. the value.



getPackage
public String getPackage()(Code)
Get the name of the package. the package.



getSrcDir
public Path getSrcDir()(Code)
Get the source dir. the source path.



getUribase
public File getUribase()(Code)
Get the uri base value. the value.



getUriroot
public File getUriroot()(Code)
Get the uri root value. the value.



getVerbose
public int getVerbose()(Code)
Get the verbose level. the level.



getWebApp
public WebAppParameter getWebApp()(Code)
Get the web app. the web app attribute.



getWebinc
public File getWebinc()(Code)
Get the webinc attribute. the webinc attribute.



getWebxml
public File getWebxml()(Code)
Filename for web.xml. The filename for web.xml.



isMapped
public boolean isMapped()(Code)
If true, generate separate write() calls for each HTML line in the JSP. mapping status



mapToJavaFile
protected File mapToJavaFile(JspMangler mangler, File srcFile, File srcDir, File dest)(Code)
get a filename from our jsp file.
Parameters:
  mangler - the jsp filename managler.
Parameters:
  srcFile - the source file.
Parameters:
  srcDir - the source directory.
Parameters:
  dest - the destination directory. the filename.



resetFileLists
protected void resetFileLists()(Code)
Clear the list of files to be compiled and copied..



scanDir
protected void scanDir(File srcDir, File dest, JspMangler mangler, String[] files)(Code)
Scans the directory looking for source files to be compiled. The results are returned in the class variable compileList
Parameters:
  srcDir - the source directory.
Parameters:
  dest - the destination directory.
Parameters:
  mangler - the jsp filename mangler.
Parameters:
  files - the file names to mangle.



setClasspath
public void setClasspath(Path cp)(Code)
Set the classpath to be used for this compilation.
Parameters:
  cp - the path to be used.



setClasspathRef
public void setClasspathRef(Reference r)(Code)
Adds a reference to a classpath defined elsewhere
Parameters:
  r - a reference to a classpath.



setCompiler
public void setCompiler(String compiler)(Code)
Class name of a JSP compiler adapter.
Parameters:
  compiler - the compiler class name.



setCompilerclasspath
public void setCompilerclasspath(Path cp)(Code)
Set the classpath to be used to find this compiler adapter
Parameters:
  cp - the compiler classpath.



setDestdir
public void setDestdir(File destDir)(Code)
Set the destination directory into which the JSP source files should be compiled.
Parameters:
  destDir - the destination directory.



setFailonerror
public void setFailonerror(boolean fail)(Code)
Whether or not the build should halt if compilation fails. Defaults to true.
Parameters:
  fail - a boolean value.



setIeplugin
public void setIeplugin(String iepluginid)(Code)
Java Plugin CLASSID for Internet Explorer
Parameters:
  iepluginid - the id to use.



setMapped
public void setMapped(boolean mapped)(Code)
If true, generate separate write() calls for each HTML line in the JSP.
Parameters:
  mapped - a boolean value.



setPackage
public void setPackage(String pkg)(Code)
Set the name of the package the compiled jsp files should be in.
Parameters:
  pkg - the name of the package.



setSrcDir
public void setSrcDir(Path srcDir)(Code)
Set the path for source JSP files.
Parameters:
  srcDir - the source path.



setUribase
public void setUribase(File uribase)(Code)
The URI context of relative URI references in the JSP pages. If it does not exist then it is derived from the location of the file relative to the declared or derived value of uriroot.
Parameters:
  uribase - The new Uribase value



setUriroot
public void setUriroot(File uriroot)(Code)
The root directory that uri files should be resolved against. (Default is the directory jspc is invoked from)
Parameters:
  uriroot - The new Uribase value



setVerbose
public void setVerbose(int i)(Code)
Set the verbose level of the compiler
Parameters:
  i - the verbose level to use.



setWebinc
public void setWebinc(File webinc)(Code)
output filename for the fraction of web.xml that lists servlets.
Parameters:
  webinc - The new Webinc value



setWebxml
public void setWebxml(File webxml)(Code)
Filename for web.xml.
Parameters:
  webxml - The new Webxml value



Fields inherited from org.apache.tools.ant.taskdefs.MatchingTask
protected FileSet fileset(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.taskdefs.MatchingTask
public void XsetIgnore(String ignoreString)(Code)(Java Doc)
public void XsetItems(String itemString)(Code)(Java Doc)
public void add(FileSelector selector)(Code)(Java Doc)
public void addAnd(AndSelector selector)(Code)(Java Doc)
public void addContains(ContainsSelector selector)(Code)(Java Doc)
public void addContainsRegexp(ContainsRegexpSelector selector)(Code)(Java Doc)
public void addCustom(ExtendSelector selector)(Code)(Java Doc)
public void addDate(DateSelector selector)(Code)(Java Doc)
public void addDepend(DependSelector selector)(Code)(Java Doc)
public void addDepth(DepthSelector selector)(Code)(Java Doc)
public void addDifferent(DifferentSelector selector)(Code)(Java Doc)
public void addFilename(FilenameSelector selector)(Code)(Java Doc)
public void addMajority(MajoritySelector selector)(Code)(Java Doc)
public void addModified(ModifiedSelector selector)(Code)(Java Doc)
public void addNone(NoneSelector selector)(Code)(Java Doc)
public void addNot(NotSelector selector)(Code)(Java Doc)
public void addOr(OrSelector selector)(Code)(Java Doc)
public void addPresent(PresentSelector selector)(Code)(Java Doc)
public void addSelector(SelectSelector selector)(Code)(Java Doc)
public void addSize(SizeSelector selector)(Code)(Java Doc)
public void addType(TypeSelector selector)(Code)(Java Doc)
public void appendSelector(FileSelector selector)(Code)(Java Doc)
public PatternSet.NameEntry createExclude()(Code)(Java Doc)
public PatternSet.NameEntry createExcludesFile()(Code)(Java Doc)
public PatternSet.NameEntry createInclude()(Code)(Java Doc)
public PatternSet.NameEntry createIncludesFile()(Code)(Java Doc)
public PatternSet createPatternSet()(Code)(Java Doc)
protected DirectoryScanner getDirectoryScanner(File baseDir)(Code)(Java Doc)
final protected FileSet getImplicitFileSet()(Code)(Java Doc)
public FileSelector[] getSelectors(Project p)(Code)(Java Doc)
public boolean hasSelectors()(Code)(Java Doc)
public int selectorCount()(Code)(Java Doc)
public Enumeration selectorElements()(Code)(Java Doc)
public void setCaseSensitive(boolean isCaseSensitive)(Code)(Java Doc)
public void setDefaultexcludes(boolean useDefaultExcludes)(Code)(Java Doc)
public void setExcludes(String excludes)(Code)(Java Doc)
public void setExcludesfile(File excludesfile)(Code)(Java Doc)
public void setFollowSymlinks(boolean followSymlinks)(Code)(Java Doc)
public void setIncludes(String includes)(Code)(Java Doc)
public void setIncludesfile(File includesfile)(Code)(Java Doc)
public void setProject(Project project)(Code)(Java Doc)

w__w__w_._ja_v_a_2s._c_o___m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.