COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### jsp textbox Errorjava.lang.NullPointerException

• Email
• Follow

Hello ,

buttons(call,submit).
Onclick of call btn Department.jsp opens and onclick of radiobutton
the deptcode
is displayed in dept textbox(third textbox). I have disabled dept
textbox so that user cannot enter any value.
In this textbox by default null is displayed.

<TD>DEPARTMENT</td>
<td>
<INPUT TYPE="TEXT"  NAME="department"  value=<%=s %> disabled >
onclick="userdept();">
</TD>

Onclick of submit button the values from 3 textboxes are inserted
into database

2 problems are arising one during inserting and other while filling
the textboxes.

1> when I click submit for insertion in database
I get the following error ( related to dept textbox)

DEPT : null Errorjava.lang.NullPointerException

(if dept  textbox property is not disabled value can be inserted into
database)

2>  I have entered value in username and password textbox and then
click call btn and select the appropriate radio btn and
the dept code is displayed in third textbox, but at the same time the
value from the other 2 textboxes vanishes.

I have search but couldn't get the solution,Your help  is required, if
any one could send code will be helpful.
Thanks
Savy


 0

See related articles to this posting

savita wrote:> Hello ,> > >  I have 3 textboxes(username,password, dept) of the jsp page and 2> buttons(call,submit).> Onclick of call btn Department.jsp opens and onclick of radiobutton> the deptcode> is displayed in dept textbox(third textbox). I have disabled dept> textbox so that user cannot enter any value.> In this textbox by default null is displayed.Are you /quite/ sure you have posted this question enough times?-- Lew
 0

1 Replies
90 Views

Similar Articles

12/11/2013 10:11:08 AM
[PageSpeed]

Similar Artilces:

Get value from popup(jsp) to parent(jsp) form
I have a JSP page with a form containing 2 text fields (infact there are many) and I want to add the feature of a help button (instead of drop down). On clicking the button it should popup a jsp page displaying records, afer selecting the record and clicking ok the window should close and populate the corresponding data to the parent form text fields. Infact the popup will be calling a controller servler, it will create a arraylist object in session and forward to a jsp page where the records are displayed. Moreover i want to use javascript only, to communicate between the parent and popup. ...

comp.security.pgp.test,comp.os.os2.networking.server,comp.lang.perl.modules,comp.os.ms-windows.networking.win95,comp.lang.vrml
comp.security.pgp.test,comp.os.os2.networking.server,comp.lang.perl.modules,comp.os.ms-windows.networking.win95,comp.lang.vrml ...

NullPointerException #5
I keep repeatedly getting nullpointerexception errors in a program I am writing for pleasure. Unfortunatly, depsite my continual attempts to fix them, I cannot. Also, any help with the program itself would be nice...: //Map generating test program import java.util.*; public class Main { static Tile[][] map = new Tile[15][10]; public static void main(String[] args) { int x, y, i; Random r = new Random(); for(x = 0; x < 10; x++) for(y = 0; y < 10; y++) map[x][y] = new Tile(x,y,14,9); for(x = 0; x < 15; x++) for(y = 0; y < 10; y++){ {//makes the map i...

Converting to JSP
A question about converting to JSP. As part of converting a website to JSP, I would imagine that every internal link would have to be renamed from *.html to *.jsp. This is not a good thing for several reasons: 1. the world at large has bookmarks and links into your website with the *.html names. 2. the jsp names don't look as safe and friendly. 3. I want to create a downloadable offline website image. It should just link statically to pages. Logically these should be plain *.html with plain *.html links. This means a special pass every time a snapshot is generated to co...

I have a very simple webpage (html form). There are about 50 input textboxes and users are expected to insert data. No I would like to know how in javascript I can check the values in all textboxes not to exceed 1000 in total. I want to click the button that submits the data on the server, to fire a javascript check the values and if less than 1000 then send them over otherwrise popup a message window and say values exceed 1000. Thanks a lot Marios Koumides <koumides@gmail.com> wrote in message news:1109858535.814085.194020@l41g2000cwc.googlegroups.com... > I have a very simple web...

textbox 23901
Can someone please, tell me how to check the value of a textbox in a form, 1, the value must be only a positive number ( not 34ax43) , for input a stock number of product 2, the value must be positive komma and two digits max (eg 150,20) , for input price value Thank you, Vagos Thessaloniki Greece In article <1109866123.924844@athnrd02>, vagos@freemail.gr enlightened us with... > Can someone please, tell me how to check the value of a textbox in a form, > > 1, the value must be only a positive number ( not 34ax43) , for input a > stock number of product > 2, the va...

Expanding Textbox
Is there a way to make an autosized textbox relative to the content, here is my attempt: <script type="text/javascript"> function checkHeight(el){ var newrows=Math.round(Form.Element.getValue(el).length/30); el.rows=(newrows>0) ? newrows : 1; } </script> <textarea style="font-size:14px;font-family:Lucida Grande, Arial, Helvetica, sans-serif" id="description" rows="1" cols="30" onkeydown="checkHeight(this);"></textarea> <input type="button" onclick="checkHeight(\$('description')...

structured lang?
Hello, I have a very basic doubt. Why is C called a structured programming language??why structured? C++ is called a Object Oriented language 'cos it obeys the OOP's concepts..Why is C called a structured programming lang?? Thanks to all those who are gonna answer.. -ambika ambika <indambika@yahoo.com> scribbled the following: > Hello, > I have a very basic doubt. > Why is C called a structured programming language??why structured? > C++ is called a Object Oriented language 'cos it obeys the OOP's > concepts..Why is C called a structured programming lang??...

lang.c++
Dear Friend, I have found some great articles at: http://www.familyandtwist.com/ http:www.articlestwist.com/ http://www.downloadstwist.com/ http://www.wallpaperstwist.com/ Read them all. Thanks ...

comparision in jsp
right now i m using <% if (request.getAttribute("Error1") != null) { %> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp <font color = "red"><%= request.getAttribute("Error1") %> <% } %> now i want to complare request.getAttribute("Error1") with a value 303, which i got from setAttribute("Error1","303")). i want, if(request.getAttribute("Error1") is equal to 303) can anybody tell me the correct syntax for it in jsp. You can use if...

JSP/Servlet projects
Hi friends, I am learning JSP... I require JSP projects....You maymail me....giridharan24@gmail.com........

latex problem in textbox
hi all, I want to put a latex table in the textbox of a figure. This all works fine but in the table I want to have a subscript where it says 'v_L' in the code below. cs = '\begin{tabular}{lll} v_L&=&0.7 m/s\\ S&=&1.02 +- 0.01\\ t&=&16.67 sec \end{tabular}'; ha = annotation('textbox',[0.15 0.75 0.3 0.15], 'Interpreter', 'latex'); set(ha, 'String', cs); the above code doesn't do a subscript but shows the underscore instead, similar I want the +- to change in the plus-minus sign. normal code for this would be /pm bu...

Re: JSP Files
In article <C5D9FEF5.34B5C%nicknaym@[remove_this].gmail.com>, Nick Naym <nicknaym@[remove_this].gmail.com> wrote: > Having never messed with JSP files before, I'm somewhat at a loss as to why > a document that apparently is (underneath it all) a PDF document is offered > in JSP format to begin with, and what folks typically use to open .jsp > files. See <http://tinyurl.com/aouw99> In article 080320092114417950%dave@N_O_T_T_H_I_Sbalderstone.ca, Dave Balderstone at dave@N_O_T_T_H_I_Sbalderstone.ca wrote on 3/8/09 11:14 PM: > In article <C5D9FEF5.34B5C...

Textboxes in XSL-FO
hi all, I have a XML file which specifies textboxes by some x and y values, that specifies where that particular textbox should be rendered on a particular page. My question is it possible (and if so how) to just say something like <xsl:for-each select="textbox"> and then reading the x, y and width and height from the attributes and put it on the page (the page number is also specified in an attribute). thanks for any help, Jurrie ...

Hello, I am stuck with a problem trying to mimic the behavior of a Windows Forms Readonly textbox in HMTL/ASP.NET. Basically, I would like the text to be readonly and overflow the textbox (overflow attribute) with the user being able to scroll thru the text using the arrow keys within the textbox. I managed to get the readonly and the overflow part to work but cannot figure out a way to let the user place the cursor within the box and allow scrolling within a readonly textbox. Any help would be very appreciated.... Thanks Kannan Hi, I think old good html will fit your needs: <div st...

result set in jsp
i want to use two result sets in my coding like: rs = st.executeQuery("select qty from instance where instance_name ='kvm' "); rs.first(); rs1= st.executeQuery("select status from reservation where instance_name='kvm' "); rs1.first(); i m not able to use it like this, its generating errors. please tell how can i do this. ...

Problem with jsp:getproperty
I am having an textbox inside a form , form is used for entry andedit .I have used an useBean to display the values while edit.while i go for edit i have to write java code asif(bean1.getMethod()!=null){<jsp:getproperty name="bean1" property="method" />}Is there any possiblity to avoid code inside the jsp.Thanks in Advance! Meendar wrote:> I am having an textbox inside a form , form is used for entry and> edit .> I have used an useBean to display the values while edit.> while i go for edit i have to write java code as> > if(bean1.getMethod()!=null)&...

Validating asp textbox
Hi, I am a newbie to javascript. I have an asp text box which I want to validate for the number of characters entered i.e. I dont want user to enter more than 280 characters in the text box. Can somebody please help me out with this. Thanks a bunch. On Fri, 8 Jul 2005 geek <metri.jain@gmail.com> wrote: > Hi, > > I am a newbie to javascript. > I have an asp text box which I want to validate for the number of > characters entered i.e. I dont want user to enter more than 280 > characters in the text box. > > Can somebody please help me out with this. Check out...

improving JSP logic
If I'm in the rwong newsgroup, please point me where to post I'm plunging into the world of JSP development and I'm wanting to improve on this type of [messy] logic: <% int rowCount = 0; %> <logic:iterate id="oi" name="myForm" property="stuff"> <% if (++rowCount % 2 == 0) { %> <tr class=normalRow> <% } else { %> <tr class=altRow> <% } %> <td><bean:write name="oi" property="group3Name" /></td> </tr> </logic:iterate> My attempts have been ...

Grab the text from a textbox
Guys, I need to know what kind of characters is being used in a textbox, whether Latin or Unicode. Depending on that I want to make a countdown. For example: if the characters are Latin, i want the countdown to start with 200 if it contained a unicode character, then it will start with 100. Any ideas? teddy.am@gmail.com wrote: > Guys, > > I need to know what kind of characters is being used in a textbox, > whether Latin or Unicode. Depending on that I want to make a countdown. > > For example: > > if the characters are Latin, i want the countdown to start with 200...