• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to import  RSS feed

 
deepak carter
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I am running an example of third cgapter of Head First Servlet and JSP

In that i have created two directories like

C:\Tomcat 6.0\webapps\Beer-v1\WEB-INF\classes\com\example\web

which contains while called BeerSelect.java

and second

C:\Tomcat 6.0\webapps\Beer-v1\WEB-INF\classes\com\example\model
which contains file called BeerExpert.java

now when i am import the package Model one in BeerSelect class which is in WEB package its showing an erroe that package doesnot exist




Can anyone of you plaese help me

 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you include C:\Tomcat 6.0\webapps\Beer-v1\WEB-INF\classes in your classpath ?
 
deepak carter
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
let me try
 
deepak carter
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i went to enviromental vaiable and set the path which we have mentioned but no luck...same error
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you compiling it? If you're doing it from the command line, what folder are you in and what's the exact command you're running?
 
deepak carter
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any solution???
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deepak carter wrote:any solution???

You expect an answer within 10 minutes? EaseUp.
 
deepak carter
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok


After writing the import com.example.model.*; in BeerSelect class which is in com.example.web package

i am compiling like this..

C:\Tomcat 6.0\webapps\Beer-v1\WEB-INF\classes>javac com/example/web/BeerSelect.java


Its showing

package com.example.model does not exist
 
deepak carter
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any solution to the above problem?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I still don't see any evidence that you've set your classpath correctly. Try this:

javac -cp .;C:\Tomcat 6.0\webapps\Beer-v1\WEB-INF\classes com/example/web/BeerSelect.java
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!