JSP not reloading using JSTL

C

clairekennedy

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
 
T

Timo Stamm

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top