Good bytonions
I have this code in my Registration.jsp page -
<%
-
if (request.getParameter("txtName") != null){
-
if(service.getPort().register(
-
request.getParameter("txtName"),
-
request.getParameter("txtSurname"),
-
request.getParameter("txtPassword"),
-
request.getParameter("txtEmail"),
-
request.getParameter("txtQuestion"),
-
request.getParameter("txtAnswer"))){response.sendRedirect("index.jsp");}
-
}
-
-
%>
-
-
/**
-
* Web service operation
-
*/
-
@WebMethod(operationName = "Register")
-
public boolean Register (@WebParam(name = "name")
-
String name, @WebParam(name = "surname")
-
String surname, @WebParam(name = "pass")
-
String pass, @WebParam(name = "mail")
-
String mail, @WebParam(name = "question")
-
String question, @WebParam(name = "answer")
-
String answer) {
-
-
boolean flag = false;
-
if(conn.connect())
-
{
-
flag = conn.Register(name, surname, pass, mail, question, answer);
-
conn.disconect();
-
}
-
return flag;
-
}
-
-
// the dbconnection.java that executes the sql
-
public boolean Register(String user, String surname,String pass, String mail, String question, String answer)
-
{
-
try
-
{
-
String sql = ("Insert into Users (usr__name, usr__surname, usr__pass, usr__mail, usr__question, usr__answer)"+
-
"values('"+user+"','"+surname+"','"+pass+"','"+mail+"','"+question+"','"+answer+"')");
-
statement.executeQuery(sql);
-
-
}catch(SQLException ex)
-
{
-
//log this to the file
-
}
-
return false;
-
}
-
What i do is load registration.jsp, then the form posts the to the registration page again and just for testing purposes i just check if they filled out one field.
this is sent to the webservice that returns a boolean value
How do i make it just insert the data and then take me to the index.jsp again
Hope you guys can help. (this does work, it just takes me back to the registration page and i need, when i get a response back go to index.jsp)
0 1095 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Mad Scientist Jr |
last post by:
I am getting an error in my code that references a textbox inside the
current row of my datagrid, whenever I try changing the page (paging is
enabled). This code doesn't even run unless a button in...
|
by: David Thielen |
last post by:
Hi;
..NET 2.0
I have a situation where when the user selects an item in a drop down list,
the code behind is called to update the values in another list on the page.
This update can take 3 -...
|
by: joe |
last post by:
how to change page-level charset to big5
|
by: UJ |
last post by:
Is there a way to tell when a webservice is called whether it came in
through HTTP or HTTPS ?
TIA - Jeff.
|
by: jobs |
last post by:
Is there a way or an attribute I can set so that the selected page
number in paging is a different color or is underlined? perhaps it's my
skin or css, but In my gridviews I can't tell what page we...
|
by: Mufasa |
last post by:
I'm trying to know the page that I came from. If I use
page.request.urlreferrer it seems to only be filled in once I am on one of
the pages within my web site. I'd really like to know what page...
|
by: satnamsarai |
last post by:
it is possible to change page orientation to landscape from asp.net
page? I am using window.print() dialog to print a page and I would
like that page to print automatically in landscape view.
|
by: lokeanwolf |
last post by:
Hi. I'm trying to create a basic template for a page, so that I can have the headers and footers stay the same, and only change the center content.
I've already figured out how to do the includes...
|
by: chaitanya02 |
last post by:
Hello everybody,
Could anyone update the code that calls webservice from a asp page..
Thanks,
Tanya
|
by: jkdudhatra |
last post by:
How To Change Page Orientation Of Default Printer In Visual Basic At Run Time ?
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |