• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Two welcome files in struts application

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

I have a customer care application which is accessed by http://servername/customercare/ - this displays the login page.

However, I need an additional login-page. This page is called kslogon.jsp. I have created it and put it into the same folder as the index.jsp.
But I am not able to make the server display this page - not even when I use the absolute path. What am I missing?


This is an exerpt from the web.xml:
<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>customercare/index.jsp</welcome-file>
<welcome-file>customercare/kslogon.jsp</welcome-file>
</welcome-file-list>

Please - I do need urgent help.
Kind regards
Ingrid Morterud

 
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ingrid, welcome to javaranch.

Ingrid is customercare the context path of your application?? Also are index.jsp and kslogon.jsp in the cutomercare folder in your application?? If the two JSP pages are at the root folder in your application and customercare is context path of your application, then you'll have to change the <welcome-file> elements and remove customercare/ from them. This doesn't mean that the server will display kslogon.jsp when you type http://servername/customercare/ in the browser, as the first welcome file is index.jsp, so it will be served to the browser if it is available.

Now this question doesn't seem to be concerned with Struts to me, as your problem is about welcome files and not struts.

I do need urgent help


Please read this...
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In web.xml you have coded:


When your application opens it selects the options from welcome file list and displays the first found View page (customercare/index.jsp in your case). kslogon.jsp will never show up until and unless you delete the index.jsp from your application considering the fact that web.xml do not change.

What you can do is add a link in index.jsp for kslogin.jsp.

Hope that helps.

Thanks,
Vikash Anand.
 
Ingrid Morterud
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Both index.jsp and kslogon.jsp is in the customercare folder in my application.

Do I understand you correctly if you by this are telling me you can only have one welcome page in the application?

If that is the case, can you please tell me what to do - I have two different sets of customers and they need two different logon pages. I thought that it would be possible to do it this way, but if there can only be one welcome page - then how can I solve this problem?

Thanks in advance.
Ingrid
 
Vikash Ananda
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Yes application can have only one initial page i.e. index page (name doesn't matter).

If you have requirement of having 2 index pages then ask two sets of customers to login using

http://servername/customercare/index.jsp
and
http://servername/customercare/kmlogin.jsp

instead of
http://servername/customercare/

else read my comment to add a link to different page in your existing index.jsp
 
Ingrid Morterud
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is exactly what I am trying to do.
I have now also tried to delete the welcome-file entries in the web.xml file.

However, when I try to access the kslogon.jsp file - I get an 404 or 505 error.

This is what my log says.

####<Jan 22, 2010 1:16:51 PM CET> <Warning> <J2EE> <herbert2.mobil.telenor.no> <systest2> <ExecuteThread: '3' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <> <BEA-160082> <There was an error while making the initial connection to the JMS resource named mqseries.QCF from the EJB "S212MessageEJB" inside application "platform". The server will attempt the connection again later. The error was com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager 'MQMCT' with connection mode 'Bindings' and host name 'localhost'. Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.>
####<Jan 22, 2010 1:17:01 PM CET> <Info> <HTTP> <herbert2.mobil.telenor.no> <systest2> <ExecuteThread: '98' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-101047> <[ServletContext(id=14572016,name=customercare,context-path=/customercare)] resolved taglib uri '/WEB-INF/struts-bean.tld' to taglib-location /WEB-INF/struts-bean.tld:>
####<Jan 22, 2010 1:17:01 PM CET> <Info> <HTTP> <herbert2.mobil.telenor.no> <systest2> <ExecuteThread: '98' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-101047> <[ServletContext(id=14572016,name=customercare,context-path=/customercare)] resolved taglib uri '/WEB-INF/struts-html.tld' to taglib-location /WEB-INF/struts-html.tld:>
####<Jan 22, 2010 1:17:01 PM CET> <Info> <HTTP> <herbert2.mobil.telenor.no> <systest2> <ExecuteThread: '98' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-101047> <[ServletContext(id=14572016,name=customercare,context-path=/customercare)] Generated java file: /app/mCommerce/nodemanager/./systest2/.wlnotdelete/extract/systest2_customercare_customercare/jsp_servlet/_customercare/__kslogon.java>


I still don't understand what the problem is.

Ingrid
 
Vikash Ananda
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that there is some problem in your JSP file.

Validate that struts-bean and struts-html is properly imported in kslogin.jsp page.

or there may be some JMS issue. I may not be able to help with JMS/EJB issues.
 
reply
    Bookmark Topic Watch Topic
  • New Topic