• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1695
  • Last Modified:

localhost:8080 issue...

I have trouble using  http:/localhost:8080/FolderName/SomeFile.html  or
http:/localhost:8080/FolderName/SomeFile.jsp

My environmental setings are:

CATALINA_HOME
C:\Program Files\Apache Software Foundation\Tomcat 5.0\

CLASSPATH
C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\;C:\j2sdk1.4.2_01\bin

JAVA_HOME
C:\j2sdk1.4.2_01\bin

PATH   (there is another path I couldn't edit. But javac works okay)
C:\j2sdk1.4.2_01\bin

Question: What kind of changes I can apply to either my settings or to my url to view the page?

Thank you.
0
Mike Eghtebas
Asked:
Mike Eghtebas
  • 6
  • 3
1 Solution
 
for_yanCommented:
>I have trouble using ...

what that means ? what do you observe?

did you start Tomcat?

if you did what do you see if you just typed

 http://localhost:8080
 ?
0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
In the process of answering your question, I sort of figured out what I was doing wrong. The following url works:

http://localhost:8080/jsp-examples/cal/cal2.jsp

If I may, I like to aske some questions to solidify my understanding of the process. Knowing there are usually two types of files for jsp pages (.jsp and class). Please comment in the following:

1) jsp files could be put into any folder we like to name so long as in it under
...Tomcat 5.0\webapps    folder.   if the folder is myProjectFolder, then
...Tomcat 5.0\webapps\myProjectFolder\myproject.jsp

and later, to be called as    http://localhost:8080/myProjectFolder\myproject.jsp


2) the classes are coppied to either:

       ...Tomcat 5.0\bin   or Tomcat 5.0\common\classes\myProjectFolder

I appreciate some comment on these two items.

Thank you,

Mike
0
 
for_yanCommented:
jsp can inded be put in any folder under webapps/MyAppFolder
and they can be accessed as


http://localhost:8080/MyAppFolder/any_path/myproject.jsp

Not so with classes
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
My be classes could be anywhere so long as we have a proper link to it in our jsp file when we are trying to instantiate an object of theat class. Any comment on this one?
0
 
for_yanCommented:
classes should be in
MyAppFolder/WEB-INF/classes
0
 
for_yanCommented:
Then the name of the servlet which you'll us in the action of your form should be mapped to the name of the class of the servlet in web.xml file aslo sitting in WEB-INF
0
 
for_yanCommented:
No classes should be in
MyAppFolder/WEB-INF/classes

and this folder is the root of your classptah, so that if you hacve pacjages - you should havecorresponding  folders under MyAppFolder/WEB-INF/classes and in those folder corresponding classe, just like in java apllications
0
 
for_yanCommented:
check this about folder structure of the web application:

http://www.servletworld.com/servlet-tutorials/web-application-directory-structure.html
0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now