Solved

localhost:8080 issue...

Posted on 2012-03-27
9
1,641 Views
Last Modified: 2012-08-14
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
Comment
Question by:Mike Eghtebas
  • 6
  • 3
9 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 37773715
>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
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 37773792
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
 
LVL 47

Expert Comment

by:for_yan
ID: 37773814
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
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 37773818
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 47

Expert Comment

by:for_yan
ID: 37773821
classes should be in
MyAppFolder/WEB-INF/classes
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37773829
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
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 37773835
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
 
LVL 47

Expert Comment

by:for_yan
ID: 37773871
check this about folder structure of the web application:

http://www.servletworld.com/servlet-tutorials/web-application-directory-structure.html
0
 
LVL 33

Author Closing Comment

by:Mike Eghtebas
ID: 37773882
thank you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
My project did see openJDK that I installed. What could be the problem 7 122
maven example error 3 52
compre toata in where clue oracle 4 55
Arrays.asList  VS  ArrayList 4 44
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now