This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 126805 - Incorrect DOCTYPE is used for SJSAS 8.2
Summary: Incorrect DOCTYPE is used for SJSAS 8.2
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Rochelle Raccah
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-06 09:52 UTC by Petr Blaha
Modified: 2008-02-28 00:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Blaha 2008-02-06 09:52:18 UTC
The incorrect DOCTYPE in server specific DD is generated for projects that have SJSAS 8.2 target server. The bug
originaly reported on nbusers:

I have tried to develop a hello world web app based on J2EE 1.4 & SJSAS 8.2 with NB6.

I create the project with web application wizard and choose SJSAS 8.2 , however, when I deploy it, the following error
occurs:
---------------------------------------------
deployment started : 0%
Deploying application in domain  failed; Error loading deployment descriptors for WebApplication5 -- www.sun.com
; requested operation cannot be completed
--------------------------------------------

I checked the files generated by NB 6 and found these lines in the sun-web.xml, which causes the error when deploying.
----------------------------------------------
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN"
"http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
----------------------------------------------
It seems that these lines are for Glassfish instead of SJSAS 8.x. Is it an issue?
Comment 1 _ pcw 2008-02-06 18:47:25 UTC
The setVersion() feature for the new DD editors missed the 6M10 cutoff for 6.0 features.  That is reason for the
described behavior.
Comment 2 Vince Kraemer 2008-02-13 18:26:34 UTC
treated in bug fix phase.
Comment 3 _ pcw 2008-02-13 19:49:13 UTC
The template for new descriptor files is version 9.0.  In 5.5, we would downgrade the DOCTYPE programmatically after
creating the descriptor for the project.  In 6.0, we can't (easily) do that anymore.

We can fix this by offering two templates (one for AS 8.2, one for AS 9.0) for each descriptor type and copying the
correct one based on the current target appserver at the time the project is created.

The current templates are listed in the layer file for the sunddui module which is in
src/org/netbeans/modules/j2ee/sun/share.

The code that copies the template is SunONEDeploymentConfiguration.createDefaultSunDD().  The deployment configuration
object has a datamember named appServerVersion that should contain the current server version (or predicted if for some
reason the version cannot be determined successfully.)
Comment 4 Rochelle Raccah 2008-02-21 19:41:11 UTC
Using doctypes from <http://www.sun.com/software/dtd/appserver/>
Comment 5 _ pcw 2008-02-28 00:01:16 UTC
Fixed.

changeset:   70283:12969cbadba3
tag:         tip
user:        pcw@netbeans.org
date:        Wed Feb 27 15:38:06 2008 -0800
summary:     Fixed IZ 126805 - generating wrong DOCTYPE when SJSAS 8.2 is the target server.