I am testing a web application (Apache Wicket Based) via Intellij IDEA Tomcat integration. There I noticed that the webapp consider its running in bin folder of the tomcat. Also when I called the ServletContext.getContext("/") it returns null. But when I deploy the same webapp manually in tomcat it works fine. How can solve this in Intellij IDEA?
How to deploy tomcat/webapps folder from IntellijIDEA
2.4k Views Asked by andunslg At
2
There are 2 best solutions below
0
Chaim Leib Halbert
On
In IntelliJ (I'm using Ultimate 2017), the context directory is set through File > Project Structure. Under the Web Resource Directories list, IntelliJ had filled in a path ending with /webapp by default, which didn't exist and was in red. I changed that to the folder enclosing my root-level index.jsp. After a rebuild, my JSPs were rendering and the CSS and JS (stored in the same tree as the JSPs) were loading perfectly.
Related Questions in TOMCAT
- Best way to pass an environment variable to several config files
- Openshift context path
- KeyStore file is not found in jar, although present in jar
- phpseclib of how to get PID and kill
- Unable to connect database of lamp instance from servlet running on tomcat instance of google cloud
- Spring and Tomcat: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- How can I get a custom header from the client in Tomcat?
- why lost Mysql connection pool after a period?
- Eclipse Java EE + Bitnami Tomcat Stack
- Service not starting using Spring-boot during integration tests
- Image not loading in web page and says 404 error
- Maven Tomcat plugin - 404 WebServlet not found
- How to deploy a spring boot MVC application in traditional tomcat webapps folder?
- Tomcat Manager is not accessible in multi-domain configuration
- JSP return Jasper Exceptions on my friend's pc's when it works on mine
Related Questions in INTELLIJ-IDEA
- How to Enable MultiDex Support in Intellij IDEA
- Where has "Show Type Info on Mouse Motion" gone in Intellij 14
- Simple JavaEE HTML GET/POST application
- Behaviour Difference: Intellij vs Eclipse
- IntelliJ warns "Cannot resolve variable" on EL variables declared in parent page of include
- Perforce workspaces and multiple branches
- How to invoke method/constructor parameter hint in IntelliJ?
- Breakpoint "concurrency" in Intellij
- How do I install Intellij on Ubuntu 15.04?
- How to disable Code Completion in Android Studio?
- How to unchain my program?
- How can I debug scala.js unit tests?
- Weblogic 12c web application not start properly after server reboot
- What is the principle of IntelliJ IDEA's remote debug?
- Node.js setup on Intellij Idea
Related Questions in TOMCAT7
- ClassNotFoundException: com.ibm.mq.jms.MQConnectionFactory (Websphere MQ 7.5 + spring jms + maven tomcat 7 plugin)
- swagger ui not working for swagger version 2
- Tomcat Manager is not accessible in multi-domain configuration
- Tomcat LDAP User Auth
- Error creating .war file
- Eclipse & Tomcat - Class loading
- Getting EOFException with embeded tomcat 7
- Tomcat7 not starting successfully
- OpenShift - Tomcat 7 (JBoss EWS 2.0) + PostgreSQL 9.2 + Hibernate 4.3.5
- Apache Tomcat 7 -Parameters lost
- JFileChooser not opening on tomcat server but it opens when it runs using eclipse
- how do I configure Apache 2.4 to have a domain name poiting to my webapp
- Apache tomcat issue with Eclipse dynamic web module 3.0
- Tomcat 7 PermGen Space or Failed to Create JVM
- reg add invalid syntax cmd
Related Questions in WICKET
- Updating the message contents for a MessageDialog wicket
- Wicket - AjaxEventBehavior not rendered properly
- disable/enable text boxes by using wicket
- How to setHeader in ResourceStreamRequestHandler#configure(..) (migration issue)
- How to get all FeedbackMessages from components inside specific form?
- I would like to implement pagination in Wicket
- IE10 - Atmosphere Unsubscribed when AJAX Call Made
- How to change all component values of parent panel on change of child panel in wicket
- Wicket AutoCompleteTextField (both kinds) have bugs when in ModalWindows
- FileUploadField constructor in wicket 6
- Wicket Modal Window, any way to close it if i click outside of the modal window?
- Wicket: Get Browser Information
- Wicket AuthenticatedWebApplication do not allow to be Signed In from different accounts on the same computer
- How do I get to the raw http headers (for basic authentication) with Wicket (Java)?
- Wildfly 8.2 on Openshift: plain text response instead of html on page reload
Related Questions in WICKET-1.5
- How to setHeader in ResourceStreamRequestHandler#configure(..) (migration issue)
- Changing textfield between enabled and disabled
- Initialization of required DropDownChoices and null value
- How to deploy tomcat/webapps folder from IntellijIDEA
- How can I override the render strategy for a specific page in wicket
- Can the headers of an AjaxFallbackDefaultDataTable be updated via AJAX?
- How to redirect to another page while keeping the original url?
- Any purpose of using a LoadableDetachableModel in a DataProvider?
- Wicket manipulate javascript import order
- Can someone let me know the approach for Mega Menu implementation in wicket . I mean how i should design
- Wicket DropDownChoice setting model value
- Wicket serialization/deserialization issue
- How to use Spring Roo with Apache Wicket?
- Page limitation AjaxPagingNavigator?
- Wicket "nullable" component view
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

Ok. Let's try.
1) Create IntellijIdea project via WebApplication template. Idea should be Ultimate version, not Community edition
2) Go to Run-Edit configutaion and set up Tomcat location folder, so Idea will know about your tomcat server
3) Go to Deployment tab and select Artifact. Apply
4) In src folder put your servlet (you can try my example for testing purpose)
5) Go to web.xml file and link your's servlet like this
6) In web folder put your's .jsp files (for example hey.jsp)
7) Now you can start you app via IntellijIdea. Run(Shift+F10) and enjoy your app in browser:
- to jsp files: http://localhost:8080/hey.jsp (or index.jsp by default)
- to servlets via virtual link you set in web.xml : http://localhost:8080/st