Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web application in eclipse 9

 
parni raghuvanshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,
i m working on eclipse9, i hv created a web application with the help of jsp database connectivity,i found some problem while running the error 404 occured....i m giving here the full view of myapp.
new->project->web project->myproject(name of my project)
myproject->webroot->customerfrm.jsp(neme of my jsp page),in this page i write the following code.

can anyone tell me ,whats d prob,in dis code there is no error,the problem can be of tomcat server.
thanks.


 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rich, welcome to Java Ranch!

A 404 error is a page not found error. Which URL is causing that error? Also, what is the layout of your WAR file?

Also, please UseRealWords
 
parni raghuvanshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply sir.
when i run my project on myeclipse server(tomcat),the whwn it opens in browse with url http://rich-pc:8080/customer%20info
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, spaces in contexts are not a good ides.

Second, what is in you web.xml? Do you have a welcome-file-list that includes customerfrm.jsp?

Third, what is the name of your war file? I assume it is "customer info.war"...
 
parni raghuvanshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you sir,the problem got resolved now.........
 
parni raghuvanshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir,can you give me some idea about the customer support tool database architecture..........thanks
 
parni raghuvanshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir,when i click the submit button i got the following error....

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /customerfrm.jsp at line 36

33: stmt.setString(9,email);
34: stmt.setString(10,city);
35: stmt.setString(11,zip);
36: rs=stmt.executeQuery("select * from customer");
37: %>
38: <html>
39: <body>


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: java.sql
eIs i have done any mistake in my code regarding database connectivity?.........please help me
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rich baliyani wrote:sir,can you give me some idea about the customer support tool database architecture..........thanks

Which "customer support tool database architecture"? Or are you writing such a tool and need an architecture?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i click the submit button i got the following error
...
i have done any mistake in my code regarding database connectivity?

Yes, that is what I would guess, but I am not sure because you didn't post the full error text. There should be more after "javax.servlet.ServletException: java.sql". If that is all that showed up in the browser, then look at the web server log file. By the way, which web server are you using?
 
parni raghuvanshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir, actually i am trying to make a project on customer support tool in java with eclipse 9 ide,but i want you to please give an overview that how i would take initial,till now i have made a jsp page tried to connect database,but the problem got occured of exception,i am giving here this exception........
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: java.sql.SQLException: Driver does not support this function
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: java.sql.SQLException: Driver does not support this function
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.customerfrm_jsp._jspService(customerfrm_jsp.java:234)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.sql.SQLException: Driver does not support this function
sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeQuery(JdbcOdbcPreparedStatement.java:117)
org.apache.jsp.customerfrm_jsp._jspService(customerfrm_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.13
..................................................................................
i am using type1 driver,is this is the reason for above exception?
thanks.
 
parni raghuvanshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried to use type4 driver & i got the following exception on submit...
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /customerfrm.jsp at line 37

34: stmt.setString(9,email);
35: stmt.setString(10,city);
36: stmt.setString(11,zip);
37: rs=stmt.executeQuery("select*from customer");
38: %>
39: <html>
40: <body>


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: java.sql.SQLException: ORA-03115: unsupported network datatype or representation

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.customerfrm_jsp._jspService(customerfrm_jsp.java:234)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.sql.SQLException: ORA-03115: unsupported network datatype or representation

oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799)
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1038)
oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1273)
org.apache.jsp.customerfrm_jsp._jspService(customerfrm_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.13.
 
Sumit Bisht
Ranch Hand
Posts: 331
Python Ruby Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First try running your jdbc code from console. It seems you are passing String in place of some other table datatype. Please review it and your db schema too.
 
parni raghuvanshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir i have given varchar2 datatype for which i have given string & i also removed variables like officephone,mobile ,zipcode from my program as wall as database too.but still i am getting error .........
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: java.sql.SQLException: Invalid column index
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: java.sql.SQLException: Invalid column index
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.customerfrm_jsp._jspService(customerfrm_jsp.java:205)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.sql.SQLException: Invalid column index
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:5265)
oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:5257)
org.apache.jsp.customerfrm_jsp._jspService(customerfrm_jsp.java:83)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.13
please help me so that i can proceed further
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.sql.SQLException: Invalid column index

This error message should be obvious. You will probably have to look at the generated java source file for your JSP to determine the exact line that caused the problem - its line 83 in the generated source:
>>>org.apache.jsp.customerfrm_jsp._jspService(customerfrm_jsp.java:83)

By the way, I recommend that you not embed server-side scripts within a JSP, it makes fixing problems like this a little more difficult. You should be querying the database within servlet code (or within a POJO called by s servlet), and then have the servlet pass a JavaBean to the JSP with the results and then use JSTL to apply the results into the JSP.
 
parni raghuvanshi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir can you give me some idea about the architecture of a customer tool.................
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rich baliyani wrote:sir can you give me some idea about the architecture of a customer tool.................

High level architecture, three-tiered:
+ browser-based UI
+ application server
+ database server
Recommend use of MVC pattern for the application server.

That is as detailed as I am willing to get. Without knowing any of your customer's requirements I cannot get any more detailed.
See also: NotACodeMill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic