This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178664 - Invalid URL in web application project properties
Summary: Invalid URL in web application project properties
Status: RESOLVED FIXED
Alias: None
Product: javacard
Classification: Unclassified
Component: Java Card (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: J Bachorik
URL:
Keywords:
: 178433 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-15 07:18 UTC by dkuzmin
Modified: 2012-04-25 09:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dkuzmin 2009-12-15 07:18:59 UTC
Create new web application, open properties, section "run". By default second option is selected for URL to be opened, "page". Value is "/index.html". "Resulting URL" in the bottom of the page is:

http://localhost:8019/index.html

When application is started URL used is:

http://localhost:8019//webapplication/index.html

So, "resulting URL" shown in project properties is wrong. Also, there is extra "/" in real URL.

Build used is #137.
Comment 1 _ tboudreau 2010-04-01 07:05:41 UTC
*** Bug 178433 has been marked as a duplicate of this bug. ***
Comment 2 msmirnov 2010-04-02 14:44:37 UTC
This issue affects HttpSession functionality in web applications. E.g. if you have a servlet with the following code in doGet:

public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws IOException {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        try {
            out.println("<html><head><title>WebApplication1</title></head>");
            out.println("<body><h1>WebApplication1</h1>");
            HttpSession session = request.getSession();
            out.println("Session ID: " + session.getId());
            out.println("</body></html>");
        } finally {
            out.close();
        }
    }

and run your web application from NetBeans (Servlet option is chosen on Run tab of Project Properties) then each time you refresh a web page with URL: 
   http://localhost:8025//webapplication1/webapplication1 
new sessionID will be displayed. This means that you can't save any attributes in HttpSession object. Otherwise if you manually type correct URL:
   http://localhost:8025/webapplication1/webapplication1 
then sessionID will be the same after each Refresh action.
Comment 3 _ tboudreau 2011-05-26 01:59:31 UTC
Reassigning a bunch of bugs still assigned to me - I haven't worked for Oracle in almost a year.
Comment 4 _ tboudreau 2011-05-26 02:44:47 UTC
Uy... I *am* the default assignee for javacard...
Comment 5 J Bachorik 2012-04-24 09:19:27 UTC
fixed in http://hg.netbeans.org/profiler-main/rev/96320b449f54
Comment 6 Quality Engineering 2012-04-25 09:58:33 UTC
Integrated into 'main-golden', will be available in build *201204250400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/96320b449f54
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #178664: Fixing computation of URL for JavaCard WebProject properties