Wrong import warning on JSP page

I've installed NitroX (v/2.0.0 build 371) and started to use it on an existing project. On a JSP page I got a warning: "The import java.io is never used" from the directive:
<%@ page buffer="1024kb" autoFlush="true" import="java.util.*, java.io.*"%>
[/code:1:77aea7b6d7]
After removing the import, i.e. changed the above to:
[code:1:77aea7b6d7]
<%@ page buffer="1024kb" autoFlush="true" import="java.util.*"%>
[/code:1:77aea7b6d7]
The warning doesn't disappear. Looking at the properties for the warning I can see that it is 3 days old (creation time = [i:77aea7b6d7]March 18, 2005 11:22:21 AM[/i:77aea7b6d7] vs. today=[i:77aea7b6d7]March 23[/i:77aea7b6d7])
Is this a bug or do I need to recompile (or similar). I tried to rebuild the Nitrox db, without any effect.
Rgds and thanks
Esge                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Check the Resource column of "Problems View" for the warning it will display the file in which you need to correct.
This warning is from eclipse and displayed for a .java file

Similar Messages

  • 2 c:import   in one Jsp Page

    Hi all,
    I wondering can a jsp page have 2 <c:import> statement?
    i having an error which is
    "javax.servlet.jsp.JspException: Cannot forward a response that is already committed" when i doing it.
    what i want to do is something like:
    <c:import url="/student/profile.view?do=TabDisplayRequest&resultLinkKey=${StudentActionForm.resultLinkKey}" charEncoding="utf-8"></c:import>
    <body>
    <html-el:form action="/student/exam_result.view">
    </html-el:form>
    </body>
    </html-el:html>
    <c:import url="/student/course_mark.view?do=DetailRequest" charEncoding="utf-8"></c:import>
    The outcome is only the first import and the middle form displayed. the last import statement was skipped.
    and prompt me the following error:
    javax.servlet.jsp.JspException: Cannot forward a response that is already committed
    at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:324)
    at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:179)
    Can some one please give me some consultation on this??
    thanks
    Regards,
    junecello

    sorry, but just to make a additional note.
    the <c:import > tag library is from JSTL taglib <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    regards,
    Junecello

  • Importing classes into JSP page

    Hi There,
    I am new to this and here is my problem.
    I am doing a shopping cart tutorial and trying to get a JSP page to import two classes :
    <%@ page language="java" contentType="text/html"
    import="ShoppingBasket,Product"
    errorPage="errorpage.jsp" %>
    I get :
    C:\jakarta-tomcat-4.1.30\work\Standalone\localhost\_\shop_0002dbasket_jsp.java:7: '.' expected
    import ShoppingBasket;
    ^
    C:\jakarta-tomcat-4.1.30\work\Standalone\localhost\_\shop_0002dbasket_jsp.java:8: '.' expected
    import Product;
    ^
    C:\jakarta-tomcat-4.1.30\work\Standalone\localhost\_\shop_0002dbasket_jsp.java:50: cannot resolve symbol
    symbol : class ShoppingBasket
    location: class org.apache.jsp.shop_0002dbasket_jsp
    ShoppingBasket basket = null;
    The classes compile ok . I read that instead of comma seperating the classes it might be better to put them in a package but I do not know the correct syntax or where to put the package if this is correct.
    The tutorial is from this book and the shopping cart source code is here.
    http://www.ineasysteps.com/books/?1840781971
    Any help appreciated
    Jim Ascroft

    A little beginners explanation of classpaths and packages is in order here. A package works like an extension of the name to keep class names unique. For example, if you have a ShoppingBasket.class and you want to use my ShoppingBasket.class along with it the two class names must be unique or different from one another in some way. Yours could be in com.yourcompany package and mine could be in org.mycompany package. When you reference you Shopping backet in your code you would use com.yourcompany.ShoppingBasket and when you reference mine in the same code you would use or.mycompany..ShoppingBasket. Shorthand for the class can be used by adding an import at the top of the referencing java file. An import is like saying "hay compiler, whenever you see ShoppingBasket look for it in the com.mycompany package!" That brings us to the next point. The package name must always be reflected in the directory structure of the .class file location in order to be found. Your shopping basket must be stored under the directory com/yourcompany if it is in package com.yourcompany. That directory structure should extend off of a classpath entry in order to be made available to the JVM. Classpath entries point to folders, jar or zip files that contain packaged and unpackaged classes. So If you have a classpath entry that points to C:\jakarta-tomcat-4.1.30\webapps\ROOT\WEB-INF\classes then all unpackaged classes (classes compiled from a .java file without a package statement) will be pulled directly out of this folder. Also, packaged classes will be pulled out of they're packaging directory structure, which should be located in this folder. You can have as many classpath entries as you want but the classes will be pulled out of the first entry that they can be found under. Now with a web app you don't normally fuss with the setting of classpaths since they are already predefined and configured for you. You just need to know to put all of your class files under the WEB-INF/classes directory in the root of your web app. You do, however, still need to know how they work. You also should know that any jar files should be placed in the lib folder of your web app and not under the classes folder.
    Getting back to your immediate problem, why are you getting class not found errors? Well this stems from what was said above. To fix these kind of problems follow these steps:
    1st off, find out exactly which .java file the .class file was compiled from. (This can be a problem in some environments where multiple copies of source hang around.) This step may involve a recompile and paying close attention to the compiler arguments. In an IDE there should be a setting or dialog that lets you find out exactly where it's placing the .class files created from you source.
    Next, determine what package the .class file should be in by examining (and maybe changing) the package statement at the top. For example, if you intended to put ShoppingBasket in the com.bloodoo package make sure it has a package "com.bloodoo;" statement at the top.
    Next recompile the .java source and move the packaging directory structure into the classes folder of your app. (This would be WEB-INF/classes under the root of the web-app.) For example if ShoppingBasket.class was compiled into the com/bloodoo folder under C:\Program Files\YourIDE\projects\yourproject\output then copy the com folder out of the output folder and into the WEB-INF\classes folder.
    Next examine the calling code (JSP or servlet .java code) and make sure it references the problem class out of the right package. For example, yourpage.jsp should reference the class com.bloodoo.ShoppingBasket and not ShoppingBasket if the shopping basket is deployed in package com/bloodoo. This gets tricky with jsp usebean tags because the desire is to use shorthand but I'm not sure if that works with the use bean tag. Make any modifications and recompile if necessary.
    Lastly, as a rule of thumb avoid wild-card imports (eg. import com.package.*) because they are a common cause of confusion especially when refactoring package names and resolving these kind of issues.Those steps should allow you to resolve 85-90% of your class not found issues. The other 10-15% are rare cases involving the use of custom classloaders, the Java extension mechanism and/or classpath trickery. If you still have questions/problems post back.
    Cliff

  • JSP page "cannot resolve symbol"

    Hi,
    I'm using j2sdk1.4.2_01 and tomcat-5.0.13. I'm developing within Eclipse 3.0.0 with the Tomcat plugin.
    In my project ("Agenda2") i only created one class ("Persona"), that is correctely compiled (%TOMCAT_HOME%\webapps\Agenda2\WEB-INF\src\Persona.java results in %TOMCAT_HOME%\webapps\Agenda2\WEB-INF\classes\Persona.class, and 0 problems are shown in the Problems list.
    In %TOMCAT_HOME%\webapps\Agenda2 i have my Edit.jsp, that begins with these lines:
    <%@ page language="java" contentType="text/html" %>
    <HTML>
    <HEAD>
    <TITLE>Edit</TITLE>
    </HEAD>
    <BODY>
    <jsp:useBean id="personaAtt" class="Persona">
        <jsp:setProperty name="personaAtt" property="*" />
    </jsp:useBean>
    ....When i call the JSP from the browser, i get this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 8 in the jsp file: /Edit.jsp
    Generated servlet error:
        [javac] Compiling 1 source file
    C:\Programmi\Java\tomcat-5.0.13\webapps\Agenda2\work\org\apache\jsp\Edit_jsp.java:48: cannot resolve symbol
    symbol  : class Persona
    location: class org.apache.jsp.Edit_jsp
          Persona personaAtt = null;
          ^The error message mentions line 8, which is the one following <BODY>, that is
    <jsp:useBean id="personaAtt" class="Persona">My impression is that there is some path problem, but despite my tries i can't get it.
    The folders tree under %TOMCAT_HOME%\webapps\Agenda2\ is:
    -WEB-INF
    --classes
    --lib
    --src
    -work
    --org
    ---apache
    ----jspDoes anybody can see the problem ?

    Thanks! I'm going to try to put the class into a package as both you have suggested, and i'll post here the result.
    In the meantime i have a related newbie question:
    putting the class into a package, is this kind of a workaround, or it's the "normal thing" ?
    I mean, is it mandatory to put classes into a package in order to import them from JSP pages ?
    It was my understanding that it isn't mandatory, but - from your replies and many other posts in this forum - i'm starting to think that i'm wrong.

  • JAVA IOException when adding "org.jdom.*" in the list of the imports for Attributes.jsp

    Hi all,
    I am trying to use JDOM and was playing with the xml examples code(Attributes.jsp)
    for WLS6.1SP2.
    When I add the " org.jdom.* " to the list of the imports on the Attributes.jsp page
    I get a java.io.exception.
    Please HELP !!

    You didn't post the exception.
    It is probably caused by the JDOM JAR or classes not being available or an
    IO error reading them (e.g. permissions issue on Unix).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Gary Fields" <[email protected]> wrote in message
    news:3cd01550$[email protected]..
    >
    I believe that someone on this newsgroup has the answer....
    Come on guys/gals !!!
    "Gary Fields" <[email protected]> wrote:
    Hi all,
    I am trying to use JDOM and was playing with the xml examples
    code(Attributes.jsp)
    for WLS6.1SP2.
    When I add the " org.jdom.* " to the list of the imports on theAttributes.jsp
    page
    I get a java.io.exception.
    Please HELP !!

  • Importing Custom Classes into a JSP page

    Hello,
    I have created custom package com.srjgroup.report. It sits in C:\workspace\src\com\srjgroup\report directory. I have java files as well as compiled classes there. No jar files there.
    did amend classpath to point to this directory.
    In my JSP page I have the import statement as following
    import="java.sql.*, java.util.*, java.text.SimpleDateFormat, com.srjgroup.report.*"It imports all the packages without any errors. However, when I try to use one of the classes in the package, I get error
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 3 in the jsp file: /SQLServer.jsp
    Generated servlet error:
    SRJReports cannot be resolved to a type
    SRJReports is one of the classes that I am trying to use in that package. When I comment out all references to the class, everything is fine.
    So, to fix this I moved the entire package to
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\lib direcory, preserving the hierarhy. So, now my custom package is located here:
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\lib\com\srjgroup\report again there are no jar files, only java and classes here. Still, no go.
    What am I doing wrong ?

    Put the class in
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\com\srjgroup\report
    One more thing, there is no subdirectory in lib directory. You may look at the example within tomcat for reference. I start from there.

  • JSP page display wrong time when compared to the server time

    Hi,
    This problem seems to weird but it is happening
    I have web application running where time is displayed in the page. In this application time is very critical. Currently, time is an hour behind the orginal time.
    I checked the server it is displaying proper time.
    As a matter of troubleshooting, I wrote a java program and run the program in the same server, where the application is running. The java program returns me proper time , but JSP is still displaying time an hour behind. To trouble shoot further, I created a test jsp page to just display the time and accessed the time and the jsp displayed wrong time as well, an hour behind.
    I am running[ tomcat 4.0.3 and j2sdk1.4.3 in suse linux enterprise server 9.0
    My Java program
    import java.util.*;
    import java.text.*;
    public class TestDate
    public static void main(String s[])
         try{
              DateFormat DF = new SimpleDateFormat( "dd/MM/yyyy");
    DateFormat DT = new SimpleDateFormat("hh:mm aa");
              SimpleDateFormat fmt=new SimpleDateFormat("HH.mm");
              Calendar cal= Calendar.getInstance();
              java.util.Date dt=cal.getTime();
              String curdt=DT.format(dt);
              System.out.println("Server Time" + curdt + "\n");
              int hh = cal.get(Calendar.HOUR);
              int mm = cal.get(Calendar.MINUTE);
              int aa = cal.get(Calendar.AM_PM);
              System.out.println("Time" + hh +":"+mm+":"+aa+"\n");
         }catch(Exception e) {
         e.printStackTrace();
    This display Time3:30:1
    My JSP Page
    <%@ page import="java.util.*,java.text.*"%>
    <%
    Calendar calen;
    calen = Calendar.getInstance();
    int hh=calen.get(Calendar.HOUR);
         int mm=calen.get(Calendar.MINUTE);
         int aa=calen.get(Calendar.AM_PM);
    %>
    <%=hh%> <%=mm%> <%=aa%>
    This display 2 30 1
    When I run Date in linux server it gives 3:30 PM EST 2004
    I am really confused, why this is happening, If you have any solutions or idea please post the solution.

    My guess is that the weirdness is caused by Daylight savings time.
    I will presume that you and the server are in the same timezone :-)
    Alternatively it could be caused by getting a different Locale.
    Try the following
    Print out "date.getTime()" value (ie long representing number of millis)
    They should be the same (or close) in both the app and in JSP
    Try simple date format in your JSP as well - what does that result in?
    Print the calendar object, and look for the difference.
    It might be in Locale, Timezone, or whether DST is set or not.
    Hope this helps,
    evnafets

  • I'm trying to open a 900kb Word doc (240pages) in Pages but get this error message:  Import Warning - A table was too big. Only the first 40 columns and 1,000 rows were imported.

    I'm trying to open a 900kb Word doc (240pages) in Pages but get this error message:  Import Warning - A table was too big. Only the first 40 columns and 1,000 rows were imported.

    Julian,
    Pages simply won't support a table with that many rows. If you need that many, you must use another application.
    Perhaps the originator could use a tabbed list rather than a table. That's the only way you will be able to contain a list that long in Pages. You can do the conversion yourself if you open the Word document in LibreOffice, Copy the Table, Paste the Table into Numbers, Export the Numbers doc to CSV, and import to Pages. In Pages Find and Replace the Commas with Tabs.
    There are probably other ways, but that's what comes to mind here.
    Jerry

  • Getting error message "Only a type can be imported-" when trying to execute jsp page

    I get the error: "Only a type can be imported. com.adobe.cq.TestServiceImpl resolves to a package in adobe day cq5
    I have created one bundle and installed in felix console. The status of the bundle is also Active. And also it is available in both service and component console.
    Here is my TestServiceImpl class in com.adobe.cq bundle
    package com.adobe.cq;
    import org.apache.felix.scr.annotations.Component;
    import org.apache.felix.scr.annotations.Service;
    import org.osgi.framework.BundleContext;
    import org.osgi.service.component.ComponentContext;
    import javax.jcr.RepositoryException;
    import org.apache.felix.scr.annotations.Property;
    import org.apache.felix.scr.annotations.Properties;
    //src.component
    //declares the class component. This will provide a wrapped ManagedService component in the OSGI container.
    //src.service interface="SampleService"
    //declares the service we are offering. Actually, the interface attribute is superflous, as by default, all implemented Interfaces are used.
    @scr.component
    @scr.service interface="testService"
    @Component(immediate = true, metatype = true)
    @Service
    @Properties( {
    @Property(name = "service.description", value = "abcd"),
    @Property(name = "label", value = "myLabel") })
    public class TestServiceImpl implements TestService {
    public String sayHello() {
         return "Hello World!";
    Here is my jsp code
    <%@include file="/libs/foundation/global.jsp"%><%
    %><%@include file="/apps/mine/includes/functions.jsp"%><%
    %><%@ page import="com.adobe.cq.TestServiceImpl,
    org.apache.sling.api.SlingHttpServletRequest,
                    java.util.List"%><%
    %><%
    SlingHttpServletRequest r = (SlingHttpServletRequest)request;   
                    TestServiceImpl testService = sling.getService(TestServiceImpl.class);
                    out.println("testService:::"+testService);
    %>
    <div id="te-nav" style="display:block !important;">
    </div>
    Is it because of am using annotation in TestServiceImpl class?
    Could you please tell me how to fix it?
    Regards,
    Anderson

    Hi Pawan,
    Thanks for your information. It was problem with my pom.xml It started to work after changing my POM.xml
    I am not able to get sling service for TestServiceImpl. But I am only able to create TestService which is my interface. I need to get reference for TestServiceImpl class not for TestService interface. Please help me to make it.
    i have created TestServiceImpl and TestService class for testing whether my bubdle is crating all the folder structure or not.
    But my requirement is like assume class A has some methods like getMenuLink, setMenuLink.. And In class B i am calling some methods in class A and doing some manipulation in createLink method.
    Here class B does not have any interface. Not implementing  any interface. But I need to get class B refererence via sling.getService.
    I know that if we are using maven SCR plugin..we need to have @component, @service. And All java classes are not services. Will it work if I add activate, deactivate method in class B?
    Could you please tell me how to proceed next?
    Thanks,
    Anderson

  • Warning message on JSP page

    Hi all,
    I have 2 JSP Pages, page 1 contains attachment button for (attachment to be uploaded ) and Done button for navigating to second JSP page. Currently Done button is not wait for the attachment to be uploaded .When user clicks on Done Button if attachment is in processing I need to display warning message like "attachment have not been attached. if you continue, attachment will be lost".with OK Cancel buttons.
    Can anyone please suggest
    Thanks in advance.
    Bhavana

    Please post JSP related queries here...
    JavaServer Pages (JSP) and JSTL
    Thanks
    --Anil
    http://oracleanil.blogspot.com

  • Java.lang.NullPointerException warning beside components on ADF JSP page

    java.lang.NullPointerException warning beside components on ADF JSP page problem
    Hello
    i developed a web application with the help of the Adf technology On jdeveloper 10.1.3.3.0 . Everything is Ok.
    But when i use application sometimes on the page i take a java.lang.NullPointerException warn beside the some components like a inputbox or a radio button ..)
    i looked the logs but nothing.
    How can i solve this problem.
    Have you got any idea?

    Hi,
    it's the validator property on inputText components that causes it. not validation or StateValidation or EnableTokenValidation.
    Paste your inputText source from the page if you are not sure.
    Brenden

  • Warning - When Compiling .jsp pages under WEB-INF

    Created a directory jsp under WEB-INF and when i compile the jsp pages i get the following warning message
    Warning: package name web2d_inf._jsp does not match source file name C:\ProviderEnrollment\ProvEnrollView\classes\.jsps\_WEB_2d_INF\_jsp\_searchprovider.java
    Need help
    Thanks

    We have encountered this warning too.
    I'm not an Oracle employee, but it looks like there's a bug in JDev that preserves the case for the output directories but not for the package name that is supposed to correspond to the output directories.
    In any case, we haven't seen any runtime problems that seem to be related to this warning, so you may be safe to disregard it. It does foul up the build log though.
    Any JDev team members watching this topic are welcome to chime in with a confirmation and details of this apparent bug, as well as any workaround that might exist to avoid having the warning appear. Thanks!

  • Import java-classes in JSP-page

    Hi,
    I'm starting with JSP and with trying one of the first examples in the book "beginning J2EE 1.4" from wrox, i got following problem.
    i'm trying to import a java-class in the package CH03 with
    <%@ page import="Ch03.FaqCategories" %>but he didn't find the package Ch03.
    I try already many things and i have no idea of the cause of the problem. So it's difficult to give information that leads to the solution.
    Maybe helpfull is the direcory-structure:
    jsp-page: /Ch03/welcome.jsp
    java-classe: /Ch03/WEB-INF/classes/Ch03/FaqCategories.class
    If you need source-codes or other information, just ask.
    Thanks,
    Dennis

    Thank you,
    Your help was one step into the good direction and that problem is solved.
    The application work now with studio one, but if i try it to work it with a stand-alone tomcat server it doesn't work anymore. I go first try to solve this problem by my self or at least try to describe the problem more exactly, before i ask for new help.
    but if you have any idea, that's always welcome...
    with regards,
    Dennis

  • ER: organize imports in an "import" attribute of a JSP page directive

    Hi,
    it would be useful to see packages/classes hierarchy when changing the "import" attribute of <%@ page %> directive. It might be as well to have all possibilities of imports processing as in .java classes (autoadding, remove unused import, etc.)
    Thanks in advance.

    Hello Scott,
              First, you have to define this page directive in your static page or JSP
              page :
              <%@ page contentType="text/html; charset=UTF8" %>
              Check your your weblogic.properties file for the following settings:
              weblogic.httpd.inputCharset specifies encoding used when changing into the
              internal code of Java from the parameter of the browser's request. If you
              use Shift_JIS in HTML or JSP, please set
              weblogic.httpd.inputCharset./*=Shift_JIS.
              weblogic.codeset specifies encoding used when jDriver stores data in an
              Oracle database and it changes into the character code of a database from
              the internal code of Java. If you use ja16sjis in Oracle database, please
              set the same encoding as NLS_LANG to weblogic.codeset.
              Hope this helps
              Ludovic.
              Developer Relations Engineer
              BEA Support
              "Scott Mark" <[email protected]> a écrit dans le message news:
              3cd67e5d$[email protected]..
              > Did you ever get around this? Is there an issue with UTF-8 encoding?
              >
              > We are going to have to deliver a site in Japanese soon, and are
              researching how well WLS handles double-byte chars...
              

  • Importing avi files into jsp pages

    hello all. im new to jsp and java. i would like to know how i could import .avi files from my MySQL database (where ive given paths for the avi files) into a jsp page. i am basically trying to make an application that allows users to select particular video files and play them. the user has the ability to upload and delete these videos

    newbie4337 wrote:
    im sorry i guess i didn't phrase that properly. i meant to say that i had saved the paths in the database If you have some saved URLs in the database (URLs to where these avi files can be found)
    you just need to retrieve the URLs and use them when generating links (<a href="..."></a>) in the html produced by your JSP.
    You have already given the paths in the html generated by your jsp? Paths as in URLs?
    Then you must already have a servlet deployed that accepts HTTP requests for .avi URLs and reads the relevant .avi from the database and serves back an avi stream with the right mime type (video/x-msvideo) in the headers...
    ([w3schools|http://www.w3schools.com/media/media_mimeref.asp]).
    could you give me some more info on that?If the URLs are hosted somewhere else you do not need any of this.

Maybe you are looking for

  • Lost all my contacts in my address book

    I am running 10.2.8 All my contacts just disappeared from my address book (no crash or anything unusual). Can anyone give me advice on how to get them back? Or if it is possible. Thank you for any help.

  • Lightroom and/or iPhoto with Apple TV (first 1st generation) integration/streaming

    As a hobby Photographer I love using lightroom, Many times, I want to use apple tv to show the photos, or even just randomly browse them. Now the problem is, there isnt any (or I dont know about one, thats why im here ) easier or more automatic or in

  • Error in uploading excel sheet data into internal table

    Dear all, i am facing problem when uploading data from excel. i used KD_GET_FILENAME_ON_F4.i select the file and pass on to ALSM_EXCEL_INTO_INTERNAL_TABLE.and i get the ERROR....   Illegal type when transferring an internal table to a FORM. this is m

  • Can't install multi-lingual voices

    Trying to DL additional voices for a MB Air, Mountain Lion. It starts the download and after a few seconds show the following error message: The update "Multilingual-Voices can not be installed. An unexpected error occured I've tried with at least te

  • User must change password after reset?

    I am looking at the password policy settings and am wondering what "User must change password after reset� actually does. I turned it on. I tried changing some passwords in an ldap client and didnt get any messages or errors after authn again. And I