aspose file tools*
The moose likes JSP and the fly likes Tab Menu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Tab Menu" Watch "Tab Menu" New topic
Author

Tab Menu

Wilson Gordon
Ranch Hand

Joined: Apr 07, 2007
Posts: 89
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:

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61601
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Wilson Gordon
Ranch Hand

Joined: Apr 07, 2007
Posts: 89
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61601
    
  67

So when you do a View Source from the browser you are still seeing the ${} constructs?
Wilson Gordon
Ranch Hand

Joined: Apr 07, 2007
Posts: 89
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61601
    
  67

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

Joined: Apr 07, 2007
Posts: 89
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61601
    
  67

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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61601
    
  67

And, I'm pretty sure that the EL ternary operator was introduced with JSP 2.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tab Menu