User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 397,816 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,594 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 868 | Replies: 1
Reply
Join Date: Aug 2006
Posts: 9
Reputation: tmv105 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tmv105 tmv105 is offline Offline
Newbie Poster

Error in JSP not allowing to use my class methods

  #1  
Apr 21st, 2007
I hope that I'm posting this correctly. I have populated a vector of my resultSet from a query. I tested it on an application side code and am now trying to access a method from my web side jsp.
Here is my error page:
org.apache.jasper.JasperException: Exception in JSP: /searchResults.jsp:32 29: String colChoice = request.getParameter("colChoice"); 30: String tableChoice = request.getParameter("tableChoice"); 31: 32: resultQuery.createSearchQuery(tableChoice, colChoice, searchWord);

Here is my embedded code:
<%
      ConnectDB resultQuery = new ConnectDB();
      Vector tableResults = new Vector();
      Vector row = new Vector();
      
      String searchWord = request.getParameter("searchWord");
      String colChoice = request.getParameter("colChoice");
      String tableChoice = request.getParameter("tableChoice");
      
      resultQuery.createSearchQuery(tableChoice, colChoice, searchWord);
      //tableResults = resultQuery.storeResultSet();
       
      %> 
<table border=2>
<%
        String strData;
        for (int i=0; i<tableResults.size(); i++)
        {
            row = (Vector)tableResults.get (i);
            for (int j=0; j<row.size(); j++)
            {
                strData = (String)row.get (j);
                %><p><%out.print(strData);%></p>
          <%}
        }
    
%>

can anyone help me figure why i can't access my method?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,661
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 193
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Error in JSP not allowing to use my class methods

  #2  
Apr 22nd, 2007
Don't use scriptlets, put that code in a servlet.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 6:36 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC