• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

import attribute and directory

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a question on using the page directive attribute "import", and the directory that contains the imported package. Should I put those packages to be imported in the classes directory? If not, where should I put them?
Thanks.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

IMO, you can put them in the classes dir. Also, if you put
them in the classes directory you still need to follow the
package structure, if you have one.
You could also put them in the lib dir if they are already
in a jar file.
Any one else who can confirm what I said........
regds.
- satya
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My idea is that when a JSP page is translated into a servlet, that servlet goes into classes directory like other regular servlets. So, the regular servlets import packages from the classes directory. So does the JSP files?
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

that servlet goes into classes
directory like other regular servlets.

This may not be really true. It depends on the app server implementation, I would guess.
Under Tomcat, the generatedJavaServlet.[java, class] files
are located under the TOMCAT_HOME/work/localhost_8080???/
directory.
regds.
- satya
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, where should I place the com packages for JSP in tomcat?
 
Randall Twede
Ranch Hand
Posts: 4363
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would think either classes or the same folder as the .jsp
One or the other should work.
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Randal, Satya.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic