• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java class in JSP doubt

 
dhwani mathur
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all

i am trying to work in jsp's for that i am using
tomcat server and dreamweaver IDE
i have create a jsp now i want to call a

class like calculate.java which i have
designed in Eclipse IDE and use its static methods

till now i am executing my jsp on local host
in a web browser for that

i save my jsp
in webapps folder of tomcat 6.x which is in E:drive
in the E drive itself i have Eclipse also so now how can call my java
class in page tag of JSP in dreamweaver

<%@page import="java.util.Date,Business.calculate"%>?
what path i must specify here for calculate class?
or where i must save my java class?


Any help on above will be realy great thnx in advance

Dhwani:>Swimmers never weep.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(1)Create CATALINA_HOME/webapp/YOUR_APP/WEB-INF/classes/Business folder. Copy calculate.class in to the folder. This should solve your problem.
(2)Avoid using multiple IDE. Use Eclipse for JSP and Class both. Attached any Tomcat Plug-in to Eclipse, it will make your life easier.
 
dhwani mathur
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chetan

Thanks for your help and advice i will try not to use many IDE's
but i dont have idea on

how to use Tomcat plug ins
with Eclipse can you ellaborate and explain a bit
also how to build JSP in eclipse?........?

it will be realy great...........
on more doubt you said me to create
CATALINA_HOME/webapp/YOUR_APP/WEB-INF/classes/Business folder
but i am i doubt where i must create this folder ?

in Tomcat 6.0
folder where i already have

Tomcat 6.0/work/catalina/localhost/org/apache/jsp.class files

any help on above will be grt
thnx in advance

Dhwani>Swimmers never weep.
 
P. Jain
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to copy the jar file and put it in the plugins folder in the eclipse.

Go the place where you have installed eclipse and in eclipse you will find plugins folder put the jar in that folder.

Hope this solve your problem.

Follow Chetan's advice as it is good for you.
 
dhwani mathur
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi thr

Thanks Prince Jain
i will try to do the same....!!!




Dhwani:>Swimmers never weep.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dhwani mathur:


how to use Tomcat plug ins
with Eclipse can you ellaborate and explain a bit
also how to build JSP in eclipse?........?



Here you go.. http://www.eclipsetotale.com/tomcatPlugin.html


CATALINA_HOME/webapp/YOUR_APP/WEB-INF/classes/Business folder
but i am i doubt where i must create this folder ?


CATALINA_HOME is an environment variable being set. It generally points to the folder/drive where you have installed Tomcat in the local machine.;

In tomcat, it will generally be TOMCAT_HOME as well. Just you need to check that out.


in Tomcat 6.0
folder where i already have

Tomcat 6.0/work/catalina/localhost/org/apache/jsp.class files


Whatever comes inside the "work" folder is created by Tomcat in the runtime and you should NOT depend on it. You may just check by editing the files in that location and as such it may help like a hot deployment.
[ January 07, 2008: Message edited by: Raghavan Muthu ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic