aspose file tools*
The moose likes Tomcat and the fly likes Setup for jsp work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Setup for jsp work" Watch "Setup for jsp work" New topic
Author

Setup for jsp work

AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Hi,
I am trying to setup to do some jsp work.
Can anyone help me with the setup.

i got my tomcat installed

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\project

Under the project folder I got the Web-INF folder

And the jsp pages



Where do I create the src directory to store the java files.(beans)

I got it at:

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\src

And got a folder called project which stores the beans (i.e C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\src\project)

The classes files are located at:

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\client\WEB-INF\classes\project



Now in the jsp page I call

<%@ page import="java.sql.*,project.*,java.io.*,java.util.*" %>

<jsp:useBean id="client" scope="session" class="project.Client" />


I am not sure if the setup is right.


The error I am getting is



HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: endeavour/Client (wrong name: Client)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause

java.lang.NoClassDefFoundError: endeavour/Client (wrong name: Client)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(Unknown Source)
java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1210)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.


thanks

Anil
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Tomcat set up is better discussed in the Tomcat forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Under the project folder I got the Web-INF folder
It should be WEB-INF.
It's case sensitive.

Where do I create the src directory to store the java files.(beans)
You can put your source wherever you want as long as the compiles class file s go under /WEB-INF/classes/{your package}


The classes files are located at:

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\client\WEB-INF\classes\project

That looks good, assuming that 'project' is your package.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Thanks Ben,

Actually i forgot to compile the java in a specific package.

Thanks

Anil
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setup for jsp work