• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to dispose web.xml at eclipse ee ide with jsp-file

 
shaoyi he
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a problem about jsp-file praratem in web.xml

here is the photos about the list.

when i use servlet ,it works.
like http://localhost/question/togo good.

but http://localhost/question/question/haha it doesnot,

i try every possible, /WebContent/question.jsp and so on,but...

the same question also appears at tag,

i write question.java for test

then example.tld inside WEB-INF
then example.jsp inside WebContent


it shows:

org.apache.jasper.JasperException: /example.jsp(11,8) No tag ""
defined in tag library imported with prefix "myExample"

how can i do

any can help me?

i read Core Servlets and JavaServer Pages Volume 2 who all about this.

if i cannot solve this question ,i cannot read more.

thanks
 
Stefan Evans
Bartender
Posts: 1822
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your tld file defines what tags are available.

In the example you have declared a tag called "question"

You are then using in your jsp page:


Two suggestions
1 - lose the space after the colon ie <myExample:example />
2 - Should it be <myExample:question /> to match the declaration in your tld file?

 
shaoyi he
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank u.

sorry, i leave that small question .
i have change that,but it doesnot work .
i use tomcat 7.0 and eclipse ee IDE.

here is the list i have changeed


when i use http://localhost/question/here/ha
it shows javax.servlet.ServletException: No servlet class has been specified for servlet here
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1056)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:813)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)

but when i use http://localhost/question/togo/haha it woks,

////example.tld


i have changeed
// example.jsp

it gets

org.apache.jasper.JasperException: /example.jsp(11,8) No tag "example" defined in tag library imported with prefix "myExample" org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)

but i have defineded it as you see.

i think the question is my web.xml cannot catch jsp file, ididnot know why.

the servlet-class,filter,error-page tags all work.

that's it.



 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the text of the actual files (be sure to use code tags when appropriate) rather than IDE screen-grab images.
 
shaoyi he
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i just want someone know the files's path.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!