Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

JSP not reloading using JSTL

Thread view: 
clairekennedy@hotmail.com - 10 Apr 2006 16:05 GMT
Hi

I'm trying to localize a jsp page using JSTL and resource bundles.  My
jsp page is made up of one main area of text which I am using resource
bundles and jsps to swap languages and a menu which is held in an
include file.  The user can click on a url on the page to swap
languages by reloading the page with a language parameter in the
request which is interpreted by the JSTL..
The main page is working correctly and displays the different languages
without any problems.  However I have an include file which displays a
menu this should also swap languages when the pages swaps.  By checking
the request parameter and loading the appropriate include file. This
doesn't appear to work when I click on the URL as it doesn't change.
Should the whole page not reload and hence the menu include refresh?
Is there some way of triggering this or has anyone got any suggestions
on doing this.  Sorry if this is a bit of a confusing explanation of
the problem.  Any help would be appreciated.
Thanks
CKE
Timo Stamm - 10 Apr 2006 23:59 GMT
clairekennedy@hotmail.com schrieb:
> However I have an include file which displays a
> menu this should also swap languages when the pages swaps.  By checking
> the request parameter and loading the appropriate include file. This
> doesn't appear to work when I click on the URL as it doesn't change.

There are several ways to include a file. One includes the file at
compile time, one includes it at runtime, using a RequestDispatcher. The
way you are checking the request parameter might be incompatible with
the wrapped Request object that is passed through by RequestDispatcher.

If you use the include directive, you should be safe. It looks like this
(JSP 1.0):

  <%@ include file="example" %>

You can find the corresponding JSP 2.0 syntax here:

  http://java.sun.com/products/jsp/syntax/2.0/card20.pdf

Timo


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.