Hello all,
Im trying to import a class into a JSP file. At the beginning I got the an error saying "Generated servlet error: Only a type can be imported. SDTDeal resolves to a package" After a lot of googling I found I wasn't placing my class files in the WEB-INF\classes\ directory and my classes weren't public. But after I fixed all of that I got the following error: "An error occurred at line: 113 in the jsp file: /SD Tool/CheckNew.jsp Generated servlet error: SDTDeal cannot be resolved" I heven't find a way to solve this issue since the error message is too general. Can somebody please give me some help at least to get me going on to how to solve this problems. P.S. Here is the JSP code: <%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <%@ page import="SDT.SDTDeal" %> <%String connectionURL = "jdbc:microsoft:sqlserver://HLEVEL1:1433;databasename=sdt"; Connection connection = null; Statement statement = null; PreparedStatement insert= null; ResultSet rs = null; Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstanc e(); connection = DriverManager.getConnection( connectionURL, "harol3", "toto2409"); statement = connection.createStatement(); String user = request.getParameter("user"); String password = request.getParameter("password"); String name=request.getParameter("name"); String company=request.getParameter("company"); int day=Integer.parseInt(request.getParameter("day")); int month=Integer.parseInt(request.getParameter("month")); int year=Integer.parseInt(request.getParameter("year")); String checkbox=request.getParameter("checkbox"); boolean fail=false; if(name.trim().equals("")) { fail=true; %> </p> <p><span class="style7">Fill in the name of the Deal </span></p> <p> <% } else { rs = statement.executeQuery("SELECT name FROM deals WHERE name LIKE '"+name.trim()+"'"); if(rs.next()) { fail=true; %> </p> <p><span class="style7">This name is being used by another deal </span></p> <p> <% } } if(company.trim().equals("")) { fail=true; %> </p> <p><span class="style7">Fill in the Company Name</span></p> <p> <% } if(checkbox==null) { if((month==4||month==6||month==9||month==11)&&day==31) { fail=true; %> </p> <p><span class="style7">The selected month does not have 31 days</span></p> <p> <% } if(month==2&&day>28) { fail=true; %> </p> <p><span class="style7">The selected month have less than 29 days</span></p> <p> <% } } if(fail) { %> </p> <form action="New.jsp" method="post" name="form1" target="rightFrame" class="style4" id="form1"> <div align="left"> <input type="hidden" value = "<%= user%>"name="username" /> <input type="hidden" value = "<%= password%>"name="password" /> <input type="submit" name="Submit" value=" Back " /> </form> <p> <% } else { SDTDeal deal = new SDTDeal(day,month,year,company,name); try { ObjectOutputStream dout= new ObjectOutputStream(new FileOutputStream(new File(name+".deal"))); dout.writeObtect(SDTDeal); insert = connection.prepareStatement("INSERT INTO deals VALUES ('"+name+"','"+company+"','IP','"+user+"')"); insert.executeUpdate(); %> </p> <p><span class="style7">New deal created Successfully</span></p> <p> </p> <form action="Work.jsp" method="post" name="form1" target="rightFrame" class="style4" id="form1"> <div align="left"> <input type="hidden" value = "<%= user%>"name="user" /> <input type="hidden" value = "<%= password%>"name="password" /> <input type="hidden" value = "<%= name%>"name="name" /> <input type="hidden" value = "<%= company%>"name="company" /> <input type="submit" name="Submit" value="Go to first evaluation" /> </form> <p> <% } catch(Exception e) { e.printStackTrace(); } } %> Regards and your help is very welcome, Haroldo Level Jr --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]