sree_prasad

Greenhorn
+ Follow
since Nov 21, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by sree_prasad

i get this error when i use Lomboz ide but when i use normal eclipse 3.2 ide I do no face any issue.
15 years ago
JSP
Hello all,

I am facing this issue when I try to run my application on Lomboz and hit the url ( http://localhost:8080/Application/home.do ).





bad class file: C:\Program Files\Java\jre1.5.0_12\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public final class eaLayout_jsp extends org.apache.jasper.runtime.HttpJspBase
^
1 error


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:302)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
com.cisco.icw.pdr.wrapper.http.ICWPDRHttpServletRequestFilter.doFilter(ICWPDRHttpServletRequestFilter.java:37)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
com.cisco.is.commons.localization.servlet.filters.RBMLocaleFilter.doFilter(RBMLocaleFilter.java:127)
com.cisco.is.commons.localization.servlet.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:100)


The strange thing is that when I try to run the application on elipse 3.2 I do not any error. The application runs perfectly fine.

Would really appreciate if anybody could help me on this issue.

Thank you.
15 years ago
JSP
15 years ago
The code appears accurate. Cannot find any missing %>
15 years ago
JSP
The code does not contain any username and password that needs to be submited.
15 years ago
public class Foo {
Foo() {System.out.print("foo");}
class Bar{
Bar() {System.out.print("bar");}
public void go() {System.out.print("hi");}
}
public static void main (String [] args) {
Foo f = new Foo();
f.makeBar();
}
void makeBar() {
(new Bar() {}).go();
}
}
what is the result?
A. Compilation fails.
B. An error occurs at runtime.
C. foobarhi
D. barhi

Could anybody kindly explain what the output would be and how you arrived at it
Thanks a lot for your help.
But my LOGIN.JSP is not getting loaded when I call the page i.e login.do
so it is taking default values of password which is null and is getting fowarded to " faliture.jsp "
17 years ago
Could you kindly help me regarding this issue.

I have a login jsp which accepts username and password.
The login.jsp feeds a bean. The action class takes values from the bean and if
password is equal to " password " it goes to Success.jsp through action forward.

My issue is when I call the page i.e login.do then
it goes directly to action class without showing the login.jsp page.
It then gives me null pointer exception.
------------------------------------------------------|||||||||
LOGIN.JSP
--------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<html:html>
<HEAD>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<TITLE></TITLE>
</HEAD>
<body bgcolor="white">
<html:form action="/login" method="post" ;">

<center>
<table width="400" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellspacing="2" cellpadding="1" width="100%" >
<tr bgcolor="#eaeac8">
<td align="left" colspan="2"><font size="5">User Login</font></td>
</tr>

<tr><td colspan="2"><p> </p></td></tr>

<tr align="center">
<td align="right">User ID:</td>
<td><html:text property="username" size="30" maxlength="30"/></td>
</tr>

<tr align="center">
<td align="right">Password:</td>
<td><html assword property="password" size="30" maxlength="30"/></td>
</tr>
<tr><td colspan="2"><p> </p></td></tr>
<tr>

<TD>Login Now !<html:submit property="submit" value="Submit" /></TD>

</tr>
</table>
</td>
</tr>
</table>
</center>
</html:form>
<body>
</html:html>

LOGINACTION
-----------------
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;


public class LOGINACTION extends {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {


LOGINFORM loginform = (LOGINFORM) form;

if (loginform.getPassword().equals("password")
&& (loginform.getPassword() != null)) {

ActionForward forward = null;

return mapping.findForward("success");


else {

return mapping.findForward("failure");
}

}


}


STRUTCONFIG
--------------

<action path="/LOGIN"
type="COM.LOGINACTION"name="LOGINFORM" scope="request" validate="true"
input="/jsps/LOGIN.jsp">
<forward name="success" path="/jsps/LOGIN/Success.jsp" />
<forward name="success" path="/jsps/LOGIN/Failture.jsp" />
</action>


FORMBEAN
----------------

<form-bean name="LOGINFORM"
type="LOGIN.LOGINFORM">



------------------------------------------------------------||||||||
Any help would be greatly appreciated.
17 years ago