• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

I Can not access my welcome file, frame.jsp?

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have developed a struts based application, using JDeveloper.
I have made the war file and deplyed it to my tomcat (4.1.31) and it is working just fine. But when I deploy it to another tomcat (4.1.x), I can not access my welcome file which is pages/frame.jsp.

Thanks for any comment
 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried putting the file directly in WEB-INF instead of the subfolder page ?

Also are you saying the file could not be reached from your index.jsp file ? If yes, alternatively you may try putting this in index.jsp:

"welcome" is a global forward that you insert into your struts-config.xml file. It forwards to /page/frame.jsp



Originally posted by Sean Mohseni:
Hi,

I have developed a struts based application, using JDeveloper.
I have made the war file and deplyed it to my tomcat (4.1.31) and it is working just fine. But when I deploy it to another tomcat (4.1.x), I can not access my welcome file which is pages/frame.jsp.

Thanks for any comment

 
Sean Hetfield
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basically I do not have any index.jsp file. The first file in my application to be accessed is /pages/frame.jsp.
I do have:
<welcome-file-list>
<welcome-file>pages/frame.jsp</welcome-file>
</welcome-file-list>
in web.xml file under WEB-INF and

<global-forwards>
<forward name="frame" path="/pages/frame.jsp"/>
</global-forwards>
in struts-config.xml and I wonder why it is behaving differently under two different tomcat (Second tomcat is the university tomcat that have to present my project on) ?

 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was always under the impression that a welcome page could not be placed in the WEB-INF folder because it is a page that the user has to access directly. I could be wrong, but try taking it out of your WEB-INF folder anyway and see what happens.
 
Sean Hetfield
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My welcome page is not in my WEB-INF, but it is under pages folder, and pages folder and WEB-INF are both under my main root which itself is under webapps
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, my misinterpretation.

Now that I think of it, I've never seen a welcome page NOT located in the root directory before. There may be a good reason for that.
 
Sean Hetfield
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, my welcome file is not in root, but first of all this program working on one tomcat and it does not work on the other.
Also in web.xml and struts-config.xml, I have defined the path for my welcome page as well.
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sean Mohseni:
Yes, my welcome file is not in root, but first of all this program working on one tomcat and it does not work on the other.
Also in web.xml and struts-config.xml, I have defined the path for my welcome page as well.



Your struts-config isn't what sets up the welcome page by the way.

Could you TRY placing your welcome page in the root directory to see if it will work in both environments?
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops, what was I thinking. Marc is right. I should have said "root" rather than "WEB-INF".

As the user needs to access the page, it must be at the root folder as far as I can understand as I've never place files like it elsewhere before.

Originally posted by Ken Loh:
Have you tried putting the file directly in WEB-INF instead of the subfolder page ?


 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marc Peabody:
I was always under the impression that a welcome page could not be placed in the WEB-INF folder because it is a page that the user has to access directly. I could be wrong, but try taking it out of your WEB-INF folder anyway and see what happens.


welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

as soon as web app is the file what ever may be case static or dynam,ic gets loaded automatically nio need to user to go to that page if u congired the code in web.xml i had tested in weblogic 8.1 and behaviour is same among the other servers too
 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ken Loh:
Oops, what was I thinking. Marc is right. I should have said "root" rather than "WEB-INF".

As the user needs to access the page, it must be at the root folder as far as I can understand as I've never place files like it elsewhere before.



as u said if u places all the files in ur root directory if ur prjts extends in some 900 pages or more u will be in CHAOS

so its really good convention to use the dif folder and be aware of giving links ....
Coz it may give u trouble some times
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The original posting wasn't about organization. It purely was about accessibility. Therefore, the answers were in line according to that to keep the simplicity.

Hence, I'd like to reiterate: put only those files that you want people to access directly at your module's "root". For those that you want to allow access only through a framework like Struts, put it in a subfolder.

In many case, the root contains only a few *.jsp files. Not uncommon that you find only index.jsp where users can logon. After a successful logon, the struts framework forwards to pages normally under some subfolders for reasons including: denying direct access (like typing the URL of a jsp at a browser); and organization that Mr Ganamukala rightfully stresses.

Originally posted by Gowtham Ganamukala:


as u said if u places all the files in ur root directory if ur prjts extends in some 900 pages or more u will be in CHAOS

so its really good convention to use the dif folder and be aware of giving links ....
Coz it may give u trouble some times

 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic