How to change personal info?
[Tomcat, HTTPD, Servlets & JSP] - JSPs with JDK5.0 features do not compile
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > Java Programming > [Tomcat, HTTPD, Servlets & JSP] - JSPs with JDK5.0 features do not compile 5 January 2010 00:16:57

  Top users: 
  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:

[Tomcat, HTTPD, Servlets & JSP] - JSPs with JDK5.0 features do not compile

AstroNox 1 April 2006 22:36:56
 Hello everyone,

I'm currently having a problem; in essence, as in the title, is about JSPs with JDK5.0 features that do not compile.

I'm running JBoss 4.0.3 SP1 with the default integrated Tomcat 5.5, with JDK5.0.

I wrote a very simple JSP in Eclipse 3.1.2 with the JBoss IDE 1.5.1 GA, packaged and deployed into JBoss. There is no problem with starting JBoss or deploying the WAR. This is the JSP:

<?xml version="1.0" encoding="UTF-8" ?>
| <%@ page language="java" contentType="text/h­tml; charset=UTF-8" pageEncoding="UTF-8­"%>
| <%
| java.util.Vector<St­ring> v = new java.util.Vector<St­ring>();
| %>

It's just the declaration and definition of a Vector using JDK5.0's generics feature.

However, when I tried to access this JSP through the browser, I get this error:

02:14:15,000 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
| org.apache.jasper.J­asperException: Unable to compile class for JSP
|
| An error occurred at line: 3 in the jsp file: /index.jsp
| Generated servlet error:
| Syntax error on token "<", invalid AssignmentOperator
|
| An error occurred at line: 3 in the jsp file: /index.jsp
| Generated servlet error:
| Syntax error on token "=", != expected
|
| An error occurred at line: 3 in the jsp file: /index.jsp
| Generated servlet error:
| Syntax error on token "<", ( expected
|
| An error occurred at line: 3 in the jsp file: /index.jsp
| Generated servlet error:
| Syntax error on token "(", invalid Expression
|
|
| at org.apache.jasper.c­ompiler.DefaultError­Handler.javacError(D­efaultErrorHandler.j­ava:84)
| at org.apache.jasper.c­ompiler.ErrorDispatc­her.javacError(Error­Dispatcher.java:328)­
| at org.apache.jasper.c­ompiler.JDTCompiler.­generateClass(JDTCom­piler.java:397)
| ... etc

Ok, this basically means that the compiler did not recognize the JDK5.0 features. I had already set the following options in Tomcat's conf/web.xml file:

<servlet>
| <servlet-name>jsp</­servlet-name>
| <servlet-class>org.­apache.jasper.servle­t.JspServlet</servle­t-class>
| <init-param>
| <param-name>fork</p­aram-name>
| <param-value>false<­/param-value>
| </init-param>
| <init-param>
| <param-name>xpowere­dBy</param-name>
| <param-value>false<­/param-value>
| </init-param>
| <init-param>
| <param-name>compile­rSourceVM</param-nam­e>
| <param-value>1.5</p­aram-value>
| </init-param>
| <init-param>
| <param-name>compile­rTargetVM</param-nam­e>
| <param-value>1.5</p­aram-value>
| </init-param>
| ...
| </servlet>

It still does not work, it does not compile.

I did search Google for any possible solutions but to no avail. For some reason it seems as if no one encountered it before; either I'm not searching properly or there are no articles on this issue. I did find a thing about Tomcat versions prior to 5.5.16 (this issue was fixed in 5.5.16):

http://issues.apach­e.org/bugzilla/show_­bug.cgi?id=38389

The problem was regarding the compilerSourceVM and compilerTargetVM as mentioned above.

However, I'm very sure that the version of Tomcat that came with JBoss 4.0.3 SP1 is not 5.5.16, although I was unable to find which version was it.

I believe if I were to integrate Tomcat 5.5.16 into JBoss, the issue might be resolved. However I'm unable to find any such tutorial or resource to accomplish this on Google.

Another note is that I'm unwilling to use JBoss 4.0.4 RC1 because there is a bug with EJB3's TransactionManager (yes, I'm using EJB3; RC5 integrated into default server configuration):

http://www.jboss.co­m/index.html?module=­bb&op=viewtopic&t=78­114

Basically I'm stumped. Tried all I can. Can anyone please tell me how to resolve this issue in JBoss 4.0.3 SP1? Please direct me to any existing resolutions, if any. I would also appreciate links to articles that describe how to integrate Tomcat 5.5.x into JBoss. Thanks!

View the original post : http://www.jboss.co­m/index.html?module=­bb&op=viewtopic&p=39­34154#3934154

Reply to the post : http://www.jboss.co­m/index.html?module=­bb&op=posting&mode=r­eply&p=3934154


-------------------­--------------------­----------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.fa­lkag.net/sel?cmd=lnk­&kid=110944&bid=2417­20&dat=121642
Add comment
Guest 27 June 2009 13:14:44 permanent link ]
 hi i too face the same problem plz let me know if you get solution, drop a mail to sridharkumar.ch@gma­il.com

Thanks in advance,
Sridhar
Add comment
Guest 5 January 2010 00:16:57 permanent link ]
 I also have the same problem, I am using jbosssga_4.0.5
can't find compiled jsp classes in [jboss_home]/server/deploy/work­ diretory.
not error msg in jboss console. but have something like below displayed in firefox.

XML Parsing Error: not well-formed
Location: https://localhost/l­ogin/index.jsp
Line Number 3, Column 2:<%@ page import="com.test.ap­p.util.Constants" %>
-^
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > Java Programming > [Tomcat, HTTPD, Servlets & JSP] - JSPs with JDK5.0 features do not compile 5 January 2010 00:16:57

see also:
Re: ABBR support
Please help me with this fulltext…
Two simple questions
pass tests:
You and sex.
see also:
How to enjoy DVD and videos on your…
Palm Pre is coming soon, do you want to…
Zune HD vs. iPod Touch: which is better…

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .