Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to call a jsp page from another jsp page in struts

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
How to call a jsp page from another jsp page in struts. basically we dont need to write any action class we will specify the following action element in struts-config.xml

<action
path="/home"
parameter="/index.jsp"
type="org.apache.struts.actions.ForwardAction"
scope="request"
validate="false">
</action>
and in jsp page we will write code with /home... can anyone provide the code to be written in jsp

Thanks in advance
saiprasanna
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just create a link:

<html:link action="/home">Click here</html:link>
 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Merrill
but we are not using struts-html taglibs can you specify in normatl html format.

Thanks in advance
saiprasanna
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am afraid that i understand your question or not..you can use <a href="html page name" >click here</a>
 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi padma
what you specified is correct in normal situation i.e when we are using MVC 1 architecture.but in struts every request should be specified in struts-config.xml(i.e controller)
regards
saiprasanna
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<a href="<%=request.getContextPath()%>/home.do">Click</a>
 
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Why dont you try

<a href="./home.do">Click<a>

Regards
[ August 10, 2006: Message edited by: A Kumar ]
 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dom & Kumar
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic