Can any one help me, im having a "java.lang.NumberFormatException: null"

im doing a simple servlet and i got this error
"java.lang.NumberFormatException: null"
package process;
* CreateCustomerServlet.java
* Created on July 25, 2007, 10:04 AM
import java.io.*;
import java.net.*;
import javax.annotation.Resource;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import javax.sql.DataSource;
* @author SLI08
* @version
public class EnrollmentInfoServlet extends HttpServlet {
@Resource(name = "School_system")
private DataSource school_system;
/** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String Sch_term = null;
String rmk = null;
int Sch_year = 0;
int enrollmentID = 0;
int i_StudID = 1;
String StudID = request.getParameter("StudentID");
String sts = "";
String msg="";
//validate
Connection conn = null;
PreparedStatement pstmt = null;
try{
i_StudID = Integer.parseInt(StudID);
conn = school_system.getConnection();
pstmt = conn.prepareStatement("SELECT * FROM Enrollment WHERE StudentID=?");
pstmt.setInt(1,i_StudID);
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
enrollmentID=rs.getInt("EnrollmantID");
Sch_year=rs.getInt("SchoolYear");
Sch_term=rs.getString("SchoolTerm");
rmk=rs.getString("Remark");
sts=rs.getString("Status");
HttpSession session = request.getSession();
session.setAttribute("Enrollment",enrollmentID);
session.setAttribute("SchoolYear",Sch_year);
session.setAttribute("SchoolTerm",Sch_term);
session.setAttribute("Remark",rmk);
session.setAttribute("Status",sts);
response.sendRedirect("testdisplay.jsp");
}catch(SQLException ex){
throw new ServletException(ex.getMessage());
}finally{
if(conn!=null) try{conn.close();}catch(SQLException e){}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
/** Returns a short description of the servlet.
public String getServletInfo() {
return "Short description";
// </editor-fold>
}

request.getParameter("StudentID");
I think it maybe "null"
test :
if(request.getParameter("StudentID") == null)
System.out.println("yes,it is null");i tried to comment out the "request.getParameter("StudentID")" and i put a default value of "1" which is present in my database and still i got the same error..

Similar Messages

  • Hello i am having a problem in my 4s that it dosent run any USSD code it goes on calling , can any one help me i am mack from Karachi Pakistan

    Hello i am having a problem in my 4s that it dosent run any USSD code it goes on calling , can any one help me i am maqsood  from Karachi Pakistan

    Ok so I've done what you said and this is what it's come back ....
    I don't know that these are the errors , but they're the things which don't look right ...
    Throughout the shut down there is a recurring line ;
    It says ;
    Com.apple.launchd 1 0x100600e70.anonymous.unmount 301 PID still valid
    Then there are 2 more which I think are related ;
    Com.apple.securityd 29 PID job has I overstayed its welcome , forcing removal.
    Then the same with fseventd 48 and diskarbitrationd 13
    Oh and on Launchd1 : System : stray anonymous job at shut down : PID 301 PPID13 PGID 13 unmount...
    Then the last process says "about to call: reboot (RB_AUTOBOOT).
    Continuing...
    And stops ...
    Hope this means something to you ... Thanks again for your help so far :-)

  • Im having trouble using bbciplayer on my ipad it says i need to switch to wifi but im already connected can any one help?

    im having trouble using bbciplayer on my ipad it says i need to switch to wifi but im already connected can any one help? I ve uninstalled/ reinstalled  switched it on and off what next?

    Did you try downloading the movie from iTunes on your iPad?  I know it takes longer but I'd try that. 
    Also try to reset all settings. 
    Settings > General > Reset. Reset all settings. 

  • HT3606 I have Mac OS X version 10.5.8 and so im wondering what is the next step i need to get. i have tried to get snow leopard and other things and not having any lukck . can any one help me out pls.

    I have Mac OS X version 10.5.8 and so im wondering what is the next step i need to get. i have tried to get snow leopard and other things and not having any lukck . can any one help me out pls.

    If your Mac meets these requirements:
    http://support.apple.com/kb/SP575
    then you can order a Snow Leopard disk and install it.
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Ciao.

  • I cant connect my i phone 4 to my sony vaio laptop via bluetooth  i am  having problem can any one help me how can i connect my i phone 4 to my laptop using bluetooth i tried to paired but it just doesnt work help me pls!!

    i cant connect my i phone 4 to my sony vaio laptop via bluetooth  i am  having problem can any one help me how can i connect my i phone 4 to my laptop using bluetooth i tried to paired but it just doesnt work help me pls!!

    Unless you're trying to tether your phone to your computer or create a personal hotspot, it won't pair with your computer by bluetooth. File transfer by bluetooth is not supported. So, you can quit trying unless you're trying to tether.

  • Can any one help me in configuring internet on E220R

    Hi All,
    I am trying to configure internet on E220R and on Solaris 8.
    I am having a Linksys router and default IP for my router is 192.169.15.1
    I am using Roadrunner High speed broad band connection.
    Subnet mask : 255.255.255.0
    Default Gateway : 192.168.15.1
    DHCP Server : 192.168.15.1
    DNS Server: 192.168.15.1
    I have not configured and domain name server here. Then what will be my domain name to add in the reslov.conf.
    With these details can any one help me. Your apprciate your help.
    Thanks
    Raj.

    PChandran wrote:
    Thank you Jerry. Are you aware of any program that does plot Value vs. Label other than Excel, or does Numbers do it as well?
    Chandran
    Chandran,
    Yes, Numbers does it well, with two value axes and one category axis. When you Insert the Chart from the Insert menu, it's called 2-Axis. When you use the icon on the Toolbar it's the last choice in the list.
    Jerry

  • Have just down loaded Yosemite over Mountain Lion, Indesign CS5 does not work ( Am dependant on it) although Bridge , Light Room and Elements operate OK How do I solve this rapidly. Can any one help on this issue. Thanks

    Have just down loaded Yosemite over Mountain Lion, Indesign CS5 does not work ( Am dependant on it) although Bridge , Light Room and Elements operate OK How do I solve this rapidly. Can any one help on this issue. Thanks

    Sorry to say it, but I think you can see from Bob's response that there's no way to solve this rapidly.
    Did you take an image of your Mountain Lion install before upgrading to Yosemite? Roll back to that. If you're not in the habit of taking a snapshot of your system before performing operating system upgrades - get in that habit. If you are dependent on anything at all on hour computer, having a reliable backup method in place is essential. If you don't have a Time Capsule, or some other way to run Time Machine onto a disk that's not in your computer, go set that up yesterday.
    If you can't just remove Yosemite and roll back to Mountain Lion for whatever reason, you can partition your drive so that you can install both Yosemite and Mountain Lion on the same drive, and then boot into Mountain Lion when you need to work in CS5. Or you can take your Mountain Lion disc (I assume you have one, no?) and then use it to create a virtual machine in something like VirtualBox to run Mountain Lion from inside Yosemite.

  • My notebook cord recently short fused the office. I have replaced the cord and the computer seems to working fine, except the internet wont work. It states it is connected in the network preferences. can any one help?

    My notebook cord recently short fused the office. I have replaced the cord and the computer seems to working fine, except the internet wont work. It states it is connected in the network preferences. can any one help?

    Hi LanaJay84,
    If you are having issues connecting to the Internet from your Mac, you may find the following articles helpful:
    Wi-Fi: How to troubleshoot Wi-Fi connectivity
    http://support.apple.com/kb/HT4628
    Mac OS X: Troubleshooting a cable modem, DSL, or LAN Internet connection
    http://support.apple.com/kb/ts1317
    Regards,
    - Brenden

  • Can any one help me in fi/sl extraction

    can any one help me in fi/sl extraction.i am not able to get data in cube please send me screen cut of fi/sl extraction.
    Edited by: chaitanya pissay on Apr 11, 2008 7:26 AM

    Hi Chaitanya,
    Check here........
    FI-SL Extraction
    FI /SL extraction
    http://help.sap.com/saphelp_nw70/helpdata/EN/04/e04c40cc538437e10000000a155106/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/FISL/FISL.pdf
    Fi_SL data model
    http://help.sap.com/saphelp_bw32/helpdata/en/af/16533bbb15b762e10000000a114084/frameset.htm
    Regards,
    Vijay.

  • Can any one help me in this code

    Hi all,
    I have created a selection screen and my aim is to display some fields or some block dynamically by choosing some radio button is it possible.
    can any one help me in this.
    REPORT  z_g_test.
    TABLES: spfli,sbook,sscrfields.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:s_carrid FOR spfli-carrid.
    SELECTION-SCREEN END OF BLOCK 1.
    PARAMETERS:rad1 RADIOBUTTON GROUP g1 USER-COMMAND us1,
               rad2 RADIOBUTTON GROUP g1 DEFAULT 'X' .
    SELECTION-SCREEN BEGIN OF SCREEN 001 as subscreen ."WITH FRAME TITLE text-002.
    SELECT-OPTIONS: s_fldate FOR sbook-fldate.
    SELECTION-SCREEN END OF SCREEN 001.
    DATA ok_code LIKE sy-ucomm.
    INITIALIZATION.
    START-OF-SELECTION.
      SELECT * FROM spfli WHERE carrid IN s_carrid.
      ENDSELECT.
    END-OF-SELECTION.
      WRITE:spfli-carrid.
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
          WHEN'US1'.
    *      call screen 001 starting at 55 40.
      ENDCASE.
    Is i am going on the right way
    Regards,
    Lisa.
    Message was edited by: Lisa Roy
    Message was edited by: Lisa Roy
    Message was edited by: Lisa Roy

    This is what I meant. Copy this and try as it is and see if it serves your purpose.
    REPORT ztest1 .
    TABLES: spfli, sscrfields, sbook.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 4 LINES.
    SELECTION-SCREEN TAB (25) tabs1 USER-COMMAND ucomm1
                         DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (25) tabs2 USER-COMMAND ucomm2
                         DEFAULT SCREEN 002.
    SELECTION-SCREEN END OF BLOCK tabb1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE abc.
    PARAMETERS: p_date LIKE sy-datum.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN .
    SELECT-OPTIONS: s_fldate FOR sbook-fldate.
    SELECTION-SCREEN END OF SCREEN 001.
    SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN .
    SELECT-OPTIONS:s_carrid FOR spfli-carrid.
    SELECTION-SCREEN END OF SCREEN 002.
    INITIALIZATION.
      tabs1 = 'Search by flight date'.
      tabs2 = 'Search by flight number'.
      abc   = 'Some other parameters'.
    AT SELECTION-SCREEN OUTPUT.
      CASE sscrfields-ucomm.
        WHEN 'UCOMM1'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 001.
          tabb1-activetab = 'TABS1'.
        WHEN 'UCOMM2'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 002.
          tabb1-activetab = 'TABS2'.
      ENDCASE.

  • Can any one help me to code a browser

    hi ,
    I am Anil, I am doing an application in java. it needs a browser as IE or Morzilla . i tried to implement the browser using jdic.
    i add jdic.jar files as a external jar file and added it to my project. when i run the program in eclipse it works fine. when i want to create a jar file to my application it shows the follwing error..
    when i click on that jar file , it shows a Java Virtual Machine Launcher dialog box and in that dialog box it shows error Could not Find the main class. Program will exit ..
    this is the error.
    can any one help me to over come the error or any alternative method to implement a browser..

    DarrylBurke wrote:
    Corss poster!
    [http://www.java-forums.org/advanced-java/30298-how-write-job-aggregator-java-j2ee.html]
    dbNot anymore, Fubarable has axed that thread.

  • Hello, every one. Over the last few days I haven't been able to download any app from the app store. can any one help me, please?

    Over the last few days I haven't been able to download any app. can any one help me, please ? thank you.

    Andrea...
    You posted in the "Using Mac App Store" forum but your profile indicates you are using an iPad so that's what I'll try helping you with.
    On the iPad tap Settings > General > Reset > Reset Network Settings
    Then restart the iPad.  Hold the On/Off Sleep/Wake button down until the red slider appears. Slide your finger across the slider to turn off iPhone. To turn iPhone back on, press and hold the On/Off Sleep/Wake button until the Apple logo appears.
    If you still can't download apps, the problem may be your Wi-Fi connection >  iOS: Troubleshooting Wi-Fi networks and connections

  • HT1338 When I connect my Macbook Pro to my Dell DLP projector, either via cable or wirelessly, I just see a dark screen with the mouse and mouse trails only, can any one help?

    When I connect my Macbook Pro to my Dell DLP projector, either via cable or wirelessly, I just see a dark screen with the mouse and mouse trails only, can any one help?

    jpmarkques post is a good start point, after folling his directions, you can try detect displays. Also try different rsolution and refresh rates.
    Most of the projectors I have used support a 1024X768 res.
    Youcan also try a pram reset if it still does not detect.
    Leave theproctor connected and powered up, power down the MBP.
    Power back up the MBP and hold the following keys before you hear the start up chime:
    Option, command, P,R (no commas) continue to hold these keys till you hear the start up chime 2 times.

  • Safari keeps crashing every time I try to open a link from a different application, i.e. Mail. The trouble report says that some problem occurs with libcooliris.dylib plug-in. Can any one help?

    Safari keeps crashing every time I try to open a link from a different application, i.e. Mail. The trouble report says that some problem occurs with libcooliris.dylib plug-in. Can any one help?
    Thanks!

    Dear Linc,
    Thank you for the advice, John Blanchard1  and Linc Davis
    As suggested in your reference thread I removed "/Library/Printers/hp/PDEs/hpPostScriptPDE.plugin" and the problem has been resolved.
    I am guessing the the plug-in for the hp printers got corrupted and effected every thing, or became unsuitable when I installed an Apple update. I would be most grateful if you can confirm how the problem was coursed so I can understand and learn from this experiance.
    Ash

  • Since itunes and apple tvs latest update I have had problem wtching movies on apple tv via my itunes can any one help, movie takes a very long time to load sometimes never, it use to work really well, whats going on please help?

    Since itunes and apple tvs latest update I have had problem wtching movies on apple tv via my itunes can any one help, movie takes a very long time to load sometimes never, it use to work really well, whats going on please help?

    You might find useful information in item D1 of Time Machine Troubleshooting.

Maybe you are looking for

  • I'm having a potpourri/Hat-Trick of issues after upgrading to Firefox 7.0.1

    The only reason I'm asking is because the three new issues occurred immediately after upgrading from the last install of Firefox to the newest release, Firefox 7.0.1 The first: for some reason I have to go to about:config to reset the "Close Tabs" pa

  • Using Coherence and Oracle Database as the CacheStore

    We are working on implementing a solution using Coherence and Oracle Database as the CacheStore. We initially implemented the Cache as a distributed-scheme which in turn uses the backing-map-scheme. We are trying to introduce transaction management a

  • JAR files just won´t run, multiple systems, JRE & JDK installed.

    Hi! I´ve been looking on many different places for an answer for this issue: I have to run different JAR files for applications, one is from Apache ActiveMQ, and the other is a hash calculating app. I´ve read on many topics that if you get error "Fai

  • WebEx session records issue

    Hi Guys, I have a problem is that when we attempt to record a webex session to be saved on WebEx server (in the cloud), using local MeetingPlace server and Webex Node, the video recording works but no audio is recorded. If we attempt to use Webex Mee

  • XI software list.

    Hi All, I am trying to do the XI3.0 installation. In order to install the SAP WEBAS (Abap and java), i have found the related guides. In the media information of WEBAS for ABAP on Oracle databse, i am confused and unable to find the link to for softw