Home Discussion Discuss: JSP Actions

  • jspprakash July 19, 2011 at 8:07 AM

    hi this is prkash fresher in jsp please help in to create login i am using this code <% String u=request.getParameter("user"); String p=request.getParameter("pass"); Connection con; boolean rowfound=false; %> <% try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("Jdbc:Odbc:hospital","",""); PreparedStatement ps=con.prepareStatement("select * from student"); ps.setString(1,u); ps.setString(2,p); ResultSet rs=ps.executeQuery(); rowfound=rs.next(); if(rowfound==true) { if((u.equals("pappu"))&&(p.equals("pappu1"))) { response.sendRedirect("next.jsp"); } else { out.println("ur invalied user"); } } } catch(Exception ex) { out.println(ex.getMessage()); out.close(); } %>

  • ssxsaasx October 13, 2011 at 10:26 PM

    nice

  • give examplesrakhi January 19, 2012 at 5:40 PM

    the thorey is enough we need examples

  • jsprishika August 23, 2012 at 2:41 PM

    can you please give the practical imlemtation examples of these actions like the real world examples.

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Struts Questions

Actions in Struts
Actions in Struts  Hello Sir, Thanks for the solutions you have sent me. i wanted examples on Struts DispatchAction,Forword Action ,Struts lookupDispatchAction,Struts mappingDispatchAction,Struts DynaActionform.please 

Struts 2 Tutorials

Writing Actions
Writing Actions The Action is responsible for controlling of data flow within an application. You can make any java class as action. But struts have some built in interface and class for making action easily. To make an Action class 

Struts Questions

Actions - Struts
 

Struts Questions

different kinds of actions in Struts
different kinds of actions in Struts  What are the different kinds of actions in Struts 

Struts Questions

Actions Threadsafe by Default - Struts
Actions Threadsafe by Default   Hi Frieds, I am beginner in struts, Are Action classes Threadsafe by default. I heard actions are singleton , is it correct 

Struts Questions

button actions in struts
button actions in struts  in my jsp page i have two buttons add and sub.when i clicking the add button one action is performed and clicking the sub button another action is performed.how i will handle it using struts.i am using 

HTML Questions

Two or more actions in the same form
Two or more actions in the same form  Can I have two or more actions in the same form 

Struts 2 Tutorials

Struts2 Actions
Struts2 Actions       When... Action interface  All actions may implement.... However with struts 2 actions you can get different return types other than 

Struts Questions

Is Multiple Actions in Action class - Struts
Is Multiple Actions in Action class  In ActionClass we can use only one action i.e execute(), but in DispatchAction we can use multiple actions.My question is , we can use multiple actions in Action class if(action.equals("add 

Struts Examples

Struts Built-In Actions
Struts Built-In Actions   ... actions shipped with Struts APIs. These built-in utility actions provide different...;     Actions 

JSP-Tutorials

Struts 2 Actions
Struts 2 Actions       In this section we will learn about Struts 2 Actions, which is a fundamental concept in most of the web... Framework. Actions are basically a unit of work that can be associated with a HTTP 

General

JSP Actions : Java Glossary
JSP Actions : Java Glossary       JSP actions are XML tags that forces the server to directly use the server to the existing components or control the behavior of the JSP engine. JSP 

Struts-Tutorials

Aggregating Actions In Struts Revisited
Aggregating Actions In Struts Revisited... Aggregating Actions in Struts , I have given a brief idea of how to create action aggregations. An action aggregation is a grouping of a set of related actions 

Struts Questions

hyperlink the pages with diff-2 actions struts - Struts
hyperlink the pages with actions struts  How to make a hyperlink in struts?  a href = "login.do" > Login </a>  hi i would suggest you to learn it from roseIndia Struts tutorials they have 

Struts Examples

Struts2 Actions
Struts2 Actions       Struts2 Actions When a client's request matches the action's name, the framework uses the mapping from struts.xml file to process the request. The mapping to an action 

JSP Tutorials

JSP Actions
JSP Actions      ... JSP Action Tags in the JSP application. What is JSP Actions? Servlet container.... Programmers can use these functions in JSP applications. The JSP Actions tags 

Struts 2 Tutorials

Test Actions
Test Actions An example of Testing a struts Action is given below using the junit. In this example the execute method is being test. HelloAction.java package net.roseindia.action; import com.opensymphony.xwork2.ActionSupport 

Struts Questions

defined actions in struts config still getting a HTTP 404 - Struts
defined actions in struts config still getting a HTTP 404  Hi guys, I am getting an Invalid Path requested error. Heres the code snippet from struts-config.xml All the JSPs in the forward 

Programming Tutorials

JSP Standard Actions 'jsp:setProperty' & 'jsp:getProperty'
JSP Standard Actions <jsp:setProperty> & <jsp:getProperty>  <jsp:setProperty> It sets a property value or values in a Bean only...: <jsp:setProperty         name=" 

Struts 2 Tutorials

Implementing Actions in Struts 2
Implementing Actions in Struts 2 Package com.opensymphony.xwork2 contains.... Actions the contains the execute() method. All the business logic is present...;error">/jsp/login.jsp</result> <result name="success" 

Programming Tutorials

JSP Standard Actions
JSP Standard Actions In this section, we will learn about JSP standard Action & their elements with some examples. JSP Standard action are predefined..., to generate a browser-specific code, etc. The JSP standard actions affect the overall 

Struts 2 Tutorials

Configuring Actions in Struts application
Configuring Actions in Struts Application To Configure an action in struts application, at first write a simple Action class such as SimpleAction.java...; } } And also write any JSP or HTML page homepage.html <!DOCTYPE HTML PUBLIC 

Struts 1 Tutorials

STRUTS ACTION - AGGREGATING ACTIONS IN STRUTS
STRUTS ACTION - AGGREGATING ACTIONS IN STRUTS... using which you can aggregate a related set of actions into a single unified... actions. DispatchAction: In this type 

Java Tips and Examples

Simple Editor
a JTextArea with Actions to implement the menu items. Actions are a good way to implement ActionListeners. Actions can be used with most buttons, including toobox... controls which do the same thing can share an Action. Actions can be dis-/enabled 

Struts 2 Tutorials

Action in Struts 2 Framework
Actions Actions are the core basic unit of work in Struts2 framework. Each.... Actions are mostly associated with a HTTP request of User. The action class... actions configuration matches with a specific result that will be rendered 

SQL Tutorial

Use if statement with LOOP statement
Use if statement with LOOP statement       Conditional if statements  in SQL are used to perform different actions based on different conditions 

JSP Tutorials

JSP Interview Questions
;  Question: What do you understand by JSP Actions? Answer: JSP actions are XML tags that direct the server to use existing components or control the behavior of the JSP engine. JSP Actions consist of a typical 

SQL Tutorial

Mysql Switch CASE
Mysql Switch CASE       Mysql Switch Case perform one of several different actions based on several different conditions. Understand with Example The Section of Tutorial 

MySQL

Mysql Else Condition
Mysql Else Condition       Mysql Else Condition evaluate the statements in database to perform different actions based on different conditions. Understand with Example The Tutorial 

Java-Tutorials

TriggerListeners and JobListeners
TriggerListeners and JobListeners       To perform any action you create Listeners objects and these actions are based on events occurring within the scheduler 

DMCA.com