Web App - Application context path (why specify?)
Hi all,
Do you guys know if its possible to create a web app without needing to
specify the "Application Context Path" field? This forces me to add the
context in the server.xml which is not normally needed. Thanks.
-Ronnie
Please sign in to leave a comment.
Hi Ronnie,
Context path is Tomcat's configuration issue. Of course it is possible to
work with WebApps without using TomcatPlugin.
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
"Ronnie Diaz" <rad91@earthlink.net> wrote in message
news:aqovc4$mvi$1@is.intellij.net...
to
>
>
yes, but without specifying the context the web application it doesn't run and the consequence is that it needs for strength 'to dirty' the original file server.xml. This is not very beautiful, if you could be resolved...?
I am also busy me a question: every time that you is made to run the web application, the virtual 'tomcat.home' under the directory System is systematically recreated with the consequent cancellation of the pages jsp previously compiled that they have to be therefore ricompilate at runtime. it's possible to do so that such directory every time doesn't come replaced?
Thanks,
Simone.
and the consequence is that it needs for strength 'to dirty' the
But how can the web application be run in Tomcat without specifying a
context path?
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
"Simone" <ricciardis@dsdata.it> wrote in message
news:6331872.1037178552253.JavaMail.jrun@is.intellij.net...
and the consequence is that it needs for strength 'to dirty' the original
file server.xml. This is not very beautiful, if you could be resolved...?
application, the virtual 'tomcat.home' under the directory System is
systematically recreated with the consequent cancellation of the pages jsp
previously compiled that they have to be therefore ricompilate at runtime.
it's possible to do so that such directory every time doesn't come replaced?
It is true that you need a context path for a web application. I think the complaints are because you can deploy a WAR into Tomcat which is installed automatically with a context path being the same as the name of the WAR. You do not need to modify your server.xml for your web application to work. For IDEA using a context path in the Tomcat integration you need to modify your server.xml file. Since IDEA copies the server.xml to a temporary folder (I think it works this way, right?), it might be possible to use the specified context path in the copy only without the need to modify the original one.
Michael
Thanks Michael, your answer is very more coherent to the question that I had done.
Do you also have some idea on as to resolve the problem of every time re-compilation of jsp pages?
Thanks in advance.
You can also install a web app without modifying the server.xml file by installing the application in the webapps directory under Tomcat. This causes Tomcat to automatically pick up the application at start-up time and assign it a context name that's the same as its directory name.
So if you put mywebapp in the CATALINA_HOME/webapps directory and restart Tomcat, you'll magically have the web app context http://server/mywebapp.
Please note, I don't know how this will affect IDEA's handling of the web application. But if it can't pick up applications that are loaded this way, then it should be able to do that.
That's exactly what I meant. You can deploy into Tomcat without modifying the server.xml file. IDEA lets you select the context path only from what it finds in the server.xml file, so you need to add the context paths that you want to use in IDEA to the server.xml.
Michael
the server.xml file. IDEA lets you select the context path only > from what
it finds in the server.xml file, so you need to add the context paths that
you want to use in IDEA to the server.xml.
This is done in order to enforce some startup paratemeters to support JSP
debugging. IDEA makes sure that in the modified copy of the server.xml some
parameters have certain values even if they are not specified in the
original server.xml.
And this is one of the reasons why the configs are copied to the temp
directory.
Currently there is no way to preserve compiled JSPs from the previous debug
session - but is this really needed?
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
Okay, I understand that copying the original server.xml is necessary but is it also necessary to put the context path I want to use for IDEA's Tomcat integration in the original server.xml? Wouldn't it be sufficient if I specified any context path in IDEA and only the server.xml copy uses this path? Currently IDEA complains about the original server.xml not containing the specified context path.
Michael
Yes, currently it requires that the context path specified in the Run
configuration should be present in the server.xml.
Perhaps this is a feature request "generate the context in the copy of the
server.xml if the context with the specified name is not found".
Also you can always work with a copy of the original server.xml specially
configured for your web app.
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
"Michael Descher" <michael.descher@gmx.de> wrote in message
news:2903443.1037267771122.JavaMail.jrun@is.intellij.net...
is it also necessary to put the context path I want to use for IDEA's Tomcat
integration in the original server.xml? Wouldn't it be sufficient if I
specified any context path in IDEA and only the server.xml copy uses this
path? Currently IDEA complains about the original server.xml not
containing the specified context path.
>
>
Eugene,
I think that IntelliJ should come up with a definitive "How To" guide on this subject. There are so many people who will be using this feature and they are going to become very frustrated with the tool (i.e. IDEA).
I spent more than an hour yesterday trying to set this up and I consider myself an experienced developer and an experienced IDE user.
This guide must be published in a highly-visible area of your website as to say, "Here is the tutorial for developing JSP/Servlet technology with IDEA."
In the J2EE developments current state, I would say that it is lacking clear instruction and ease of use. When people compare IDEA to other tools, this will be an issue. I wish I checked this out during the EAP phase but I didn't have the need for JSP/Servlet debugging.
Sincerely,
Justin
Yep, you are right - there are some unintuitive issues. We'll think about
providing the guide.
As for ease of use - our tracker is always open for all kinds of requests
:)
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
"Justin Hopper" <jusbiz@oz.net> wrote in message
news:3061499.1037276069339.JavaMail.jrun@is.intellij.net...
>
this subject. There are so many people who will be using this feature and
they are going to become very frustrated with the tool (i.e. IDEA).
>
myself an experienced developer and an experienced IDE user.
>
to say, "Here is the tutorial for developing JSP/Servlet technology with
IDEA."
>
clear instruction and ease of use. When people compare IDEA to other tools,
this will be an issue. I wish I checked this out during the EAP phase but I
didn't have the need for JSP/Servlet debugging.
>
>