my dog learned polymorphism*
The moose likes JSP and the fly likes Invalid Standard Action - Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Invalid Standard Action - Error

Saravanan Jothimani
Greenhorn

Joined: Feb 25, 2005
Posts: 26
I got this error when I run my application

org.apache.jasper.JasperException: /sample/secondprogram/firstpage.jsp(16,5) Invalid standard action
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:90)
org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1249)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1559)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

My JSP program

<%@ page language="java" %>
<%@ page session="true"%>


<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title> New Page 1</title>
</head>

<body>
<jsp:usebean id="dbconn" scope="page" class="src.dbConnection"/>
<%
out.println("Inside JSP");

String user = "hello";
String pass = "hai";
String sessionid;

String username = request.getParameter("txtusername");
String password = request.getParameter("txtpassword");
if ((username.length()>0) && (password.length()>0))
{
if ((username.equals(user)) &&(password.equals(pass)))
{
out.println(username);
out.println(password);

sessionid = session.getId();
session.setAttribute("sessionid", sessionid);
}
else
{
out.println("The user and password are not valid");
}
}
else
{
out.println("The username & password field is empty");
}
%>
<form method="POST" action="secondpage.jsp">
<input type= "submit" name="Click">
</form>
</body>

</html>


Help Me

Thanks in Advance

Saravanan
Saravanan Jothimani
Greenhorn

Joined: Feb 25, 2005
Posts: 26
I got my friends advice and I have corrected the error.

Please send me the folder structure for JSP program.

Now I am getting another error in useBean tag.

The value for the useBean class attribute com.dbConnection is invalid.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Saravanan Jothimani:
I got my friends advice and I have corrected the error.

Please send me the folder structure for JSP program.

Now I am getting another error in useBean tag.

The value for the useBean class attribute com.dbConnection is invalid.


There must be a getter/setter for every property in your bean, in order to use that property in usebean tag.
Raghuram Srinivas
Greenhorn

Joined: Jun 27, 2005
Posts: 4
Hi Saravanan ,
The classes in <jsp:useBean> must always be with in a package.I am assuming you have kept the file "dbConnection" under the "src" directory. Try placing it under a package under "src" directory.
eg : src/mypackage/dbConnection.class and dont forget to put the
"package mypackage;" in the dbConnection.java!!

Also there are chances for a NullPointerException at
"if ((username.length()>0) && (password.length()>0))"
replace with (username!= null && password != null )

hope this helps

~Raghuram
Arunkumar Chinnadurai
Ranch Hand

Joined: Dec 15, 2011
Posts: 56

Saravanan Jothimani wrote:I got my friends advice and I have corrected the error.

Please send me the folder structure for JSP program.

Now I am getting another error in useBean tag.

The value for the useBean class attribute com.dbConnection is invalid.



Please share that answer....now i`m strugling with this
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

Arunkumar Chinnadurai wrote:
Please share that answer....now i`m strugling with this

The thread is 6 Years Old, so its very unlikely, that the OP will be watching this thread.
You would get helpful replies, if you create your own topic and TellTheDetails...


Regards, Prasad
SCJP 5 (93%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Invalid Standard Action - Error
 
Similar Threads
sending parameters from one JSP page to another JSP page
Error in jsf
org.apache.jasper.JasperException: Unable to compile class for JSP:
hello help me in authentication
Strange JSP error - Invalid Standard Action