3,747 Topics
| |
[code=Java]public class logout extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { process(request,response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { process(request,response); } public void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); session.invalidate(); response.sendRedirect("index.jsp"); } }[/code] session is … | |
Hi All, I'm having issues with a for loop in .jsp. The second for loop in red will not post anything to the webpage. It will do work with variables. But when I try putting something like [B]<%=employeeIDArray[i]%>[/B] in the loop it does not work. Any help is appriciated. [CODE] … | |
i have two Jsp's pages. on main.jsp have some list of schools. from there i can go home page of any school. home.jsp represents a school home page. in home.jsp have some links like message, vision, addmission etc. when i click on any of these link then i get some … | |
hi, i just need to pass the value from my html page to my servlet...it is not working...pasting the code below.. [CODE] <html> <head> </head> <body> <form name="frm" method="GET" action="http://localhost:8080/connect/ConnectServlet.java"> <input type="text" name="txtName"> <input type="submit" name="btSub"> </form> </body> </html> [/CODE] my Tomcat is running and i am able to run … | |
Hey lads, Firstly apologies for the long message. I just thought it might be easier to explain my issues. I'm doing a website for myself and have been getting some amazing info from this forum. I've moved onto the database part to it. Now, for my website, user can sign … | |
G'day, My problem is not one that is overly complex but i have been unable to find a simple solution to my problem. My problem is that i have my given form with two submit buttons, for which I'm using images. Once i click on the images, how do i … | |
In jboss, if i use localhost to access the application then its working and if i use ip address its not working why !!!!!!!! can anybody suggest ? | |
[code=java]package jee5study.exercise.disboard.servlet; import java.io.*; import java.net.*; import java.util.*; import javax.servlet.*; public class Board implements servlet { private String SvName; private Date Started; public void init(ServletConfig config) { SvName = config.getServletName(); Started = new Date( (java.lang.System.currentTimeMillis())); System.out.println("Servlet: " + SvName); System.out.println(" Started: " + Started.toString()); } public void destroy() { Date … | |
Hi I have a problem with my first program using JSP and am hoping that someone could help me? In my servlet I am using a vector to create my JavaBeans and insert the values from my database: [CODE] rs = stmt.executeQuery(); Vector collection = new Vector(); while (rs.next()) { … | |
The group button in my form is set to "unack". The Spring HwController receive the correct group "unack" when the "apply" button is clicked. However, the HwController receive the null group when the cursor is moved to the text box and press the <Enter> key. Only the data from the … | |
I'm desperately trying to do some coursework and its not going well. I've been searching for example code for registering a new user to a database. I have a database connection and data access servlets but its riddled with errors. Its building but throwing up apache errors of all types. … | |
Hello Experts pls i want get all the form data for id card along with the passport image when correct id corresponding to the database row is inputed. the code only retrieves other form data but can't get the image. --------------recovery.jsp--------- [CODE=jsp]<HTML> <HEAD> <TITLE>Database Lookup</TITLE> </HEAD> <BODY> <FORM ACTION="recover1.jsp" METHOD="POST"><fieldset><legend> … | |
I am trying to change the look of the jsp/servlet pages dynamically based on the device from which the request comes. i have done the part of how to identify the devices from which the request arises. but stuck at the part where i should change the css sheet. is … | |
i am calling a JSP from a servlet but i am getting a error Error 404- Not found. Servlet file is reside in E:\Simple\WEB-INF\classes\servlet folder. ServletHome.java [CODE] package servlet; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.net.*; public class ServletHome extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, … | |
Hey lads, Just have a small query here thats really bugging me. When details are entered by user and checked in database, the program should display one of two messages as seen below. When the details are entered correctly the welcome message displays correctly. However, when incorrect details are entered, … | |
I am new one for jsp and web developement... if i click back arrow in navigation toolbar (from any page in my application) ,then go to logout page... For example.... Suppose i am in page4... here i click backarrow in browser then i want to go logout page, don't go … | |
I am new one of jsp .i have developed simple webapplication using jsp... Step 1 : I have one login page : (contains username ,password and sumbit button) Step2 : I have one logout page : it has one link (Go to login page), just u click this link go … | |
i am trying to make ajax call to a jsp and setting up a few variables using(retrieved from the session) # delimiter using out.println and then use this variable in the response object of onSuccess call back function. and then i have to remove that from the session. But if … | |
I running my little blog on Tomcat 6 server. My hosting company allows me to set up multiple sub domains. I was trying to do for last few hours, but no luck. Having started with [code=xml] <Engine name="Catalina" defaultHost="mydomain.co.uk"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> <Host name="mydomain.co.uk" appBase="/home/user/public_html" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Alias>www.mydomain.co.uk</Alias> … | |
I am mostly following this page: [url]http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html[/url] I used this command to create the keystore keytool -genkey -alias tomcat -keyalg RSA -keystore /etc/tomcat6/keystore and answered the prompts Then i edited my server.xml file and uncommented/edited this line [code] <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/etc/tomcat6/keystore" keystorePass="tomcat" /> … | |
Hello people, Im getting an "Exception occured ---java.lang.NullPointerException" error when i try running the code below: [code=Java]public void Register(String Username, String Password, String Surname, String Firstname, String Email, String Phone) { String a = Username; String b = Password; String c = Surname; String d = Firstname; String k = … | |
This is something I've been struggling with for a couple months now without having much luck. I beginning to think it's not possible but I'm hoping someone here can prove me wrong. The environment I am working with is a JSP page that interfaces with a java Bean. I want … | |
I have created a text box in html and if the string entered by user is a alphabet it will not show any message ,else it should display a error message..These checking validations of textbox is done in java and called in jsp; ---------------------------------------------------------- [B]a.html [/B] [code=html]<font size="4">Enter the search … | |
Hi, how can I call another JSP without transferring control to that. The response.sendRedirect is transferring control to the next jsp page. I still have some code after the response line which needs to be executed but it doesnt gets executed. Any suggestions? Thanks | |
My controller.java encounter an input string: "undefined". Please help. [CODE]public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { int rowsPerPage = 20; String rowsPerPageStr = request.getParameter("rowsPerPage"); logger.info("rowsPerPageStr " + rowsPerPageStr); if (rowsPerPageStr != null) { rowsPerPage = Integer.parseInt(rowsPerPageStr); }[/CODE] My jsp page use javascript as follows: [CODE]window.location = "hwdisplay?rowsPerPage=" + … | |
Hi All, I have a database table "productdetails",where i have id,name,price,prodimage(blob) fields. Am displaying all the records using jsp inside a div with the help of while loop, am getting all the datas correctly except the image. Check below code and let me know how to display the image retrieved … | |
I am trying to make a form using html and JSP, get the data and save them in an XML file. I use also Tomcat 1.6 as server. For generating the XML I am using the XStream library. I have a Customer.java class with get and set methods for a … | |
Hi, Is it possible to create a jar file (mobile app) from JSP files? I mean instead of using some toolkit to compile the java files and create the jar file, can I do the same using JSP files? Thanks. | |
Ok, so i am quite new to JSP. Working on a big database project, and I'm left scratching my head here. The ugly code below calls the chemical name and chemical id properly, and links the chemical name to a page where the chemical with that id will be viewed, … |
The End.