Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Running JSP page in Eclipse
Running JSP page in Eclipse [message #642022] Mon, 29 November 2010 15:23 Go to next message
AAM  is currently offline AAM Friend
Messages: 1
Registered: November 2010
Junior Member
Hi,

I created a J2EE Project in Eclipse and placed my jsp page under /WebContent. Name of my jsp page is EnterName.jsp

Once I click submit on my JSP, it posts to the Servlet ActionServlet.java which is created under Servlets.

I created an EAR file for this J2EE Projec and deployed it on

Oracle Oc4j Server.

I also changed the web.xml as below.

SchoolList -> Project Name
Resultsjsp -> the ActionServlet forwards to this jsp
Welcome file is EnterName.jsp

<display-name>SchoolList</display-name>
<servlet>
<description>
The Servlet that takes the submit Action and passes the values to DB</description>
<display-name>ActionServlet</display-name>
<servlet-name>ActionServlet</servlet-name>
<servlet-class>Servlets.ActionServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ActionServlet</servlet-name>
<url-pattern>Results.jsp</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/WebContent/EnterName.jsp</welcome-file>
</welcome-file-list>
</web-app>

After starting the server, i opened Web browser in eclipse and typed http://localhost:8888/SchoolList/

But I got an error telling 'Website cannot open this page".

I also tried to click EnterName.jsp and do a run as on the server and i got the below error in console

2010-11-29 07:06:23.111 NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP Page : Exception:oracle.jsp.provider.JspCompileException: <H3>Errors compiling:C:\Oracle\oc4j\j2ee\home\application-deployments\S choolListEAR\SchoolList\persistence\_pages\\_EnterName.java </H3><pre></pre>

Please help me out. Thanks in advance
Re: Running JSP page in Eclipse [message #642059 is a reply to message #642022] Mon, 29 November 2010 17:15 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2010.11.29 8:23, AAM wrote:
> Hi,
>
> I created a J2EE Project in Eclipse and placed my jsp page under
> /WebContent. Name of my jsp page is EnterName.jsp
>
>[snip]

While you'll probably get some help here, this is a question better
posed in the Eclipse webtools forum.
Re: Running JSP page in Eclipse [message #643692 is a reply to message #642022] Tue, 07 December 2010 21:46 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

On 11/29/2010 10:23 AM, AAM wrote:
> Hi,
>
> I created a J2EE Project in Eclipse and placed my jsp page under
> /WebContent. Name of my jsp page is EnterName.jsp
>
> Once I click submit on my JSP, it posts to the Servlet
> ActionServlet.java which is created under Servlets.
>
> I created an EAR file for this J2EE Projec and deployed it on
>
> Oracle Oc4j Server.
>
> I also changed the web.xml as below.
>
> SchoolList -> Project Name
> Resultsjsp -> the ActionServlet forwards to this jsp
> Welcome file is EnterName.jsp
>
> <display-name>SchoolList</display-name>
> <servlet>
> <description>
> The Servlet that takes the submit Action and passes the values to
> DB</description>
> <display-name>ActionServlet</display-name>
> <servlet-name>ActionServlet</servlet-name>
> <servlet-class>Servlets.ActionServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>ActionServlet</servlet-name>
> <url-pattern>Results.jsp</url-pattern>
> </servlet-mapping>
> <welcome-file-list>
> <welcome-file>/WebContent/EnterName.jsp</welcome-file>
> </welcome-file-list>
> </web-app>
>
> After starting the server, i opened Web browser in eclipse and typed
> http://localhost:8888/SchoolList/
>
> But I got an error telling 'Website cannot open this page".
>
> I also tried to click EnterName.jsp and do a run as on the server and i
> got the below error in console
>
> 2010-11-29 07:06:23.111 NOTIFICATION J2EE JSP-0008 Unable to dispatch
> JSP Page : Exception:oracle.jsp.provider.JspCompileException: <H3>Errors
> compiling:C:\Oracle\oc4j\j2ee\home\application-deployments\S
> choolListEAR\SchoolList\persistence\_pages\\_EnterName.java
> </H3><pre></pre>
> Please help me out. Thanks in advance
>
Your welcome-file is likely not specified properly. What's *in*
WebContent is placed in the root of your deployed application. Try
<welcome-file>/EnterName.jsp</welcome-file>

--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Running JSP page in Eclipse [message #875632 is a reply to message #643692] Wed, 23 May 2012 04:18 Go to previous messageGo to next message
seiciu razvan is currently offline seiciu razvanFriend
Messages: 4
Registered: May 2012
Junior Member
Same problem jsp J2ee oc4j error 0008 cannot dispatch jsp ... persistance error pointing my compiled index.java file. There is no problem with welcome file and eclipse deploy of my dynamic web project is succesfull. I even looked in oc4j em and deployment descriptors seemed okbut in orion the path for persistence is : persistence.
Any great ideas or i have to shoot this stupid server platform?
ps: on my jboss 5 same project works perfectlt!

Greetings from Romania and please provide solution because i can't change OAS so i'm working with Jdeveloper Smile))(
Re: Running JSP page in Eclipse [message #875637 is a reply to message #875632] Wed, 23 May 2012 04:35 Go to previous messageGo to next message
seiciu razvan is currently offline seiciu razvanFriend
Messages: 4
Registered: May 2012
Junior Member
See attachement please!
Re: Running JSP page in Eclipse [message #875873 is a reply to message #875637] Wed, 23 May 2012 13:34 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 05/22/2012 10:36 PM, seiciu razvan wrote:
> See attachement please!

Web application questions are asked in the Eclipse web tools forum.
Previous Topic:Context menu
Next Topic:tag suggestions
Goto Forum:
  


Current Time: Fri Apr 26 07:48:00 GMT 2024

Powered by FUDForum. Page generated in 0.08576 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top