Your browser does not seem to support CSS. If images appear below, please disregard them.
It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.
Previous Thread
Next Thread
Print Thread
Rate This Thread
#18846 - 05/23/04 06:21 PM jsp - j2ee problem  
Joined: Oct 2003
Posts: 59
bosky101 Offline
Junior Member
bosky101  Offline
Junior Member

Joined: Oct 2003
Posts: 59
india
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
Sponsored Links
#18847 - 05/24/04 01:32 AM Re: jsp - j2ee problem  
Joined: Mar 2002
Posts: 1,136
pergesu Offline
UGN Elite Poster
pergesu  Offline
UGN Elite Poster

Joined: Mar 2002
Posts: 1,136
Pimpin the Colorizzle
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/28/04 05:24 AM Re: jsp - j2ee problem  
Joined: Oct 2003
Posts: 59
bosky101 Offline
Junior Member
bosky101  Offline
Junior Member

Joined: Oct 2003
Posts: 59
india


"it is the question ...that drives the answer..."
Keep Clicking,
Bosky
#18849 - 05/28/04 05:26 AM Re: jsp - j2ee problem  
Joined: Oct 2003
Posts: 59
bosky101 Offline
Junior Member
bosky101  Offline
Junior Member

Joined: Oct 2003
Posts: 59
india
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 ?!


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/28/04 06:04 AM Re: jsp - j2ee problem  
Joined: Feb 2002
Posts: 7,195
Gremelin Offline
Community Owner
Gremelin  Offline

Community Owner

Joined: Feb 2002
Posts: 7,195
Likes: 3
Portland, OR; USA
/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
Sponsored Links
#18851 - 05/28/04 08:50 AM Re: jsp - j2ee problem  
Joined: Mar 2002
Posts: 1,136
pergesu Offline
UGN Elite Poster
pergesu  Offline
UGN Elite Poster

Joined: Mar 2002
Posts: 1,136
Pimpin the Colorizzle
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 10:28 PM Re: jsp - j2ee problem  
Joined: Oct 2003
Posts: 59
bosky101 Offline
Junior Member
bosky101  Offline
Junior Member

Joined: Oct 2003
Posts: 59
india
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 01:56 PM Re: jsp - j2ee problem  
Joined: Mar 2002
Posts: 1,136
pergesu Offline
UGN Elite Poster
pergesu  Offline
UGN Elite Poster

Joined: Mar 2002
Posts: 1,136
Pimpin the Colorizzle
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/08/04 04:09 AM Re: jsp - j2ee problem  
Joined: Oct 2003
Posts: 59
bosky101 Offline
Junior Member
bosky101  Offline
Junior Member

Joined: Oct 2003
Posts: 59
india
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 04:32 PM Re: jsp - j2ee problem  
Joined: Mar 2002
Posts: 1,136
pergesu Offline
UGN Elite Poster
pergesu  Offline
UGN Elite Poster

Joined: Mar 2002
Posts: 1,136
Pimpin the Colorizzle
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

Sponsored Links
#18856 - 06/09/04 02:37 PM Re: jsp - j2ee problem  
Joined: Oct 2003
Posts: 59
bosky101 Offline
Junior Member
bosky101  Offline
Junior Member

Joined: Oct 2003
Posts: 59
india
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 line in server.xml
-added a 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 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 07:33 PM Re: jsp - j2ee problem  
Joined: Oct 2003
Posts: 59
bosky101 Offline
Junior Member
bosky101  Offline
Junior Member

Joined: Oct 2003
Posts: 59
india
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 .


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

Member Spotlight
Crime
Crime
SC, usa
Posts: 506
Joined: March 2002
Show All Member Profiles 
Forum Statistics
Forums45
Topics47,470
Posts82,640
Average Daily Posts7
Members2,159
Most Online1,567
Apr 25th, 2010
Latest Postings
Top Posters(All Time)
UGN Security 40,634
Gremelin 7,195
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Liked Users (All Time)
§intå× Likes: 1
Cold Sunn Likes: 1
Crime Likes: 1
Cyrez Likes: 1
Ghost Likes: 1
Gremelin Likes: 4
Ice Likes: 1
unreal Likes: 1
Top Liked Users (30 Days)
No Data Found
Powered by UBB.threads™ PHP Forum Software 7.6.0
(Snapshot build 20160902)