• Post Reply Bookmark Topic Watch Topic
  • New Topic

finding bean....

 
Naadir Peterson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm having a problem connecting to a bean..
i changed the tomcat variables so that i dont have to save my work in the tomcat folder... it something like this:
http://www.name.co.za/8080: ok..

i wrote a bean that connects to a database and saved it in a package..
like so: za.co.name.ConnectionBean...

but when i include it in a simple jsp page and i run it i get a:

org.apache.jasper.JasperException: /index.jsp(5,6) jsp.error.badaction
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803)
etc.. etc.. etc...

i cant seem to find out how 2 solve the problem..
the bean is saved in the WEB_INF/classes/za/co/name directory...
 
chen hongyun
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's JSP syntax error,you should be check your JSP file first
 
Naadir Peterson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the thing is... i only have 1 line of code as follows:
<jsp: useBean id="connectBean" class="za.co.name.ConnectionBean" scope="session"/>

the rest is just html code...
 
Sheldon Fernandes
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove the extra space between jsp: and useBean. Try
<jsp:useBean id="connectBean" class="za.co.name.ConnectionBean" scope="session"/>

[Edit: Rephrased the sentence]

Sheldon Fernandes
[ September 28, 2004: Message edited by: Sheldon Fernandes ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!