Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JSPs not compiling
JSPs not compiling [message #210816] Mon, 24 March 2008 22:25 Go to next message
Eclipse UserFriend
Originally posted by: nick.poppelreiter.eyefinity.com

I just installed Eclipse Version: 3.3.2 Build id: M20080221-1800 - the
full install with web tools. I'm running a Tomcat 5.5 server in eclipse,
but I can't get my JSPs to compile. Nothing is showing up in my
...\workspace\.metadata\.plugins\org.eclipse.wst.server.core \tmp0\work\Catalina\localhost\ <context>
dir. Any suggestions???
Nick
Re: JSPs not compiling [message #210861 is a reply to message #210816] Tue, 25 March 2008 12:39 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1313
Registered: July 2009
Senior Member
Nick wrote:
> I just installed Eclipse Version: 3.3.2 Build id: M20080221-1800 - the
> full install with web tools. I'm running a Tomcat 5.5 server in
> eclipse, but I can't get my JSPs to compile. Nothing is showing up in
> my
> ..\workspace\.metadata\.plugins\org.eclipse.wst.server.core\ tmp0\work\Catalina\localhost\ <context>
> dir. Any suggestions???
> Nick
>

Provide more detail about what you are doing and what the result is?! :)

Cheers,
Larry
Re: JSPs not compiling [message #210877 is a reply to message #210861] Tue, 25 March 2008 14:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nick.poppelreiter.eyefinity.com

I'm running a tomcat server in eclipse. Servlets (with appropriate
web.xml mapping) are working just fine. But JSPs are not. I think it's
because they are not compiling - there are no java or class files for
them. The java and class files should be in tmp0 (the server path) in the
work\Catalina\localhost\<contextroot> directory.
Re: JSPs not compiling [message #210885 is a reply to message #210877] Tue, 25 March 2008 14:24 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1313
Registered: July 2009
Senior Member
Nick wrote:
> I'm running a tomcat server in eclipse. Servlets (with appropriate
> web.xml mapping) are working just fine. But JSPs are not. I think it's
> because they are not compiling - there are no java or class files for
> them. The java and class files should be in tmp0 (the server path) in
> the work\Catalina\localhost\<contextroot> directory.
>

Unfortunately, no JSP related java or class file showing up under the
work directory provides almost nothing with which to make a diagnosis.
Just shooting in the dark, a simple way to achieve this behavior is to
have a typo, or some other error, in the URL used such that no JSP is
actually invoked.

Cheers,
Larry
Re: JSPs not compiling [message #210892 is a reply to message #210885] Tue, 25 March 2008 14:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nick.poppelreiter.eyefinity.com

I thought the java and class files get created when the server publishes.
Not so?
Re: JSPs not compiling [message #210898 is a reply to message #210892] Tue, 25 March 2008 14:54 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1313
Registered: July 2009
Senior Member
Nick wrote:
> I thought the java and class files get created when the server
> publishes. Not so?
>

You are correct. However, this fact contains no clues as to why these
files aren't showing up.

Cheers,
Larry
Re: JSPs not compiling [message #210907 is a reply to message #210898] Tue, 25 March 2008 15:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nick.poppelreiter.eyefinity.com

My web.xml file contains the following, where my context root is
valuereport:

<servlet>
<description></description>
<servlet-name>ValueReport2</servlet-name>
<jsp-file>/ValueReportMain.jsp</jsp-file>
</servlet>

<servlet-mapping>
<servlet-name>ValueReport2</servlet-name>
<url-pattern>/ValueReportMain</url-pattern>
</servlet-mapping>

The ValueReportMain.jsp file is located in the WEB-INF dir in my
workspace, along with my web.xml file. Both are getting published to the
server tmp0 WEB-INF dir. At this point in testing, my jsp file only
contains minimal html.

My URL is:
http://localhost:8080/valuereport/ValueReportMain
Re: JSPs not compiling [message #210915 is a reply to message #210907] Tue, 25 March 2008 15:07 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1313
Registered: July 2009
Senior Member
Nick wrote:
> My web.xml file contains the following, where my context root is
> valuereport:
>
> <servlet>
> <description></description>
> <servlet-name>ValueReport2</servlet-name>
> <jsp-file>/ValueReportMain.jsp</jsp-file>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>ValueReport2</servlet-name>
> <url-pattern>/ValueReportMain</url-pattern>
> </servlet-mapping>
>
> The ValueReportMain.jsp file is located in the WEB-INF dir in my
> workspace, along with my web.xml file. Both are getting published to
> the server tmp0 WEB-INF dir. At this point in testing, my jsp file only
> contains minimal html.
>
> My URL is:
> http://localhost:8080/valuereport/ValueReportMain
>

Try:

<jsp-file>/WEB-INF/ValueReportMain.jsp</jsp-file>

The "path" to the resource needs to start from the "root" of the webapp.
Access to resources under "WEB-INF" is forbidden to the browser, but
that doesn't apply to internal uses like this.

Cheers,
Larry
Re: JSPs not compiling [message #210922 is a reply to message #210915] Tue, 25 March 2008 15:14 Go to previous message
Eclipse UserFriend
Originally posted by: nick.poppelreiter.eyefinity.com

OK. That's what I was after. How much do I owe you? :) Guess this is
the benefit of web forums! Thanks much.
Nick
Previous Topic:Derby version and Eclipse version?
Next Topic:Missing Contents of WEB-INF directory
Goto Forum:
  


Current Time: Mon Dec 22 20:12:29 GMT 2014

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

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