7.0.3 doesn't recognize <%@ page trimDirectiveWhitespaces = "true"%>

Just installed 7.0.3 on Fedora and see it fails to recognize
<%@ page trimDirectiveWhitespaces = "true"%>
JSP page directive (see the screenshot attached)

Project's JDK is Java 6, language level is Java 5, web.xml is using "web-app_2_5.xsd" and states version="2.5".
In other words, it's a pure Java EE 5 environment and if built with Eclipse works fine with Tomcat 6.

Edited by: Evgeny Goldin on Mar 17, 2008 11:50 AM



Attachment(s):
1.png
12 comments
Comment actions Permalink

How your web.xml root tag looks like?

Evgeny Goldin wrote:

Just installed 7.0.3 on Fedora and see it fails to recognize
<%@ page trimDirectiveWhitespaces = "true"%>
JSP page directive (see the screenshot attached)

Project's JDK is Java 6, language level is Java 5, web.xml is using "web-app_2_5.xsd" and states version="2.5".
In other words, it's a pure Java EE 5 environment and if built with Eclipse works fine with Tomcat 6.


------------------------------------------------------------------------


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

When I click on "trimDirectiveWhitespaces" in the JSP file - I go to "jspdirectives2_1.xsd" to line 173:
<xsd:attribute name = "trimDirectiveWhitespaces" use = "optional" type = "Bool"/>

0
Comment actions Permalink

Had to disable "Run jasper validator for JSP files" (excluding problematic files didn't help, IDEA was still failing on one of them)

0
Comment actions Permalink

It's a known problem (see
http://jetbrains.net/jira/browse/IDEADEV-20562). We will fix it in Diana.

Evgeny Goldin wrote:

Had to disable "Run jasper validator for JSP files" (excluding problematic files didn't help, IDEA was still failing on one of them)



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

application configuration]]>
...

0
Comment actions Permalink

Hi,

I have just tried using:

<%@ page trimDirectiveWhitespaces="true" %>

in IntelliJ 10.0.1 (with Java 1.6, Windows 7) and it also doesn't appear to work

I have:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

in my web.xml, but IntelliJ highlights the 'trimDirectiveWhitespace' line in red and when you hover over it, it says 'attribute trimDirectiveWhitespaces not allowed here'

Can someone please help me with this?  

Thanks,

Mark

0
Comment actions Permalink

Looks like a regression, please file a bug at http://youtrack.jetbrains.net/issues/IDEA.

0
Comment actions Permalink

You need at least 2.5 version of web.xml to get jsp 2.1 worked.

0
Comment actions Permalink

Hi Dmitry,

Thank you for your quick reply...

If I change the web.xml to use  "http://java.sun.com/dtd/web-app_2_5.dtd", the DTD doesn't resolve within IntelliJ, so I assume that this is not included in the jar file which includes the  "http://java.sun.com/dtd/web-app_2_3.dtd". If I then try to download the resource IntelliJ asks me to configure a proxy!? I don't know how to configure this proxy. Is there something I am missing?

Thanks,
Mark

0
Comment actions Permalink

You should declare it like

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
            http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">


"Mark Burke" <no_reply@jetbrains.com> сообщил(а) в новостях
следующее:5315043.23771299841554334.JavaMail.devnet@domU-12-31-39-18-36-57.compute-1.internal...

Hi Dmitry,

>

Thank you for your quick reply...

>

If I change the web.xml to use  "http://java.sun.com/dtd/web-app_2_3.dtd",
the DTD doesn't resolve within IntelliJ, so I assume that this is not
included in the jar file which includes the
"http://java.sun.com/dtd/web-app_2_3.dtd". If I then try to download the
resource IntelliJ asks me to configure a proxy!? I don't know how to
configure this proxy. Is there something I am missing?

>

Thanks,
Mark

>

---
Original message URL: http://devnet.jetbrains.net/message/5297062#5297062


0
Comment actions Permalink

Hi Dmitry,

I added the following as suggested.

<web-app
        xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        version="2.5">

IntelliJ now seems to recognise the directive, but my doctype still references 2.3. Is this correct? Shouldn't the 2.5 version of the dtd also be present in the jar file?

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

Regards,

Mark

0
Comment actions Permalink

You need no more DOCTYPE declaration. Just remove it.

"Mark Burke" <no_reply@jetbrains.com> сообщил(а) в новостях
следующее:19034616.29521299865460575.JavaMail.devnet@domU-12-31-39-18-36-57.compute-1.internal...

Hi Dmitry,

>

I added the following as suggested.

>

<web-app
        xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        version="2.5">

>

IntelliJ now seems to recognise the directive, but my doctype still
references 2.3. Is this correct? Shouldn't the 2.5 version of the dtd also
be present in the jar file?

>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
Regards,
Mark

>

---
Original message URL: http://devnet.jetbrains.net/message/5297150#5297150


0

Please sign in to leave a comment.