Link to home
Start Free TrialLog in
Avatar of aentice
aentice

asked on

a href link in JSP

I'm just learning JSP and I have a simple problem, how can I create a link.
This is part of a left menu that is suppose to link to a different page.
<A HREF="<%= PMPage.jsp %>" style="text-decoration:none" class="A">PARK</a>
Avatar of mrcoffee365
mrcoffee365
Flag of United States of America image

Do you mean that you want the link to go to PMPage.jsp ?  Then it should be a normal url:

<A HREF="PMPage.jsp" style="text-decoration:none" class="A">PARK</a>

Avatar of aentice
aentice

ASKER

I had it initially that way, but doesn't work. If I try Park/PMPage.jsp
Here's how my folder looks like:
TESTWEB
   WebContent
     images
     Park
        PMpage.jsp
     Web-INF
        LeftMenu.jsp
        main.jsp
Then it looks as if your URL is wrong.

where does your Web app start?  If it's the WebContent directory, then your url should be
/Park/PMpage.jsp -- notice that you're spelling it wrong, too, if the latest post is correct.  If the file is PMpage.jsp, then PMPage.jsp will not exist.
Avatar of aentice

ASKER

I tried that too. When I add /Park/PMpage.jsp the link becomes Park/Park/PMPage.jsp instead to just one Park it becomes 2.
Avatar of aentice

ASKER

I tried one that worked, but it should not be done this way. I moved the page under WEB-INF and mixed it together with the other pages, it seems like it cannot find the Park folder and I'm not sure how the structure works.
ASKER CERTIFIED SOLUTION
Avatar of mrcoffee365
mrcoffee365
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
check you context root in ear.
add context root to jsp path