Webapps RUN!

I got a webapp to RUN! I don't know how, but it compiled and
dependencies were checked and copied and Tomcat started... Not sure
how, I have to re do a new one from scratch to figure it all out, it's
better, not as complex, still needs a little massaging, and certainly a
new way of thinking on our part since it's a totally new 'feature'.

Nice nice.

happy camper right now.

R

16 comments
Comment actions Permalink

In the new build or 996?

0
Comment actions Permalink

Nevermind. 998 rocks! Setup a web module in a couple minutes and have no problems debugging.

0
Comment actions Permalink


Robert S. Sfeir wrote:

I got a webapp to RUN! I don't know how, but it compiled and
dependencies were checked and copied and Tomcat started...


YES, I also mysterically got it to work. However, there's still quite a few nasty things:

- The NPE at com.intellij.openapi.fileTypes.a.a.d kinda kills the usefulness of in the
current build when using web modules. I don't think I'm masochistic enough to click
the error dialog away each time IDEA is de-activated :(
(Umm, btw: Where's the possibility to ignore certain exceptions? Would come in
very handy: http://www.intellij.net/tracker/idea/viewSCR?publicId=16392)

- I did not manage to let IDEA build a .war file for me. However, it fails so
unspecifically that I don't dare to submit a SCR yet. The "Make" Window tells sth.
about "Duplicate entries" and the created .war file is not valid...

- The module configuration is not clear about that either a .war file or an exploded
directory is needed. Actually, I'd like to specify neither of those for running simple
webapps inside IDEA.

- The module config reverted the path to my web.xml to the default setting a few times.
Not reproducable though.

- I'm unable to edit the web.xml file inside IDEA because the caret keeps disappearing.
Weird. (http://www.intellij.net/tracker/idea/viewSCR?publicId=24187)

Good job so far, but still a lot to go. I'm eagerly awaiting the next build... :)


Sascha


0
Comment actions Permalink

Sascha Weinreuter wrote:

Robert S. Sfeir wrote:

>>I got a webapp to RUN! I don't know how, but it compiled and
>>dependencies were checked and copied and Tomcat started...


YES, I also mysterically got it to work. However, there's still quite a few nasty things:

- The NPE at com.intellij.openapi.fileTypes.a.a.d kinda kills the usefulness of in the
current build when using web modules. I don't think I'm masochistic enough to click
the error dialog away each time IDEA is de-activated :(
(Umm, btw: Where's the possibility to ignore certain exceptions? Would come in
very handy: http://www.intellij.net/tracker/idea/viewSCR?publicId=16392)

- I did not manage to let IDEA build a .war file for me. However, it fails so
unspecifically that I don't dare to submit a SCR yet. The "Make" Window tells sth.
about "Duplicate entries" and the created .war file is not valid...


Sascha, if you want it to work, for each of your modules that are
dependant on your web app, set the output path to the same directory as
where the module points to. In other words if your module's src
directory is at:

C:\project\mywebapp\src

then the output path has to be the same. Don't ask me why, it's an
anomaly which I'm sure they're working on, and I filed it as a bug or
something.

- The module configuration is not clear about that either a .war file or an exploded
directory is needed. Actually, I'd like to specify neither of those for running simple
webapps inside IDEA.


I think you can do that, haven't figured it out yet, but I think all it
involves is having a webapp module with a directory that is configured
with everything like it would be in your webroot.

- The module config reverted the path to my web.xml to the default setting a few times.
Not reproducable though.



Sure it is, it never saves the path of the one I want to use, but even
worse I think, it remembers the one I want to use, although it doesn't
show it in the text box. weird.


- I'm unable to edit the web.xml file inside IDEA because the caret keeps disappearing.
Weird. (http://www.intellij.net/tracker/idea/viewSCR?publicId=24187)


Hum, I can do that fine.

Good job so far, but still a lot to go. I'm eagerly awaiting the next build... :)


I'm actually going to give this build a shot and see what breaks, the
more we can report the more we can get into the next build.

R

0
Comment actions Permalink


Sascha Weinreuter wrote:

- The NPE at com.intellij.openapi.fileTypes.a.a.d kinda kills the usefulness of in the
current build when using web modules. I don't think I'm masochistic enough to click
the error dialog away each time IDEA is de-activated :(


Sadly, this is stopping for using this build. I use way too many tools
way too often to deal with that. (Hmmm, I once a program that would
click buttons on windows as they appears. Yes, its called Buzzof. I'll
have to see if I still have it around.)

0
Comment actions Permalink

Barry Kaplan wrote:

Sadly, this is stopping for using this build. I use way too many tools
way too often to deal with that. (Hmmm, I once a program that would
click buttons on windows as they appears. Yes, its called Buzzof. I'll
have to see if I still have it around.)


Couldn't you just use the standard workaround and remove the dialog
appender from bin/log.xml? You wouldn't be able to see any other
exceptions that appeared, of course (but they'd still be in the log and
in the console).

I think it's

<appender-ref ref="DIALOG"/>

that you're supposed to remove.

0
Comment actions Permalink


Robert S. Sfeir wrote:

Sascha Weinreuter wrote:

>

Sascha, if you want it to work, for each of your modules that are
dependant on your web app, set the output path to the same directory as
where the module points to. In other words if your module's src
directory is at:

>

C:\project\mywebapp\src

>

then the output path has to be the same. Don't ask me why, it's an
anomaly which I'm sure they're working on, and I filed it as a bug or
something.


OK, thanks for the advice. However, my webapp is really simple, I don't even have a
seperate src-dir. All I have is a web.xml that declares a servlet. The dir-structure is kinda
fixed which currently prevents me from taking the servlet-source of of the main module.
My attempt to set the output path to the module's content-root obviously nuked the whole
directory (umm well, just the web.xml) during the "clearing output path" build-step.

- The module configuration is not clear about that either a .war file or an exploded
directory is needed. Actually, I'd like to specify neither of those for running simple
webapps inside IDEA.

>

I think you can do that, haven't figured it out yet, but I think all it
involves is having a webapp module with a directory that is configured
with everything like it would be in your webroot.


OK, I will check this again. Anyway, the whole configuration seems kinda complex and
might need lots of documentation (at least for those who don't eat webapps for breakfast :))
There should either be a wizard (oh no, did I say wizard??) that leads the user through setting
up a standard webapp, or it should be more clear (without reading lots of documentation) what
settings are absolutely needed and which settings are for "advanced use".

- The module config reverted the path to my web.xml to the default setting a few times.
Not reproducable though.

>
>

Sure it is, it never saves the path of the one I want to use, but even
worse I think, it remembers the one I want to use, although it doesn't
show it in the text box. weird.


Yeah, I've experienced the same. I also think that after typing sth. into the textfield, the value
seems to persist. I'm not sure though.


Sascha



0
Comment actions Permalink

How to make Idea copy my resource and html files in the exploded directory?
Besides classes and lib directories I need other contents for the webapp.
How to do that?



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

I got a webapp to RUN! I don't know how, but it compiled and
dependencies were checked and copied and Tomcat started... Not sure
how, I have to re do a new one from scratch to figure it all out, it's
better, not as complex, still needs a little massaging, and certainly a
new way of thinking on our part since it's a totally new 'feature'.

>

Nice nice.

>

happy camper right now.

>

R



0
Comment actions Permalink

Daniel Moldovan wrote:

How to make Idea copy my resource and html files in the exploded directory?
Besides classes and lib directories I need other contents for the webapp.
How to do that?


Daniel,

The trick to do that is 2 fold. Make your resources and html files
separate modules. Once you've done that, set them as dependencies to
your web module. Once you've done that, go to the web app settings tab
(the one with the blue globe) and you will see that they're in the child
modules list at the bottom of the window. There check them all on.
Adjust the path. If you want your html files at the root of the web
directory, just put a . in the field. This will put it one level up
from the WEB-INF directory. For resources, if you want those at the
root of WEB-INF, then just put in WEB-INF (so slash).

Next you want to make sure the output path of your resources is the
directory your resources is in (don't ask me why this is how it works
right now), do the same for the html pages.

R

0
Comment actions Permalink

Thanx, Robert. I hope this is just temporary.
Another problem is that if your Servelt class is in a
jar file(like turbine is) you can not configure this directly.
The workaround is that you have to extend that class in your own source. :(

Daniel

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

Daniel Moldovan wrote:

How to make Idea copy my resource and html files in the exploded

directory?

Besides classes and lib directories I need other contents for the

webapp.

How to do that?

>

Daniel,

>

The trick to do that is 2 fold. Make your resources and html files
separate modules. Once you've done that, set them as dependencies to
your web module. Once you've done that, go to the web app settings tab
(the one with the blue globe) and you will see that they're in the child
modules list at the bottom of the window. There check them all on.
Adjust the path. If you want your html files at the root of the web
directory, just put a . in the field. This will put it one level up
from the WEB-INF directory. For resources, if you want those at the
root of WEB-INF, then just put in WEB-INF (so slash).

>

Next you want to make sure the output path of your resources is the
directory your resources is in (don't ask me why this is how it works
right now), do the same for the html pages.

>

R



0
Comment actions Permalink


Jonas Kvarnström wrote:

Couldn't you just use the standard workaround and remove the dialog
appender from bin/log.xml? You wouldn't be able to see any other
exceptions that appeared, of course (but they'd still be in the log and
in the console).

I think it's

<appender-ref ref="DIALOG"/>

that you're supposed to remove.


Ah!! Thats great. But I won't remove the appender, but rather add a
filter. I'll give it a shot and report back. Thanks

0
Comment actions Permalink


Robert S. Sfeir wrote:

The trick to do that is 2 fold.


Is all that required to run/debug from within idea? Is this how one is
expected to have to setup webapps, or just an interim annoyance?

0
Comment actions Permalink

See the mini tutorial I just posted in the J2EE forum. It is EXTREMELY convoluted at this time. There seems to be no simply way of setting up a quick webapp. To do that we'd need to be able to build a project through the wizard and tell it it's a web app project. if we can do that, then the wizard would simply ask us the various questions we need, and when the project is created everything is ready to go.

Unfortunately my web apps are not simple, so the complexity of the setup, in a strange way, is welcome, because it allows me to tweak things heavily. However this is TOO hard to figure out. WAY too hard, especially for someone who eats web apps for breakfast, lunch and dinner ;)

I've posted more comments in the J2EE forum where it is more appropriate to discuss this. Please add your requests/frustrations to them, I'm just jetbrains is listening.

R

0
Comment actions Permalink

Jonas Kvarnström wrote:

Barry Kaplan wrote:

>> Sadly, this is stopping for using this build. I use way too many tools
>> way too often to deal with that. (Hmmm, I once a program that would
>> click buttons on windows as they appears. Yes, its called Buzzof. I'll
>> have to see if I still have it around.)


Couldn't you just use the standard workaround and remove the dialog
appender from bin/log.xml? You wouldn't be able to see any other
exceptions that appeared, of course (but they'd still be in the log and
in the console).

I think it's

<appender-ref ref="DIALOG"/>

that you're supposed to remove.



Jonas,

You're a LIFE saver!

I changed the log.xml to look like this at the end:

]]>

And now I don't get nagged every time I press a key, and I can DEBUG my
webapps in peace... well there could be other problems now, but at least
now I can report them!!!

Thanks, I'll post this to the J2EE forum.
R

0
Comment actions Permalink

I use Struts, and I can configure things just fine. I'm not sure what
you mean by that. We should carry on this conversation in J2EE forum.
Maybe it's a setting you have. I've also posted a little hidden feature
which might solve your problem in the J2EE form.

R

Daniel Moldovan wrote:

Thanx, Robert. I hope this is just temporary.
Another problem is that if your Servelt class is in a
jar file(like turbine is) you can not configure this directly.
The workaround is that you have to extend that class in your own source. :(

Daniel

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

>>Daniel Moldovan wrote:
>>
>>>How to make Idea copy my resource and html files in the exploded


directory?

>>>Besides classes and lib directories I need other contents for the


webapp.

>>>How to do that?
>>
>>Daniel,
>>
>>The trick to do that is 2 fold. Make your resources and html files
>>separate modules. Once you've done that, set them as dependencies to
>>your web module. Once you've done that, go to the web app settings tab
>>(the one with the blue globe) and you will see that they're in the child
>>modules list at the bottom of the window. There check them all on.
>>Adjust the path. If you want your html files at the root of the web
>>directory, just put a . in the field. This will put it one level up
>>from the WEB-INF directory. For resources, if you want those at the
>>root of WEB-INF, then just put in WEB-INF (so slash).
>>
>>Next you want to make sure the output path of your resources is the
>>directory your resources is in (don't ask me why this is how it works
>>right now), do the same for the html pages.
>>
>>R


0

Please sign in to leave a comment.