A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Engineering
»
Ant, Maven and Other Build Tools
Author
Eclips error
Samanthi perera
Ranch Hand
Joined: Jan 08, 2010
Posts: 510
posted
Feb 14, 2010 07:33:34
0
this is my
java
class
package jstl; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.tagext.TagSupport; public class TodayTag extends TagSupport{ private String mFormat; public void setFormat(String pFormat) { mFormat = pFormat; } public int doStartTag() throws JspException { try { JspWriter out = pageContext.getOut(); Date today = new Date(); SimpleDateFormat dateFormatter = new SimpleDateFormat(mFormat); out.print(dateFormatter.format(today)); } catch(IOException ioe) { throw new JspException("Error: " + ioe.getMessage()); } return SKIP_BODY; } public int doEndTag() throws JspException { return SKIP_PAGE; } }
this is my
ant
file
<?xml version="1.0" encoding="UTF-8"?> <project name="project" > <target name="compile"> <javac srcdir="src/jstl" destdir="WebContent/WEB-INF/classes"></javac> </target> </project>
this is error
Buildfile: D:\PROJECT\Gwt-eclips\JstlExample\AntCompile.xml compile: [javac] Compiling 1 source file to D:\PROJECT\Gwt-eclips\JstlExample\WebContent\WEB-INF\classes [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:7: package javax.servlet.jsp does not exist [javac] import javax.servlet.jsp.JspException; [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:8: package javax.servlet.jsp does not exist [javac] import javax.servlet.jsp.JspWriter; [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:9: package javax.servlet.jsp.tagext does not exist [javac] import javax.servlet.jsp.tagext.TagSupport; [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:12: cannot find symbol [javac] symbol: class TagSupport [javac] public class TodayTag extends TagSupport{ [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:20: cannot find symbol [javac] symbol : class JspException [javac] location: class jstl.TodayTag [javac] public int doStartTag() throws JspException { [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:34: cannot find symbol [javac] symbol : class JspException [javac] location: class jstl.TodayTag [javac] public int doEndTag() throws JspException { [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:22: cannot find symbol [javac] symbol : class JspWriter [javac] location: class jstl.TodayTag [javac] JspWriter out = pageContext.getOut(); [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:22: cannot find symbol [javac] symbol : variable pageContext [javac] location: class jstl.TodayTag [javac] JspWriter out = pageContext.getOut(); [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:28: cannot find symbol [javac] symbol : class JspException [javac] location: class jstl.TodayTag [javac] throw new JspException("Error: " + ioe.getMessage()); [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:30: cannot find symbol [javac] symbol : variable SKIP_BODY [javac] location: class jstl.TodayTag [javac] return SKIP_BODY; [javac] ^ [javac] D:\PROJECT\Gwt-eclips\JstlExample\src\jstl\TodayTag.java:35: cannot find symbol [javac] symbol : variable SKIP_PAGE [javac] location: class jstl.TodayTag [javac] return SKIP_PAGE; [javac] ^ [javac] 11 errors BUILD FAILED D:\PROJECT\Gwt-eclips\JstlExample\AntCompile.xml:7: Compile failed; see the compiler error output for details. Total time: 829 milliseconds
i am using eclips IDE
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5543
I like...
posted
Feb 14, 2010 08:20:47
0
The <java> task in your build.xml is missing the classpath entry - it should reference the
JSP
and JSTL JAR files. These JAR files should come with the app server you are using.
JBoss In Action
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5543
I like...
posted
Feb 14, 2010 08:21:22
0
This is an ant script question, not an eclipse question, moving.
Samanthi perera
Ranch Hand
Joined: Jan 08, 2010
Posts: 510
posted
Feb 14, 2010 09:17:50
0
Thanks Peter Johnson.
Now it is working.
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: Eclips error
Similar Threads
classic tag extends TagSupport
How do I compile mt Tag Handler...?
Problem in compiling Class tag handler
compilation error for EVAL_BODY_AGAIN
How to use custom tag?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter