how to detect <jsp:usebean> ?

hi, good day , i have use tag for my jsp, but it seem that intellij 5.0.2 can't detect it and give error like cannot resolve symbol

and also, if i write my code like following :



it highlight getServletContext() with red color,

both of it are working , just that the IDE give me some error msg that annoying


how do i avoid these error ? thank you very much for guidace

6 comments

Jdk/servlet/struts lib is most likely not configured.

alvin wrote:

hi, good day , i have use tag for my jsp, but it seem that intellij 5.0.2 can't detect it and give error like cannot resolve symbol

and also, if i write my code like following :

 ServletContext srvCtx = getServletContext();
> ]]>



it highlight getServletContext() with red color,

both of it are working , just that the IDE give me some error msg that annoying


how do i avoid these error ? thank you very much for guidace



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

0

i have set jsp-api.jar and servlet-api.jar as global library in setting | modules , and also include both jar file under module library, but it still happen , jdk is set properly (1.4.2.9)

0

Do you mean getServletConfig().getServletContext()?
What is highlighted in jsp:useBean?

alvin wrote:

i have set jsp-api.jar and servlet-api.jar as global library in setting | modules , and also include both jar file under module library, but it still happen , jdk is set properly (1.4.2.9)



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

0

thanks Maxim Mossienko for reply,

when i use ServletContext srvCtx = getServletContext();

IDE give me cannot resolved method for getServletContext(), but if i use getServletConfig().getServletContext() then it didn't prompt me error, why is it so ?

but for the case <jsp:usebean>

]]>


under scriptlet, if i use the id "checkFinder" then keyin "." (dot), it didn't give me the methods it contains, and it give me "cannot resolve symbol checkFinder" error

0

alvin wrote:

when i use ServletContext srvCtx = getServletContext();

IDE give me cannot resolved method for getServletContext(), but if i use getServletConfig().getServletContext() then it didn't prompt me error, why is it so ?

HttpJspPage interface does not have such method (but some particular
implementation may have)


but for the case <jsp:usebean>

 
> ]]>


under scriptlet, if i use the id "checkFinder" then keyin "." (dot), it didn't give me the methods it contains, and it give me "cannot resolve symbol checkFinder" error

You are editing jsp not in Web module.

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

0

This bug is fixed in next 5.1 eap build

alvin wrote:

thanks Maxim Mossienko for reply,

when i use ServletContext srvCtx = getServletContext();

IDE give me cannot resolved method for getServletContext(), but if i use getServletConfig().getServletContext() then it didn't prompt me error, why is it so ?

but for the case <jsp:usebean>

 
> ]]>


under scriptlet, if i use the id "checkFinder" then keyin "." (dot), it didn't give me the methods it contains, and it give me "cannot resolve symbol checkFinder" error



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

0

Please sign in to leave a comment.