Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
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
Ron McLeod
Paul Clapham
Devaka Cooray
Tim Cooke
Sheriffs:
Rob Spoor
Liutauras Vilda
paul wheaton
Saloon Keepers:
Tim Holloway
Tim Moores
Mikalai Zaikin
Carey Brown
Piet Souris
Bartenders:
Stephan van Hulst
Forum:
Struts
Use welcome-file-list to run struts action?
A Harry
Ranch Hand
Posts: 124
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can I the welcome-file-list element in web.xml to run the startup
struts
action of my application?
Currently to start my app up the url is
http://localhost:8080/PRD/PRD.do
but would prefer something like
http://localhost:8080/PRD
or
http://localhost:8080/PRD/main.jsp
If I have to use a
jsp
file to redirect/forward to it what would this file look like?
many thans
Junilu Lacar
Sheriff
Posts: 17665
300
I like...
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can define PRD.do as a welcome file and that should allow you to enter
http://localhost:8080/PRD
to bring up your application
A Harry
Ranch Hand
Posts: 124
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks for replying - in my web.xm file I've put -
<welcome-file-list>
<welcome-file>PRD.do</welcome-file>
</welcome-file-list>
when i type in this url
http://localhost:8080/PRD/
now I get a directory listing for the PRD directory
What am I doing wrong?
thanks
Mark Jones
Greenhorn
Posts: 4
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Here is what I would do:
1) Create a 'welcome.jsp' which simply does a redirect to your struts alias. For example:
<html>
<body>
<%response.sendRedirect("home.do");%>
</body>
</html>
2) Add the 'welcome.jsp' to your welcome-list. For example:
<welcome-file-list>
<welcome-file>welcome.jsp</welcome-file>
</welcome-file-list>
This setup works for me!
-Chughead
A Harry
Ranch Hand
Posts: 124
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
cheers CH, that's exactly what I wanted it to do!
A Harry
Ranch Hand
Posts: 124
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
ah here we go & theres alway a gotcha - works fine on
Tomcat
5 but not on Weblogic 8.1
Does anything ever get any easier in this god damm environment? - why does everything have to be such a battle!
A Harry
Ranch Hand
Posts: 124
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
funny though putting this line in the welcome.jsp file
<meta HTTP-EQUIV="REFRESH" content="0; url=PRD.do">
& it works fine on both servers!
the weblogic error was -
<2004-08-13 14:25:20,640> ERROR - Invalid path /jsp/PRD was requested
Why? who knows, who cares just as long as it works!
Everybody's invited. Even this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How can i change the url of struts?
Calling .do directly
Basic JSP problem
Dobut in Realm Authentication
webapp not on 8080 and html:base
More...