This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes unable to view files in webapps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "unable to view files in webapps" Watch "unable to view files in webapps" New topic
Author

unable to view files in webapps

vinod prime
Greenhorn

Joined: Mar 07, 2011
Posts: 5
Actually i installed TOMCAT 6.0 first, and it worked well..............

after few days i uninstalled and re installed TOMCAT........ here the problem starts

my project consist of folders which has to placed in WEB APPS ....
i copied all folders in WEB APPS ..... when i log on TOMCAT MANAGER i can't able to see the folders... only the ROOT, MANAGER, DOC and HOST MANAGER is available.

i tried all versions of TOMCAT but no use.

please tell me what to do... it's my final year project
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
It sounds like Tomcat has decided that your added directories are not web applications. Possible reasons might be the directory structure missing important bits or not using correct conventions for naming.

Compare the directory structure, names and files with the apps which do work.

Suggestion: Drop the habit of arbitrary UPPER CASE use for emphasis - Java and of course Tomcat really care about case of directory and file names. For example if your directory had a WEB.XML file instead of a web.xml file it would be disqualified.

Bill
vinod prime
Greenhorn

Joined: Mar 07, 2011
Posts: 5
I checked only my first letter is capitalized...........
moreover it was working fine when i installed the tomcat 6.0 for first time with the same naming convention....

can you tell me the settings to be done in ENVIRONMENT VARIABLES

my java folder is present in C:\Program files\Java
my Tomcat folder is present in C:\Program files\Java\Tomcat

tell me the settings accordingly
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

Here we go again....

A web server is not a file server

I don't care how much URLs look like filename paths. They aren't. It's up to the web application to determine what comes get back when a client submits a URL The fact that most web servers will default to resolving the request by rummaging around in the app's local resources if there's no better alternative supplied does not make a web server a file server.

Java webapps have to conform to certain basic minimum requirements. One of these is that a WEB-INF/web.xml file is required to be provided (J2EE) or synthesized (JEE). It doesn't sound like you met those minimum requirements.

Also, just because Windows ignores upper/lower case in filenames doesn't mean that Java will.


Customer surveys are for companies who didn't pay proper attention to begin with.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Why do you think environment settings are involved in this problem?

If you can see ANY of the Tomcat applications like doc then Tomcat is running with existing settings.

Did you install Tomcat as a "service" or an application?

How are you starting and stopping Tomcat?

Why do you think the location of your project Java source code files is important? Tomcat will not compile servlets for you.

You might also tell us the Operating System and Java version just to give a complete picture.

Bill
vinod prime
Greenhorn

Joined: Mar 07, 2011
Posts: 5
TO TIM


how to enable JEE or J2EE in web.xml ?
vinod prime
Greenhorn

Joined: Mar 07, 2011
Posts: 5
TO WILLIAM

i installed from apache.org Tomcat 6.20 ( 32 bit Windows installer)

OS : WINDOWS XP

JAVA VERSION: jdk 1.6_24

I am using TOMCAT to access a webpage.... nearly 7 folders are there i have to copy it in WEB APPS....
after if i log on to tomcat manager... i have to see the files which are copied in WEB APPS folder... Then if i click one (say \XQuery ) it will display the web page and i have to do some stuffs in filling details that's secondary. I need the files to be displayed this is my first step....
This is how my project works

HOW I START is GO to start -> TOMCAT 6.0 -> monitor tomcat -> Start(green play icon) -> mozilla -> local host: 8080
the stopping is Right click my tomcat icon and click STOP

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
I have only used the Tomcat Manager App to look at the status of running applications.

How is this display of files through the Manager supposed to work??

Display of a list of files in a Tomcat directory can be enabled in web.xml by setting "listings" true. I normally leave it false like this:



Bill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: unable to view files in webapps
 
Similar Threads
HTTP Status 404 error in tomcat
Configuring Tomcat5.5 in Eclipse3.6
Changing the default Page in Tomcat
HFSJ using Eclipse
Referencing images in a servlet