You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kshitiz <k....@gmail.com> on 2013/02/12 07:37:03 UTC

Using tomcat server in wicket application

Hi,

I have a wicket application running fine using Jetty server. But I need to
deploy the application in tomcat server. As tomcat is not able to find
appropiate resources, how to configure my application to make it compatible
for tomcat? 



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-tomcat-server-in-wicket-application-tp4656251.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using tomcat server in wicket application

Posted by Martin Grigorov <mg...@apache.org>.
On Sun, Feb 17, 2013 at 10:16 PM, kshitiz <k....@gmail.com> wrote:

> I found the reason of my cause which is perhaps a very stupid one. Posting
> the answer in case any one find himself in the same trouble. There was no
> web.xml file in web-inf folder of webContent. Tomcat was not able to find
> the file and so was throwing error. Quickstart does not place web.xml in
> that folder as it structures the project as per jetty server.
>

It is not "per Jetty server".
src/main/webapp is the standard folder where WEB-INF/ is in Maven-like
projects (Gradle, SBT, Buildr also use this as default).
'webContent' is what your IDE uses as a folder for all web resources. This
differs for every IDE.

In the end all that matters is the built .war file. I recommend you to get
familiar with its structure.


>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Using-tomcat-server-in-wicket-application-tp4656251p4656450.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: Using tomcat server in wicket application

Posted by kshitiz <k....@gmail.com>.
I found the reason of my cause which is perhaps a very stupid one. Posting
the answer in case any one find himself in the same trouble. There was no
web.xml file in web-inf folder of webContent. Tomcat was not able to find
the file and so was throwing error. Quickstart does not place web.xml in
that folder as it structures the project as per jetty server.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-tomcat-server-in-wicket-application-tp4656251p4656450.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using tomcat server in wicket application

Posted by kshitiz <k....@gmail.com>.
There is one thing that is bothering though is while the command is running
but when I try to execute the project in eclipse directly using tomcat, the
application does not run. It shows the same error requested resource is not
available. Can anyone tell me how to make it happen? This is required as I
have to deploy it in Openshift where it will be executed directly with name
ROOT.war.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-tomcat-server-in-wicket-application-tp4656251p4656268.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using tomcat server in wicket application

Posted by kshitiz <k....@gmail.com>.
I found the solution...it can be found in 
http://stackoverflow.com/questions/5070517/bare-metal-wicket-tomcat-helloworld-example
<http://stackoverflow.com/questions/5070517/bare-metal-wicket-tomcat-helloworld-example> 
. All you need to do is execute $ mvn tomcat:run command in project folder.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-tomcat-server-in-wicket-application-tp4656251p4656259.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using tomcat server in wicket application

Posted by kshitiz <k....@gmail.com>.
All the things are there...there are automatically present when we create
project using  http://wicket.apache.org/start/quickstart.html
<http://wicket.apache.org/start/quickstart.html>  .

I am running the project by right clicking the project in eclipse, selecting
run as option and selecting tomcat 7.0. But the error I am getting is:

HTTP Status 404 - /walknshine/

type Status report

message /walknshine/

description The requested resource is not available.

walknshine is the name of the project. Even if you create the project using
quickstart and then run the project using tomcat server, it will display the
same error. I have tried many times :( 



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-tomcat-server-in-wicket-application-tp4656251p4656258.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using tomcat server in wicket application

Posted by Francois Meillet <fr...@gmail.com>.
1) You neeed to insert this lines in your web.xml

 <filter>
        <filter-name>WicketFilter</filter-name>
        <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
        <init-param>
            <param-name>applicationClassName</param-name>
            <param-value>yourpackages.WicketApplication</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>WicketFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>


2) in your applicationClassName, here yourpackages.WicketApplication, you need to override getHomePage()

    public Class<? extends Page> getHomePage() {
        return HomePage.class;
    }



Francois Meillet
Formation & Développement Wicket 




Le 12 févr. 2013 à 08:01, kshitiz <k....@gmail.com> a écrit :

> I mean when I run application using run as "tomcat server", the server is not
> able find the first page it should look for. Now in wicket,
> WicketApplication class carries a method where we describes the first page
> and jetty server takes up that but not tomcat server.
> 
> I just want to understand how to run wicket application (which has been
> created using commands in wicket site) on tomcat server? How to configure it
> for the giver purpose?
> 
> 
> 
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-tomcat-server-in-wicket-application-tp4656251p4656253.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


Re: Using tomcat server in wicket application

Posted by kshitiz <k....@gmail.com>.
I mean when I run application using run as "tomcat server", the server is not
able find the first page it should look for. Now in wicket,
WicketApplication class carries a method where we describes the first page
and jetty server takes up that but not tomcat server.

I just want to understand how to run wicket application (which has been
created using commands in wicket site) on tomcat server? How to configure it
for the giver purpose?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-tomcat-server-in-wicket-application-tp4656251p4656253.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using tomcat server in wicket application

Posted by Francois Meillet <fr...@gmail.com>.
what do you mean by not able to find appropriate resource ?


Francois Meillet
AtomicThread 
Formation & Développement Wicket 



Le 12 févr. 2013 à 07:37, kshitiz <k....@gmail.com> a écrit :

> Hi,
> 
> I have a wicket application running fine using Jetty server. But I need to
> deploy the application in tomcat server. As tomcat is not able to find
> appropiate resources, how to configure my application to make it compatible
> for tomcat? 
> 
> 
> 
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-tomcat-server-in-wicket-application-tp4656251.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>