Solved

JasperException & ServletException in Jakarta Tomcat Server

Posted on 2004-10-14
21
503 Views
Last Modified: 2008-02-01
Hi!

Can everybody help me??  I´m getting an error which was apparently solved, but I got another error ... I can´t see neither the forms nor forwarded jsp on the browser.  You can see my last question, answered by "ramazanyich" at:
http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_21164294.html#12294885

I supose that there´s something wrong with Tomcat Server or the accessing to the mysql, but I don´t know with precision.  Can anybody help me as soon as possible??

Thanks in advance.


Hi!

I have a web application, its Server is Jakarta Tomcat.  I´m getting this error in WinXP and Win2000 ... trying to access a jsp page by means of a call through a user name and password. The error is not presented in Win98.  I was configuring Jakarta Tomcat Server as it have to be configured, but everything is ok.  

Could you please give any solution as soon as possible??
Thanks in advance.
I´ll be wating fou you.

HTTP Status 500 -

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

type Exception report

message

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

exception

org.apache.jasper.JasperException
0
Comment
Question by:intanhm
  • 11
  • 10
21 Comments
 

Author Comment

by:intanhm
ID: 12310195
Urgent..!
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12324472
may be try changing the port address let see 8090
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12324488
On Win XP ,   Tomcat needs to be able to find javac to compile JSPs
Change the path of C:\Program Files\Java\j2re1.4.1_01\bin\client\jvm.dll
to C:\Program Files\jre\bin\client\jvm.dll, restart the service,
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12324498
also point your JAVA_HOME to c:\jdk1.4.1 not c:\jdk1.4.1\bin

0
 

Author Comment

by:intanhm
ID: 12324622
Hi, ronan_40060!

I´m using port 8080.  What is the difference in to use port 8090?? (as you say).  The defaul port of Tomcat is 8080.

I´m using C:\Program Files\Java\j2re1.4.1_01\bin\client\jvm.dll  because SDK installed this folder over there.  Do you tell remove or copy this folder under ProgramFiles?? (C:\Program Files\jre\bin\client\jvm.dll)

I´m using Tomcat version 4.1.30, but the designers don´t remember which version did they use. They supose the same version or may me 4.01.  Which will be the problem??

Another thing ... Must I add C:\Archivos de programa\Apache Group\Tomcat 4.1\common\lib\servlet.jar to classpath variable??  Which jar paths should be there??

Thanks in advance.
0
 

Author Comment

by:intanhm
ID: 12324783
PD: I´m using right:
C:\>set java_home
JAVA_HOME=C:\j2sdk1.4.0
as you say
0
 

Author Comment

by:intanhm
ID: 12324842
Hi, ronan_40060!

What about configuration of web.xml ??
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12324900
Hello Intanhm
1> yes try changing  C:\Program Files\Java\j2re1.4.1_01\bin\client\jvm.dll    to  C:\Program Files\jre\bin\client\jvm.dll and restart the tomcat .
The reason I told u to chnage the 8080 port as there might be something else using that port too  so try changing it to 8090 .
Let me know what happenes when u implement the first change
Good Luck
Ronan
 
Just curious C:\Archivos de programa  ??? is it Spanish or Italien
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12324925
I would want you to have a close look at the information provided by the following links
http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html  
www.moreservlets.com
regards
Ronan
0
 

Author Comment

by:intanhm
ID: 12339831
Hi, ronan!

I tried with your solutions (separated):

1) I changed C:\Program Files\Java\j2re1.4.1_01\bin\client\jvm.dll    to  C:\Program Files\jre\bin\client\jvm.dll and restart the tomcat .  It doesn´t work.

2) I changed the port 8080 by 8090, but it doesn´t work either.

I got this log by netstat command in command prompt line: ... Do you think is a problem of port number yet?? I´m going to check links you sent me (Thanks a lot).  Any other solution??  By the way, do you know how can I recover the configuration of the PC after formatting??  Could you please tell me or guide me to another part of the forum??  Thanks in advance.

C:\>netstat

Conexiones activas

  Proto  Dirección local        Dirección remota       Estado
  TCP    DESIGN2:1062           localhost:1285         TIME_WAIT
  TCP    DESIGN2:1295           localhost:3306         ESTABLISHED
  TCP    DESIGN2:3306           localhost:1295         ESTABLISHED
  TCP    DESIGN2:1111           192.168.123.253:http   CLOSE_WAIT
  TCP    DESIGN2:1272           192.168.123.69:2869    CLOSE_WAIT
  TCP    DESIGN2:1279           rad.msn.com:http       ESTABLISHED
  TCP    DESIGN2:1286           ns15.webmasters.com:pop3  TIME_WAIT
  TCP    DESIGN2:1291           192.168.123.250:netbios-ssn  TIME_WAIT
  TCP    DESIGN2:1293           dsl-201-129-64-198.prod-infinitum.com.mx:8090  E
STABLISHED
  TCP    DESIGN2:1294           dsl-201-129-64-198.prod-infinitum.com.mx:8090  E
STABLISHED
  TCP    DESIGN2:8090           192.168.123.254:1293   ESTABLISHED
  TCP    DESIGN2:8090           192.168.123.254:1294   ESTABLISHED

C:\>
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:intanhm
ID: 12349715
Hi, Ronan!

Are you very busy??  Could you please give me your opinion about my las comments??  How do you have the classpath variable configuration??  I have this one: ... could you tell me if it is rigth according the yours??
Thanks in advance.
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12349902
I will get back to right away
sorryyI have been preparing myself for the upcoming Interviews
i will post you a reply tonight
thanks
ronan
0
 

Author Comment

by:intanhm
ID: 12349988
ok, I´m sorry ´cause of the annoyance. Thanks Ronan.  I´ll be waiting for you.
:)
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12353341
Hi there itnanhm I am back , had a good time in preparing for the  Interview Questions on C/C++, Perl , Unix and Oracle :)
Its 2:11 am in Paris but I am awake :) Well back to the question  
You have problems while configuring Tomcat on Win 98 , in fact my one friend is also facing the same problem
Could you please tell me how did you define your configuration variables for Win 98 ?
from the netstat command
just curious are u italian or spanish ?
those words in netstat command sounds spanish may be ??
I will be waiting for your reply
Happy programming
Good Luck
Ronan
0
 

Author Comment

by:intanhm
ID: 12358714
Hi, Ronan!

Great about your interview preparation!!! :)
You really have a lot of work because of your keeping awake!!!
I didn´t configurate the Tomcat on Win98. My server has the same configuration, and the client (Win98) works fine, but the clientes (WinXP) don´t work.  The configuration variables on server is the same for all kind of clients (is the classpath varialble I sent you).
By the way, you´re right, the language on command prompt log is spanish.  I´m mexican.
I really have a happy programming except some times when I don´t find the solution for my TOMCAT!!! :)
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12364533
Hello intanhm
What version of Tomcat are you using ?

These are the steps to configure your Tomcat properly ( source www.coreservlets.com)
1> Download the Apache Tomcat Software
Go to http://jakarta.apache.org/site/binindex.cgi and download the zip file for the current release build of Tomcat 4 (JSP 1.2; servlets 2.3) or Tomcat 5 (JSP 2.0; servlets 2.4). Save the zip file on your PC and unzip it into a location of your choice. You specify the top-level directory (e.g., C:\) and the zip file has embedded subdirectories (e.g., jakarta-tomcat-4.1.29 or jakarta-tomcat-5.0.27). Thus, C:\jakarta-tomcat-4.1.29 is a common resultant installation directory for Tomcat 4. Note: from this point forward, I'll refer to that location as install_dir.

2> 2. Set the JAVA_HOME Variable
Next, you must set the JAVA_HOME environment variable to tell Tomcat where to find Java. Failing to properly set this variable prevents Tomcat from handling JSP pages. This variable should list the base JDK installation directory, not the bin subdirectory. For example, if you are on Windows 98/Me and installed the JDK in C:\j2sdk1.4.2_05 on your C drive, you might put the following line in your C:\autoexec.bat file.

  set JAVA_HOME=C:\j2sdk1.4.2_05

On Windows XP, you could also go to the Start menu, select Control Panel, choose System, click on the Advanced tab, press the Environment Variables button at the bottom, and enter the JAVA_HOME variable and value directly. On Windows 2000 and NT, you do Start, Settings, Control Panel, System, then Environment. If you prefer, you can use C:\autoexec.bat on those versions of Windows also (unless a system administrator has set your PC to ignore it).

3> 3. Enable the ROOT Context
To enable it in those versions, make a backup copy of the original version of install_dir/conf/server.xml, then uncomment the following line:
  <Context path="" docBase="ROOT" debug="0"/>

Note that in most early versions of Tomcat 5, the commented out entry distributed with Apache Tomcat is in error: it is missing the trailing slash (i.e., <Context ... debug="0" > instead of the proper <Context ... debug="0" />). So, you will need to insert the slash. You can also:

4> 4. Turn on Servlet Reloading
The next step is to tell Tomcat to check the modification dates of the class files of requested servlets and reload ones that have changed since they were loaded into the server's memory. This slightly degrades performance in deployment situations, so is turned off by default. However, if you fail to turn it on for your development server, you'll have to restart the server every time you recompile a servlet that has already been loaded into the server's memory. Since this tutorial discusses the use of Tomcat for development, this change is strongly recommended.
To turn on servlet reloading, edit install_dir/conf/server.xml and add a DefaultContext subelement to the main Host (Tomcat 5.0.20 and later) or Service (Tomcat 5.0.19 and earlier) element and supply true for the reloadable attribute. For example, in Tomcat 5.0.27, search for this entry:

        <Host name="localhost" debug="0" appBase="webapps"
                                                            ...>

and then insert the following immediately below it:
        <DefaultContext reloadable="true"/>

Be sure to make a backup copy of server.xml before making the above change.

5> 5. Change the Port to 80
Assuming you have no other server already running on port 80, you'll find it convenient to configure Tomcat to run on the default HTTP port (80) instead of the out-of-the-box port of 8080. Making this change lets you use URLs of the form http://localhost/blah instead of http://localhost:8080/blah. Note that you need admin privileges to make this change on Unix. Also note that some versions of Windows XP automatically start IIS on port 80. So, if you use XP and want to use port 80 for Tomcat, you may need to disable IIS (see the Administrative Tools section of the Control Panel).
To change the port, edit install_dir/conf/server.xml and change the port attribute of the Connector element from 8080 to 80, yielding a result similar to that below. Note that the exact form of the Connector element varies in different Tomcat versions. Just search for a non-comment occurrence of "8080".

    <Connector port="80" ...
      maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
      ...
    ... />

6>  8. Set the CATALINA_HOME Variable (Optional)
If you are going to make copies of the Tomcat startup or shutdown scripts, it is also helpful to set the CATALINA_HOME environment variable to refer to the top-level directory of the Apache Tomcat installation (e.g., C:\jakarta-tomcat-5.0.27). This variable identifies the Tomcat installation directory to the server. However, if you are careful to avoid copying the server startup scripts and you use only shortcuts (called "symbolic links" on Unix/Linux) instead, you are not required to set this variable. I recommend using shortcuts and not bothering with CATALINA_HOME.

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

 
0
 

Author Comment

by:intanhm
ID: 12372425
Hi, ronan!

I´m really thankful ´cause of your answer.  Thanks for taking some time and explain to me these steps to configure Tomcat server.  I really made these instructions, so I have the right configuration.

The error I had was solved with some adjustments I made in the browser of the client.
Thank you very much for your support.
Hasta pronto! :)

0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12378574
Good Moring Itnanhm

Glad to know that you problem has been solved. :)
all exeprts on EE are here to help you out
Please close the question by accepting answer.
Have a nice day
happy programming
Ronan
0
 

Author Comment

by:intanhm
ID: 12382618
Hi, ronan!

Thanks! :) How can I do to accept the answer??  In which option or panel of the site??
Regards!
... Aby
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 12382846
Hello Itanhm
you cud go to the following url
http://www.experts-exchange.com/help.jsp#hi68

in front of any comment , theres a accept button you need to click to it and then you  have 3 choices
1> Excellent
2> very good
3> average

you can select the option you want

Regards
Ronan
0
 
LVL 9

Accepted Solution

by:
ronan_40060 earned 500 total points
ID: 12398996
please accept the answer and close the question
ronan
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now