How to use JDK5.0 new feature code in tomcat 5.5.9, jsp files

Hi Everyone:
I am trying to use JDK5.0 new feature code -- for loop in jsp file , but got compile error , i try the same code in the java file which is working fine. i am wondering is it tomcat jsp compiler problem ?
following is my code and error msg
/* jdk 5.0 new feature, but cannot use in this jsp file, tomcat version? or setting problem ?
for (Thumbnail thumbnail : thumbnailList){
     System.out.println(thumbnail.getAbsolutePath());
// following is working fine in jsp
Iterator iter = thumbnailList.iterator();
          while(iter.hasNext()){
               Thumbnail thumbnail = (Thumbnail) iter.next();
               out.print(thumbnail.getAbsolutePath()+"<BR>");
     %>
the error msg is :
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 16 in the jsp file: /test/testImageGallery.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)
An error occurred at line: 16 in the jsp file: /test/testImageGallery.jsp
Generated servlet error:
Syntax error on token ")", : expected
     org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
     org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
     org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
I am using fedora core 4 x64bit , tomcat 5.5.9,
java -version
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_04-b05, mixed mode)
tomcat settings
tomcat5/bin/catalina.sh run
Using CATALINA_BASE: /home/normal/tomcat5
Using CATALINA_HOME: /home/normal/tomcat5
Using CATALINA_TMPDIR: /home/normal/tomcat5/temp
Using JRE_HOME: /home/normal/jdk1.5.0_04

The JDT compiler that Tomcat installs by default is only 1.4 compliant.
You can use ant instead:
remove the common/lib/jasper-compiler-jdt.jar file
place ant.jar file from the latest Ant distribution in the common/lib folder.
If you do this, you also need to use the "javac" argument to catalina.sh.
Documentation reference: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html

Similar Messages

  • How to use the "identify" feature in new 6.3.1 airport utility?

    how to use the "identify" feature in new 6.3.1 airport utility?
    so you can find the basestations in larger networks?

    There is a workaround, which is to use Airport Utility 5.6.
    I can confirm that 5.6 will run on 10.8.4 Mountain Lion, it will recognize the new 2013 Airport Extreme Base Station (A1521) running firmware 7.7.1, and it will give you access to view the device's Log & Statistics, DHCP Clients, and Profiles.
    Four caveats:
    1) The easiest way to install it is to download the app itself, not an installer or through the App Store. There is a page here where you can download the app: http://coreyjmahler.com/2013/03/08/airport-utility-5-6-on-os-x-v10-8-mountain-li on/ This way, you still have both versions, Airport Utility 6.x.x and 5.6.
    2) When you launch 5.6, you'll get a message saying a newer version is available and asking if you want to update. Click Cancel to proceed into the utility.
    3) When you click the Manual Setup button in 5.6, you'll get a warning dialog that "This version of AirPort Utility doesn't support this AirPort wireless device and might improperly configure the device if you continue to use it. Check www.apple.com/support/airport for the latest version of AirPort Utility." You can click Continue to get into the utility without issue.
    4) You should probably only use 5.6 to view the additional status details. I have not tried to modify and save any AEBS settings using 5.6. There are other discussions here in the forums indicating that attempting to save settings via 5.6 that are no longer available in 6.3.1 will not actually save the settings to the AEBS even if both utilities indicate that the settings are changed. See https://discussions.apple.com/message/22677993#22677993
    So, even though you can't use it to modify settings no longer available in Airport Utility 6.3.1, using Airport Utility 5.6 to view DHCP clients, Logs and Statistics is very useful for troubleshooting network issues.
    PS - There are two ways to get to the DHCP Clients list, neither of which is obvious The first is to go to the Airport pane -> Summary tab and click on the "Wireless Clients:" label in the Summary display. All of the labels from "Wireless Mode:" down on the Summary display operate as links to view/edit the corresponding info/settings, which is also not obvious at first glance. Also not obvious, clicking on "Wireless Clients:" actually brings up a new pane with three tabs: Logs, Wireless Clients, and DHCP Clients. You can also get to the same pane by going to the Advanced pane and clicking on the Logs and Statistics button.
    I hope this is helpful information. Took me a while to find out how to do this.

  • Where can I learn how to setup and use the new features in Mountain Lion?

    Where can I learn how to setup and use the new features in Mountain Lion?

    MacWorld has a Superguide, TidBITS has Take Control books, and probably a flock of other publishers have physical books.

  • HT1695 I know nothing about how to use my new ipod and when reading the little bit of information in the folder that came with it, all I can do is turn it on, but it just powers down after a few seconds.  How do I work this thing?

    I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on.  Then in a few seconds it goes black, never having brought up a screen to do anything!  Help!  What do I do to get this thing going?

    You might consider connecting it to the charger and charging up the battery overnight.
    Please Get the iPod Touch User Manual for iOS 5

  • How to use my new 02 sim

    How to use my new 02  sim on iPhone 4

    Put it in the phone. Turn the phone on. Make calls... I don't understand what you mean by "how to use" it...

  • How to Use the JAVA SCRIPT code in .htm page of the component

    Hi .
    In my requirement i have to use Java Script Function in .htm code ..how to use the java script code and functions in .htm???
    thank you
    B.Mani

    Check this document  [Arun's Blog|http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUI-TalkingwithJava+Script]
    Regards
    Kavindra

  • HOW TO USE THE PANORAMA FEATURE IN IPHONE 4S, HOW TO USE THE PANORAMA FEATURE IN IPHONE 4S

    HOW TO USE THE PANORAMA FEATURE IN IPHONE 4S?

    There is no current panorama feature.  When iOS 6 is released (Sept. 19) we will find out.

  • HT1208 Where do I find a tutorial about how to use the new iTunes? I have version 11.1.3 (8). I looked on the Apple web site but only found info extolling the virtues of iTunes, not how to use it.

    Where do I find a tutorial about how to use the new iTunes? I have version 11.1.3 (8). I looked on the Apple web site but only found info extolling the virtues of iTunes, not how to use it.

    Use it the same way as previously.
    ctrl B shows the menus.
    ctrl S shows the sidebar.
    What else do you need help with?

  • When i update apps on my iphone they need the ID that i used when i downloaded these app and i forgot this ID and a make a new ID how i used the new one to update these apps thanks

    Hello all,
    when i update apps on my iphone they need the ID that i used when i downloaded these apps and i forgot this ID and a make a new ID
    How i used the new one to update these apps?
    thanks

    Your device can hold apps from multiple IDs, but to update them you have to swicth identities which is time consuming. If possible use only the one ID. If you need to reset the password for your old ID visit My Apple ID.
    tt2

  • Can anyone help me figure out how to use my new LaCie external hard drive to import movies from my camcorder into imovie '09? I ran into so many problems last night!! Was up way past my bedtime!

    Can anyone help me figure out how to use my new LaCie external hard drive to import movies from my camcorder into imovie '09? I ran into so many problems last night!! Was up way past my bedtime!

    I'll stay in this chat ... I answered in the other one ... I have a Sony digital Handycam ... from years ago.  I just got the LaCie and I think I formatted it for only to be used on my Mac ... how should I go about reformatting it to be HFS Extended like you said?

  • HT4623 Why I cannot use the new feature of phone after I upgraded to ios 6???

    I have already upgraded to iOS 6, but why I still cannot use the new feature of phone??
    I cannot reject calls by sending them message.  What happen??

    While ios 6 is compatable with the iPhone 4, many of its features are not available for the 4. The features need the 4s or 5. See here:
    Turn-by-turn navigation is available only on iPhone 4S, iPhone 5, and iPad 2 or later with cellular data capability. Flyover is available only on iPhone 4S, iPhone 5, iPad 2 or later, and iPod touch (5th generation). Cellular data charges may apply.
    Siri is available in Beta only on iPhone 4S, iPhone 5, iPad (3rd generation), and iPod touch (5th generation) and requires Internet access. Siri may not be available in all languages or in all areas, and features may vary by area.  Cellular data charges may apply.
    FaceTime video calling requires a FaceTime-enabled device for the caller and recipient and a Wi-Fi connection. FaceTime over a cellular network requires iPhone 4S, iPhone 5, or iPad (3rd generation) with cellular data capability. Availability over a cellular network depends on carrier policies; data charges may apply.
    Offline Reading List is available on iPhone 4 or later, iPad 2 or later, and iPod touch (5th generation).
    Made for iPhone hearing aids require iPhone 4S or iPhone 5.
    Panorama is available on iPhone 4S, iPhone 5, and iPod touch (5th generation).
    Find My iPhone and Find My Friends enable you to locate iOS devices only when they are on and connected to a registered Wi-Fi network or have an active data plan.

  • I found a page with a long list of short videos to wathc on how to use my new mac, now I can't find it anywhere--anybody know where this is?

    I found a page with a long list of short videos on how to use my new imac, now I can't remember how I got there--anyone know where i can find?

    Assuming Safari, CMD+OPT+2 brings up history.

  • Are you using the new features?

    Some of you were very loud about getting certain features for PlayStation 4 and some even complained that they weren't available on day day1.
    You asked for suspend/resume, a media player, dlna, the ability to pause downloads and you got it.
    So are you using these new features?

    Suspend and resume... for endurance racing modes on PJ Cars...Theres no save race status, kill the game lose the hole  1 hour 30mins race... sleep mode is on so if you pause the game the PS4 powers down and saves the game status.... Tested DLNA don't need it allready used plex VIA web browser then the transcoding PS3 and PS4 app...Pause and cancel down loads used.  Music player use for PJ cars... As people stated if you Do not Use any thing then they vanish from the dynamic menu on PS4...Most are not even on the console untill a User hits the down load option... (technicaly you could use the youtube app to watch this...)   

  • How to use built in dictionary in Mac OS X lion on PDF file?

    Hi there,
    Does anyone know how to use built in dictionary in Mac OS X lion on PDF file with out using trackpad? Thank you.

    I don't know what to tell you, it works perfectly for me...
    My expertise ends here... Hopefully someone else comes along with useful suggestions and tips.

  • Creating a conditional index? How to suggest a new feature?

    How can I suggest a new feature in Oracle?
    Imagine a table of service requests to be processed, where a column named STATUS can be: 'N': New, 'C': Canceled or 'P': Processed. This will result in a biased distribution where 'P' will represent more than 99% of rows.
    I know that Oracle accept indexes created using functions and I can create an index on decode(STATUS,'P',null,STATUS) to make index small. But it will not help a query on STATUS = 'N' condition.
    I would like to create a conditional index like:
    create index idx01 on service_requests (status) where status <> 'P';
    In this example, only status 'N' and 'C' will be indexed resulting in a very small index that can resolve filters like STATUS = 'N'.
    Or this:
    create index idx01 on some_tables (column1 including null values); to resolve COLUMN1 is NULL
    Is there a way to suggest new features like this?

    How can I suggest a new feature in Oracle?
    Imagine a table of service requests to be processed, where a column named STATUS can be: 'N': New, 'C': Canceled or 'P': Processed. This will result in a biased distribution where 'P' will represent more than 99% of rows.
    I know that Oracle accept indexes created using functions and I can create an index on decode(STATUS,'P',null,STATUS) to make index small. But it will not help a query on STATUS = 'N' condition.
    I would like to create a conditional index like:
    create index idx01 on service_requests (status) where status <> 'P';
    In this example, only status 'N' and 'C' will be indexed resulting in a very small index that can resolve filters like STATUS = 'N'.
    Or this:
    create index idx01 on some_tables (column1 including null values); to resolve COLUMN1 is NULL
    Is there a way to suggest new features like this?
    A new feature isn't needed. Oracle provides the equivalent of that 'conditional index' by allowing you to create, and index, VIRTUAL columns.
    This code uses a VIRTUAL column and then creates an index on it.
    drop table test_status
    create table test_status (col1 number,
         status varchar2(1),
         special_status generated always as (decode(STATUS,'P',null,STATUS)
    create index idx01 on test_status (special_status)

Maybe you are looking for

  • Making only onr field mandatory in material master

    Hi, We want to make a field 'Account Assignment Group (MVKE-KTGRM)' (field is in  Sales: Sales org - 2 view) mandatory for finished products only. The field 'Item category Grp' in the same view is already mandatory. We do not want to make any other a

  • Safari crashes with message about "ct_plugins"

    Safari now crashes instantly, every single time. It gives me a message saying that the crash was probably caused by "ct_plugins." I cannot find anything called "ct_plugins" by using the Finder. Remarkably unhelpful. Actually reminds me of the old day

  • Fix Desktop Icons in Mavericks

    After updating to Mavericks last week, my desktop icons went crazy - stopped letting me move them around or snap to grid - I solved the problem by resetting the "snap to grid" desktop feature and all seemed well for a while. But now random "grid" pla

  • Track order gets re-arranged

    when i download some whole albums, i find that my Itunes puts the songs in alphabetical order! This will not do. Is there anyway to manually arrange the track order in the itunes library? for example, if I sort alpha by artist, can i set up the album

  • [ID CS2 MAC]crash of ID during placed EPS without preview

    Hi, has somebody encounter problem with placing EPS without preview into frame? If you run ID CS2 on MAC (intel MAC in my case) from terminal you could see outputs from ID like this: Adobe InDesign CS2(602,0xa000eca0) malloc: *** vm_allocate(size=184