Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » WTP 1.0RC4 and <distributable/> tag
WTP 1.0RC4 and <distributable/> tag [message #151689] Tue, 13 December 2005 11:50 Go to next message
Eclipse UserFriend
Hi all,
i've made a fresh installation of wtp 1.0rc4 on my eclipse 3.1.1 in order
to test the JBoss 4.0.x integration plugin that has been recently posted
here.
I've completely rebuilt the wtp tutorial "Shedule Web Application" using
wtp rc4 and jboss 4.0.3sp1 (many weeks ago i've successfully tested this
tutorial with wtp 0.7 and tomcat 5.5), but when i click on the "add
course" button of the jsp i encountered in this error (the setAttribute is
referred to an HttpSession trying to bind a non-serializable object):

java.lang.IllegalArgumentException: setAttribute: Non-serializable
attribute
org.apache.catalina.session.StandardSession.setAttribute(Sta ndardSession.java:1233)
org.apache.catalina.session.StandardSessionFacade.setAttribu te(StandardSessionFacade.java:129)
org.eclipse.wtp.sample.classschedule.ScheduleServlet.doGet(S cheduleServlet.java:57)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(Repl yHeaderFilter.java:81)

I've compared the war generated by wtp1.0 and wtp0.7 and i've noticed that
the latest wtp adds a <distributable/> tag in the generated web.xml. If i
remove this tag, the tutorial runs flawlessly on my jboss 4...
I suppose this tag is meant primarly for clustered environments (it
requires session objects to be serializable), so why is it enabled by
default?
Re: WTP 1.0RC4 and <distributable/> tag [message #151729 is a reply to message #151689] Tue, 13 December 2005 14:03 Go to previous messageGo to next message
Eclipse UserFriend
Janny wrote:
> I suppose this tag is meant primarly for clustered environments (it
> requires session objects to be serializable), so why is it enabled by
> default?

Probably a safer default, in that if you app does work in clustered
environment it will also work in non-clustered. But not the other way.


Are you using XDoclet to create web.xml ?


Darryl
Re: WTP 1.0RC4 and <distributable/> tag [message #151862 is a reply to message #151729] Wed, 14 December 2005 05:28 Go to previous messageGo to next message
Eclipse UserFriend
I've generated a whole new project with WPT1.0 using the "Dynamic Web
Project" wizard and the web.xml (that is initially generated by this
wizard) does not contain the <distributable/> tag:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
SchoolSchedule_WTP1.0</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

If I force to regenerate this file (e.g. renaming web.xml, adding a jsp
file directly into workspace), the new file (that now is surely generated
by xdoclet) is substantially different and the tag now appears:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="web-app_1" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<display-name>SchoolSchedule</display-name>
<distributable/>

...many auto-generated xdoclet comments...

</web-app>

It seems like the eclipse wizard is using a different way to generate the
initial web.xml file. Notice that also the <display-name> tag is different
(my eclipse project is named SchoolSchedule_WTP1.0 but my context root is
set to SchoolSchedule)...
Re: WTP 1.0RC4 and <distributable/> tag [message #152331 is a reply to message #151862] Wed, 14 December 2005 14:44 Go to previous messageGo to next message
Eclipse UserFriend
Janny wrote:
> It seems like the eclipse wizard is using a different way to generate
> the initial web.xml file. Notice that also the <display-name> tag is
> different (my eclipse project is named SchoolSchedule_WTP1.0 but my
> context root is set to SchoolSchedule)...

I don't think this different in generation is real problem at all, its
just a quirk, XDoclet is optional facet on a web project.


To cure the XDoclet problem create a file:

WebContent/WEB-INF/lib/web-settings.xml

this file can be empty, or might want to contain:

---- SNIP ----
<description>My web-app that has no description.</description>
<display-name>MyProject</display-name>
---- SNIP ----

Now run XDoclet again.


Darryl
Re: WTP 1.0RC4 and <distributable/> tag [message #152408 is a reply to message #152331] Thu, 15 December 2005 04:07 Go to previous messageGo to next message
Eclipse UserFriend
> To cure the XDoclet problem create a file:
>
> WebContent/WEB-INF/lib/web-settings.xml

Thanks for your suggestion, I've placed an empty web-settings.xml file into
WebContent/WEB-INF directory (the lib subdir in no needed) and this
eliminates the tag from web.xml...
Re: WTP 1.0RC4 and <distributable/> tag [message #152433 is a reply to message #152408] Thu, 15 December 2005 09:14 Go to previous message
Eclipse UserFriend
Janny wrote:
>>To cure the XDoclet problem create a file:
>>
>>WebContent/WEB-INF/lib/web-settings.xml
>
> Thanks for your suggestion, I've placed an empty web-settings.xml file into
> WebContent/WEB-INF directory (the lib subdir in no needed) and this
> eliminates the tag from web.xml...

Opps you are right my mistake, no "lib/" in the path.


Darryl
Previous Topic:How to get the autocompletion feature working in JSEditor
Next Topic:How to use DoubleClickListener in TableViewer
Goto Forum:
  


Current Time: Mon Jul 07 01:25:12 EDT 2025

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

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

Back to the top