11 comments

I hope so, I tried playing around with tomcat, and ran into this same problem. I didnt feel like hacking up the server.xml at the time so i just gave up.

0

Andre Mermegas wrote:

I hope so, I tried playing around with tomcat, and ran into this same problem. I didnt feel like hacking up the server.xml at the time so i just gave up.


FWIW, I just add one context in server.xml called webapps, and I use
that one for all idea web modules. So you don't have to do anything
special to handle the rest of them. The it's nice also because in the
web browser you just set a bookmark for localhost/webapps and you're done.

R

0

This may be a dumb question, but based on what you have said, why do we need to choose a context at all?

0

Scott Hrehirchuk wrote:

This may be a dumb question, but based on what you have said, why do we need to choose a context at all?

>


Because Idea makes us :)

I would rather not have to setup anything, and just tell idea when it
starts Tomcat up to just respond to a specific context, but it doesn't
do that.

R

0

I would rather not have to setup anything, and just
tell idea when it
starts Tomcat up to just respond to a specific
context, but it doesn't
do that.


And that's a shame...

0

Martin Fuhrer wrote:

>>I would rather not have to setup anything, and just
>>tell idea when it
>>starts Tomcat up to just respond to a specific
>>context, but it doesn't
>>do that.


And that's a shame...


Yup :)

0

Scott Hrehirchuk wrote:

This may be a dumb question, but based on what you have said, why do
we need to choose a context at all?


Hear hear. Afaik webmodule name == context name in appservers.

What is even sillier is that you have to edit the tomcat server.xml to
add your contextroot & content basepath, and then you have to go back to
IDEA and define exactly the same information in the tomcat plugin setup,
then on starting tomcat IDEA creates a new (temporary) server.xml
containing the configured paths!?! How does that make sense?

(I just checked the plugin sources, and it seems the plugin checks if
the server.xml contains the context you just configured, gives an error
if it doesn't, but if it does it uses the configured values and sets
your context & basepath anyway?!)

Thank you. I'll go back to bed now 8-)

It's quite possible I miss something - I just don't understand the logic
behind this.

CU,
Edwin

0

Agreed Edwin. Personally I'd like to see IDEAs web project settings handle all this for you. Playing around in server and web xmls seems rather archaic to me when we are setting up pretty much the same things in our project settings.

Of course I'm not saying that manual editing of these files is never useful, however it would be nice if when you specified a project as a web module all this was automatically setup for you by IDEA and could be changed via the project settings.

0

Rob Bradley wrote:

rather archaic to me when we are setting up pretty much the same
things in our project settings.

Of course I'm not saying that manual editing of these files is never
useful, however it would be nice if when you specified a project as a


Oh, I agree with you there! I guess what really irks me is that you
have to define the same things in two (and in the case of the context
path three) different places.

I suppose part of this may be a left-over from the pre-(web)-module
days, but even there the strange check-but-create-new-one-anyway logic
for server.xml existed...

I would 'fix' the tomcat plugin, but can't get the sources to compile
(some internal intellij stuff is missing?)

CU,
Edwin

0

I would 'fix' the tomcat plugin, but can't get the
sources to compile
(some internal intellij stuff is missing?)


I already did changes to the tomcat plugin some time ago. There was no problem to compile it. Maybe something changed meanwhile, but I think it's worth giving it a second try.

0

Martin Fuhrer wrote:

>> I would 'fix' the tomcat plugin, but can't get the sources to
>> compile (some internal intellij stuff is missing?)

I already did changes to the tomcat plugin some time ago. There was
no problem to compile it. Maybe something changed meanwhile, but I
think it's worth giving it a second try.


Yeah, I was being lazy - looking at it right now 8-) : the needed stuff
(undocumented, module-related, by the way) is in idea.rt (obviously),
and the debugger/JSR45 support is in the jre tools.jar.

CU,
Edwin

0

Please sign in to leave a comment.