[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

problem in using beans in tomcat

Posted on 2003-03-16
6
Medium Priority
?
192 Views
Last Modified: 2010-04-20
The problem seems to be very frequent among tomcat users, as there are a lot of similar questions on web. well the problem is that the tomcat can't find the classes though i put them in webapps/ROOT/myapps/WEB-INF/classes folder. if i put them in shared folder then it can find them.
i don't know what to do with this.

0
Comment
Question by:ashutoshleo
  • 3
  • 3
6 Comments
 
LVL 4

Expert Comment

by:thanassis
ID: 8151320
change
webapps/ROOT/myapps/WEB-INF/classes
with
webapps/myapps/WEB-INF/classes
0
 
LVL 4

Expert Comment

by:thanassis
ID: 8151369
and then restart tomcat
0
 

Author Comment

by:ashutoshleo
ID: 8152007
no then it starts giving this error.(see below)
but if i put the class file in shared/classes/ then it can find that class there
i hope these lines below will give more clues to diagnos whats wrong with my setup



type Exception report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 6 in the jsp file: /mail/mail.jsp

Generated servlet error:
    [javac] Compiling 1 source file

C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\mail\mail_jsp.java:47: cannot resolve symbol
symbol  : class mailBean
location: package jspClasses
      jspClasses.mailBean mb = null;
                ^



An error occurred at line: 6 in the jsp file: /mail/mail.jsp

Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\mail\mail_jsp.java:49: cannot resolve symbol
symbol  : class mailBean
location: package jspClasses
        mb = (jspClasses.mailBean) pageContext.getAttribute("mb", PageContext.SESSION_SCOPE);
                        ^



An error occurred at line: 6 in the jsp file: /mail/mail.jsp

Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\mail\mail_jsp.java:52: cannot resolve symbol
symbol  : class mailBean
location: package jspClasses
            mb = (jspClasses.mailBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "jspClasses.mailBean");
                            ^
3 errors


      at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
      at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
      at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
      at java.lang.Thread.run(Thread.java:536)

0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
LVL 4

Accepted Solution

by:
thanassis earned 250 total points
ID: 8152432
You use the package jspClasses.
Have you create the folder jspClasses?
Try put the classes in the following folder:

webapps/myapps/WEB-INF/classes/jspClasses

0
 

Author Comment

by:ashutoshleo
ID: 8154337
I tried that too
but its giving the same mistake
i don't know what to do
may be i'll simply use the shared folder only
0
 

Author Comment

by:ashutoshleo
ID: 8154412
i got it
it worked when i used  following folder-
webapps\ROOT\WEB-INF\classes\jspClasses
thanks for support thanassis
i don't can i accept ur comment as answer b'cos it didn't gave me the fully correct solution but i gave me a lot of clue
so i at my part accept it as answer
i hope its okay with experts-exchange.com's rules
thanks
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

640 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question