Servlet

B

bgolda

Hi,

I have an application (which uses Tomcat5 on Windows) and would like to
compile it (very much). There is an environment in which the previous
version compiles well, but the new one does not. The only change was
that the program can use another jdbc driver. The suitable jar was put
in the directory used for the another driver and the path was set in
the compiling batch - it is the same as for the previous one. I'm not a
java programmer and have just basic knowledge and the compilation
errors in this case are not very informative to me. And I just wanted
to see "compilation succesful" message...

I read somewhere that it could be a servlet.jar issue, so I downloaded
it and put in the JAVA_HOME directory but it didn't help.

Any suggestions? It is probably very simple, but I could not find
anything suitable on the Groups and on the Web (or was too dumb to ask
the Right Question).

Thanks in advance,
Bart Golda

[error description starts]

[javac] Compiling 1 source file to C:\XXX\deploy.we
b\WEB-INF\classes
[javac] C:\XXX\src\com\mycorp\prod\prodQBE.
java:200: cannot access javax.servlet.jsp.PageContext
[javac] file javax\servlet\jsp\PageContext.class not found
[javac] rQuery.initialize(request, response, pageContext,
session, a
pplication, out, page);
[javac] ^
[javac] C:\XXX\src\com\mycorp\prod\prodQBE.
java:345: cannot access javax.servlet.jsp.JspWriter
[javac] file javax\servlet\jsp\JspWriter.class not found
[javac] out.println(sb.toString());
[javac] ^
[javac] Note: C:\XXX\src\com\mycorp\prod\prodQBE.java uses
unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors

[error description ends]
 
R

Rhino

bgolda said:
Hi,

I have an application (which uses Tomcat5 on Windows) and would like to
compile it (very much). There is an environment in which the previous
version compiles well, but the new one does not. The only change was
that the program can use another jdbc driver. The suitable jar was put
in the directory used for the another driver and the path was set in
the compiling batch - it is the same as for the previous one. I'm not a
java programmer and have just basic knowledge and the compilation
errors in this case are not very informative to me. And I just wanted
to see "compilation succesful" message...

I read somewhere that it could be a servlet.jar issue, so I downloaded
it and put in the JAVA_HOME directory but it didn't help.

Any suggestions? It is probably very simple, but I could not find
anything suitable on the Groups and on the Web (or was too dumb to ask
the Right Question).

Thanks in advance,
Bart Golda

[error description starts]

[javac] Compiling 1 source file to C:\XXX\deploy.we
b\WEB-INF\classes
[javac] C:\XXX\src\com\mycorp\prod\prodQBE.
java:200: cannot access javax.servlet.jsp.PageContext
[javac] file javax\servlet\jsp\PageContext.class not found
[javac] rQuery.initialize(request, response, pageContext,
session, a
pplication, out, page);
[javac] ^
[javac] C:\XXX\src\com\mycorp\prod\prodQBE.
java:345: cannot access javax.servlet.jsp.JspWriter
[javac] file javax\servlet\jsp\JspWriter.class not found
[javac] out.println(sb.toString());
[javac] ^
[javac] Note: C:\XXX\src\com\mycorp\prod\prodQBE.java uses
unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors

[error description ends]
The messages you are getting do _not_ suggest a problem with your JDBC
driver. It looks to me like there are bigger differences between the two
environments.

Are you trying to learn servlet programming? Is this servlet a sample that
you found online somewhere which you want to try running so that you can
understand how it works? If yes, you should consider a more systematic way
of learning servlet programming. A book or online tutorial would be a good
start, preferably one that comes with a variety of examples and guides you
through all of the steps involved in setting up a servlet environment and
installing the examples in the book/tutorial.

Or are you an administrator of some kind, trying to migrate a servlet that
works fine in an older version of Tomcat to a newer version of Tomcat? If
yes, you might have better luck if you posted a question to the Tomcat
mailing list, specifying the old and new versions of Tomcat along with your
error messages. Tomcat has apparently changed a lot in Version 5 (and 5.5.)
and this is causing considerable confusion for users of older versions of
Tomcat. You can subscribe to the Tomcat mailing lists at
http://tomcat.apache.org/lists.html. I think you'll want to subscribe to
tomcat-users, not tomcat-dev!
 
B

bgolda

Thank you for explanations. Yes, I'm a sort of administrator. A guy was
working on a system and now he is far and away, send his sources which
differ (I checked with windiff/winmerge) only with a few lines (added
postgresql driver and some minor changes in conditions, pure logic) and
disapperead or something like that :). The environment he used before
the small changes is the one I use, but his current environment could
differ. The guy cannot be contacted at the moment. I know, everyone has
his or hers own problems...

You are right, my way is not very good - I should look deeper into
documentation, but I thought it may be some simple issue with paths or
something that can be explained with one or two sentences (preferably
overnight :). Apparently, I was mistaken...

I will check the Tomcat-users lists, thanks.

Thank you,
Bart Golda
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top