• 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
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How to redirect URL to external page?

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

I would like to redirect a menu on web page such as the About menu which essentially points to http://abc.com/reporting-school/about.

The content of $HOME/tomcatProd/webapps/reporting-school/WEB-INF/jsps/about.jsp is as follows:



However, I would like to redirect this About menu to another external website such as http://hobbies.com/about instead but has failed to do so with
the following example:



I am not familiar with JSP or the Apache Tomcat Spring, Solaris 10 development platform, where this application has been developed.

Any assistance would be much appreciated.

Thanks,

jack
 
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What library or framework is <app:page> from? It's not a standard JSP action.

Why are you trying to use a JSP as a redirect? A JSP is for creating views. Doing anything else is a misuse of the technology. And putting Java code in a JSP is an obsolete practice from over 10 years ago.

Back up a bit and explain what you are actually trying to accomplish. You haven't made it clear. (For example you mention "menu" yet I see no evidence of anything menu-like.)
 
Jack Bush
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

I have no idea what library but isn’t Spring the framework? This application was delivered to us by external developers who are no longer contactable.

Do you have any suggestion on how to redirect a menu called “About us” on the application to an external “About us” page? The content of target about.jsp is incorrect according to your observation. Would a simple HTML redirect URL command be able to achieve this?

Hope this help. I am just as lost due to my limited understanding of how the application was developed.

Thanks again,

Jack
 
Bear Bibeault
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you simply want to go to another page when "About us" is clicked, you'd simple make it a link with an <a> tag.
 
Jack Bush
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

Below is a working pure XHTML page that successfully:



However, the URL redirection failed when placed this file (about.htm) in $HOME/tomcatProd/webapps/reporting-school/WEB-INF/jsps because this Spring application is looking for about.jsp instead of about.htm. As a result, would you know which configuration / property file to change the lookup file name if possible?

Thanks a lot again,

Jack
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is your dispatcher in your web.xml mapped to /?

If so what does the controller code that has a handler for about_us.htm look like?

also that custom tag lib you quoted earlier is not Spring either. You will have to ask someone on your team if you are not familiar with it.
 
Jack Bush
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear Bibeault & Bill Gorder,

I have found another consultant who is familiar with this technologies to resolve this issue for us.

Thanks for all your help anyhow,

Jack
 
reply
    Bookmark Topic Watch Topic
  • New Topic