3,747 Topics

Member Avatar for
Member Avatar for nHulk

**registerBean.java** public void onEdit(RowEditEvent event) { Connection con = null; PreparedStatement stat = null; ResultSet rs = null; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/db", "root", ""); stat = con.prepareStatement("update regtbl set fname=? where rno=?") ; stat.setString(1, fname); stat.setInt(2, rno); stat.executeUpdate(); con.close(); } catch (Exception e) { e.printStackTrace(); } } ** …

Member Avatar for LastMitch
0
484
Member Avatar for anand01

Hi all, I have problem with mb spring application I want to configure my url,my url should be like this **www.site.com/admin/login, www.site.com/admin/addproduct** I tried following way , its working fine, <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> but when I changed like this <url-pattern>/</url-pattern> my images are not loading Any one could help …

Member Avatar for LastMitch
0
103
Member Avatar for shopnobhumi

Hi, i want to convert a .jsp file to .java file. I read various forums and they said to use tomcat to convert .jsp to .java.I have ran tomcat but it is not doing anything(i cannot write anything). Through command prompt i ran it and it just opens a new …

Member Avatar for stultuske
0
4K
Member Avatar for Markancia

I am a beginner in j2ee, I met a problem when retrieving an image already stored in the database. I am using Hibernate and JSP, the code I used is as follows: / / java code: s.setAttribute ("photo", l.getPhoto ()); StringTokenizer st = new StringTokenizer (s.getAttribute ("photo"). ToString (), "/"); …

Member Avatar for LastMitch
0
359
Member Avatar for Neha290791

hi.. iam developing a jsp application. Iam using two columns called open_time and resolution_time. The thing I want is the time difference between two dates but iam unable to do so. please guide me accordingly. Iam using timestamp for the date & time.

Member Avatar for LastMitch
0
771
Member Avatar for Neha290791

Hi, iam new to jsp. actually my problem is with the format of date and time.Datea nad time stored in database are in hh:mm:ss format. but when i am displaying reports, nanoseconds are displaying. please give reason for this.

Member Avatar for radhakrishna.p
0
180
Member Avatar for chandub

hi. when a user request hits the ActionForm's validate method (struts)and bounces back, i'm loosing some request attributes that i had set for the page. In other words, if the user inputs some data that don't pass the validate method, the page comes back with a few request scope attributes …

Member Avatar for LastMitch
0
210
Member Avatar for bably raj

i have to create a website in jsp using sturts in netbeans ide.i wants to knowhow to gt record values from d database on my webpage.

Member Avatar for stultuske
0
59
Member Avatar for riahc3

Hey I have a program in retrieving data from a HTML page with Javascript using Java. Lets say I have the structure of C:/index.html C:/js/script.js index.html contains: [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript" src="js/script.js"></script> </head> <body> <a href="javascript:void(0);" id="add"><img src="images/menunew.png" alt="plus" border="0" /></a> …

Member Avatar for Sammy@
0
2K
Member Avatar for javalover

Hi frnds, I am developing a struts2 project, I do require how to multiply to variable using struts tag ... I tried with this code below, <s:set var="total" value="var1" /> <s:set var="tot" value="%{var2 * #attr.total}"></s:set> <s:property value="%{'' + #attr.total}"/> AM getting the output as 0.0 .. Please any help ...

Member Avatar for LastMitch
0
124
Member Avatar for Qonquest

I'm going through a netbeans tutorial on Java ecommerce located here: http://netbeans.org/kb/docs/javaee/ecommerce/setup-dev-environ.html When I get to "running the web project, step 1", I click the green run button in the NetBeans IDE. In my browser, it goes to http://localhost:8080/AffableBean, but no HTML is displayed. If I view the admin domain …

Member Avatar for LastMitch
0
184
Member Avatar for xxmp

Hello i am trying to use cookie at my site. I used this code for set the cookie try{ Cookie cookie1 = new Cookie("thesiteid", Integer.toString(site_id)); cookie1.setDomain("localhost"); cookie1.setPath("/"); cookie1.setMaxAge(24*60*60*365); response.addCookie(cookie1); System.err.println("Set cookie"); } catch (Exception e){ System.err.println("Error in creating the cookie: "+e.getMessage()); } The problem is that is not working at …

Member Avatar for jayvee88
0
185
Member Avatar for shwetha.marigowda
Member Avatar for shibu2all

Hello, I have a Mysql table, where i want that after i execute the update query in the JSP form, an automated mail is send to the email id in the record.Can anyone tell me how to do this?

Member Avatar for stultuske
0
151
Member Avatar for rahul pareek

hello there I m trying to do database connectivity with sqlserver2000 it runs if i write that code in a normal java file but if i run that code with jsp file it gives an exception com.microsoft.jdbc.sqlserver.SQLServerDriver Although i hav set the CLASSPATH of Jar file for sqlserver 2000 here …

Member Avatar for rahul pareek
0
135
Member Avatar for SidNoob

Hello guys. I'm getting an error as follows: Error I get on the browser:- type Exception report message: descriptionThe server encountered an internal error () that prevented it from fulfilling this request. exception: org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: string:///GuestBookView_jsp.java:8: cannot find symbol symbol …

Member Avatar for LastMitch
0
226
Member Avatar for rahul pareek

ResultSet rs=st.executeQuery("select * from category"); rs.moveToInsertRow(); rs.updateString("cname",c); rs.insertRow(); rs.moveToCurrentRow(); i want to insert new row in table of sqlserver2000 database the row should insert at last in a table .can i use variable at place of value in updateString("column name","value") the code i m using is here

Member Avatar for LastMitch
0
90
Member Avatar for ct_hunny

hello i have some problem in showing button, when data exist and data not exist. i want the button show if data exist also data not exist. my current problem right now the button only show when data exist but the button automatically hide when data not exist. here what …

Member Avatar for LastMitch
0
122
Member Avatar for hwoarang69

i getting error when i run my jsp project "starting tomcat v7.0 server at localhost has ecountered a problem. Server v7.0 server at localhost was undable to start within 45 mins." i think the problem might be in my web.xml fine under web-inf folder. may be i am not using …

Member Avatar for peter_budo
0
272
Member Avatar for participantjava

Hi, I want to pass String array to the javascript function when the page is getting loaded. Iam using jsp and javascript for doing this. But could not able to send the Stirng array to the javascript function. <%! String msg[] = {"one","two","three"}; %> <input type="button" name="save" value="Save" onclick="show(msg);" /> …

Member Avatar for radhakrishna.p
0
4K
Member Avatar for xxmp

Is there any way to add a parameter of previous page to the existing URL? I found the parameter i want from the previous URL i only want to add it at the existing URL Thank you very much

Member Avatar for LastMitch
0
81
Member Avatar for xxmp

Hello I want to make a site that the user upload an image. For now i do not upload images that are more than a size. But i want change it. When the image is bigger than 1 MB i want to resize it to 1 MB or to the …

Member Avatar for LastMitch
0
94
Member Avatar for rahul pareek
Member Avatar for LastMitch
0
74
Member Avatar for anisha.silva

hi what i wan to do is to get the customer ID from the glassfisn database and displaindey it in a drop down box in a jsp page. in the index.jsp page how to i call the servlet so that the the servlet would load the jsp page? i have …

Member Avatar for anisha.silva
0
548
Member Avatar for shibu2all

Hi, I don't know if this question makes any sense, but i need to get some answers. I am working on a project, where i am using a file encrytion/decrytion program.Now i have this .java program which is working perfectly from the command prompt and encryting/decryting files Now , the …

Member Avatar for shibu2all
0
332
Member Avatar for biswa2ray

I have created email account in my website(ex: info@mywebsite.com) to use it for sending clients feedback.please guide me in jsp code to solve problem..

Member Avatar for biswa2ray
0
179
Member Avatar for ayanbizz

I have a jsp page where I have embedded a video.Now I want a link to appear ,(after the video is played at least once) for the user to navigate to another jsp page. How will I do it? I have used <EMBED> tag to add the video to the …

Member Avatar for LastMitch
0
186
Member Avatar for ruchi18

Ok I know many of you already done with this sort of situation i have a form which have few fields and on submitting that form i want these field values save into two tables. Both the tables contains a primary key and foriegn key. Let table one have id …

Member Avatar for ruchi18
0
1K
Member Avatar for vidyya06

hi friends need to display the questions and options using radio button such as online quiz ,, i tried but sequentially iam getting a first question with fist options of all questions ,, kindly help me to display first question with its options and second questions with its options thanks …

Member Avatar for urtrivedi
0
908
Member Avatar for hatebin

Hi all ! 1. I'm developing a Database Web aplication with PrimeFaces, JSF frameworks. 2. I've allready implemented Managment Bean, Session Bean and EntityClass. 3. What's the problem ? I need to populate `<p:dataTable>` with data from Dbase, but I need filtering on dBase level, because I'm going to deel …

Member Avatar for LastMitch
0
189

The End.