Robert, let us know how that new build works with web modules.

Unfortunately, I don't have time to mess with it right now.


99 comments
Comment actions Permalink

Well, I give up. Back to 1019 again.

"Brad" <brad.lane@pearson.com> wrote in message
news:bspu1j$866$1@is.intellij.net...

Unfortunately, I don't have time to mess with it right now.

>
>


0
Comment actions Permalink

Ok. I'd like to make things clear.

-- We do not support dependences in WebModules
-- JSPs not under WebRoots will not resolve includes and tlds. Also they
are not visible by other JSPs as they will not be deployed.
-- There could more then one web root per module
-- Our JSP support resolve TLDs from /WEB-INF, jars, and web.xml mappings.

IK

Robert S. Sfeir wrote:

Dope didn't see the mark webroot! WOW... hum... Ok Setting that allows
the tag libs to resolve, however only inside the webroot itself... not
in another module which depends on the web module.

Igor? Any chance this can happen, or should we expect to always have
the jsps inside the webroot???

R



--
Igor Kuralenok
Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

hey Brad, et al,

Igor just sent me a fixed project file. I'm gonna check it out and see
what the diff is with my 'busted' project. They re set everything up
from scratch. It seems that I had a few mistakes in there, including
the fact that we're using dependencies and they haven't been implemented
yet... LOL... no wonder they don't save, but in a weird way, they work
anyway!

It seems you can have multiple webroots. The location of each directory
is its relative path to where you expect it in the webroot. So you can
work with the project with all your directories exactly like you want
them in CVS, and then VIRTUALLY setup the webroots so you simulate
things as if they were in the final web app.

if I understood this, and it works, this is even BETTER than I was
hoping things would be with J2EE, it means we don't need to setup a
deploy directory or anything until we want to deploy the app, the whole
thing should work as expected. Should be a lot of fun.

More soon.

R

0
Comment actions Permalink

I have had issues with this EAP saving settings, although at some point it maintained my webroot marking. You might have to mark it as webroot again everytime you open. You might want to open an issue on the tracker.

Thanks,
Patrick

0
Comment actions Permalink

Okay, I tried 1050 now. I find the following bugs with web modules:

1) web.xml path reset to project root after closing and reopening project.

2) all check marks for including other modules/libs into web module are
cleared after closing and reopening project.

At least (1) leads to taglibs not being resolved because of wrong
web.xml which does not define any taglibs.

Michael

Michael Descher wrote:

I had lots of problems up tp build 1024 (resolving taglibs, settings not
being saved, etc.). When I got build 1035, I recreated my project (all
files, i.e. IPR, IML, IWS) from scratch and everything except for
web.xml path not being stored when edited through paths settings worked.
Don't know if my project files (IPR, IML, IWS) got busted sometime or if
it just started to work in 1035. Didn't try 1050 either. Maybe you could
try this as well (in case you did not try yet).

Michael

Robert S. Sfeir wrote:

>> Jon Erdman wrote:
>>
>>> I have no problem resolving tag libs. Here's what I have ...
>>>
>>> >>> jsps >>> WEB-INF >>> lib >>> tld >>> .tld files >>> web.xml >>> ... >>> >>> The only difference I see is that I'm defining the tags directly in >>> the jsps. I use this form: >>> >>> >>> >>> I don't have a separate resource module either. >> >> >> >> Thanks for the info Jon. I should try that setup, though it defeats >> setting up the exploded directory, I am more interested in getting tag >> libs to resolve when I have jsps in a separate module. My feeling is >> that if the jsps module is a Child of the web module, web.xml being >> setup properly, should allow for proper resolution of the tag libs. >> >> I have another project I need to work on, never worked on it in IDEA, >> maybe I can set it up as a web module only. >> >> Which makes me think of a question to those who have things working... >> >> Do you have exploded dir, or war setup, or neither? >> >>]]> R

0
Comment actions Permalink

Ok Brad, get back to 1050... it works, here is a stripped down project
again. There is only ONE module, even with the way I setup my whole
project. It's phenomenal! It works even when you restart IDEA and
EVERYTHING resolves! HOLLY SMOKES THIS IS COOL!

Ignore the extra modules in there. I'm cleaning the whole thing up and
starting over. I get it.

R



Attachment(s):
mesquite.zip
0
Comment actions Permalink

So with the current version it will not be possible to share web
resources like JSPs, images, etc. in multiple web modules (either by
dependencies or by sharing content roots), right?!

Igor Kuralenok (JetBrains) wrote:

Ok. I'd like to make things clear.

-- We do not support dependences in WebModules
-- JSPs not under WebRoots will not resolve includes and tlds. Also they
are not visible by other JSPs as they will not be deployed.
-- There could more then one web root per module
-- Our JSP support resolve TLDs from /WEB-INF, jars, and web.xml mappings.

IK

Robert S. Sfeir wrote:

>> Dope didn't see the mark webroot! WOW... hum... Ok Setting that
>> allows the tag libs to resolve, however only inside the webroot
>> itself... not in another module which depends on the web module.
>>
>> Igor? Any chance this can happen, or should we expect to always have
>> the jsps inside the webroot???
>>
>> R


0
Comment actions Permalink

Michael Descher wrote:

Okay, I tried 1050 now. I find the following bugs with web modules:

1) web.xml path reset to project root after closing and reopening project.


yeah it's a bug.


2) all check marks for including other modules/libs into web module are
cleared after closing and reopening project.


Don't use Child Modules anymore, they don't work, and they're not
supposed to work yet, and further you don't need them.

At least (1) leads to taglibs not being resolved because of wrong
web.xml which does not define any taglibs.


If you put web.xml at the root of your project, or where ever your web
module.iml file goes, it will work.

Check out the sample project I uploaded with the fixed web module from
Igor. It works, it's consistently working for me right now, and it's
super fast to setup too.

R

0
Comment actions Permalink

I see how that's working and it's pretty nice, but my only problem with it is that the way I use ant to deploy is I just copy everything from my webapp directory, which means I have web.xml in its rightful place under WEB-INF.

Although, after seeing that setup, I am going to make my current project just a web module with a java src dir. That's too cool.

Igor, is it a bug that IDEA expects the web.xml to be in the root of the project? And that it doesn't seem to save other locations of web.xml?

Thanks,
Patrick

0
Comment actions Permalink

My MO when it comes to new EAP builds is to start over from scratch. Install IDEA in a new directory, with new system and config directories, and start my project files over. As time intensive as this is (especially with two builds a day at times last week), it lets me know for sure I am not running into something from a previous build. And the only reason I started doing it was because I got burned during the Arianda EAP with one of my project files being incorrect due to a bug in a previous build that the current build couldn't resolve.

Thanks,
Patrick

0
Comment actions Permalink

Patrick Burleson wrote:

My MO when it comes to new EAP builds is to start over from scratch. Install IDEA in a new directory, with new system and config directories, and start my project files over. As time intensive as this is (especially with two builds a day at times last week), it lets me know for sure I am not running into something from a previous build. And the only reason I started doing it was because I got burned during the Arianda EAP with one of my project files being incorrect due to a bug in a previous build that the current build couldn't resolve.

Thanks,
Patrick

This is what I do here too Patrick, but it seems the web root button was
not that obvious... we got so used to the old way, this is completely
different way of setting up web modules. it takes no more than 1 minute
to setup my project, it's a really beautiful thing.

R

0
Comment actions Permalink

Odd, now that I have resetup my project as just a web module with a java src folder identified, if I get a NPE when I try to build the project. The classes from the Java files are getting created in my output directory, but the strange thing is, the old .dependency folder isn't there. Maybe something is busted with the compile from within a web module. I've submitted it through the auto submitter.

Thanks,
Patrick

0
Comment actions Permalink

Patrick Burleson wrote:

I see how that's working and it's pretty nice, but my only problem with it is that the way I use ant to deploy is I just copy everything from my webapp directory, which means I have web.xml in its rightful place under WEB-INF.

Although, after seeing that setup, I am going to make my current project just a web module with a java src dir. That's too cool.

Igor, is it a bug that IDEA expects the web.xml to be in the root of the project? And that it doesn't seem to save other locations of web.xml?


Patrick, if you use the J2EE deployment stuff, you don't need ant
anymore, it copies everything where it needs to go, and even sets up a
war file properly.

This is working so well now I feel like a little kid going out and
setting up every project from scratch and they all work.

I have one project right now that has 10 web modules, all of which share
various directories and libraries, and they all work as expected, I'm
just blown away... this is truly putting J2EE as a first class citizen
in IDEA... it's way way way cool!

Thanks JetBrainers! This is cool!

R

0
Comment actions Permalink

Patrick Burleson wrote:

Odd, now that I have resetup my project as just a web module with a java src folder identified, if I get a NPE when I try to build the project. The classes from the Java files are getting created in my output directory, but the strange thing is, the old .dependency folder isn't there. Maybe something is busted with the compile from within a web module. I've submitted it through the auto submitter.

Thanks,
Patrick


Known bug. It doesn't happen to me here, I cleared everything, but I
have an output dir pointed to classes dir outside any webroot.

R

0
Comment actions Permalink

Robert,
The problem with that is we don't have IDEA installed on our staging and production servers. We do actual builds on these servers with tagged versions from CVS. So I have to make sure ant is working, and it seems like a hack to have the web.xml file outside of WEB-INF in that case.

I agree that it is quite cool (haven't been this excited about J2EE support since I saw the EAP for Andriana and was blown away compared to what was around before), but to reiterate my mantra during this EAP, the IDE shouldn't dictate file location.

Thanks,
Patrick

0
Comment actions Permalink

Just to clarify, my module setup is as follows:

- All jsps are in a web module. They are set to use exploding directory in the build at a different location then where the source jsps are.
- all java files are in a standard module together. The output path is set to the WEB-INF/classes folder where my exploded directory is going.
- The tld files are under the WEB-INF/tld folder in the web module. They are not in a separate module. They get automatically copied to the exploded structure since they are part of the web module.
- The web.xml in my web module is set to the web.xml in my exploded directory, not my web module root. This is because I set some specific params in my servlet params that I wish to keep generic in my web root. With this setup the web.xml in the exploded dir does not get replaced with the web.xml in the module root (which is the behavior I desire.)
- The web module specifies the java module as a dependency.

0
Comment actions Permalink

Patrick Burleson wrote:

Robert,
The problem with that is we don't have IDEA installed on our staging and production servers. We do actual builds on these servers with tagged versions from CVS. So I have to make sure ant is working, and it seems like a hack to have the web.xml file outside of WEB-INF in that case.


We do the same here. I just reconfigured ant to build my project from
the same setup idea uses. We're only 3 people though, so it's not as
bad as with a bigger group, still I think it's a small adjustment.

I agree that it is quite cool (haven't been this excited about J2EE support since I saw the EAP for Andriana and was blown away compared to what was around before), but to reiterate my mantra during this EAP, the IDE shouldn't dictate file location.


No S**t. I am productive again, but so giddy, that I need to keep
playing with stuff first to get it out of my system.

R

0
Comment actions Permalink

Jon Erdman wrote:

Just to clarify, my module setup is as follows:

- All jsps are in a web module. They are set to use exploding directory in the build at a different location then where the source jsps are.
- all java files are in a standard module together. The output path is set to the WEB-INF/classes folder where my exploded directory is going.
- The tld files are under the WEB-INF/tld folder in the web module. They are not in a separate module. They get automatically copied to the exploded structure since they are part of the web module.
- The web.xml in my web module is set to the web.xml in my exploded directory, not my web module root. This is because I set some specific params in my servlet params that I wish to keep generic in my web root. With this setup the web.xml in the exploded dir does not get replaced with the web.xml in the module root (which is the behavior I desire.)
- The web module specifies the java module as a dependency.


John you should only have one module. Check out the sample module I
just uploaded, it's a lot simpler than you describe above.

R

0
Comment actions Permalink

Unforunately, that's not a small adjustment amongst my team. I am the only developer trying out IDEA EAP and I can't suddenly have everyone else change their settings in 3.0.5 because of a quirk in the EAP and to also change the build.xml file. I consider not being able to have the web.xml in a location other than where the .iml file is to be a bug.

But I am actually productive with it now. I just can't compile for the moment in IDEA. That's ok, that's what I have ant for. :)

Thanks,
Patrick

0
Comment actions Permalink

Ok hope this helps everyone watching this thread. Here is a screen shot
of my project setup.

R



Attachment(s):
new-setup.gif
0
Comment actions Permalink

Robert S. Sfeir wrote:

Ok hope this helps everyone watching this thread. Here is a screen shot
of my project setup.

R

As a matter of fact I don't think it's reasonable to create a web root
for /WEB-INF/lib because it is generated from libraries marked to be
included in deployment. Marking libraries for deployment is the right
way because taglibs are resolved only in such libraries.

IK

--
Igor Kuralenok
Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Patrick Burleson wrote:

Odd, now that I have resetup my project as just a web module with a java src folder identified, if I get a NPE when I try to build the project. The classes from the Java files are getting created in my output directory, but the strange thing is, the old .dependency folder isn't there. Maybe something is busted with the compile from within a web module. I've submitted it through the auto submitter.




Try to exclude your output directory.

IK

--
Igor Kuralenok
Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Igor Kuralenok (JetBrains) wrote:

Robert S. Sfeir wrote:

>> Ok hope this helps everyone watching this thread. Here is a screen
>> shot of my project setup.
>>
>> R


As a matter of fact I don't think it's reasonable to create a web root
for /WEB-INF/lib because it is generated from libraries marked to be
included in deployment. Marking libraries for deployment is the right
way because taglibs are resolved only in such libraries.


Well I would LIKE to set it up that way, but I keep losing the Child
Settings. is there some other magic way to to include them in deployment???

R

0
Comment actions Permalink

How do I mark a library for deployment?

0
Comment actions Permalink

Igor Kuralenok (JetBrains) wrote:

Try to exclude your output directory.


If we're talking about
http://www.intellij.net/tracker/idea/viewSCR?publicId=24968 I've tried
to exclude the output directories for both modules and I still get the NPE.

0
Comment actions Permalink

>> 2) all check marks for including other modules/libs into web module
>> are cleared after closing and reopening project.


Don't use Child Modules anymore, they don't work, and they're not
supposed to work yet, and further you don't need them.


Problem is that I have a framework java module which is used by four
different web modules. I cannot imagine any other setup than four web
modules depending on the same java module in one project. I cannot
include the framework in all web modules since the content roots cannot
be shared. I also cannot use a project level library since the framework
code gets compiled by the project.

Michael

0
Comment actions Permalink

Ian Zabel wrote:

How do I mark a library for deployment?


Settings | Paths | Web Module tab Children Modules.

IK

--
Igor Kuralenok
Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Michael Descher wrote:
>>> 2) all check marks for including other modules/libs into web module
>>> are cleared after closing and reopening project.
>>
>>
>>
>> Don't use Child Modules anymore, they don't work, and they're not
>> supposed to work yet, and further you don't need them.


Problem is that I have a framework java module which is used by four
different web modules. I cannot imagine any other setup than four web
modules depending on the same java module in one project. I cannot
include the framework in all web modules since the content roots cannot
be shared. I also cannot use a project level library since the framework
code gets compiled by the project.


I'm not aware of the multiple content roots being an issue anymore.
have you tried that under 1050?

R

0
Comment actions Permalink

Igor Kuralenok (JetBrains) wrote:

Ian Zabel wrote:

>> How do I mark a library for deployment?


Settings | Paths | Web Module tab Children Modules.


Yeah and it doesn't save :) Once it saves the settings we can use it :)

R

0
Comment actions Permalink

How do you have only one module that is a web module? Do you start with a
regular mod, add a web, then remove regular?

"Robert S. Sfeir" <robert@codepuccino.com> wrote in message
news:bss5fn$so9$1@is.intellij.net...

Ok Brad, get back to 1050... it works, here is a stripped down project
again. There is only ONE module, even with the way I setup my whole
project. It's phenomenal! It works even when you restart IDEA and
EVERYTHING resolves! HOLLY SMOKES THIS IS COOL!

>

Ignore the extra modules in there. I'm cleaning the whole thing up and
starting over. I get it.

>

R

>


0

Please sign in to leave a comment.