?
Solved

problem in using beans in tomcat

Posted on 2003-03-16
6
Medium Priority
?
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

800 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