Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 13th, 2005, 01:50 AM
Registered User
 
Join Date: Apr 2005
Location: hubli, karnataka, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shilpa
Default plz help me out...

hi friends,
 i am getting a problem while trying to compile a simple servlet.it shows an error :

C:\TOMCAT~1.0\WEBAPPS\RESUSE\WEB-INF\CLASSES>javac com/wrox/servlets/ExampleServ
let.java -classpath %CATALINA_HOME%\common\lib\servlet-api.jar
javac: invalid flag: 5.0\common\lib\servlet-api.jar
Usage: javac <options> <source files>
where possible options include:
  -g Generate all debugging info
  -g:none Generate no debugging info
  -g:{lines,vars,source} Generate only some debugging info
  -nowarn Generate no warnings
  -verbose Output messages about what the compiler is doing
  -deprecation Output source locations where deprecated APIs are us
ed
  -classpath <path> Specify where to find user class files
  -sourcepath <path> Specify where to find input source files
  -bootclasspath <path> Override location of bootstrap class files
  -extdirs <dirs> Override location of installed extensions
  -d <directory> Specify where to place generated class files
  -encoding <encoding> Specify character encoding used by source files
  -source <release> Provide source compatibility with specified release
  -target <release> Generate class files for specific VM version
  -help Print a synopsis of standard options


C:\TOMCAT~1.0\WEBAPPS\RESUSE\WEB-INF\CLASSES>
i am using Tomcat5.0 and jdk1.4 on winxp.
plz help me.
                                                        regards.
                                                             shilpa

shilpa
Reply With Quote
  #2 (permalink)  
Old April 13th, 2005, 06:03 AM
Registered User
 
Join Date: Apr 2005
Location: bangalore, karnatka, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to anandp
Default

regarding your problem i will suggest you to check your classpath and set it properly,i think the problem is in that only...
Bye

Anand Pritam
Software engineer
(bangalore)
Reply With Quote
  #3 (permalink)  
Old April 15th, 2005, 04:24 AM
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

the syntax of javac is like this:
javac <options> <source files>

first set the classpath, then give the source file

javac -classpath %CATALINA_HOME%\common\lib\servlet-api.jar com/wrox/servlets/ExampleServlet.java

hope this would work.

Pretty

Reply With Quote
  #4 (permalink)  
Old April 17th, 2005, 06:33 AM
Authorized User
 
Join Date: Apr 2005
Location: , , India.
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this out,

javac -classpath %CATALINA_HOME%\common\lib\servlet-api.jar com/wrox/servlets/ExampleServlet.java

 Instead of javac <options> <source files> format, you have used javac <source files> <options>. The above should resolve it.
Reply With Quote
  #5 (permalink)  
Old May 5th, 2005, 05:25 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

Opttion

  -d <directory> Specify where to place generated class files

will be useful when you work with package

Gokulan Ethiraj
Reply With Quote
  #6 (permalink)  
Old May 5th, 2005, 05:33 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

Developing Applications with Tomcat

Integrating a Sample Application with Tomcat
http://scitec.uwichill.edu.bb/cmp/on...SampleApp.html

Gokulan Ethiraj
Reply With Quote
  #7 (permalink)  
Old May 5th, 2005, 06:44 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

Please help me2run Blogroll ( I've downloaded it from SourceForge ) on http://localhost:8080/blogroll/roller/
( I know nothing about Java/JSP/Tomcat; just installed it. I wanna learn this, I'm a PHP developer. )
http://www.mediasworks.com/literature/

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
plz.....plz solve out my problem.... kethireddy435 ASP.NET 1.x and 2.0 Application Design 1 October 4th, 2007 12:56 PM
plz tell me flowertear Pro Visual Basic 2005 2 November 28th, 2006 08:30 PM
Plz help me ritesh_ch23 Pro JSP 1 July 18th, 2006 10:46 PM
Plz plz someone help beetle_jaipur CSS Cascading Style Sheets 3 March 26th, 2006 05:37 AM
Help me plz waqaraziz VB.NET 2002/2003 Basics 1 March 19th, 2005 04:40 PM



All times are GMT -4. The time now is 05:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.