• 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:

Tab Menu

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

I am trying to make a tab menu that highlights the tab when the page is selected. The tab menu is included via JSP include. Below are my codes? It doesn't work for some reason. Can someone tell me what's wrong? Thanks.

How I include the file:



tabs.jsp content:

 
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

Originally posted by Wilson Gordon:
It doesn't work for some reason.


By "it doesn't work" do you man that the keyboard bursts into flame?

If not, it might be helpful to tell us what it does, and how that differs from what you expect.
 
Wilson Gordon
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good point. By "doesn't work" I meant the EL didn't get parse in the tabs.jsp include file. It's strange, because in the JSP that has the tab menu include, there are EL and those get parsed without problem.
 
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
So when you do a View Source from the browser you are still seeing the ${} constructs?
 
Wilson Gordon
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Right. I found out if I use ${param.selectedPage} directly on the page, it doesn't get parse. But if I put it inside <c:choose><c:when test="${param.selectedPage == 'summary'}"... etc>, the test condition gets parsed ok.

It's weird but at least I got the tab menu to work this way.

Thanks.
 
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

Originally posted by Wilson Gordon:
It's weird ....


This means that you are either using a non-JSP 2.0 container, or your web application is not set up correctly to use JSP 2.0 features.

What container are you using?
 
Wilson Gordon
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Weblogic 8.1.

I think you are correct, Bear. I did a search and found this in the 8.1 documentation:


WebLogic Implementation of JSP

BEA WebLogic JSP supports the JSP 1.2 specification from Sun Microsystems. JSP 1.2 includes support for defining custom JSP tag extensions. (See Programming JSP Extensions)

The WebLogic Server implementation of the JSP 1.3 specification calls getOutputStream rather that getWriter to output characters in a JSP. This can cause certain extended characters to be truncated and to appear incorrectly. Using HTML code for extended characters such as the Angsrtom unit and the degree symbol will ensure that they will be processed correctly by your WebLogic Server instance.

WebLogic Server also supports the Servlet 2.3 specification from Sun Microsystems.


So it only supports JSP 1.2...

But do you know why putting the EL inside that test condition works?
[ December 10, 2007: Message edited by: Wilson Gordon ]
 
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
In JSP 1.2, the EL is supported by the JSTL. So it will only work when used as an attribute to a JSTL tag.

As of JSP 2.0, it's part of core JSP.
 
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
And, I'm pretty sure that the EL ternary operator was introduced with JSP 2.0.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic