Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Relative Newbie - Full web project in webservice context?
Relative Newbie - Full web project in webservice context? [message #162229] Mon, 27 February 2006 16:57 Go to next message
Dave Belfer-Shevett is currently offline Dave Belfer-ShevettFriend
Messages: 9
Registered: July 2009
Junior Member
Hi folks - I'm just now getting into using WTP to build webservices, and I
must admit I'm impressed with how easy it is to go from "here's my pojo" to
"here's a war file servicing that request that you can deploy". It's quite
a step up from hand-rolling WSDL files and dependencies.

But here's my next problem. I want my deployed WAR file to include an
entire set of HTML and JSP pages, as well as a couple servlets I'm writing
- for now I'd be happy with static HTML. The question is, in the context
of "how WTP manages a project" - where should I create the HTML pages so
that a) they're deploye dlocally into my Tomcat server for coding /
debugging, and b) will be rolled into my WAR file properly so they'll show
up in the deployed webapp?

I tried creating a 'foo.html' file in the 'generated' WEB-INF/ target, but
no luck there - I can't seem to find it in the deployed app.

I'd like to be able to use WTP as a soup to nuts web application build and
deploy system, and writing in servlets, jsps, and HTML alongside my
webservices is my next logical step.

Thanks!

-dbs
Re: Relative Newbie - Full web project in webservice context? [message #162247 is a reply to message #162229] Mon, 27 February 2006 18:11 Go to previous messageGo to next message
Sachin Patel is currently offline Sachin PatelFriend
Messages: 75
Registered: July 2009
Member
You can put static content in the WebContent folder. For example if you
put a jsp in WebContent/jsps/

Then the URL would resolve to

http://localhost:8080/contextroot/jsps/foo.jsp

Dave Belfer-Shevett wrote:
> Hi folks - I'm just now getting into using WTP to build webservices, and I
> must admit I'm impressed with how easy it is to go from "here's my pojo" to
> "here's a war file servicing that request that you can deploy". It's quite
> a step up from hand-rolling WSDL files and dependencies.
>
> But here's my next problem. I want my deployed WAR file to include an
> entire set of HTML and JSP pages, as well as a couple servlets I'm writing
> - for now I'd be happy with static HTML. The question is, in the context
> of "how WTP manages a project" - where should I create the HTML pages so
> that a) they're deploye dlocally into my Tomcat server for coding /
> debugging, and b) will be rolled into my WAR file properly so they'll show
> up in the deployed webapp?
>
> I tried creating a 'foo.html' file in the 'generated' WEB-INF/ target, but
> no luck there - I can't seem to find it in the deployed app.
>
> I'd like to be able to use WTP as a soup to nuts web application build and
> deploy system, and writing in servlets, jsps, and HTML alongside my
> webservices is my next logical step.
>
> Thanks!
>
> -dbs
>
Re: Relative Newbie - Full web project in webservice context? [message #162310 is a reply to message #162247] Mon, 27 February 2006 21:34 Go to previous messageGo to next message
Dave Belfer-Shevett is currently offline Dave Belfer-ShevettFriend
Messages: 9
Registered: July 2009
Junior Member
Sachin Patel wrote:
> You can put static content in the WebContent folder. For example if you
> put a jsp in WebContent/jsps/
>
> Then the URL would resolve to
>
> http://localhost:8080/contextroot/jsps/foo.jsp

I tried this, but it's not working - i'm getting 404 errors. I should be
able to, within WTP + Tomcat, to create a file there, and it'll show up on
the local server via that URL - I can get to my webservices via:

http://localhost:8080/XMLServer/services/Services

And I created a foo.html in WebContent/foo.html, but this url 404's:

http://localhost:8080/XMLServer/foo.html

I did a War export from the project (created as a 'bottom up' webservice
bean, and the resulting war contents don't even have the HTML in it:

dbs@hunter:~$ jar tvf out.war
39 Mon Feb 27 16:31:46 EST 2006 META-INF/MANIFEST.MF
38015 Mon Feb 20 20:00:58 EST 2006 WEB-INF/lib/commons-logging-1.0.4.jar
2528 Mon Feb 27 16:20:38 EST 2006
WEB-INF/ServicesService/com/arete/webservices/deploy.wsdd
32071 Mon Feb 20 20:00:58 EST 2006 WEB-INF/lib/jaxrpc.jar
153253 Mon Feb 20 21:15:42 EST 2006 WEB-INF/lib/jdom.jar
4114 Mon Feb 27 16:20:42 EST 2006 WEB-INF/server-config.wsdd
666 Mon Feb 27 16:20:38 EST 2006
WEB-INF/ServicesService/com/arete/webservices/undeploy.wsdd
1569 Mon Feb 20 20:01:04 EST 2006 WEB-INF/web.xml
1686074 Mon Feb 20 20:00:56 EST 2006 WEB-INF/lib/axis.jar
19427 Mon Feb 20 20:00:58 EST 2006 WEB-INF/lib/saaj.jar
126771 Mon Feb 20 20:01:00 EST 2006 WEB-INF/lib/wsdl4j-1.5.1.jar
71442 Mon Feb 20 20:00:58 EST 2006 WEB-INF/lib/commons-discovery-0.2.jar
3273 Sun Feb 26 22:48:58 EST 2006
WEB-INF/classes/com/arete/webservices/Services.class
4741 Sun Feb 26 22:48:54 EST 2006 WEB-INF/lib/webserviceutils.jar
4612 Mon Feb 27 16:20:32 EST 2006 wsdl/Services.wsdl


What am I doing wrong?

-dbs
Re: Relative Newbie - Full web project in webservice context? [message #162334 is a reply to message #162310] Tue, 28 February 2006 00:37 Go to previous messageGo to next message
Sachin Patel is currently offline Sachin PatelFriend
Messages: 75
Registered: July 2009
Member
Which version of WTP & Tomcat are you using? I'll see if I can duplicate.

Dave Belfer-Shevett wrote:
> Sachin Patel wrote:
>> You can put static content in the WebContent folder. For example if you
>> put a jsp in WebContent/jsps/
>>
>> Then the URL would resolve to
>>
>> http://localhost:8080/contextroot/jsps/foo.jsp
>
> I tried this, but it's not working - i'm getting 404 errors. I should be
> able to, within WTP + Tomcat, to create a file there, and it'll show up on
> the local server via that URL - I can get to my webservices via:
>
> http://localhost:8080/XMLServer/services/Services
>
> And I created a foo.html in WebContent/foo.html, but this url 404's:
>
> http://localhost:8080/XMLServer/foo.html
>
> I did a War export from the project (created as a 'bottom up' webservice
> bean, and the resulting war contents don't even have the HTML in it:
>
> dbs@hunter:~$ jar tvf out.war
> 39 Mon Feb 27 16:31:46 EST 2006 META-INF/MANIFEST.MF
> 38015 Mon Feb 20 20:00:58 EST 2006 WEB-INF/lib/commons-logging-1.0.4.jar
> 2528 Mon Feb 27 16:20:38 EST 2006
> WEB-INF/ServicesService/com/arete/webservices/deploy.wsdd
> 32071 Mon Feb 20 20:00:58 EST 2006 WEB-INF/lib/jaxrpc.jar
> 153253 Mon Feb 20 21:15:42 EST 2006 WEB-INF/lib/jdom.jar
> 4114 Mon Feb 27 16:20:42 EST 2006 WEB-INF/server-config.wsdd
> 666 Mon Feb 27 16:20:38 EST 2006
> WEB-INF/ServicesService/com/arete/webservices/undeploy.wsdd
> 1569 Mon Feb 20 20:01:04 EST 2006 WEB-INF/web.xml
> 1686074 Mon Feb 20 20:00:56 EST 2006 WEB-INF/lib/axis.jar
> 19427 Mon Feb 20 20:00:58 EST 2006 WEB-INF/lib/saaj.jar
> 126771 Mon Feb 20 20:01:00 EST 2006 WEB-INF/lib/wsdl4j-1.5.1.jar
> 71442 Mon Feb 20 20:00:58 EST 2006 WEB-INF/lib/commons-discovery-0.2.jar
> 3273 Sun Feb 26 22:48:58 EST 2006
> WEB-INF/classes/com/arete/webservices/Services.class
> 4741 Sun Feb 26 22:48:54 EST 2006 WEB-INF/lib/webserviceutils.jar
> 4612 Mon Feb 27 16:20:32 EST 2006 wsdl/Services.wsdl
>
>
> What am I doing wrong?
>
> -dbs
>
Re: Relative Newbie - Full web project in webservice context? [message #162342 is a reply to message #162334] Tue, 28 February 2006 01:08 Go to previous message
Dave Belfer-Shevett is currently offline Dave Belfer-ShevettFriend
Messages: 9
Registered: July 2009
Junior Member
Sachin Patel wrote:
> Which version of WTP & Tomcat are you using? I'll see if I can duplicate.

For additional information, I've managed to get it to deploy if I -manually-
place HTML files in the top-level of the build target (for some reason
that's called 'html' for me, which I believe I mistakenly entered when I
created the project).

There is a WebContent folder, but nothing in there ever gets built into the
app - I've added the ${Project}/html/[file.html] to my SVN now, and I can
check it in, out, etc - but checking in things that are part of a build
target seems wrong.

Here's the version information:
Eclipse SDK
Version: 3.1.1
Build id: M20050929-0840

Apache Tomcat v5.5.

Thanks...

-dbs
Previous Topic:Debug Mode and websphere
Next Topic:The most basic newbie question possible
Goto Forum:
  


Current Time: Fri Apr 19 21:00:40 GMT 2024

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

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

Back to the top