Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

getting errors in tomcat server

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am doing the program in jsps.
When ever i am executing the jsp like following path
http://localhost:8082/Finance/myjsp/Welcome.jsp
here options .Register User
Logon
When ever i am clicking on Register User It has to show enter user name and password, but its is not showing any thing(not showing the html page)
I am getting in the browser like following after clicking RegisterUser

http://localhost:8082/Finance/myjsp/RegisterUser.jsp;jsessionid=76E1C4F732FD0B7DB7CAD7A14FAABB4E

i am geeting the errors at server side like following

at org.apache.struts2.components.Form.populateComponentHtmlId(Form.java:
208)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:695)
at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:
55)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(Component
TagSupport.java:44)
at org.apache.jsp.myjsp.RegisterUser_jsp._jspx_meth_s_form_0(RegisterUse
r_jsp.java:150)
at org.apache.jsp.myjsp.RegisterUser_jsp._jspService(RegisterUser_jsp.ja
va:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:298)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
92)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
her.java:248)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:793)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:702)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:571)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:644)
at java.lang.Thread.run(Thread.java:595)
java.lang.NullPointerException
at org.apache.struts2.components.Form.evaluateExtraParamsServletRequest(
Form.java:245)
at org.apache.struts2.components.Form.populateComponentHtmlId(Form.java:
208)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:695)
at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:
55)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(Component
TagSupport.java:44)
at org.apache.jsp.myjsp.RegisterUser_jsp._jspx_meth_s_form_0(RegisterUse
r_jsp.java:150)
at org.apache.jsp.myjsp.RegisterUser_jsp._jspService(RegisterUser_jsp.ja
va:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:298)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
92)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
her.java:248)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:793)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:702)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:571)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:644)
at java.lang.Thread.run(Thread.java:595)
Apr 22, 2008 10:53:03 AM org.apache.struts2.components.ClosingUIBean start
SEVERE: Could not open template
java.lang.NullPointerException
at org.apache.struts2.components.Form.evaluateExtraParamsServletRequest(
Form.java:245)
at org.apache.struts2.components.Form.populateComponentHtmlId(Form.java:
208)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:695)
at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:
55)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(Component
TagSupport.java:44)
at org.apache.jsp.myjsp.RegisterUser_jsp._jspx_meth_s_form_0(RegisterUse
r_jsp.java:150)
at org.apache.jsp.myjsp.RegisterUser_jsp._jspService(RegisterUser_jsp.ja
va:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:298)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
92)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
her.java:248)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:793)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:702)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:571)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:644)
at java.lang.Thread.run(Thread.java:595)
java.lang.NullPointerException
at org.apache.struts2.components.Form.evaluateExtraParamsServletRequest(
Form.java:245)
at org.apache.struts2.components.Form.populateComponentHtmlId(Form.java:
208)
at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:695)
at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:
55)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(Component
TagSupport.java:44)
at org.apache.jsp.myjsp.RegisterUser_jsp._jspx_meth_s_form_0(RegisterUse
r_jsp.java:150)
at org.apache.jsp.myjsp.RegisterUser_jsp._jspService(RegisterUser_jsp.ja
va:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:298)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
92)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatc
her.java:248)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:793)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:702)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:571)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:644)
at java.lang.Thread.run(Thread.java:595)



plese any one help in this
i am not getting where is the mistake was done

i am unable to get what to change and what to do

plese any one help in this....................

Regards
Geeta
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Geeta,

i guess it is tomcat problem...whether you are using ActionForm to your jsp form....then please see your ActionForm..you are creatting setter,getter methods or not..

thanks®ards,
seetharaman.v
 
Geeta Ravikanti
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes i am using setters and getters in the program

this is the program

RegisterUser.java

package org.students;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;

import org.common.MyUtility;

import com.opensymphony.xwork2.ActionSupport;

public class RegisterUser extends ActionSupport {

private String username;
private String password;
private String email;
private int age;
private String status="";

public String execute() throws Exception {
if(isUserExists()){
setStatus("Oops! User Already Exists!");
return ERROR;
}
Connection con = MyUtility.getConnection();
String vsql = "insert into app_users values(?,?,?,?)";
PreparedStatement psmt = con.prepareStatement(vsql);
psmt.setString(1, this.username);
psmt.setString(2, this.password);
psmt.setInt(3, this.age);
psmt.setString(4, this.email);
psmt.executeUpdate();
con.close();
return SUCCESS;
}

public boolean isUserExists() throws Exception {
Connection con = MyUtility.getConnection();
System.out.println("connceted----->" + con.getClass());
Statement stmt = con.createStatement();
String vsql = "select count(1) from app_users where user_name='"+ this.username + "'";

ResultSet rs = stmt.executeQuery(vsql);
int count = 0;
while (rs.next()) {
count = rs.getInt(1);
}
con.close();
if (count == 0) {
return false;
} else {
return true;
}

}

public void setUsername(String username) {
System.out.println("set username---" + username);
this.username = username;
}

public void setPassword(String password) {
System.out.println("set username---" + password);
this.password = password;
}

public void setEmail(String email) {
System.out.println("set username---" + email);
this.email = email;
}

public void setAge(int age) {
System.out.println("set age---" + age);
this.age = age;
}

// getters
public String getUsername() {
System.out.println("get username---" + username);
return this.username;
}

public String getPassword() {
System.out.println("get pwd---" + password);
return this.password;
}

public String getEmail() {
System.out.println("get email---" + email);
return this.email;
}

public int getAge() {
System.out.println("get age---" + age);
return this.age;
}

public RegisterUser() {
System.out.println("Executed........");
}

public String getStatus(){
return this.status;
}
public void setStatus(String status){
this.status = status;
}

}


am i did any mistake here
i think every thing is correct
but i dont know why the problem is coming
please can you check again

Geeta
 
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic