Merge lp:~er-abhinav-upadhyay/ubuntu/natty/tomcat6/bugfix-297675 into lp:ubuntu/natty/tomcat6

Proposed by Abhinav Upadhyay
Status: Merged
Merge reported by: Thierry Carrez
Merged at revision: not available
Proposed branch: lp:~er-abhinav-upadhyay/ubuntu/natty/tomcat6/bugfix-297675
Merge into: lp:ubuntu/natty/tomcat6
Diff against target: 42 lines (+14/-0)
3 files modified
debian/changelog (+9/-0)
debian/tomcat6-instance-create (+4/-0)
debian/tomcat6-user.install (+1/-0)
To merge this branch: bzr merge lp:~er-abhinav-upadhyay/ubuntu/natty/tomcat6/bugfix-297675
Reviewer Review Type Date Requested Status
Thierry Carrez (community) Approve
Dave Walker Pending
Review via email: mp+52983@code.launchpad.net

Commit message

debian/tomcat6-instance-create: Eclipse can now be configured to use a user instance of tomcat6 using tomcat6-instance-create without any additional work.
tomcat6-instance-create will setup all the necessary symlinks to make eclipse work.
(Closes: #551091) (LP: #297675)

Description of the change

It required a lot of manual work for web developers to setup tomcat inside eclipse. Either they could setup symlinks for some files which eclipse expects to be found in the server directory, or they had to download and compile tomcat form source.

I modified tomcat6-instance-create so that it will setup those symlinks in the user instance directory. Now it requires zero work for a setting up a user instance of tomcat in eclipse.

I tested it by creating some sample servlets, jsps, and html pages, they were run successfully.

To post a comment you must log in.
Revision history for this message
Thierry Carrez (ttx) wrote :

/etc/tomcat6/policy.d/03catalina.policy is provided by the tomcat6 package, so this won't work if you don't have "tomcat6" (the system instance) installed. tomcat6-user can be used without tomcat6 installed, so you might end up with a borken symlink.

Maybe the policy file should be included in tomcat6-user directly (much like logging.properties or catalina.properties). This would have the added advantage of letting people customize it ?

review: Needs Fixing
Revision history for this message
Abhinav Upadhyay (er-abhinav-upadhyay) wrote :

> /etc/tomcat6/policy.d/03catalina.policy is provided by the tomcat6 package, so
> this won't work if you don't have "tomcat6" (the system instance) installed.
> tomcat6-user can be used without tomcat6 installed, so you might end up with a
> borken symlink.
>
> Maybe the policy file should be included in tomcat6-user directly (much like
> logging.properties or catalina.properties). This would have the added
> advantage of letting people customize it ?

Oh! I did not know that. I had the impression that tomcat6 was the main package, and tomcat6-user was a convenience package so that users could run several user instances of tomcat.

Well, if that is the case, then it would be impossible to run tomcat inside eclipse without catalina.policy. The only possibly way is to include catalina.policy with tomcat6-user package, as you suggested.

How would it be done ?

Revision history for this message
Thierry Carrez (ttx) wrote :

Look how catalina.properties is included, and do the same for a catalina.policy file ?

35. By Abhinav Upadhyay

tomcat6-user package will now include catalina.policy as eclipse requires this file for
setting up the development environment.

Revision history for this message
Abhinav Upadhyay (er-abhinav-upadhyay) wrote :

catalina.policy should now be included with the tomcat6-user package.

Revision history for this message
Thierry Carrez (ttx) wrote :

You forgot to "bzr add" your conf/catalina.policy, so it's missing in the diff...
Otherwise looks good.

review: Needs Fixing
Revision history for this message
Thierry Carrez (ttx) wrote :

Err... no, it's OK :)
Will sponsor it in if nobody beats me to it.

review: Approve
Revision history for this message
Abhinav Upadhyay (er-abhinav-upadhyay) wrote :

> Err... no, it's OK :)
> Will sponsor it in if nobody beats me to it.

Yaay. I will be waiting for it :-)
My 2nd patch going to be merged :-D

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-03-09 18:27:19 +0000
3+++ debian/changelog 2011-03-11 20:34:50 +0000
4@@ -1,3 +1,12 @@
5+tomcat6 (6.0.28-10ubuntu2) natty; urgency=low
6+
7+ * debian/tomcat6-instance-create: Eclipse can now be configured to use a user instance
8+ of tomcat6 using tomcat6-instance-create without any additional work.
9+ tomcat6-instance-create will setup all the necessary symlinks to make eclipse work.
10+ (Closes: #551091) (LP: #297675)
11+
12+ -- Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com> Fri, 11 Mar 2011 13:55:28 +0530
13+
14 tomcat6 (6.0.28-10ubuntu1) natty; urgency=low
15
16 [ Abhinav Upadhyay ]
17
18=== modified file 'debian/tomcat6-instance-create'
19--- debian/tomcat6-instance-create 2011-03-08 03:47:50 +0000
20+++ debian/tomcat6-instance-create 2011-03-11 20:34:50 +0000
21@@ -128,6 +128,10 @@
22 mkdir ${TARGET}/temp
23 cp -r /usr/share/tomcat6/skel/* ${TARGET}
24
25+# Create necessary symbolic links so that eclipse can be properly configured
26+ln -s /usr/share/tomcat6/lib ${TARGET}/lib
27+ln -s /usr/share/tomcat6/bin/bootstrap.jar ${TARGET}/bin/bootstrap.jar
28+
29 sed -i -e "s/Connector port=\"8080\"/Connector port=\"${HPORT}\"/;s/Server port=\"8005\" shutdown=\"SHUTDOWN\"/Server port=\"${CPORT}\" shutdown=\"${CWORD}\"/" ${TARGET}/conf/server.xml
30
31 cat > ${TARGET}/bin/startup.sh << EOT
32
33=== modified file 'debian/tomcat6-user.install'
34--- debian/tomcat6-user.install 2008-08-08 15:37:48 +0000
35+++ debian/tomcat6-user.install 2011-03-11 20:34:50 +0000
36@@ -1,5 +1,6 @@
37 conf/*.xml /usr/share/tomcat6/skel/conf/
38 conf/catalina.properties /usr/share/tomcat6/skel/conf/
39+conf/catalina.policy /usr/share/tomcat6/skel/conf/
40 debian/logging.properties /usr/share/tomcat6/skel/conf/
41 debian/tomcat6-instance-create /usr/bin/
42 debian/setenv.sh /usr/share/tomcat6/skel/bin/

Subscribers

People subscribed via source and target branches