Previous Thread
Next Thread
Print Thread
Rate Thread
#18846 05/23/04 11:21 AM
Joined: Oct 2003
Posts: 59
Junior Member
OP Offline
Junior Member
Joined: Oct 2003
Posts: 59
i have a strange probelm.... jsp files that i delete from the public_html folder,are stll visible or can be run when the server runs.
eg: i deleted bean.jsp ,but when i go to localhost:8000/bean.jsp , it still runs !!!
i am coming across this problem a nmber of times.

I would also like to know where the beans,classes should be stored for j2ee ( j2ee/lib/classes/ ? )


"it is the question ...that drives the answer..."
Keep Clicking,
Bosky
#18847 05/23/04 06:32 PM
Joined: Mar 2002
Posts: 1,136
P
UGN Elite Poster
Offline
UGN Elite Poster
P
Joined: Mar 2002
Posts: 1,136
You might know that a JSP gets compiled into a servlet, it's just a convenient way to write a servlet with some HTML markup. The first time you call the page, it gets compiled into a servlet class, and like any class, is loaded by the class loader. The J2EE server stores the class in memory until you undeploy the web application. Next time you restart the J2EE server, your file won't show up.

Bean classes should be stored on a per application basis. Write your bean classes, then put them in a jar file, and stick that in the $app/WEB-INF/lib directory. The only time you want jar files in j2ee/lib is when they store something that should be used for the entire server, such as a JDBC connector or JMS implementation. If certain classes are to be used only by an application, they should be confined to that particular application's lib directory.

#18848 05/27/04 10:24 PM
Joined: Oct 2003
Posts: 59
Junior Member
OP Offline
Junior Member
Joined: Oct 2003
Posts: 59


"it is the question ...that drives the answer..."
Keep Clicking,
Bosky
#18849 05/27/04 10:26 PM
Joined: Oct 2003
Posts: 59
Junior Member
OP Offline
Junior Member
Joined: Oct 2003
Posts: 59
question ...

i have j2ee, do i need tomcat ?i hear that j2ee has a inbuilt tomcat,i havnt been able to access it so far.S o i downloaded tomcat 5.0.24 and extracted the zip file.hers what else i did

-set path for java_home
-set catalina_home

do i need to set a classpath variable to a servlet-api.jar or jsp-api.jar from \common\lib

-localhost:8080\ gives nothing

-bin\tomcat5 gives nothing when run
-bin\tomcat5w says not a batch or service
-bin\startup show this

Using CATALINA_BASE: d:\tomcat\jakarta-tomcat-5.0.24
Using CATALINA_HOME: d:\tomcat\jakarta-tomcat-5.0.24
Using CATALINA_TMPDIR: d:\tomcat\jakarta-tomcat-5.0.24\temp
Using JAVA_HOME: d:\java

-and running bin\startup.bat opens a new window with text that scrolls fast and then just closes !

what did i do ....... what Do i do ?! frown


PS:by the way the add quick reply or full reply button did not work,it took me to http://www.UnderGroundNews.com/boards .I had to click on the link on the bottom of the page,saying post reply !


"it is the question ...that drives the answer..."
Keep Clicking,
Bosky
#18850 05/27/04 11:04 PM
Joined: Feb 2002
Posts: 7,203
Likes: 11
Community Owner
Offline
Community Owner
Joined: Feb 2002
Posts: 7,203
Likes: 11
/boards/ is unsupported. Only responses sent through the main board are supported. /boards/ is stricly a search engine mirror.


Donate to UGN Security here.
UGN Security, Back of the Web, and VNC Web Services Owner
#18851 05/28/04 01:50 AM
Joined: Mar 2002
Posts: 1,136
P
UGN Elite Poster
Offline
UGN Elite Poster
P
Joined: Mar 2002
Posts: 1,136
Tomcat is just a servlet and JSP container. It's also the reference implementation of the Sun Servlet and JSP standards. If you want do use any other parts of J2EE, such as EJB or JDNI, you need a more comprehensive container. [url=http://www.jboss.org]JBoss[/jboss] is the one I'd recommend. It's open source, and a great product. But it seems you just want to do servlet/jsp stuff, so Tomcat will be fine.

As far as running Tomcat, you just extract it into whatever directory you want, set up the environment variables, and start it up. That's all covered in the documentation.

Here's the How-to: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/RUNNING.txt

Here's a pretty good tutorial, that covers the installation, and some basic servlet coding:
http://www.coreservlets.com/Apache-Tomcat-Tutorial/

#18852 05/28/04 03:28 PM
Joined: Oct 2003
Posts: 59
Junior Member
OP Offline
Junior Member
Joined: Oct 2003
Posts: 59
does having zone alarm or norton anti-vir hinder the functioning of the tomcat server ? localhost:8080/till shows "page cannot be displayed " message !


"it is the question ...that drives the answer..."
Keep Clicking,
Bosky
#18853 05/29/04 06:56 AM
Joined: Mar 2002
Posts: 1,136
P
UGN Elite Poster
Offline
UGN Elite Poster
P
Joined: Mar 2002
Posts: 1,136
I haven't used any of those. But if you've got a firewall running (which I think ZA is), then you have to allow access to port 8080.

#18854 06/07/04 09:09 PM
Joined: Oct 2003
Posts: 59
Junior Member
OP Offline
Junior Member
Joined: Oct 2003
Posts: 59
one more Q,

wher do i put the classes or beans for j2ee ? any idea ?

thnx


"it is the question ...that drives the answer..."
Keep Clicking,
Bosky
#18855 06/08/04 09:32 AM
Joined: Mar 2002
Posts: 1,136
P
UGN Elite Poster
Offline
UGN Elite Poster
P
Joined: Mar 2002
Posts: 1,136
classes go in /WEB-INF/lib, and that's relative to the web application. You can have two forms of a web app - a war file or an exploded archive. A war file is just a jar with a .war extension. You have a WEB-INF directory in it, into which the web.xml file goes, and a WEB-INF/lib, where you put any compiled classes or jar files. Compiled servlet classes go into WEB-INF/classes

#18856 06/09/04 07:37 AM
Joined: Oct 2003
Posts: 59
Junior Member
OP Offline
Junior Member
Joined: Oct 2003
Posts: 59
when double click on startup.bat in windows explorer,it just closes quickly after opening.
i went to the services and manually started tomcat.
But,when i go to http://localhost:80/ ,it says page cannot be found !

- should tomcat and j2ee have the same port numbers,j2ee uses 8000 and i made tomcat use 80 .
- Do i need j2ee to be runnning along with tomcat, i tried it ,it still doesnt show anything
- uncommented the <Context path="" docBase="ROOT" debug="0"> line in server.xml
-added a <DefaultContext reloadable="true"/> before the context path line,as in the manuals.


the index.jsp works when i open it with ie 5.0 ,but not at localhost:80

When i type install~dir/bin/catalina run
,the folwing message comes

[ERROR] Digester - -Begin event threw exception <sun.misc.InvalidJarIndexExce
on: Invalid index!>sun.misc.InvalidJarIndexException: Invalid index!
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:594)
at sun.misc.URLClassPath.getResource(URLClassPath.java:134)
at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.apache.catalina.loader.StandardClassLoader.findClass(StandardC
sLoader.java:621)
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardC
sLoader.java:958)
at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardC
sLoader.java:857)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRul
ava:253)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:12

at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown S
ce)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(U
own Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartEle
t(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentCont
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Catalina.start: sun.misc.InvalidJarIndexException: Invalid index!
sun.misc.InvalidJarIndexException: Invalid index!
at org.apache.commons.digester.Digester.createSAXException(Digester.j
:2540)
at org.apache.commons.digester.Digester.createSAXException(Digester.j
:2566)
at org.apache.commons.digester.Digester.startElement(Digester.java:12

at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown S
ce)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(U
own Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartEle
t(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentCont
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)


Ive beenstruggling with this for ...... SOO LLONG.


"it is the question ...that drives the answer..."
Keep Clicking,
Bosky
#18857 06/11/04 12:33 PM
Joined: Oct 2003
Posts: 59
Junior Member
OP Offline
Junior Member
Joined: Oct 2003
Posts: 59
you wont believe it !!!!
after being slaughtered thru various manuals, cionfiguration faqs, downloading four verions of tomcat ,etc unsuccesfully ... i fianally stumbled across line #75 of server.xl under tomcat~-dir/conf/ which said that ...


Code
 * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
           later, and put the JAR files into "$JAVA_HOME/jre/lib/ext". 
and all the while i had jdk 1.3 !!!!
i immediately installed jdk 1.5 and voila ...it worked without any glitches ! hardly took 5 minutes for something ive been trying for one WHOLE month!

thnx pergusu ... and every1 else for letting me figure out this 1 myself ... the hard way . smile


"it is the question ...that drives the answer..."
Keep Clicking,
Bosky

Link Copied to Clipboard
Member Spotlight
Phatal
Phatal
Houston, TX
Posts: 298
Joined: April 2004
Forum Statistics
Forums41
Topics33,840
Posts68,858
Average Daily Posts1
Members2,176
Most Online3,253
Jan 13th, 2020
Latest Postings
Where and how do you torrent?
by danni75 - 03/01/24 05:58 AM
Animation,
by JohanKaariainen - 08/15/19 01:18 AM
Blackbeard.....
by Gremelin - 10/03/18 07:02 PM
my old account still exists!
by Crime - 08/10/18 02:47 PM
Okay WTF?
by HenryMiring - 09/27/17 01:45 AM
The History Thread...
by Gremelin - 08/11/17 12:11 PM
My friend NEEDS your HELP!
by Lena01 - 07/21/17 12:06 AM
I'm having fun with this guy.
by gabithompson730 - 07/20/17 01:50 AM
I want to upgrade my phone
by gabithompson730 - 07/20/17 01:49 AM
Doom 3
by Cyrez - 09/11/14 08:58 PM
Amazon Gift Card Generator/KeyGen?te
by Gecko666 - 08/22/14 09:21 AM
AIM scene 99-03
by lavos - 09/02/13 08:06 AM
Planetside 2
by Crime - 03/04/13 07:10 AM
Beta Testers Wanted
by Crime - 03/04/13 06:55 AM
Hello Everyone
by Gremelin - 02/12/12 06:01 PM
Tracfone ESN Generator
by Zanvin Green - 01/18/12 01:31 PM
Python 3 issue
by Testing - 12/17/11 09:28 PM
tracfone airtime
by Drache86 - 07/30/11 03:37 AM
Backdoors and the Infinite
by ZeroCoolStar - 07/10/11 03:52 AM
HackThisZIne #12 Releaseed!
by Pipat2 - 04/28/11 09:20 PM
gang wars? l33t-wars?
by Gremelin - 04/28/11 05:56 AM
Consolidate Forums
by diggin2deep - 04/21/11 10:02 AM
LAN Hacking Noob
by Gremelin - 03/12/11 12:42 AM
Top Posters
UGN Security 41,392
Gremelin 7,203
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Likes Received
Ghost 2
Cyrez 1
Girlie 1
unreal 1
Crime 1
Powered by UBB.threads™ PHP Forum Software 7.7.5