JSP Class / Java

Panda On Smack

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,030
Hey

Im editing a site for a mate, its JSP. There is a WEB-INF folder with class and java files in it. Ive edited the java file to accomodate some extra things but on uploading they dont seem to take effect. Do i need to somehow compile it which creates a new class file? Both files are named the same etc.

Thanks
 

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
you'll need to restart teh server

it may have a web admin pannel to do this

EDIT: just re-read your post

yes, you need to recompile the java file into a class file with the jde and the class path set to the location of the servlet classes
 

JingleBells

FH is my second home
Joined
Mar 25, 2004
Messages
2,224
You will want the J2EE JDK, depending on your application server (i.e.:Tomcat, JBoss, JRun etc...) you may want to download the J2EE bundle which comes with J2SE 1.4.2 rather that J2SE 5.0 (scroll down the page), consult docs of server and see what java version is installed for clarification.
You may need to use the "touch" unix tool to "touch" the web.xml file in WEB-INF/ once you've compiled all the classes in the WEB-INF directory, this tells the server that the files have changed and it reloads the web-app. I have to do this with my servlets at work using Jrun 4 :puke:
If you're in windows (like me) then you can get a version of "touch" from here: http://gnuwin32.sourceforge.net/packages/coreutils.htm
 

Panda On Smack

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,030
Its Tomcat, i just need to update 2 of the class files that already exist

i think i might need the servlet classes, will have a google now

thanks guys
 

JingleBells

FH is my second home
Joined
Mar 25, 2004
Messages
2,224
No there shouldn't be, SDK (Software Development Kit) is more of a generic term whereas JDK (Java Development Kit) is java specific. In other words the JDK is a type of SDK.
 

phlash

Fledgling Freddie
Joined
Dec 24, 2003
Messages
195
You've probably sorted it by now, but you should be able to use the JDK that tomcat is running with - since it has to be able to compile JSPs into .java and then .class files before it can run them.. so it has all the tools you need to recompile the Java servlet code (which you have been editing), in particular the servlet API somewhere in <tomecat home>/common/lib if memory serves.
 

Panda On Smack

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,030
cheers guys, i only had access to ftp so i downloaded the web-inf folder to get to the java stuff.

All ok now, just used javac with the version command to compile my changes and all works ok.
 

Users who are viewing this thread

Top Bottom