This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JForum and the fly likes changing URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "changing URL" Watch "changing URL" New topic
Author

changing URL

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
i installed JForum under: http://test/jforum. Now i want to change the URL to: http://test/testforum. What do i need to change to do this?
[originally posted on jforum.net by balakiran]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
What are you using as a servlet container? Tomcat, Resin, etc....
[originally posted on jforum.net by Taboo]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
You should change the context mapping name. If you are using Tomcat, this is specified by the attribute "path" of tha tag <Context>, like



Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
i'm using JRun4. i changed the following:

web.xml:
<!-- <servlet-name>jforum</servlet-name> -->
<servlet-name>forums</servlet-name>
<servlet-mapping>
<!-- <servlet-name>jforum</servlet-name> -->
<servlet-name>forums</servlet-name>

jrun-web.xml:
<!-- <context-root>/jforum</context-root> -->
<context-root>/forums</context-root>

Then, recycled the server. If I access http://mysite/forums, it says "Not Found

The requested URL /forums was not found on this server."

if i access the old URL, http://mysite/jforum, it shows JRUN default 404 page.

What could be wrong here?

[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
the above post was from me
[originally posted on jforum.net by balakiran]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
hehe.. I removed jrun two or three days ago from my machine. I'm not sure, but if you change the *directory* name, it will not work as expected? (considering that hot deploy will register the webapp as the name of the directory)

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
My current Jforum directory is here: /opt/jrun4/servers/news/JForum-2.1.4/

In my jrun-web.xml file, I have context root set to: /jforum (when i installed it). i changed it to: /forum, pointing the base to: /opt/jrun4/servers/news/JForum-2.1.4/

ANy help is appreciated.


[originally posted on jforum.net by balakiran]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
do i have to reinstall everything? why its not working when i change the contextroot?
[originally posted on jforum.net by balakiran]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Sorry for not helping on this issue. I simple don't know how JRun works.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
hi Rafael, can I get your MSN/yahoo messenger id?
[originally posted on jforum.net by balakiran]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Try in the profile page
[originally posted on jforum.net by GreenEyed]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: changing URL
 
Similar Threads
The First Steps.. you start here
returnUrl incorrect
New Installation
install problems
JForum new user creation